diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2013-05-05 00:48:40 -0400 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2013-05-05 00:48:40 -0400 |
commit | 3fd25dcbed6ef964b828698facf6cc15189441ca (patch) | |
tree | 80638257c551d1d8b063dca5a894f72603dfb0e9 | |
parent | fd00d3cf4815e8a5bd5ec3df405e449b2bd0083a (diff) | |
download | rockbox-3fd25dc.tar.gz rockbox-3fd25dc.zip |
Purge the usage of DSP_SWITCH_FREQUENCY.
DSP_SWITCH_FREQUENCY has been deprecated and the same enumerated value
as DSP_SET_FREQUENCY since major DSP revisions were committed. This
task should have been performed much earlier but, oh well, do it now.
Change-Id: I3f30d651b894136a07c7e17f78fc16a7d98631ff
27 files changed, 27 insertions, 28 deletions
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index b00bf7a113..1c167ea2a2 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c @@ -621,7 +621,7 @@ static void audio_thread(void) if (frame.header.samplerate != td.samplerate) { td.samplerate = frame.header.samplerate; - rb->dsp_configure(td.dsp, DSP_SWITCH_FREQUENCY, + rb->dsp_configure(td.dsp, DSP_SET_FREQUENCY, td.samplerate); } diff --git a/lib/rbcodec/codecs/a52.c b/lib/rbcodec/codecs/a52.c index cb6e66dd05..77caaf87c1 100644 --- a/lib/rbcodec/codecs/a52.c +++ b/lib/rbcodec/codecs/a52.c @@ -142,7 +142,7 @@ enum codec_status codec_run(void) if (codec_init()) return CODEC_ERROR; - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); codec_set_replaygain(ci->id3); /* Intialise the A52 decoder and check for success */ diff --git a/lib/rbcodec/codecs/a52_rm.c b/lib/rbcodec/codecs/a52_rm.c index 2db126f5b1..42868437d8 100644 --- a/lib/rbcodec/codecs/a52_rm.c +++ b/lib/rbcodec/codecs/a52_rm.c @@ -157,7 +157,7 @@ enum codec_status codec_run(void) resume_offset = ci->id3->offset; - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); codec_set_replaygain(ci->id3); ci->seek_buffer(ci->id3->first_frame_offset); diff --git a/lib/rbcodec/codecs/aac.c b/lib/rbcodec/codecs/aac.c index 365dca804d..c9cf737b48 100644 --- a/lib/rbcodec/codecs/aac.c +++ b/lib/rbcodec/codecs/aac.c @@ -84,7 +84,7 @@ enum codec_status codec_run(void) file_offset = ci->id3->offset; - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); codec_set_replaygain(ci->id3); stream_create(&input_stream,ci); diff --git a/lib/rbcodec/codecs/adx.c b/lib/rbcodec/codecs/adx.c index 83ced5add0..8a56320787 100644 --- a/lib/rbcodec/codecs/adx.c +++ b/lib/rbcodec/codecs/adx.c @@ -218,7 +218,7 @@ enum codec_status codec_run(void) ci->set_elapsed(0); /* setup pcm buffer format */ - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (channels == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); } else if (channels == 1) { diff --git a/lib/rbcodec/codecs/aiff.c b/lib/rbcodec/codecs/aiff.c index 333bcd0455..3bedfa5760 100644 --- a/lib/rbcodec/codecs/aiff.c +++ b/lib/rbcodec/codecs/aiff.c @@ -234,7 +234,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (format.channels == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); diff --git a/lib/rbcodec/codecs/alac.c b/lib/rbcodec/codecs/alac.c index 144d796e5f..5eb6e001f7 100644 --- a/lib/rbcodec/codecs/alac.c +++ b/lib/rbcodec/codecs/alac.c @@ -64,7 +64,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); codec_set_replaygain(ci->id3); ci->seek_buffer(0); diff --git a/lib/rbcodec/codecs/ape.c b/lib/rbcodec/codecs/ape.c index ed6ea21685..577e7b65e2 100644 --- a/lib/rbcodec/codecs/ape.c +++ b/lib/rbcodec/codecs/ape.c @@ -200,7 +200,7 @@ enum codec_status codec_run(void) (ape_ctx.seektablefilepos + ape_ctx.numseekpoints * sizeof(uint32_t))); - ci->configure(DSP_SWITCH_FREQUENCY, ape_ctx.samplerate); + ci->configure(DSP_SET_FREQUENCY, ape_ctx.samplerate); ci->configure(DSP_SET_STEREO_MODE, ape_ctx.channels == 1 ? STEREO_MONO : STEREO_NONINTERLEAVED); codec_set_replaygain(ci->id3); diff --git a/lib/rbcodec/codecs/au.c b/lib/rbcodec/codecs/au.c index cb75c7423d..7ae7fe3e94 100644 --- a/lib/rbcodec/codecs/au.c +++ b/lib/rbcodec/codecs/au.c @@ -225,7 +225,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (format.channels == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); } else if (format.channels == 1) { diff --git a/lib/rbcodec/codecs/flac.c b/lib/rbcodec/codecs/flac.c index e8588d3c95..3c5545df08 100644 --- a/lib/rbcodec/codecs/flac.c +++ b/lib/rbcodec/codecs/flac.c @@ -476,7 +476,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); ci->configure(DSP_SET_STEREO_MODE, fc.channels == 1 ? STEREO_MONO : STEREO_NONINTERLEAVED); codec_set_replaygain(ci->id3); diff --git a/lib/rbcodec/codecs/mpa.c b/lib/rbcodec/codecs/mpa.c index f9bf7e600f..07db248099 100644 --- a/lib/rbcodec/codecs/mpa.c +++ b/lib/rbcodec/codecs/mpa.c @@ -342,7 +342,7 @@ enum codec_status codec_run(void) file_end = 0; - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); current_frequency = ci->id3->frequency; codec_set_replaygain(ci->id3); @@ -475,7 +475,7 @@ enum codec_status codec_run(void) /* Check if sample rate and stereo settings changed in this frame. */ if (frame.header.samplerate != current_frequency) { current_frequency = frame.header.samplerate; - ci->configure(DSP_SWITCH_FREQUENCY, current_frequency); + ci->configure(DSP_SET_FREQUENCY, current_frequency); } if (MAD_NCHANNELS(&frame.header) == 2) { if (current_stereo_mode != STEREO_NONINTERLEAVED) { diff --git a/lib/rbcodec/codecs/mpc.c b/lib/rbcodec/codecs/mpc.c index b2628f988e..9db40242dc 100644 --- a/lib/rbcodec/codecs/mpc.c +++ b/lib/rbcodec/codecs/mpc.c @@ -102,7 +102,7 @@ enum codec_status codec_run(void) byterate = (mpc_uint32_t)(info.average_bitrate) / 8; frequency = info.sample_freq / 100; /* 0.1 kHz accuracy */ - ci->configure(DSP_SWITCH_FREQUENCY, info.sample_freq); + ci->configure(DSP_SET_FREQUENCY, info.sample_freq); /* Remark: rockbox offset is the file offset in bytes. So, estimate the * sample seek position from the file offset, the sampling frequency and diff --git a/lib/rbcodec/codecs/raac.c b/lib/rbcodec/codecs/raac.c index 0ef7e715bc..523560b63e 100644 --- a/lib/rbcodec/codecs/raac.c +++ b/lib/rbcodec/codecs/raac.c @@ -79,7 +79,7 @@ enum codec_status codec_run(void) ci->seek_buffer(0); init_rm(&rmctx); - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); codec_set_replaygain(ci->id3); /* initialise the sound converter */ diff --git a/lib/rbcodec/codecs/shorten.c b/lib/rbcodec/codecs/shorten.c index a8ab3f30a0..aa4acdad4a 100644 --- a/lib/rbcodec/codecs/shorten.c +++ b/lib/rbcodec/codecs/shorten.c @@ -82,7 +82,7 @@ enum codec_status codec_run(void) } ci->id3->frequency = sc.sample_rate; - ci->configure(DSP_SWITCH_FREQUENCY, sc.sample_rate); + ci->configure(DSP_SET_FREQUENCY, sc.sample_rate); if (sc.sample_rate) { ci->id3->length = (sc.totalsamples / sc.sample_rate) * 1000; diff --git a/lib/rbcodec/codecs/sid.c b/lib/rbcodec/codecs/sid.c index 9b19a20ba7..1a6d04155d 100644 --- a/lib/rbcodec/codecs/sid.c +++ b/lib/rbcodec/codecs/sid.c @@ -1235,7 +1235,7 @@ enum codec_status codec_main(enum codec_entry_call_reason reason) { if (reason == CODEC_LOAD) { /* Make use of 44.1khz */ - ci->configure(DSP_SWITCH_FREQUENCY, SAMPLE_RATE); + ci->configure(DSP_SET_FREQUENCY, SAMPLE_RATE); /* Sample depth is 28 bit host endian */ ci->configure(DSP_SET_SAMPLE_DEPTH, 28); /* Mono output */ diff --git a/lib/rbcodec/codecs/smaf.c b/lib/rbcodec/codecs/smaf.c index 0203d1b4e3..d56aa0a860 100644 --- a/lib/rbcodec/codecs/smaf.c +++ b/lib/rbcodec/codecs/smaf.c @@ -394,7 +394,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (format.channels == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); diff --git a/lib/rbcodec/codecs/tta.c b/lib/rbcodec/codecs/tta.c index dda33b3f5e..564496a14e 100644 --- a/lib/rbcodec/codecs/tta.c +++ b/lib/rbcodec/codecs/tta.c @@ -67,7 +67,7 @@ enum codec_status codec_run(void) codec_set_replaygain(ci->id3); - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (info.NCH == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); } else if (info.NCH == 1) { diff --git a/lib/rbcodec/codecs/vorbis.c b/lib/rbcodec/codecs/vorbis.c index 944dd6d60c..c09d2cea6d 100644 --- a/lib/rbcodec/codecs/vorbis.c +++ b/lib/rbcodec/codecs/vorbis.c @@ -91,7 +91,7 @@ static bool vorbis_set_codec_parameters(OggVorbis_File *vf) return false; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); codec_set_replaygain(ci->id3); if (vi->channels == 2) { diff --git a/lib/rbcodec/codecs/vox.c b/lib/rbcodec/codecs/vox.c index 279d003162..66979e2911 100644 --- a/lib/rbcodec/codecs/vox.c +++ b/lib/rbcodec/codecs/vox.c @@ -119,7 +119,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); ci->configure(DSP_SET_STEREO_MODE, STEREO_MONO); /* make sure we're at the correct offset */ diff --git a/lib/rbcodec/codecs/wav.c b/lib/rbcodec/codecs/wav.c index d20331bc6c..cc65ab83b2 100644 --- a/lib/rbcodec/codecs/wav.c +++ b/lib/rbcodec/codecs/wav.c @@ -350,7 +350,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (format.channels == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); } else if (format.channels == 1) { diff --git a/lib/rbcodec/codecs/wav64.c b/lib/rbcodec/codecs/wav64.c index 184f39bf18..9b3b2d38e4 100644 --- a/lib/rbcodec/codecs/wav64.c +++ b/lib/rbcodec/codecs/wav64.c @@ -352,7 +352,7 @@ enum codec_status codec_run(void) return CODEC_ERROR; } - ci->configure(DSP_SWITCH_FREQUENCY, ci->id3->frequency); + ci->configure(DSP_SET_FREQUENCY, ci->id3->frequency); if (format.channels == 2) { ci->configure(DSP_SET_STEREO_MODE, STEREO_INTERLEAVED); } else if (format.channels == 1) { diff --git a/lib/rbcodec/codecs/wavpack.c b/lib/rbcodec/codecs/wavpack.c index 4d42391fc1..c0cdafabac 100644 --- a/lib/rbcodec/codecs/wavpack.c +++ b/lib/rbcodec/codecs/wavpack.c @@ -68,7 +68,7 @@ enum codec_status codec_run(void) if (!wpc) return CODEC_ERROR; - ci->configure(DSP_SWITCH_FREQUENCY, WavpackGetSampleRate (wpc)); + ci->configure(DSP_SET_FREQUENCY, WavpackGetSampleRate (wpc)); codec_set_replaygain(ci->id3); /* bps = WavpackGetBytesPerSample (wpc); */ nchans = WavpackGetReducedChannels (wpc); diff --git a/lib/rbcodec/codecs/wma.c b/lib/rbcodec/codecs/wma.c index 36e4285916..9039f81429 100755 --- a/lib/rbcodec/codecs/wma.c +++ b/lib/rbcodec/codecs/wma.c @@ -96,7 +96,7 @@ restart_track: ci->set_elapsed(elapsedtime); resume_offset = 0; - ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); + ci->configure(DSP_SET_FREQUENCY, wfx.rate); ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? STEREO_MONO : STEREO_NONINTERLEAVED); codec_set_replaygain(ci->id3); diff --git a/lib/rbcodec/codecs/wmapro.c b/lib/rbcodec/codecs/wmapro.c index bab3b5a027..d99ca1aa9e 100644 --- a/lib/rbcodec/codecs/wmapro.c +++ b/lib/rbcodec/codecs/wmapro.c @@ -65,7 +65,7 @@ restart_track: saves us from parsing it again here. */ memcpy(&wfx, ci->id3->toc, sizeof(wfx)); - ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); + ci->configure(DSP_SET_FREQUENCY, wfx.rate); ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? STEREO_MONO : STEREO_NONINTERLEAVED); codec_set_replaygain(ci->id3); diff --git a/lib/rbcodec/codecs/wmavoice.c b/lib/rbcodec/codecs/wmavoice.c index 9cf5a49f1a..214e0737e7 100644 --- a/lib/rbcodec/codecs/wmavoice.c +++ b/lib/rbcodec/codecs/wmavoice.c @@ -90,7 +90,7 @@ restart_track: memset(&avctx, 0, sizeof(AVCodecContext)); memset(&avpkt, 0, sizeof(AVPacket)); - ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); + ci->configure(DSP_SET_FREQUENCY, wfx.rate); ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? STEREO_MONO : STEREO_INTERLEAVED); codec_set_replaygain(ci->id3); diff --git a/lib/rbcodec/dsp/dsp_core.h b/lib/rbcodec/dsp/dsp_core.h index 713190debc..d3cfdd133c 100644 --- a/lib/rbcodec/dsp/dsp_core.h +++ b/lib/rbcodec/dsp/dsp_core.h @@ -35,7 +35,6 @@ enum dsp_settings DSP_INIT, /* For dsp_init */ DSP_RESET, DSP_SET_FREQUENCY, - DSP_SWITCH_FREQUENCY = DSP_SET_FREQUENCY, /* deprecated */ DSP_SET_SAMPLE_DEPTH, DSP_SET_STEREO_MODE, DSP_FLUSH, diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c index 93fe286f2d..6aabf95d17 100644 --- a/lib/rbcodec/test/warble.c +++ b/lib/rbcodec/test/warble.c @@ -577,7 +577,7 @@ static void ci_configure(int setting, intptr_t value) dsp_configure(ci.dsp, setting, value); } else { if (setting == DSP_SET_FREQUENCY - || setting == DSP_SWITCH_FREQUENCY) + || setting == DSP_SET_FREQUENCY) format.freq = value; else if (setting == DSP_SET_SAMPLE_DEPTH) format.depth = value; |