diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-09-28 23:25:07 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-09-28 23:25:07 +0000 |
commit | 11ef4ce1f9500ca1bd5651bc0e0dc49bf0dfbd2d (patch) | |
tree | 8cc9f49bcf015f1e06840179a29a6f2c1107000d /firmware/drivers/audio | |
parent | aa8a76b65971e3bad38fa30e39a0ad46f50ff77c (diff) | |
download | rockbox-11ef4ce1f9500ca1bd5651bc0e0dc49bf0dfbd2d.tar.gz rockbox-11ef4ce1f9500ca1bd5651bc0e0dc49bf0dfbd2d.zip |
Accept FS #9394 by Christian Lees and extend it to all PP targets with a WM8731: More samplerates for playback and recording. Only tested on H10 but should work on the others too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18662 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r-- | firmware/drivers/audio/wm8731.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/firmware/drivers/audio/wm8731.c b/firmware/drivers/audio/wm8731.c index a1149c3d2e..a895f4fd8b 100644 --- a/firmware/drivers/audio/wm8731.c +++ b/firmware/drivers/audio/wm8731.c | |||
@@ -223,8 +223,30 @@ void audiohw_set_nsorder(int order) | |||
223 | 223 | ||
224 | void audiohw_set_sample_rate(int sampling_control) | 224 | void audiohw_set_sample_rate(int sampling_control) |
225 | { | 225 | { |
226 | int rate = 0; | ||
227 | switch(sampling_control) | ||
228 | { | ||
229 | case SAMPR_96: | ||
230 | rate = WM8731_USB24_96000HZ; | ||
231 | break; | ||
232 | case SAMPR_88: | ||
233 | rate = WM8731_USB24_88200HZ; | ||
234 | break; | ||
235 | case SAMPR_48: | ||
236 | rate = WM8731_USB24_48000HZ; | ||
237 | break; | ||
238 | case SAMPR_44: | ||
239 | rate = WM8731_USB24_44100HZ; | ||
240 | break; | ||
241 | case SAMPR_32: | ||
242 | rate = WM8731_USB24_32000HZ; | ||
243 | break; | ||
244 | case SAMPR_8: | ||
245 | rate = WM8731_USB24_8000HZ; | ||
246 | break; | ||
247 | } | ||
226 | codec_set_active(false); | 248 | codec_set_active(false); |
227 | wmcodec_write(SAMPCTRL, sampling_control); | 249 | wmcodec_write(SAMPCTRL, rate); |
228 | codec_set_active(true); | 250 | codec_set_active(true); |
229 | } | 251 | } |
230 | 252 | ||