From 9cf3e658eb0dea9f2697e9ae290cd15676c2ffc6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E7=94=9C=E7=93=9C=E6=9E=9C=E9=85=92?= Date: Thu, 8 Oct 2026 19:27:42 +0800 Subject: [PATCH] sof-soundwire: add ES9356 device files Boards using the Everest Semiconductor ES9356 SDCA codec (for example the MECHREVO WUJIE 14SAH with AMD ACP6.3) report the component string cfg-amp:1 hs:es9356 mic:es9356-dmic spk:es9356-spk spk:es9356 so sof-soundwire resolves the device files to es9356-spk, es9356-dmic and es9356. Those files do not exist, UCM loading fails, and WirePlumber falls back to the "stereo-fallback" profile, which only exposes the first PCM of the card (device 0, the headset output). Desktop audio is silent even though the kernel side works. Add the three device files, using the PCM layout of these boards: device 0 headset playback, device 1 headset capture, device 2 speaker playback, device 4 internal DMIC capture. Tested on a MECHREVO WUJIE 14SAH (Ryzen 7 H 255, ACP6.3 rev 63, ES9356 on SoundWire link 0) with mainline 7.2.9: with these files Speaker, Headphones, Internal Microphone and Headset Mic all appear in PipeWire and playback plus recording work. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/869 Link: https://bugzilla.kernel.org/show_bug.cgi?id=222092 Link: https://lore.kernel.org/linux-sound/20261007193038.2473068-1-mario.limonciello@amd.com/ Link: https://lore.kernel.org/linux-sound/179145019931.16888.9682263186729943710@gmail.com/ Signed-off-by: Zachary Huang Signed-off-by: Jaroslav Kysela --- ucm2/sof-soundwire/es9356-dmic.conf | 17 ++++++++++ ucm2/sof-soundwire/es9356-spk.conf | 25 ++++++++++++++ ucm2/sof-soundwire/es9356.conf | 51 +++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 ucm2/sof-soundwire/es9356-dmic.conf create mode 100644 ucm2/sof-soundwire/es9356-spk.conf create mode 100644 ucm2/sof-soundwire/es9356.conf diff --git a/ucm2/sof-soundwire/es9356-dmic.conf b/ucm2/sof-soundwire/es9356-dmic.conf new file mode 100644 index 0000000..1dd1f5b --- /dev/null +++ b/ucm2/sof-soundwire/es9356-dmic.conf @@ -0,0 +1,17 @@ +# Use case Configuration for sof-soundwire card +# +# Everest Semiconductor ES9356 (SDCA) - internal DMIC (SmartMic) function. +# Internal microphone capture is PCM device 4 on AMD ACP6.3 SDCA boards. + +SectionDevice."Mic" { + Comment "Internal Microphone" + + ConflictingDevice [ + "Headset" + ] + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId},4" + } +} diff --git a/ucm2/sof-soundwire/es9356-spk.conf b/ucm2/sof-soundwire/es9356-spk.conf new file mode 100644 index 0000000..2c43153 --- /dev/null +++ b/ucm2/sof-soundwire/es9356-spk.conf @@ -0,0 +1,25 @@ +# Use case Configuration for sof-soundwire card +# +# Everest Semiconductor ES9356 (SDCA) - speaker (SmartAmp) function. +# Speaker playback is PCM device 2 on AMD ACP6.3 SDCA boards. + +SectionDevice."Speaker" { + Comment "Speaker" + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='Speaker Switch' on" + ] + + DisableSequence [ + cset "name='Speaker Switch' off" + ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},2" + } +} diff --git a/ucm2/sof-soundwire/es9356.conf b/ucm2/sof-soundwire/es9356.conf new file mode 100644 index 0000000..5374924 --- /dev/null +++ b/ucm2/sof-soundwire/es9356.conf @@ -0,0 +1,51 @@ +# Use case Configuration for sof-soundwire card +# +# Everest Semiconductor ES9356 (SDCA) - headset (UAJ) function. +# +# On AMD ACP6.3 SDCA boards the PCM layout of this codec is: +# device 0: headset playback, device 1: headset capture, +# device 2: speaker playback, device 4: internal DMIC capture. + +SectionDevice."Headphones" { + Comment "Headphones" + + ConflictingDevice [ + "Speaker" + ] + + EnableSequence [ + cset "name='Headphone Switch' on" + ] + + DisableSequence [ + cset "name='Headphone Switch' off" + ] + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId}" + JackControl "Headphone Jack" + } +} + +SectionDevice."Headset" { + Comment "Headset Microphone" + + ConflictingDevice [ + "Mic" + ] + + EnableSequence [ + cset "name='Headset Mic Switch' on" + ] + + DisableSequence [ + cset "name='Headset Mic Switch' off" + ] + + Value { + CapturePriority 200 + CapturePCM "hw:${CardId},1" + JackControl "Headset Mic Jack" + } +} -- 2.52.0