]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-soundwire: add basic tac5572 support
authorNiranjan H Y <niranjan.hy@ti.com>
Fri, 14 Aug 2026 10:21:47 +0000 (15:51 +0530)
committerJaroslav Kysela <perex@perex.cz>
Fri, 9 Oct 2026 09:23:23 +0000 (11:23 +0200)
Add support of ucm to tac5572 codec.

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/839
Signed-off-by: Niranjan H Y <niranjan.hy@ti.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/sof-soundwire/sof-soundwire.conf
ucm2/sof-soundwire/tac5572.conf [new file with mode: 0644]

index 656196e1877caefecba84eb1dc6050bf8494e257..f12cd419c5001f9a1a597dcfcebc5fd5cb8939cb 100644 (file)
@@ -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 (file)
index 0000000..9ee3402
--- /dev/null
@@ -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"
+                       }
+               }
+       }
+}