summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2008-09-28 23:25:07 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2008-09-28 23:25:07 +0000
commit11ef4ce1f9500ca1bd5651bc0e0dc49bf0dfbd2d (patch)
tree8cc9f49bcf015f1e06840179a29a6f2c1107000d /firmware/target
parentaa8a76b65971e3bad38fa30e39a0ad46f50ff77c (diff)
downloadrockbox-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/target')
-rw-r--r--firmware/target/arm/pcm-pp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/target/arm/pcm-pp.c b/firmware/target/arm/pcm-pp.c
index 38fd49165e..e37ee9aaad 100644
--- a/firmware/target/arm/pcm-pp.c
+++ b/firmware/target/arm/pcm-pp.c
@@ -94,9 +94,13 @@ static int sr_ctrl = MROBE100_44100HZ;
94#endif 94#endif
95 95
96void pcm_set_frequency(unsigned int frequency) 96void pcm_set_frequency(unsigned int frequency)
97{ 97{
98 (void)frequency; 98#ifdef HAVE_WM8731
99 pcm_freq = frequency;
100#else
101 (void)frequency;
99 pcm_freq = HW_SAMPR_DEFAULT; 102 pcm_freq = HW_SAMPR_DEFAULT;
103#endif
100#ifdef HAVE_WM8751 104#ifdef HAVE_WM8751
101 sr_ctrl = MROBE100_44100HZ; 105 sr_ctrl = MROBE100_44100HZ;
102#endif 106#endif
@@ -107,6 +111,10 @@ void pcm_apply_settings(void)
107#ifdef HAVE_WM8751 111#ifdef HAVE_WM8751
108 audiohw_set_frequency(sr_ctrl); 112 audiohw_set_frequency(sr_ctrl);
109#endif 113#endif
114
115#ifdef HAVE_WM8731
116 audiohw_set_sample_rate(pcm_freq);
117#endif
110 pcm_curr_sampr = pcm_freq; 118 pcm_curr_sampr = pcm_freq;
111} 119}
112 120