summaryrefslogtreecommitdiff
path: root/lib/rbcodec/dsp/eq.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2012-12-19 17:34:57 -0500
committerMichael Sevakis <jethead71@rockbox.org>2013-05-04 13:43:33 -0400
commit78a45b47dede5ddf35dfc53e965b486a79177b18 (patch)
treeedb3ad7c101e600a7cc3be4b40380430cbeb3e55 /lib/rbcodec/dsp/eq.c
parentcdb71c707bb434f44368b72f2db3becc37b7a46c (diff)
downloadrockbox-78a45b47dede5ddf35dfc53e965b486a79177b18.tar.gz
rockbox-78a45b47dede5ddf35dfc53e965b486a79177b18.zip
Cleanup and simplify latest DSP code incarnation.
Some things can just be a bit simpler in handling the list of stages and some things, especially format change handling, can be simplified for each stage implementation. Format changes are sent through the configure() callback. Hide some internal details and variables from processing stages and let the core deal with it. Do some miscellaneous cleanup and keep things a bit better factored. Change-Id: I19dd8ce1d0b792ba914d426013088a49a52ecb7e
Diffstat (limited to 'lib/rbcodec/dsp/eq.c')
-rw-r--r--lib/rbcodec/dsp/eq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rbcodec/dsp/eq.c b/lib/rbcodec/dsp/eq.c
index d58f0959b2..372ef9bbad 100644
--- a/lib/rbcodec/dsp/eq.c
+++ b/lib/rbcodec/dsp/eq.c
@@ -156,8 +156,10 @@ static intptr_t eq_configure(struct dsp_proc_entry *this,
156 { 156 {
157 case DSP_PROC_INIT: 157 case DSP_PROC_INIT:
158 if (value != 0) 158 if (value != 0)
159 break; 159 break; /* Already enabled */
160 this->process[0] = eq_process; 160
161 this->process = eq_process;
162 /* Fall-through */
161 case DSP_PROC_CLOSE: 163 case DSP_PROC_CLOSE:
162 pga_enable_gain(PGA_EQ_PRECUT, setting == DSP_PROC_INIT); 164 pga_enable_gain(PGA_EQ_PRECUT, setting == DSP_PROC_INIT);
163 break; 165 break;
@@ -167,7 +169,7 @@ static intptr_t eq_configure(struct dsp_proc_entry *this,
167 break; 169 break;
168 } 170 }
169 171
170 return 1; 172 return 0;
171 (void)dsp; 173 (void)dsp;
172} 174}
173 175