Fix pipewire support with ES8336
-
PipeWire version (
pipewire --version
): 0.3.47 -
Distribution and distribution version (
PRETTY_NAME
from/etc/os-release
): Fedora 35 -
Desktop Environment: Mate
-
Kernel version (
uname -r
): Kernel 5.16.10 + es8336 patchset from: https://github.com/thesofproject/linux/pull/3338Used kernel is at: https://github.com/mchehab/linux/tree/sound-es8336
Description of Problem:
Devices like Huawei MateBook D15 are now being shipped with SOF support via ES8336 chipset. While upstream support is being merged, pipewire fails to properly detect and enable the microphone. So, currently, only internal speaker seems to be properly working.
On such devices, there are 3 capture devices, as listed below:
arecord -l -D hw:0
**** List of CAPTURE Hardware Devices ****
card 0: sofessx8336 [sof-essx8336], device 0: ES8336 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofessx8336 [sof-essx8336], device 1: DMIC (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofessx8336 [sof-essx8336], device 2: DMIC16kHz (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
The internal digital microphone is at device 1. Device 2 also is conected to it, but only provides a 16 kHz sample rate.
When pipewire/wireplumber is used with such hardware with ACP, it seems to associate hw:0,0 as the mic input, instead of hw:0,1, causing the microphone to be unusable.
Note: there is a WIP to add UCM support for this device as well, at: https://github.com/alsa-project/alsa-ucm-conf/pull/139
The output of alsa-info.sh for this device is at: https://alsa-project.org/db/?f=9aa2ea604bde2f1217a1c7ba6477e4d254751ed2