diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-05-02 22:33:24 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-05-02 22:33:24 +0000 |
commit | 3c38fe420426695ae33b4f579eb283d95fc17f04 (patch) | |
tree | 8e630707768e021523fb171237fa5edd55c108d2 /firmware/sound.c | |
parent | aa220d5acdbfd8178580e7eb503c205406e2be74 (diff) | |
download | rockbox-3c38fe420426695ae33b4f579eb283d95fc17f04.tar.gz rockbox-3c38fe420426695ae33b4f579eb283d95fc17f04.zip |
Gigabeat: Separate driver for audio codec. Tweak pcm driver to comply with intended interface.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13307 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/sound.c')
-rw-r--r-- | firmware/sound.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/firmware/sound.c b/firmware/sound.c index 9835711b54..2589306290 100644 --- a/firmware/sound.c +++ b/firmware/sound.c @@ -64,7 +64,11 @@ static const struct sound_settings_info sound_settings_table[] = { [SOUND_TREBLE] = {"dB", 0, 2, 0, 6, 0, sound_set_treble}, #elif defined(HAVE_TLV320) [SOUND_VOLUME] = {"dB", 0, 1, -73, 6, -20, sound_set_volume}, -#elif defined(HAVE_WM8975) || defined(HAVE_WM8751) +#elif defined(HAVE_WM8751) + [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25, sound_set_volume}, + [SOUND_BASS] = {"dB", 1, 15, -60, 90, 0, sound_set_bass}, + [SOUND_TREBLE] = {"dB", 1, 15, -60, 90, 0, sound_set_treble}, +#elif defined(HAVE_WM8975) [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25, sound_set_volume}, [SOUND_BASS] = {"dB", 0, 1, -6, 9, 0, sound_set_bass}, [SOUND_TREBLE] = {"dB", 0, 1, -6, 9, 0, sound_set_treble}, @@ -514,8 +518,12 @@ void sound_set_bass(int value) mas_writereg(MAS_REG_KBASS, bass_table[value+15]); current_bass = value * 10; set_prescaled_volume(); +#elif defined(HAVE_WM8751) + current_bass = value; + audiohw_set_bass(value); + set_prescaled_volume(); #elif defined HAVE_WM8975 || defined HAVE_WM8758 || defined(HAVE_UDA1380) \ - || defined HAVE_WM8731 || defined(HAVE_WM8721) || defined(HAVE_WM8751) + || defined HAVE_WM8731 || defined(HAVE_WM8721) current_bass = value * 10; audiohw_set_bass(value); set_prescaled_volume(); @@ -540,8 +548,12 @@ void sound_set_treble(int value) mas_writereg(MAS_REG_KTREBLE, treble_table[value+15]); current_treble = value * 10; set_prescaled_volume(); +#elif defined(HAVE_WM8751) + audiohw_set_treble(value); + current_treble = value; + set_prescaled_volume(); #elif defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_UDA1380) \ - || defined(HAVE_WM8731) || defined(HAVE_WM8721) || defined(HAVE_WM8751) + || defined(HAVE_WM8731) || defined(HAVE_WM8721) audiohw_set_treble(value); current_treble = value * 10; set_prescaled_volume(); |