Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)

From: Mogens Jensen
Date: Thu Jan 17 2019 - 00:58:59 EST


âââââââ Original Message âââââââ
On Sunday, December 2, 2018 12:25 PM, Hans de Goede <hdegoede@xxxxxxxxxx> wrote:

> Hi,
>
> On 01-11-18 07:55, Mogens Jensen wrote:
>
> > âââââââ Original Message âââââââ
> > On Wednesday, October 31, 2018 9:29 AM, Hans de Goede hdegoede@xxxxxxxxxx wrote:
> >
> > > Hi,
> > > On 31-10-18 07:02, Mogens Jensen wrote:
> > >
> > > > âââââââ Original Message âââââââ
> > > > On Tuesday, October 30, 2018 7:10 PM, Hans de Goede hdegoede@xxxxxxxxxx wrote:
> > > >
> > > > > Hi,
> > > > > On 30-10-18 19:56, Mogens Jensen wrote:
> > > > >
> > > > > > âââââââ Original Message âââââââ
> > > > > > On Tuesday, October 30, 2018 4:04 PM, Hans de Goede hdegoede@xxxxxxxxxx wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > > On 30-10-18 16:46, Hans de Goede wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > > On 30-10-18 16:04, Pierre-Louis Bossart wrote:
> > > > > > > >
> > > > > > > > > In addition I am not aware of any baytrail device using plt_clk_0, so moving a common machine driver such a cht_bsw_max98090_ti to use plt_clk0 only would break other devices (e.g. Rambi/Orco). Asking for both clocks to be on might work though,
> > > > > > > >
> > > > > > > > Ok, so we need to have a DMI based quirk for the Swanky and maybe also
> > > > > > > > the clapper to use plt_clk_0 there. Asking for 2 clks if we only need
> > > > > > > > one does not seem like a good plan.
> > > > > > >
> > > > > > > Dean, Mogens,
> > > > > > > To write a proper patch for this I'm going to need DMI strings
> > > > > > > from your devices.
> > > > > > > Can you please run (as normal user):
> > > > > > > grep . /sys/class/dmi/id/* 2> /dev/null
> > > > > > > And reply with the output of this command?
> > > > > > > I have attached the output from a coreboot seabios based clapper.
> > > > >
> > > > > Thank you.
> > > > >
> > > > > > Should I still test 0001-ASoC-intel-cht_bsw_max98090_ti-Use-pmc_plt_clk_0-ins.patch with SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH and asoundrc from Dean? There seems to have been some development in the case since that request was made.
> > > > >
> > > > > Yes please test that, I expect that to also fix things for the
> > > > > Clapper, but I need to have that confirmed before submitting a
> > > > > patch upstream adding a quirk for the Clapper to use pmc_plt_clk_0
> > > > > instead of pmc_plt_clk_3.
> > > > > Regards,
> > > > > Hans
> > > >
> > > > Unfortunately I only have access to longterm kernel 4.14 for building/running on this system, and 0001-ASoC-intel-cht_bsw_max98090_ti-Use-pmc_plt_clk_0-ins.patch does not patch against 4.14.78. Can a test patch for 4.14 be created?
> > >
> > > Can you run (as root):
> > > for i in /sys/kernel/debug/clk/pmc_plt_clk_?; do echo -n "$i: "; cat $i/clk_flags; echo; done
> > > When running a kernel with working audio?
> > > Then I can confirm that the Clapper is also using pmc_plt_clk_0, so that I can
> > > fix this for the clapper for 4.18+
> > > I've just checked the 4.14 sources and in 4.14 the SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH
> > > driver does not support mclk control yet, so for the 4.14 kernel the only way to
> > > fix this is to revert the 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL")
> > > commit.
> > > Regards,
> > > Hans
> >
> > Here is the output from the Clapper with 4.14.78 and working sound:
> > /sys/kernel/debug/clk/pmc_plt_clk_0: 0x00000800
> > /sys/kernel/debug/clk/pmc_plt_clk_1: 0x00000000
> > /sys/kernel/debug/clk/pmc_plt_clk_2: 0x00000000
> > /sys/kernel/debug/clk/pmc_plt_clk_3: 0x00000000
> > /sys/kernel/debug/clk/pmc_plt_clk_4: 0x00000000
> > /sys/kernel/debug/clk/pmc_plt_clk_5: 0x00000000
>
> Ok, so your Clapper model indeed is also using clk 0 and not clk 3 as
> expected. I've just submitted a patch upstream adding a quirk for this.
>
> As for what the plan is with 4.14, I don't know. I believe that
> reverting the commit causing the issue there is fine.
>
> Regards,
>
> Hans

Hi,

I have now tried the recently released kernel 4.19.14 on my Chromebook Clapper as this version now contains the DMI quirk (commit 984bfb398a3af6fa9b7e80165e524933b0616686 upstream).

Kernel is compiled with SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH and the quirk seems to have fixed the problem caused by commit 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL"), as sound is now working if running "speaker-test" on my system which is clean ALSA.

Unfortunately, SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH driver is unusable on Clapper Chromebooks as audio played from everything but "speaker-test" as video players or web browsers is extremly low and sounds like played at 10x speed. At the same time kernel log is spammed with messages like this:

max98090 i2c-193C9890:00: PLL unlocked
intel_sst_acpi 80860F28:00: FW Version 01.0c.00.01
writing to lpe: 00000000: 01 01 01 01 00 00 08 00 ff ff ff ff 55 00 00 00 ............U...
writing to lpe: 00000000: 01 01 01 01 00 00 1a 00 ff ff ff ff 75 00 12 00 ............u...

This is probably not related to the problem discussed in this thread, but the result is that I have to use the legacy driver SND_SOC_INTEL_BYT_MAX98090_MACH and therefore still has to revert commit 648e921888ad for sound to work.

Is it possible to create a fix for SND_SOC_INTEL_BYT_MAX98090_MACH on kernel 4.19? Kernel 4.19 is a long term release so it would be very nice to have fix for this version upstream.

Regards,

Mogens