summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs.c10
-rw-r--r--apps/codecs.h16
-rw-r--r--apps/codecs/aiff_enc.c31
-rw-r--r--apps/codecs/mp3_enc.c31
-rw-r--r--apps/codecs/wav_enc.c31
-rw-r--r--apps/codecs/wavpack_enc.c31
6 files changed, 2 insertions, 148 deletions
diff --git a/apps/codecs.c b/apps/codecs.c
index 9969b6f597..dfae463865 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -131,7 +131,6 @@ struct codec_api ci = {
enc_set_parameters,
enc_get_chunk,
enc_finish_chunk,
- enc_pcm_buf_near_empty,
enc_get_pcm_data,
enc_unget_pcm_data,
@@ -141,15 +140,6 @@ struct codec_api ci = {
(read_func)read,
PREFIX(lseek),
(write_func)write,
-
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-#ifdef CPU_BOOST_LOGGING
- cpu_boost_,
-#else
- cpu_boost,
-#endif
-#endif
-
round_value_to_list32,
#endif
diff --git a/apps/codecs.h b/apps/codecs.h
index 29ed2d351b..ad6b831b61 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -80,12 +80,12 @@
#define CODEC_ENC_MAGIC 0x52454E43 /* RENC */
/* increase this every time the api struct changes */
-#define CODEC_API_VERSION 21
+#define CODEC_API_VERSION 22
/* update this to latest version if a change to the api struct breaks
backwards compatibility (and please take the opportunity to sort in any
new function which are "waiting" at the end of the function table) */
-#define CODEC_MIN_API_VERSION 18
+#define CODEC_MIN_API_VERSION 22
/* codec return codes */
enum codec_status {
@@ -200,7 +200,6 @@ struct codec_api {
void (*enc_set_parameters)(struct enc_parameters *params);
struct enc_chunk_hdr * (*enc_get_chunk)(void);
void (*enc_finish_chunk)(void);
- int (*enc_pcm_buf_near_empty)(void);
unsigned char * (*enc_get_pcm_data)(size_t size);
size_t (*enc_unget_pcm_data)(size_t size);
@@ -210,21 +209,10 @@ struct codec_api {
ssize_t (*read)(int fd, void* buf, size_t count);
off_t (*PREFIX(lseek))(int fd, off_t offset, int whence);
ssize_t (*write)(int fd, const void* buf, size_t count);
-
- /* Encoder codecs adjust CPU boost themselves */
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-#ifdef CPU_BOOST_LOGGING
- void (*cpu_boost_)(bool on_off,char*location,int line);
-#else
- void (*cpu_boost)(bool on_off);
-#endif
-#endif
-
int (*round_value_to_list32)(unsigned long value,
const unsigned long list[],
int count,
bool signd);
-
#endif
/* new stuff at the end, sort into place next time
diff --git a/apps/codecs/aiff_enc.c b/apps/codecs/aiff_enc.c
index 51c4344702..749c3a13a1 100644
--- a/apps/codecs/aiff_enc.c
+++ b/apps/codecs/aiff_enc.c
@@ -304,9 +304,6 @@ static bool init_encoder(void)
ci->enc_set_parameters == NULL ||
ci->enc_get_chunk == NULL ||
ci->enc_finish_chunk == NULL ||
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->enc_pcm_buf_near_empty == NULL ||
-#endif
ci->enc_get_pcm_data == NULL )
return false;
@@ -334,10 +331,6 @@ static bool init_encoder(void)
/* main codec entry point */
enum codec_status codec_main(void)
{
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- bool cpu_boosted;
-#endif
-
if (!init_encoder())
{
ci->enc_codec_loaded = -1;
@@ -347,11 +340,6 @@ enum codec_status codec_main(void)
/* main application waits for this flag during encoder loading */
ci->enc_codec_loaded = 1;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->cpu_boost(true);
- cpu_boosted = true;
-#endif
-
/* main encoding loop */
while(!ci->stop_encoder)
{
@@ -364,13 +352,6 @@ enum codec_status codec_main(void)
if (ci->stop_encoder)
break;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (!cpu_boosted && ci->enc_pcm_buf_near_empty() == 0)
- {
- ci->cpu_boost(true);
- cpu_boosted = true;
- }
-#endif
chunk = ci->enc_get_chunk();
chunk->enc_size = enc_size;
chunk->num_pcm = PCM_SAMP_PER_CHUNK;
@@ -382,21 +363,9 @@ enum codec_status codec_main(void)
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted && ci->enc_pcm_buf_near_empty() != 0)
- {
- ci->cpu_boost(false);
- cpu_boosted = false;
- }
-#endif
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted) /* set initial boost state */
- ci->cpu_boost(false);
-#endif
-
/* reset parameters to initial state */
ci->enc_set_parameters(NULL);
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index 1ec41ad45e..2dc9bcbb3d 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -2423,9 +2423,6 @@ static bool enc_init(void)
ci->enc_set_parameters == NULL ||
ci->enc_get_chunk == NULL ||
ci->enc_finish_chunk == NULL ||
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->enc_pcm_buf_near_empty == NULL ||
-#endif
ci->enc_get_pcm_data == NULL ||
ci->enc_unget_pcm_data == NULL )
return false;
@@ -2461,10 +2458,6 @@ static bool enc_init(void)
enum codec_status codec_main(void)
{
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- bool cpu_boosted;
-#endif
-
/* Generic codec initialisation */
if (!enc_init())
{
@@ -2475,11 +2468,6 @@ enum codec_status codec_main(void)
/* main application waits for this flag during encoder loading */
ci->enc_codec_loaded = 1;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->cpu_boost(true);
- cpu_boosted = true;
-#endif
-
/* main encoding loop */
while (!ci->stop_encoder)
{
@@ -2492,13 +2480,6 @@ enum codec_status codec_main(void)
if (ci->stop_encoder)
break;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (!cpu_boosted && ci->enc_pcm_buf_near_empty() == 0)
- {
- ci->cpu_boost(true);
- cpu_boosted = true;
- }
-#endif
chunk = ci->enc_get_chunk();
chunk->enc_data = ENC_CHUNK_SKIP_HDR(chunk->enc_data, chunk);
@@ -2515,21 +2496,9 @@ enum codec_status codec_main(void)
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted && ci->enc_pcm_buf_near_empty())
- {
- ci->cpu_boost(false);
- cpu_boosted = false;
- }
-#endif
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted) /* set initial boost state */
- ci->cpu_boost(false);
-#endif
-
/* reset parameters to initial state */
ci->enc_set_parameters(NULL);
diff --git a/apps/codecs/wav_enc.c b/apps/codecs/wav_enc.c
index eb43f8b240..25d2838e7d 100644
--- a/apps/codecs/wav_enc.c
+++ b/apps/codecs/wav_enc.c
@@ -291,9 +291,6 @@ static bool init_encoder(void)
ci->enc_set_parameters == NULL ||
ci->enc_get_chunk == NULL ||
ci->enc_finish_chunk == NULL ||
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->enc_pcm_buf_near_empty == NULL ||
-#endif
ci->enc_get_pcm_data == NULL )
return false;
@@ -321,10 +318,6 @@ static bool init_encoder(void)
/* main codec entry point */
enum codec_status codec_main(void)
{
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- bool cpu_boosted;
-#endif
-
if (!init_encoder())
{
ci->enc_codec_loaded = -1;
@@ -334,11 +327,6 @@ enum codec_status codec_main(void)
/* main application waits for this flag during encoder loading */
ci->enc_codec_loaded = 1;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->cpu_boost(true);
- cpu_boosted = true;
-#endif
-
/* main encoding loop */
while(!ci->stop_encoder)
{
@@ -351,13 +339,6 @@ enum codec_status codec_main(void)
if (ci->stop_encoder)
break;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (!cpu_boosted && ci->enc_pcm_buf_near_empty() == 0)
- {
- ci->cpu_boost(true);
- cpu_boosted = true;
- }
-#endif
chunk = ci->enc_get_chunk();
chunk->enc_size = enc_size;
chunk->num_pcm = PCM_SAMP_PER_CHUNK;
@@ -369,21 +350,9 @@ enum codec_status codec_main(void)
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted && ci->enc_pcm_buf_near_empty() != 0)
- {
- ci->cpu_boost(false);
- cpu_boosted = false;
- }
-#endif
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted) /* set initial boost state */
- ci->cpu_boost(false);
-#endif
-
/* reset parameters to initial state */
ci->enc_set_parameters(NULL);
diff --git a/apps/codecs/wavpack_enc.c b/apps/codecs/wavpack_enc.c
index cf58a5973a..70261e70e2 100644
--- a/apps/codecs/wavpack_enc.c
+++ b/apps/codecs/wavpack_enc.c
@@ -343,9 +343,6 @@ static bool init_encoder(void)
ci->enc_set_parameters == NULL ||
ci->enc_get_chunk == NULL ||
ci->enc_finish_chunk == NULL ||
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->enc_pcm_buf_near_empty == NULL ||
-#endif
ci->enc_get_pcm_data == NULL ||
ci->enc_unget_pcm_data == NULL )
return false;
@@ -386,10 +383,6 @@ static bool init_encoder(void)
enum codec_status codec_main(void)
{
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- bool cpu_boosted;
-#endif
-
/* initialize params and config */
if (!init_encoder())
{
@@ -400,11 +393,6 @@ enum codec_status codec_main(void)
/* main application waits for this flag during encoder loading */
ci->enc_codec_loaded = 1;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- ci->cpu_boost(true);
- cpu_boosted = true;
-#endif
-
/* main encoding loop */
while(!ci->stop_encoder)
{
@@ -422,13 +410,6 @@ enum codec_status codec_main(void)
abort_chunk = true;
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (!cpu_boosted && ci->enc_pcm_buf_near_empty() == 0)
- {
- ci->cpu_boost(true);
- cpu_boosted = true;
- }
-#endif
chunk = ci->enc_get_chunk();
/* reset counts and pointer */
@@ -472,21 +453,9 @@ enum codec_status codec_main(void)
}
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted && ci->enc_pcm_buf_near_empty() != 0)
- {
- ci->cpu_boost(false);
- cpu_boosted = false;
- }
-#endif
ci->yield();
}
-#ifdef HAVE_ADJUSTABLE_CPU_FREQ
- if (cpu_boosted) /* set initial boost state */
- ci->cpu_boost(false);
-#endif
-
/* reset parameters to initial state */
ci->enc_set_parameters(NULL);