diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2010-10-24 09:24:35 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2010-10-24 09:24:35 +0000 |
commit | 097d7fb689cc29bb58d13aec94e38b0b08fffb0e (patch) | |
tree | fdcf8fa138327fba859d1528d08bb87c8dba4c46 | |
parent | f444b0ad32317f00636c15891eb8c251875679b5 (diff) | |
download | rockbox-097d7fb689cc29bb58d13aec94e38b0b08fffb0e.tar.gz rockbox-097d7fb689cc29bb58d13aec94e38b0b08fffb0e.zip |
Fix FS#11559 - no sound from ipod fm remote on ipod nano 1g.
This fix implements audiohw_set_monitor for the wm8975 codec (used in ipod nano 1g, nano 2g, color, 4g)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28341 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/drivers/audio/wm8975.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/firmware/drivers/audio/wm8975.c b/firmware/drivers/audio/wm8975.c index 3fcb01e728..45fa3ffdd6 100644 --- a/firmware/drivers/audio/wm8975.c +++ b/firmware/drivers/audio/wm8975.c | |||
@@ -319,6 +319,22 @@ void audiohw_set_recvol(int left, int right, int type) | |||
319 | 319 | ||
320 | void audiohw_set_monitor(bool enable) | 320 | void audiohw_set_monitor(bool enable) |
321 | { | 321 | { |
322 | (void)enable; | 322 | if (enable) { |
323 | // set volume to 0 dB | ||
324 | wm8975_regs[LOUTMIX1] &= ~LOUTMIX1_LI2LOVOL_MASK; | ||
325 | wm8975_regs[LOUTMIX1] |= LOUTMIX1_LI2LOVOL(2); | ||
326 | wm8975_regs[ROUTMIX2] &= ~ROUTMIX2_RI2ROVOL_MASK; | ||
327 | wm8975_regs[ROUTMIX2] |= ROUTMIX2_RI2ROVOL(2); | ||
328 | // set mux to line input | ||
329 | wm8975_write_and(LOUTMIX1, ~7); | ||
330 | wm8975_write_and(ROUTMIX1, ~7); | ||
331 | // enable bypass | ||
332 | wm8975_write_or(LOUTMIX1, LOUTMIX1_LI2LO); | ||
333 | wm8975_write_or(ROUTMIX2, ROUTMIX2_RI2RO); | ||
334 | } else { | ||
335 | // disable bypass | ||
336 | wm8975_write_and(LOUTMIX1, ~LOUTMIX1_LI2LO); | ||
337 | wm8975_write_and(ROUTMIX2, ~ROUTMIX2_RI2RO); | ||
338 | } | ||
323 | } | 339 | } |
324 | #endif /* HAVE_RECORDING */ | 340 | #endif /* HAVE_RECORDING */ |