From 65f61d6cce4a5d3b52860d38a922b01fcddc70cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Tue, 9 Dec 2008 20:48:04 +0000 Subject: =?UTF-8?q?FS#9609=20FM=20radio=20support=20for=20the=20Gigabeat?= =?UTF-8?q?=20S,=20seeking/scanning=20is=20not=20yet=20implemented=20but?= =?UTF-8?q?=20manual=20tuning=20works=20nicely.=20Thanks=20to=20Rafa=C3=AB?= =?UTF-8?q?l=20Carr=C3=A9,=20Bertrik=20Sikken=20and=20Robert=20Menes=20for?= =?UTF-8?q?=20suggestions=20and=20debugging=20help.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19372 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/audio/wm8978.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'firmware/drivers/audio') diff --git a/firmware/drivers/audio/wm8978.c b/firmware/drivers/audio/wm8978.c index c2c19ca7be..6a7c974f43 100644 --- a/firmware/drivers/audio/wm8978.c +++ b/firmware/drivers/audio/wm8978.c @@ -144,12 +144,12 @@ static void wmc_write(unsigned int reg, unsigned int val) wmcodec_write(reg, val); } -static void wmc_set(unsigned int reg, unsigned int bits) +void wmc_set(unsigned int reg, unsigned int bits) { wmc_write(reg, wmc_regs[reg] | bits); } -static void wmc_clear(unsigned int reg, unsigned int bits) +void wmc_clear(unsigned int reg, unsigned int bits) { wmc_write(reg, wmc_regs[reg] & ~bits); } @@ -226,6 +226,14 @@ void audiohw_postinit(void) wmc_write(WMC_AUDIO_INTERFACE, WMC_WL_16 | WMC_FMT_I2S); wmc_write(WMC_DAC_CONTROL, WMC_DACOSR_128 | WMC_AMUTE); + wmc_set(WMC_INPUT_CTRL, WMC_R2_2INPPGA | WMC_L2_2INPPGA); + wmc_set(WMC_LEFT_INP_PGA_GAIN_CTRL, 0x3f); + wmc_set(WMC_RIGHT_INP_PGA_GAIN_CTRL, 0x3f); + wmc_set(WMC_LEFT_INP_PGA_GAIN_CTRL, 1<<8); + wmc_set(WMC_RIGHT_INP_PGA_GAIN_CTRL, 1<<8); + wmc_set(WMC_LEFT_ADC_BOOST_CTRL, (7<<3)); + wmc_set(WMC_RIGHT_ADC_BOOST_CTRL, (7<<3)); + /* Specific to HW clocking */ wmc_write_masked(WMC_CLOCK_GEN_CTRL, WMC_BCLKDIV_4 | WMC_MS, WMC_BCLKDIV | WMC_MS | WMC_CLKSEL); -- cgit v1.2.3