[alsa-devel] [PATCH v4-resend 1/7] ASoC: sirf: Add SiRF internal audio codec driver

RongJun Ying rjying at gmail.com
Tue Mar 4 06:11:50 CET 2014

2014-03-04 12:58 GMT+08:00 Mark Brown <broonie at kernel.org>:
> On Mon, Mar 03, 2014 at 03:48:02PM +0800, Barry Song wrote:
>> here the clock is an internal clock in the internal codec. the
>> external clock of audio controller is managed in system suspend/resume
>> as you see. but they are not managed in runtime suspend/resume here
>> because the external clock is always enabled to make sure the charge
>> pump to be working to make the board have stable current and voltage.
>> otherwise, touchscreen ADC will not be accurate.
> Why aren't these drivers keeping the clock enabled themselves?

The charge pump register is a part of  the audio controller.
But this register is impacted the touchscreen ADC stable.
So when the audio codec driver probe, It always enable the audio
controller's clock,
and must be set the charge pump register.

         ret = clk_prepare_enable(sirf_audio_codec->clk);
         if (ret) {
                dev_err(&pdev->dev, "Enable clock failed.\n");
                 return ret;
          * Always open charge pump, if not, when the charge pump closed the
          * adc will not stable
         regmap_update_bits(sirf_audio_codec->regmap, AUDIO_IC_CODEC_CTRL0,
                 IC_CPFREQ, IC_CPFREQ);

         if (of_device_is_compatible(pdev->dev.of_node,
                                 AUDIO_IC_CODEC_CTRL0, IC_CPEN, IC_CPEN);

RongJun Ying
Rongjun Ying

More information about the Alsa-devel mailing list