From 9ae4a7a9f0712db1cb5934eecc905c5c7930260c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Mon, 21 Jun 2021 11:58:45 +0200 Subject: [PATCH] Add UCM for Librem 5 Devkit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The DTS configuration is in Linux mainline since 5.13-rc1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts?h=v5.13-rc1#n167 Signed-off-by: Guido Günther Signed-off-by: Jaroslav Kysela --- ucm2/NXP/iMX8/Librem_5_Devkit/HiFi.conf | 74 +++++++++++++++++++ .../iMX8/Librem_5_Devkit/Librem 5 Devkit.conf | 10 +++ ucm2/conf.d/simple-card/Librem 5 Devkit.conf | 1 + 3 files changed, 85 insertions(+) create mode 100644 ucm2/NXP/iMX8/Librem_5_Devkit/HiFi.conf create mode 100644 ucm2/NXP/iMX8/Librem_5_Devkit/Librem 5 Devkit.conf create mode 120000 ucm2/conf.d/simple-card/Librem 5 Devkit.conf diff --git a/ucm2/NXP/iMX8/Librem_5_Devkit/HiFi.conf b/ucm2/NXP/iMX8/Librem_5_Devkit/HiFi.conf new file mode 100644 index 0000000..f34aa92 --- /dev/null +++ b/ucm2/NXP/iMX8/Librem_5_Devkit/HiFi.conf @@ -0,0 +1,74 @@ +SectionVerb { + EnableSequence [ + cset "name='Digital Input Mux' I2S" + cset "name='PCM Playback Volume' 144" + + cset "name='AVC Switch' off" + cset "name='Headphone Playback ZC Switch' off" + + cset "name='Capture Attenuate Switch (-6dB)' off" + cset "name='Capture Mux' MIX_IN" + cset "name='Capture ZC Switch' off" + cset "name='Capture Switch' On" + cset "name='Capture Volume' 15,15" + ] + DisableSequence [ + cset "name='PCM Playback Volume' 0" + ] + Value { + } +} + +SectionDevice."Handset".0 { + Comment "Handset" + + ConflictingDevice [ + "Headset" + ] + + EnableSequence [ + cset "name='Mic Mux MUX' Input 2" + cset "name='Lineout Playback Switch' on" + cset "name='Lineout Playback Volume' 18" + cset "name='Mic Volume' 2" + ] + DisableSequence [ + cset "name='Lineout Playback Switch' off" + cset "name='Mic Volume' 0" + ] + Value { + PlaybackPriority "1000" + PlaybackPCM "hw:${CardId},0" + PlaybackVolume "name='Lineout Playback Volume'" + PlaybackSwitch "name='Lineout Playback Switch'" + CapturePriority "1000" + CapturePCM "hw:${CardId},0" + } +} + +SectionDevice."Headset".0 { + Comment "Headset" + + ConflictingDevice [ + "Handset" + ] + + EnableSequence [ + cset "name='Mic Mux MUX' Input 1" + cset "name='Headphone Mux' DAC" + cset "name='Headphone Playback Volume' 63" + cset "name='Headphone Playback Switch' on" + ] + DisableSequence [ + cset "name='Headphone Playback Switch' off" + ] + Value { + PlaybackPriority "700" + PlaybackPCM "hw:${CardId},0" + PlaybackVolume "name='Headphone Playback Volume'" + PlaybackSwitch "name='Headphone Playback Switch'" + CapturePriority "700" + CapturePCM "hw:${CardId},0" + JackControl "Headphones Jack" + } +} diff --git a/ucm2/NXP/iMX8/Librem_5_Devkit/Librem 5 Devkit.conf b/ucm2/NXP/iMX8/Librem_5_Devkit/Librem 5 Devkit.conf new file mode 100644 index 0000000..933e3d4 --- /dev/null +++ b/ucm2/NXP/iMX8/Librem_5_Devkit/Librem 5 Devkit.conf @@ -0,0 +1,10 @@ +Syntax 2 + +SectionUseCase."HiFi" { + File "HiFi.conf" +} + +ValueDefaults { + PlaybackPCM "hw:${CardId},0" + CapturePCM "hw:${CardId},0" +} diff --git a/ucm2/conf.d/simple-card/Librem 5 Devkit.conf b/ucm2/conf.d/simple-card/Librem 5 Devkit.conf new file mode 120000 index 0000000..3bdfe20 --- /dev/null +++ b/ucm2/conf.d/simple-card/Librem 5 Devkit.conf @@ -0,0 +1 @@ +../../NXP/iMX8/Librem_5_Devkit/Librem 5 Devkit.conf \ No newline at end of file -- 2.47.1