]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: Intel: cht_bsw_max98090_ti: Enable codec clock once and keep it enabled
authorHans de Goede <hdegoede@redhat.com>
Tue, 2 Apr 2019 10:20:49 +0000 (12:20 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 3 Apr 2019 04:37:10 +0000 (11:37 +0700)
commit4bcdec39c454c4e8f9512115bdcc3efec1ba5f55
treeb128eadd918d0cdf9cbcaf1d4c6a958f916cf798
parent43d147be5738a9ed6cfb25c285ac50d6dd5793be
ASoC: Intel: cht_bsw_max98090_ti: Enable codec clock once and keep it enabled

Users have been seeing sound stability issues with max98090 codecs since:
commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")

At first that commit broke sound for Chromebook Swanky and Clapper models,
the problem was that the machine-driver has been controlling the wrong
clock on those models since support for them was added. This was hidden by
clk-pmc-atom.c keeping the actual clk on unconditionally.

With the machine-driver controlling the proper clock, sound works again
but we are seeing bug reports describing it as: low volume,
"sounds like played at 10x speed" and instable.

When these issues are hit the following message is seen in dmesg:
"max98090 i2c-193C9890:00: PLL unlocked".

Attempts have been made to fix this by inserting a delay between enabling
the clk and enabling and checking the pll, but this has not helped.

It seems that at least on boards which use pmc_plt_clk_0 as clock,
if we ever disable the clk, the pll looses its lock and after that we get
various issues.

This commit fixes this by enabling the clock once at probe time on
these boards. In essence this restores the old behavior of clk-pmc-atom.c
always keeping the clk on on these boards.

Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
Reported-by: Mogens Jensen <mogens-jensen@protonmail.com>
Reported-by: Dean Wallace <duffydack73@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/cht_bsw_max98090_ti.c