summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-01-30 21:12:31 +0000
committerDave Chapman <dave@dchapman.com>2006-01-30 21:12:31 +0000
commit5ffa8c52df2df1096c484efe6815ea8e8b548065 (patch)
treec9add96d65013bfced444a7b77f9c09b8dc785a4 /firmware/drivers
parent1a4ef4fc0aa7a6257995f5df51f686c726802e5b (diff)
downloadrockbox-5ffa8c52df2df1096c484efe6815ea8e8b548065.tar.gz
rockbox-5ffa8c52df2df1096c484efe6815ea8e8b548065.zip
iPod: Initial attempt at volume/bass/treble control - more work is needed, but it seems to be working.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8495 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/wm8975.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/firmware/drivers/wm8975.c b/firmware/drivers/wm8975.c
index 802bcfa72b..a817284406 100644
--- a/firmware/drivers/wm8975.c
+++ b/firmware/drivers/wm8975.c
@@ -196,14 +196,25 @@ int wm8975_set_mixer_vol(int channel1, int channel2)
196 return 0; 196 return 0;
197} 197}
198 198
199/* We are using Linear bass control */
199void wm8975_set_bass(int value) 200void wm8975_set_bass(int value)
200{ 201{
201 (void)value; 202 int regvalues[]={11, 10, 10, 9, 8, 8, 0xf , 6, 6, 5, 4, 4, 3, 2, 1, 0};
203
204 if ((value >= -6) && (value <= 9)) {
205 /* We use linear bass control with 130Hz cutoff */
206 ipod_i2c_send(0x1a, 0x0c << 1, regvalues[value+6]);
207 }
202} 208}
203 209
204void wm8975_set_treble(int value) 210void wm8975_set_treble(int value)
205{ 211{
206 (void)value; 212 int regvalues[]={11, 10, 10, 9, 8, 8, 0xf , 6, 6, 5, 4, 4, 3, 2, 1, 0};
213
214 if ((value >= -6) && (value <= 9)) {
215 /* We use a 8Khz cutoff */
216 ipod_i2c_send(0x1a, 0x0d << 1, regvalues[value+6]);
217 }
207} 218}
208 219
209int wm8975_mute(int mute) 220int wm8975_mute(int mute)