digital microphone on google chromebook code name banon

From: Chris Gorman
Date: Fri Feb 14 2020 - 14:27:12 EST


Hello All,

I have a problem with my laptop recording via the digital microphone.
I did try to explain the problem on
https://bugzilla.kernel.org/show_bug.cgi?id=95681, but I have heard no
response on the issue, so I am bugging the mailing list in hopes that
someone will have a magic fix for me. ;)

My laptop is a google chromebook, braswell, banon. It is of the intel
strago family. When I try to record all I get is white noise. I can
reduce the level of noise via alsamixer, but I have to reduce all the
capture levels to 5 or lower.

I reached out to Sam McNally (thank you sam) from chromium regarding
his patch to cht_bsw_rt5645.c
adebb11139029ddf1fba6f796c4a476f17eacddc. He was quite nice and
helpful. According to Sam, the banon chromebooks dmic works with
their chromeos 4.9 and chromeos 5.4 kernels. Unfortunately the dmic
still failed on my system when I tried the chromeos 5.4 kernel.
Perhaps the problem is my new coreboot 4.11 bios, whereas chrome uses
an older bios? I don't know.

Sam also pointed me to checking /sys/kernel/debug/clk/clk_summary.
While recording I get..

pmc_plt_clk_0 0 0 0 19200000
0 0 50000

and while playing everything's fine and I get...

pmc_plt_clk_0 1 1 0 19200000
0 0 50000

This is clearly the problem. I don't know how to get the clock
working with the capture function though.

My kernel configs are ...

SOUND = y
SND = y
SND_SOC = y
SND_SOC_INTEL_MACH = y
SND_SST_ATOM_HIFI2_PLATFORM = y
SND_SST_ATOM_HIFI2_PLATFORM_ACPI = y
I2C = y
ACPI = y
X86_INTEL_LPSS = y
SND_SOC_ACPI = y
SND_SOC_INTEL_CHT_BSW_RT5645_MACH = y
SND_SOC_RT5645 = y
SND_SOC_DMIC = y

and I am running linux 5.5.0. I welcome patches and suggestions, but
have not subscribed to the mailing list because of the volume of
emails, so please cc me with any response.

Thanks in advance.

Chris Gorman