From: Niranjan H Y Date: Fri, 14 Aug 2026 10:21:47 +0000 (+0530) Subject: ucm2: sof-soundwire: add basic tac5572 support X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=2bbb6a6adde0ef3055fe4e5133d0d926daa6d26b;p=alsa-ucm-conf.git ucm2: sof-soundwire: add basic tac5572 support Add support of ucm to tac5572 codec. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/839 Signed-off-by: Niranjan H Y Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/sof-soundwire/sof-soundwire.conf b/ucm2/sof-soundwire/sof-soundwire.conf index 656196e..f12cd41 100644 --- a/ucm2/sof-soundwire/sof-soundwire.conf +++ b/ucm2/sof-soundwire/sof-soundwire.conf @@ -19,7 +19,7 @@ Define { Mics1 "0" Iec61937Pcms1 "" MultiCodec1 "" - MultiCodecRegex "rt712|rt713|rt721|rt722|rt1320|es9356" + MultiCodecRegex "rt712|rt713|rt721|rt722|rt1320|es9356|tac5572" } DefineRegex { @@ -138,6 +138,7 @@ If.multi_init { Macro.rt722.MultiCodecInit "CodecId=rt722" Macro.rt1320.MultiCodecInit "CodecId=rt1320" Macro.es9356.MultiCodecInit "CodecId=es9356" + Macro.tac5572.MultiCodecInit "CodecId=tac5572" } } diff --git a/ucm2/sof-soundwire/tac5572.conf b/ucm2/sof-soundwire/tac5572.conf new file mode 100644 index 0000000..9ee3402 --- /dev/null +++ b/ucm2/sof-soundwire/tac5572.conf @@ -0,0 +1,87 @@ +# Use case Configuration for sof-soundwire card +# Texas Instruments TAC5572 audio codec + +If.codec_spk { + Condition { + Type RegexMatch + Regex "(tac5572)" + String "${var:SpeakerCodec1}" + } + True { + SectionDevice."Speaker" { + Comment "Speaker" + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='Left Spk Switch' on" + cset "name='Right Spk Switch' on" + ] + + DisableSequence [ + cset "name='Left Spk Switch' off" + cset "name='Right Spk Switch' off" + ] + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId},2" + PlaybackVolume "tac5572 Speaker Volume" + } + } + } +} + +If.codec_hs { + Condition { + Type RegexMatch + Regex "(tac5572)" + String "${var:HeadsetCodec1}" + } + True { + SectionDevice."Headphones" { + Comment "Headphones" + + ConflictingDevice [ + "Speaker" + ] + + EnableSequence [ + cset "name='Headphone Switch' on" + ] + + DisableSequence [ + cset "name='Headphone Switch' off" + ] + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId}" + PlaybackVolume "tac5572 UAJ Playback Volume" + JackControl "Headphone Jack" + } + } + + SectionDevice."Headset" { + Comment "Headset Microphone" + + EnableSequence [ + cset "name='Headset Mic Switch' on" + ] + + DisableSequence [ + cset "name='Headset Mic Switch' off" + ] + + Value { + CapturePriority 200 + CapturePCM "hw:${CardId},1" + CaptureSwitch "Headset Mic Switch" + CaptureVolume "tac5572 UAJ Capture Volume" + JackControl "Headset Mic Jack" + } + } + } +}