1
0
Fork 0
forked from len0rd/rockbox

[3/4] Completely remove HWCODEC support

'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
This commit is contained in:
Solomon Peachy 2020-07-17 00:01:32 -04:00
parent 0c4f89370d
commit 8cb555460f
207 changed files with 322 additions and 5594 deletions

View file

@ -91,11 +91,7 @@
#include "bookmark.h"
#include "wps.h"
#include "playback.h"
#if CONFIG_CODEC == SWCODEC
#include "voice_thread.h"
#else
#include "mp3_playback.h"
#endif
#ifdef BOOTFILE
#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) \
@ -302,7 +298,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
#endif
{
bool batt_safe = battery_level_safe();
#if CONFIG_CODEC != SWCODEC || defined(HAVE_RECORDING)
#if defined(HAVE_RECORDING)
int audio_stat = audio_status();
#endif
@ -339,19 +335,12 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY),
str(LANG_SHUTTINGDOWN));
}
#if CONFIG_CODEC != SWCODEC
if (global_settings.fade_on_stop
&& (audio_stat & AUDIO_STATUS_PLAY))
{
fade(false, false);
}
#endif
#ifdef HAVE_DISK_STORAGE
if (batt_safe) /* do not save on critical battery */
#endif
{
#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
#if defined(HAVE_RECORDING)
if (audio_stat & AUDIO_STATUS_RECORD)
{
rec_command(RECORDING_CMD_STOP);
@ -368,13 +357,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
if (callback != NULL)
callback(parameter);
#if CONFIG_CODEC != SWCODEC
/* wait for audio_stop or audio_stop_recording to complete */
while (audio_status())
sleep(1);
#endif
#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC
#if defined(HAVE_RECORDING)
audio_close_recording();
#endif
scrobbler_shutdown(true);
@ -403,9 +386,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter)
enqueue = true;
}
talk_id(LANG_SHUTTINGDOWN, enqueue);
#if CONFIG_CODEC == SWCODEC
voice_wait();
#endif
}
shutdown_hw();
@ -426,10 +407,6 @@ bool list_stop_handler(void)
{
if (!global_settings.party_mode)
{
#if CONFIG_CODEC != SWCODEC
if (global_settings.fade_on_stop)
fade(false, false);
#endif
bookmark_autobookmark(true);
audio_stop();
ret = true; /* bookmarking can make a refresh necessary */
@ -894,7 +871,6 @@ char *strip_extension(char* buffer, int buffer_size, const char *filename)
return buffer;
}
#if CONFIG_CODEC == SWCODEC
/* Play a standard sound */
void system_sound_play(enum system_sound sound)
{
@ -1046,7 +1022,6 @@ void replaygain_update(void)
settings.type = replaygain_setting_mode(settings.type);
dsp_replaygain_set_settings(&settings);
}
#endif /* CONFIG_CODEC == SWCODEC */
/* format a sound value like: -1.05 dB */
int format_sound_value(char *buf, size_t size, int snd, int val)