diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-01-14 12:38:40 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-01-14 12:38:40 +0000 |
commit | 72f1027b3edae94ad9962c654519c2cab8566078 (patch) | |
tree | be2a6f877292070bcea86882994a9e061e44504b /firmware/drivers | |
parent | a25fa2c6a67760c7fd59d9d3c23ca307c77630ba (diff) |
Enabled zero crossing detection for volume changes in the WM8721/WM8731 driver (iPod G3, iPod Mini G1/G2, Iriver H10).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12006 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/wm8731l.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/drivers/wm8731l.c b/firmware/drivers/wm8731l.c index 4f0f249149..62b1b6a81e 100644 --- a/firmware/drivers/wm8731l.c +++ b/firmware/drivers/wm8731l.c @@ -43,6 +43,9 @@ #define IPOD_PCM_LEVEL 0x65 /* -6dB */ +/* use zero crossing to reduce clicks during volume changes */ +#define VOLUME_ZC_WAIT (1<<7) + /* convert tenth of dB volume (-730..60) to master volume register value */ int tenthdb2master(int db) { @@ -159,8 +162,8 @@ int audiohw_set_master_vol(int vol_l, int vol_r) /* 0110000 == -73dB */ /* 0101111 == mute (0x2f) */ - wmcodec_write(LOUTVOL, vol_l); - wmcodec_write(ROUTVOL, vol_r); + wmcodec_write(LOUTVOL, VOLUME_ZC_WAIT | vol_l); + wmcodec_write(ROUTVOL, VOLUME_ZC_WAIT | vol_r); return 0; } |