]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: add profile for the Librem 5
authorClayton Craft <clayton@craftyguy.net>
Wed, 29 Jun 2022 22:23:23 +0000 (15:23 -0700)
committerJaroslav Kysela <perex@perex.cz>
Wed, 16 Nov 2022 14:57:45 +0000 (15:57 +0100)
Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/181
Tested-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/NXP/iMX8/Librem_5/HiFi.conf [new file with mode: 0644]
ucm2/NXP/iMX8/Librem_5/Librem 5.conf [new file with mode: 0644]
ucm2/conf.d/simple-card/Librem 5.conf [new symlink]

diff --git a/ucm2/NXP/iMX8/Librem_5/HiFi.conf b/ucm2/NXP/iMX8/Librem_5/HiFi.conf
new file mode 100644 (file)
index 0000000..55eabe3
--- /dev/null
@@ -0,0 +1,151 @@
+SectionVerb {
+       EnableSequence [
+               disdevall ""
+       ]
+
+       Value.TQ "HiFi"
+}
+
+SectionDevice."Handset" {
+       Comment "Handset"
+
+       ConflictingDevice [
+               "Headphones"
+               "Speaker"
+       ]
+
+       EnableSequence [
+               cset "name='Speaker Switch' off,on"
+               cset "name='DAC L/R Swap Switch' on"
+               cset "name='DAC Monomix Switch' on"
+               cset "name='SPKOUTR PGA' DAC"
+               cset "name='Speaker Boost Volume' 2"
+       ]
+
+       DisableSequence [
+               cset "name='Speaker Switch' off,off"
+               cset "name='DAC L/R Swap Switch' off"
+               cset "name='DAC Monomix Switch' off"
+               cset "name='SPKOUTR PGA' Mixer"
+       ]
+
+       Value {
+               PlaybackPriority "100"
+               PlaybackVolume "name='Speaker Volume'"
+               PlaybackSwitch "name='Speaker Switch'"
+               PlaybackMixerElem "Speaker"
+               PlaybackPCM "hw:${CardId}"
+       }
+}
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       ConflictingDevice [
+               "Handset"
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cset "name='Speaker Switch' on,off"
+               cset "name='DAC Monomix Switch' on"
+               cset "name='SPKOUTL PGA' DAC"
+               cset "name='Speaker Boost Volume' 6"
+       ]
+
+       DisableSequence [
+               cset "name='Speaker Switch' off,off"
+               cset "name='DAC Monomix Switch' off"
+               cset "name='SPKOUTL PGA' Mixer"
+       ]
+
+       Value {
+               PlaybackPriority "500"
+               PlaybackVolume "name='Speaker Volume'"
+               PlaybackSwitch "name='Speaker Switch'"
+               PlaybackMixerElem "Speaker"
+               PlaybackPCM "hw:${CardId}"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       ConflictingDevice [
+               "Handset"
+               "Speaker"
+       ]
+
+       EnableSequence [
+               cset "name='Headphone Switch' on,on"
+               cset "name='HPOUTL PGA' 0 unmute"
+               cset "name='HPOUTR PGA' 0 unmute"
+       ]
+
+       DisableSequence [
+               cset "name='Headphone Switch' off off"
+               cset "name='HPOUTL PGA' 0 mute"
+               cset "name='HPOUTR PGA' 0 mute"
+       ]
+
+       Value {
+               PlaybackPriority "1000"
+               PlaybackVolume "name='Headphone Volume'"
+               PlaybackSwitch "name='Headphone Switch'"
+               PlaybackMixerElem "Headphone"
+               PlaybackPCM "hw:${CardId}"
+               JackControl "Headphones Jack"
+       }
+}
+
+SectionDevice."Mic" {
+       Comment "Internal Microphone"
+
+       ConflictingDevice [
+               "Headset"
+       ]
+
+       EnableSequence [
+               cset "name='ADC L/R Swap Switch' on"
+               cset "name='Input Mode' Digital"
+       ]
+
+       DisableSequence [
+               cset "name='ADC L/R Swap Switch' off"
+       ]
+
+       Value {
+               CapturePriority "500"
+               CaptureVolume "name='Digital Capture Volume'"
+               CaptureMixerElem "Digital"
+               CapturePCM "hw:${CardId}"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
+
+       ConflictingDevice [
+               "Mic"
+       ]
+
+       EnableSequence [
+               cset "name='Input Mode' Analog"
+               cset "name='MIXINR PGA Switch' on,on"
+               cset "name='Capture Switch' on,on"
+       ]
+
+       DisableSequence [
+               cset "name='Capture Switch' off,off"
+               cset "name='MIXINR PGA Switch' off,off"
+               cset "name='Input Mode' Digital"
+       ]
+
+       Value {
+               CapturePriority "100"
+               CaptureVolume "name='Capture Volume'"
+               CaptureMixerElem "Capture"
+               CapturePCM "hw:${CardId}"
+               JackControl "Headphones Jack"
+       }
+}
diff --git a/ucm2/NXP/iMX8/Librem_5/Librem 5.conf b/ucm2/NXP/iMX8/Librem_5/Librem 5.conf
new file mode 100644 (file)
index 0000000..4d7dbd6
--- /dev/null
@@ -0,0 +1,25 @@
+Syntax 2
+
+SectionUseCase."HiFi" {
+       File "HiFi.conf"
+       Comment "Default"
+}
+
+BootSequence [
+       cset "name='Digital Playback Volume' 100,100"
+       cset "name='MIXINL IN2L Switch' off"
+       cset "name='MIXINL IN3L Switch' off"
+       cset "name='MIXINR IN2R Switch' off"
+       cset "name='MIXINR IN3R Switch' off"
+       cset "name='INPGAR IN1R Switch' off"
+       cset "name='INPGAR IN2R Switch' off"
+       cset "name='INPGAR IN3R Switch' on"
+       cset "name='INPGAR IN4R Switch' off"
+       cset "name='INPGAL IN1L Switch' off"
+       cset "name='INPGAL IN2L Switch' off"
+       cset "name='INPGAL IN3L Switch' off"
+       cset "name='INPGAL IN4L Switch' off"
+       cset "name='Input Mixer Switch' off,on"
+       cset "name='SPKOUTL PGA' Mixer"
+       cset "name='SPKOUTR PGA' Mixer"
+]
diff --git a/ucm2/conf.d/simple-card/Librem 5.conf b/ucm2/conf.d/simple-card/Librem 5.conf
new file mode 120000 (symlink)
index 0000000..c687942
--- /dev/null
@@ -0,0 +1 @@
+../../NXP/iMX8/Librem_5/Librem 5.conf
\ No newline at end of file