[alsa-devel] [PATCH 1/2] ASoC: rt5670: Revert Keep sysclk on patch

Bard Liao bardliao at realtek.com
Mon Mar 9 13:13:04 CET 2015


> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Monday, March 09, 2015 6:50 PM
> To: Bard Liao
> Cc: lgirdwood at gmail.com; alsa-devel at alsa-project.org; lars at metafoo.de;
> Flove; Oder Chiou; John Lin; mengdong.lin at intel.com; yao.jin at intel.com
> Subject: Re: [PATCH 1/2] ASoC: rt5670: Revert Keep sysclk on patch
> 
> On Mon, Mar 09, 2015 at 04:55:22PM +0800, Bard Liao wrote:
> > The "Keep sysclk on if JD func is used" patch force enable/disable pin
> > in rt5670_set_dai_sysclk. But some machine driver call it in dapm
> > widget event. It will cause kernel crash.
> 
> Could you go into more detail on what's going wrong here please - this
> sounds like the machine drivers are buggy, not the jack detection code?
> Configuring jack detection in response to a DAPM event would be very
> unusual.

System clock is needed for rt5670 jack detection function. Usually,
the system clock source is from MCLK. But some platform such as
Intel BSW will turn off MCLK in idle mode. So rt5670 need to switch the
system clock source to its internal clock. The action is done by machine
driver.

There is a PLL power in rt5670. It should be on if we want to use
PLL as the system clock source. So we call force enable/disable pin
in rt5670_set_dai_sysclk. However, cht_bsw_rt5672.c call
snd_soc_dai_set_sysclk in platform_clock_control which is the dapm
event of "Platform Clock" widget. In that case,
snd_soc_dapm_disable_pin and snd_soc_dapm_sync are called
within a dapm event. I think it is not valid.

Thanks.

> 
> ------Please consider the environment before printing this e-mail.


More information about the Alsa-devel mailing list