chromebook-linux-audio icon indicating copy to clipboard operation
chromebook-linux-audio copied to clipboard

HP Chromebook 11 G5 internal microphone records loud sizzling sound only

Open TonyBoothNZ opened this issue 2 years ago • 4 comments

I have an HP Chromebook 11 G5 (Setzer / Strago / Braswell) which is running Xubuntu 23.10 (kernel is 6.5.0-14). I have followed the instructions, up to and including running setup-audio, here: https://github.com/WeirdTreeThing/chromebook-linux-audio

When I record the microphone by speaking at a normal volume and then play it back I get quite a loud sizzling sound and can’t hear any trace of what was actually recorded. If I speak loudly right up against the microphone then there is some highly distorted evidence of my voice (there is sustained loudness at the points where I spoke and I can almost make out words) but otherwise it just sounds like the sizzling again.

Recording command: arecord -r 48000 /tmp/test.wav

Playback command: aplay /tmp/test.wav

The microphone volume is set at around 50% in the audiomixer (pavucontrol). If I set it lower then the crackling is quieter when I play it back but I still can’t make out what was recorded.

I have also tried arecord without the -r switch, same result (though I did not try speaking loudly right up against the microphone in that case).

I can play other audio (e.g. youtube videos through Firefox work).

My problem seems have a similar effect to a now-resolved problem experienced by another person: https://lore.kernel.org/alsa-devel/[email protected]/. However, in that case the microphone was an analog microphone and as noted below mine is supposed to be digital.

My problem also seems somewhat similar to the won’t-fix issue here: https://github.com/WeirdTreeThing/chromebook-linux-audio/issues/48

I have attached some files (please let me know if other information would be useful):

  • Output of udevadm info -e > udev_output
  • Files in /usr/share/alsa/ucm2/Intel/chtrt5650/
  • Files in /usr/share/alsa/ucm2/Intel/chtrt5645/
  • File in /usr/share/alsa/ucm2/codecs/rt5645/

HPChromebook11G5XUbuntu23.10rt5650Files.tar.gz

To briefly summarise the output of udevadm info -e:

  • the relevant device name for the sound in /sys/ is 10EC5650:00 (10EC5645 does not appear anywhere)
  • card1 is using the platform cht-bsw-rt5465 (card0 is hdmi stuff and I think possibly not related at all)
  • card1 is associated with a headset input (sof-bytcht rt5650 headset) and 3 PCM things (pcmC1D0c, pcmC1D0p, pcmC1D1p).
  • there is also an i2c device name i2c-10EC5650:00 using the rt5645 driver

The HP documentation says variously that the HP Chromebook 11 G5 contains:

  • “Dual array digital microphone with appropriate software - beam forming, echo cancellation, noise suppression” (https://support.hp.com/nz-en/document/c05182225)

  • “Single digital microphone with appropriate echo-cancellation, noise-suppression software” (HP Chromebook and HP Chromebook 11 G5 Maintenance and Service Guide p.1)

  • “Internal microphones** [...] ** The position of the internal microphones may differ, depending on the model.” (HP Chromebook and HP Chromebook 11 G5 Maintenance and Service Guide p.5)

When it was still running stock the Google Chromium OS I believe it was using the 3.18 kernel, in which case these might have been the relevant kernel driver files:

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.18/sound/soc/codecs/rt5645.h https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.18/sound/soc/codecs/rt5645.c https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-3.18/sound/soc/intel/boards/cht_bsw_rt5645.c

I have also found some Chromium OS ucm config files though I am not sure of version (I selected the only factory-strago branch I could find in the repository): https://chromium.googlesource.com/chromiumos/overlays/board-overlays.git/+/refs/heads/factory-strago-7458.B/overlay-setzer/chromeos-base/chromeos-bsp-setzer/files/audio-config/ucm-config/chtrt5650/HiFi.conf https://chromium.googlesource.com/chromiumos/overlays/board-overlays.git/+/refs/heads/factory-strago-7458.B/overlay-setzer/chromeos-base/chromeos-bsp-setzer/files/audio-config/ucm-config/chtrt5650/HiFi.conf

I would be grateful for any suggestions.

TonyBoothNZ avatar Jan 07 '24 03:01 TonyBoothNZ

Should have added debug logs (apologies): debug-logs.tar.gz

TonyBoothNZ avatar Jan 07 '24 03:01 TonyBoothNZ

I've had mixed results with braswell devices. It seems like the drivers will just randomly break over time. The only thing my script does for braswell/baytail is enable the sof driver because in my experience, it works better than the atom sst driver.

WeirdTreeThing avatar Jan 13 '24 15:01 WeirdTreeThing

Well, the script gives me nice audio output so thank you for that! It's only the mic causing issues. I would like to dig through the ucm and driver code to work out what has gone wrong but despite doing some background reading over the last few days it's well above my level of competence. What do you think my odds are of getting a response if I post to an alsa or kernel list to ask about the issue? And which list/s would you recommend?

TonyBoothNZ avatar Jan 14 '24 05:01 TonyBoothNZ

https://www.alsa-project.org/wiki/Mailing-lists alsa-user looks like what you are looking for. Just keep in mind that many people have moved on from this platform so may not get help at all.

WeirdTreeThing avatar Jan 14 '24 05:01 WeirdTreeThing