]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ASoC: rt5670: Check sysclk source by private data
authorBard Liao <bardliao@realtek.com>
Mon, 9 Mar 2015 08:55:23 +0000 (16:55 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 9 Mar 2015 18:12:48 +0000 (18:12 +0000)
commit485372dc24ca2eaac18ce41a51b9dd017bc11400
tree3f18931542971cfc56369cc115c1da1e231761de
parentbd22f9d405eb14cc074d294919d0b909e0bc6170
ASoC: rt5670: Check sysclk source by private data

Currently, is_sys_clk_from_pll check sysclk source by reading codec
register value. And it will be invoked before updating dapm widget
power. In some machine driver, snd_soc_dai_set_sysclk is called in
dapm event to switch codec sysclk to RC clock in idle mode. And in
some use cases (such as syspend/resume) hw_params will not be called
when the dapm widget is powered up. As a result, is_sys_clk_from_pll
will return 0 although it is supposed to be 1.
To solve this, we let is_sys_clk_from_pll check sysclk sysclk_src
which is stored in private data and don't change the value of sysclk_src
when codec sysclk is switched to internal clock. The internal clock
can only be used in idle mode, so it sould be fine if we don't set
sysclk_src to internal clock.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5670.c