]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
ucm2: MediaTek: mt8395-evk: Add alsa-ucm support
authorZoran Zhan <zoran.zhan@mediatek.com>
Thu, 1 Jun 2023 07:48:33 +0000 (15:48 +0800)
committerJaroslav Kysela <perex@perex.cz>
Wed, 17 Jan 2024 09:20:19 +0000 (10:20 +0100)
Add alsa-ucm support for the MediaTek mt8395-evk platform.

Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/322
Signed-off-by: Zoran Zhan <zoran.zhan@mediatek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/MediaTek/mt8395-evk/HiFi.conf [new file with mode: 0644]
ucm2/MediaTek/mt8395-evk/mt8395-evk.conf [new file with mode: 0644]
ucm2/conf.d/mt8395-evk/mt8395-evk.conf [new symlink]

diff --git a/ucm2/MediaTek/mt8395-evk/HiFi.conf b/ucm2/MediaTek/mt8395-evk/HiFi.conf
new file mode 100644 (file)
index 0000000..81e4423
--- /dev/null
@@ -0,0 +1,154 @@
+SectionDevice."HDMI1" {
+       Comment "HDMI output"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},5"
+               JackControl "HDMI Jack"
+       }
+
+       EnableSequence [
+               cset "name='HDMI_OUT_MUX' 1"
+       ]
+
+       DisableSequence [
+               cset "name='HDMI_OUT_MUX' 0"
+       ]
+}
+
+SectionDevice."HDMI2" {
+       Comment "DP output"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},5"
+               JackControl "DP Jack"
+       }
+
+       EnableSequence [
+               cset "name='DPTX_OUT_MUX' 1"
+       ]
+
+       DisableSequence [
+               cset "name='DPTX_OUT_MUX' 0"
+       ]
+}
+
+SectionDevice."Speaker" {
+       Comment "Lineout speaker"
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+
+       EnableSequence [
+               cset "name='LOL Mux' Playback_L_DAC"
+       ]
+
+       DisableSequence [
+               cset "name='LOL Mux' Open"
+       ]
+
+       Value {
+               PlaybackPriority 300
+               PlaybackChannels 2
+               PlaybackPCM "hw:${CardId},0"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Earphone speaker"
+
+       ConflictingDevice [
+               "Speaker"
+       ]
+
+       EnableSequence [
+               cset "name='HP Mux' Audio Playback"
+       ]
+
+       DisableSequence [
+               cset "name='HP Mux' Open"
+       ]
+
+       Value {
+               PlaybackPriority 400
+               PlaybackChannels 2
+               PlaybackPCM "hw:${CardId},0"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "Earphone microphone"
+
+       ConflictingDevice [
+               "Mic1"
+       ]
+
+       EnableSequence [
+               cset "name='PGA_L_Mux' AIN1"
+       ]
+
+       Value {
+               CapturePriority 400
+               CaptureChannels 3
+               CapturePCM "hw:${CardId},15"
+       }
+}
+
+SectionDevice."Mic1" {
+       Comment "Analog microphone"
+
+       ConflictingDevice [
+               "Headset"
+       ]
+
+       EnableSequence [
+               cset "name='PGA_L_Mux' AIN0"
+               cset "name='O039 I169 Switch' on"
+               cset "name='O182 I170 Switch' on"
+               cset "name='MISO1_MUX' UL1_CH2"
+       ]
+
+       DisableSequence [
+               cset "name='O039 I169 Switch' off"
+               cset "name='O182 I170 Switch' off"
+               cset "name='MISO1_MUX' UL1_CH1"
+       ]
+
+       Value {
+               CapturePriority 300
+               CaptureChannels 3
+               CapturePCM "hw:${CardId},15"
+       }
+}
+
+SectionDevice."Mic2" {
+       Comment "Digital microphone"
+
+       Value {
+               CapturePriority 200
+               CaptureChannels 2
+               CapturePCM "hw:${CardId},14"
+       }
+}
+
+SectionDevice."Line1" {
+       Comment "PCM input"
+
+       Value {
+               CapturePriority 100
+               CaptureChannels 2
+               CapturePCM "hw:${CardId},8"
+       }
+}
+
+SectionDevice."Line2" {
+       Comment "PCM output"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackChannels 2
+               PlaybackPCM "hw:${CardId},2"
+       }
+}
\ No newline at end of file
diff --git a/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf b/ucm2/MediaTek/mt8395-evk/mt8395-evk.conf
new file mode 100644 (file)
index 0000000..1957b69
--- /dev/null
@@ -0,0 +1,46 @@
+Syntax 4
+
+SectionUseCase."HiFi" {
+       File "/MediaTek/mt8395-evk/HiFi.conf"
+       Comment "Play high quality music"
+}
+
+BootSequence [
+       cset "name='HP Mux' Audio Playback"
+       cset "name='LOL Mux' Open"
+       cset "name='MISO0_MUX' UL1_CH1"
+       cset "name='MISO1_MUX' UL1_CH1"
+       cset "name='ADC_L_Mux' Left Preamplifier"
+       cset "name='ADC_R_Mux' Right Preamplifier"
+       cset "name='ADC_3_Mux' Preamplifier"
+       cset "name='PGA_L_Mux' AIN1"
+       cset "name='PGA_R_Mux' AIN2"
+       cset "name='PGA_3_Mux' AIN3"
+       cset "name='HDMI_OUT_MUX' Connect"
+       cset "name='DPTX_OUT_MUX' Disconnect"
+       cset "name='Lineout Volume' 10"
+       cset "name='Headset Volume' 2"
+       cset "name='PGA1 Volume' 4"
+       cset "name='PGA2 Volume' 4"
+       cset "name='PGA3 Volume' 4"
+       cset "name='O000 I000 Switch' on"
+       cset "name='O001 I001 Switch' on"
+       cset "name='O002 I004 Switch' on"
+       cset "name='O003 I005 Switch' on"
+       cset "name='O004 I006 Switch' on"
+       cset "name='O005 I007 Switch' on"
+       cset "name='O006 I008 Switch' on"
+       cset "name='O007 I009 Switch' on"
+       cset "name='O008 I010 Switch' on"
+       cset "name='O009 I011 Switch' on"
+       cset "name='O034 I168 Switch' on"
+       cset "name='O035 I169 Switch' on"
+       cset "name='O038 I168 Switch' on"
+       cset "name='O039 I169 Switch' on"
+       cset "name='O040 I002 Switch' on"
+       cset "name='O041 I003 Switch' on"
+       cset "name='O176 I070 Switch' on"
+       cset "name='O177 I071 Switch' on"
+       cset "name='O182 I170 Switch' on"
+       cset "name='O183 I171 Switch' on"
+]
diff --git a/ucm2/conf.d/mt8395-evk/mt8395-evk.conf b/ucm2/conf.d/mt8395-evk/mt8395-evk.conf
new file mode 120000 (symlink)
index 0000000..30557e3
--- /dev/null
@@ -0,0 +1 @@
+../../MediaTek/mt8395-evk/mt8395-evk.conf
\ No newline at end of file