]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: sof-glkda7219max: add initial support
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 25 Apr 2022 23:18:29 +0000 (18:18 -0500)
committerJaroslav Kysela <perex@perex.cz>
Mon, 29 Aug 2022 16:34:05 +0000 (18:34 +0200)
Speaker and headphone work.
Headset mic works.

Automatic detection of headset/headphone work with additional kernel
changes to remap jack pins, queued for review at

https://github.com/thesofproject/linux/pull/3681

DMIC doesn't seem to work, but this could be because of the 4ch
capture. We need the ability to extract 2ch as done by CRAS with

CaptureChannelMap "0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1"

BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/150
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/Intel/sof-glkda7219max/Hdmi.conf [new file with mode: 0644]
ucm2/Intel/sof-glkda7219max/HiFi.conf [new file with mode: 0644]
ucm2/Intel/sof-glkda7219max/sof-glkda7219max.conf [new file with mode: 0644]
ucm2/codecs/da7219/init.conf [new file with mode: 0644]
ucm2/conf.d/sof-glkda7219ma/sof-glkda7219ma.conf [new symlink]

diff --git a/ucm2/Intel/sof-glkda7219max/Hdmi.conf b/ucm2/Intel/sof-glkda7219max/Hdmi.conf
new file mode 100644 (file)
index 0000000..461c278
--- /dev/null
@@ -0,0 +1,30 @@
+# Use case Configuration for sof-glkda7219max
+
+Include.hdmi.File "/codecs/hda/hdmi.conf"
+
+If.hdmi1 {
+       Condition { Type AlwaysTrue }
+       True.Macro.hdmi1.HDMI {
+               Number 1
+               Device 5
+               Priority 500
+       }
+}
+
+If.hdmi2 {
+       Condition { Type AlwaysTrue }
+       True.Macro.hdmi2.HDMI {
+               Number 2
+               Device 6
+               Priority 600
+       }
+}
+
+If.hdmi3 {
+       Condition { Type AlwaysTrue }
+       True.Macro.hdmi3.HDMI {
+               Number 3
+               Device 7
+               Priority 700
+       }
+}
diff --git a/ucm2/Intel/sof-glkda7219max/HiFi.conf b/ucm2/Intel/sof-glkda7219max/HiFi.conf
new file mode 100644 (file)
index 0000000..8fc42b2
--- /dev/null
@@ -0,0 +1,72 @@
+# command-line sequence to switch playback/capture
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev Headphone
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev Speaker
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev Headset
+# alsaucm -c sof-glkda7219max set _verb HiFi set _enadev InternalMic
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+       }
+       EnableSequence [
+               cset "name='Spk Switch' on"
+       ]
+       DisableSequence [
+               cset "name='Spk Switch' off"
+       ]
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},1"
+               PlaybackMixerElem "Headphone"
+               JackControl "Headphone Jack"
+       }
+       EnableSequence [
+               cset "name='Headphone Jack Switch' on"
+               cset "name='Headphone Switch' 1"
+       ]
+       DisableSequence [
+               cset "name='Headphone Jack Switch' off"
+               cset "name='Headphone Switch' 0"
+       ]
+}
+
+SectionDevice."Mic" {
+       Comment "Internal Microphone"
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},99"
+               CaptureChannels 4
+               #CaptureChannelMap "0 0 -1 -1 -1 -1 -1 -1 -1 -1 -1"
+               #MaxSoftwareGain "2000"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
+
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
+               CaptureMixerElem "Headset Mic"
+               JackControl "Headset Mic Jack"
+       }
+       EnableSequence [
+               cset "name='Headset Mic Switch' on"
+               cset "name='Mic Switch' on"
+       ]
+       DisableSequence [
+               cset "name='Headset Mic Switch' off"
+               cset "name='Mic Switch' off"
+       ]
+}
+
+Include.hdmi.File "/Intel/sof-glkda7219max/Hdmi.conf"
diff --git a/ucm2/Intel/sof-glkda7219max/sof-glkda7219max.conf b/ucm2/Intel/sof-glkda7219max/sof-glkda7219max.conf
new file mode 100644 (file)
index 0000000..2e57826
--- /dev/null
@@ -0,0 +1,8 @@
+Syntax 6
+
+SectionUseCase."HiFi" {
+       File "/Intel/sof-glkda7219max/HiFi.conf"
+       Comment "Play and record HiFi quality Music"
+}
+
+Include.codec-init.File "/codecs/da7219/init.conf"
diff --git a/ucm2/codecs/da7219/init.conf b/ucm2/codecs/da7219/init.conf
new file mode 100644 (file)
index 0000000..a2f58cc
--- /dev/null
@@ -0,0 +1,24 @@
+# DA7219 specific volume control settings
+
+BootSequence [
+       cset "name='Playback Digital Volume' 111"
+       cset "name='Playback Digital Switch' 1"
+       cset "name='Out DACL Mux' DAIL"
+       cset "name='Out DACR Mux' DAIR"
+       cset "name='Mixer Out FilterL DACL Switch' 1"
+       cset "name='Mixer Out FilterR DACR Switch' 1"
+       cset "name='ST Mixer Out FilterL Out FilterL Switch' 1"
+       cset "name='ST Mixer Out FilterR Out FilterR Switch' 1"
+       cset "name='Headphone Jack Switch' off"
+       cset "name='Headset Mic Switch' off"
+       cset "name='Mic Volume' 5"
+       cset "name='Capture Digital Volume' 111"
+       cset "name='Capture Digital Switch' 1"
+       cset "name='Mixin Volume' 10"
+       cset "name='Mixin Switch' 1"
+       cset "name='Mixer In Mic Switch' 1"
+       cset "name='Out DAIL Mux' ADC"
+       cset "name='Out DAIR Mux' ADC"
+       cset "name='Gain Ramp Rate' 1"
+]
+
diff --git a/ucm2/conf.d/sof-glkda7219ma/sof-glkda7219ma.conf b/ucm2/conf.d/sof-glkda7219ma/sof-glkda7219ma.conf
new file mode 120000 (symlink)
index 0000000..c646915
--- /dev/null
@@ -0,0 +1 @@
+../../Intel/sof-glkda7219max/sof-glkda7219max.conf
\ No newline at end of file