forked from len0rd/rockbox
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
This commit is contained in:
parent
f444b0ad32
commit
097d7fb689
1 changed files with 17 additions and 1 deletions
|
@ -319,6 +319,22 @@ void audiohw_set_recvol(int left, int right, int type)
|
||||||
|
|
||||||
void audiohw_set_monitor(bool enable)
|
void audiohw_set_monitor(bool enable)
|
||||||
{
|
{
|
||||||
(void)enable;
|
if (enable) {
|
||||||
|
// set volume to 0 dB
|
||||||
|
wm8975_regs[LOUTMIX1] &= ~LOUTMIX1_LI2LOVOL_MASK;
|
||||||
|
wm8975_regs[LOUTMIX1] |= LOUTMIX1_LI2LOVOL(2);
|
||||||
|
wm8975_regs[ROUTMIX2] &= ~ROUTMIX2_RI2ROVOL_MASK;
|
||||||
|
wm8975_regs[ROUTMIX2] |= ROUTMIX2_RI2ROVOL(2);
|
||||||
|
// set mux to line input
|
||||||
|
wm8975_write_and(LOUTMIX1, ~7);
|
||||||
|
wm8975_write_and(ROUTMIX1, ~7);
|
||||||
|
// enable bypass
|
||||||
|
wm8975_write_or(LOUTMIX1, LOUTMIX1_LI2LO);
|
||||||
|
wm8975_write_or(ROUTMIX2, ROUTMIX2_RI2RO);
|
||||||
|
} else {
|
||||||
|
// disable bypass
|
||||||
|
wm8975_write_and(LOUTMIX1, ~LOUTMIX1_LI2LO);
|
||||||
|
wm8975_write_and(ROUTMIX2, ~ROUTMIX2_RI2RO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif /* HAVE_RECORDING */
|
#endif /* HAVE_RECORDING */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue