]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: acp3x-es83xx: introduce UCM support for acp3x-es83xx
authorMarian Postevca <posteuca@mutex.one>
Sat, 30 Dec 2023 16:01:41 +0000 (18:01 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 29 Jan 2024 12:48:14 +0000 (13:48 +0100)
Based on already existing UCM support in ucm2/Intel/sof-essx8336

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/391
Signed-off-by: Marian Postevca <posteuca@mutex.one>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/AMD/acp3x-es83xx/HiFi.conf [new file with mode: 0644]
ucm2/AMD/acp3x-es83xx/acp3x-es83xx.conf [new file with mode: 0644]
ucm2/conf.d/acp3x-es83xx/acp3x-es83xx.conf [new symlink]

diff --git a/ucm2/AMD/acp3x-es83xx/HiFi.conf b/ucm2/AMD/acp3x-es83xx/HiFi.conf
new file mode 100644 (file)
index 0000000..7917964
--- /dev/null
@@ -0,0 +1,88 @@
+SectionVerb {
+       EnableSequence [
+               disdevall ""
+       ]
+}
+
+If.dmic {
+       Condition {
+               Type String
+               Empty "${var:DeviceDmic}"
+       }
+       False.SectionDevice."Mic" {
+               Comment "Digital Microphone"
+
+               Value {
+                       CapturePriority 100
+                       CapturePCM "hw:${CardId},${var:DeviceDmic}"
+                       CaptureChannels 2
+               }
+       }
+}
+
+SectionDevice."Speaker" {
+       Comment "Speakers"
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cset "name='Speaker Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Speaker Switch' off"
+       ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               # The es8316 only has a HP-amp which is muxed to the speaker
+               # or to the headpones output
+               PlaybackMixerElem "Headphone Mixer"
+               PlaybackMasterElem "DAC"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       ConflictingDevice [
+               "Speaker"
+       ]
+
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId}"
+               PlaybackMixerElem "Headphone Mixer"
+               PlaybackMasterElem "DAC"
+               JackControl "Headphone Jack"
+               JackHWMute "Speaker"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
+
+       EnableSequence [
+               cset "name='Differential Mux' lin1-rin1"
+               cset "name='Headset Mic Switch' on"
+               cset "name='Digital Mic Mux' 'dmic disable'"
+               cset "name='Internal Mic Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Headset Mic Switch' on"
+               cset "name='Internal Mic Switch' off"
+       ]
+
+       Value {
+               CapturePriority 300
+               CapturePCM "hw:${CardId}"
+               CaptureMixerElem "ADC PGA Gain"
+               CaptureMasterElem "ADC"
+               JackControl "Headset Mic Jack"
+       }
+}
+
diff --git a/ucm2/AMD/acp3x-es83xx/acp3x-es83xx.conf b/ucm2/AMD/acp3x-es83xx/acp3x-es83xx.conf
new file mode 100644 (file)
index 0000000..d5645d2
--- /dev/null
@@ -0,0 +1,33 @@
+Syntax 6
+
+Define.DeviceDmic "$${find-device:type=pcm,stream=capture,field=id,regex='dmic'}"
+
+BootSequence [
+       # Setup muxes / switches
+       cset "name='Left Headphone Mixer Left DAC Switch' on"
+       cset "name='Right Headphone Mixer Right DAC Switch' on"
+       # Set digital mix mux to "dmic disable"
+       # That doesn't affect dmic, but other values mute headset mic
+       cset "name='Digital Mic Mux' 0"
+
+       # Set HP vol to 0 dB
+       cset "name='Headphone Playback Volume' 100%"
+       cset "name='Headphone Mixer Volume' 100%"
+
+       # Set DAC vol
+       cset "name='DAC Playback Volume' 70%"
+       # LDATA TO LDAC, RDATA TO RDAC
+       cset "name='DAC Source Mux' 0"
+
+       # Disable Auto Level Control
+       cset "name='ALC Capture Switch' off"
+
+       # Set capture vol
+       cset "name='ADC Capture Volume' 70%"
+]
+
+SectionUseCase."HiFi" {
+       File "/AMD/acp3x-es83xx/HiFi.conf"
+       Comment "Play and record HiFi quality Music"
+}
+
diff --git a/ucm2/conf.d/acp3x-es83xx/acp3x-es83xx.conf b/ucm2/conf.d/acp3x-es83xx/acp3x-es83xx.conf
new file mode 120000 (symlink)
index 0000000..35a4dea
--- /dev/null
@@ -0,0 +1 @@
+../../AMD/acp3x-es83xx/acp3x-es83xx.conf
\ No newline at end of file