From 11ef4ce1f9500ca1bd5651bc0e0dc49bf0dfbd2d Mon Sep 17 00:00:00 2001 From: Peter D'Hoye Date: Sun, 28 Sep 2008 23:25:07 +0000 Subject: 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 --- firmware/target/arm/pcm-pp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'firmware/target') 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; #endif void pcm_set_frequency(unsigned int frequency) -{ - (void)frequency; +{ +#ifdef HAVE_WM8731 + pcm_freq = frequency; +#else + (void)frequency; pcm_freq = HW_SAMPR_DEFAULT; +#endif #ifdef HAVE_WM8751 sr_ctrl = MROBE100_44100HZ; #endif @@ -107,6 +111,10 @@ void pcm_apply_settings(void) #ifdef HAVE_WM8751 audiohw_set_frequency(sr_ctrl); #endif + +#ifdef HAVE_WM8731 + audiohw_set_sample_rate(pcm_freq); +#endif pcm_curr_sampr = pcm_freq; } -- cgit v1.2.3