From 6a45d0e255a9b76dbd7e6b29006f51591bd459e4 Mon Sep 17 00:00:00 2001 From: Amery Song Date: Thu, 16 Jan 2020 14:26:08 +0800 Subject: [PATCH] ucm: add support for sof-glkda7219max Signed-off-by: Amery Song --- ucm/sof-glkda7219max/Hdmi1.conf | 31 ++++++ ucm/sof-glkda7219max/Hdmi2.conf | 31 ++++++ ucm/sof-glkda7219max/Hdmi3.conf | 31 ++++++ ucm/sof-glkda7219max/HiFi.conf | 112 +++++++++++++++++++++ ucm/sof-glkda7219max/sof-glkda7219max.conf | 32 ++++++ 5 files changed, 237 insertions(+) create mode 100644 ucm/sof-glkda7219max/Hdmi1.conf create mode 100644 ucm/sof-glkda7219max/Hdmi2.conf create mode 100644 ucm/sof-glkda7219max/Hdmi3.conf create mode 100644 ucm/sof-glkda7219max/HiFi.conf create mode 100644 ucm/sof-glkda7219max/sof-glkda7219max.conf diff --git a/ucm/sof-glkda7219max/Hdmi1.conf b/ucm/sof-glkda7219max/Hdmi1.conf new file mode 100644 index 00000000..7db7ae66 --- /dev/null +++ b/ucm/sof-glkda7219max/Hdmi1.conf @@ -0,0 +1,31 @@ +SectionVerb { + + EnableSequence [ + cdev "hw:sofglkda7219max" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + ] +} + +SectionDevice."HDMI1" { + Comment "HDMI1/DP1 Playback" + + Value { + PlaybackPCM "hw:sofglkda7219max,5" + PlaybackChannels "2" + JackControl "HDMI/DP,pcm=5 Jack" + PlaybackPriority "300" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + cset "name='IEC958 Playback Switch' on" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + cset "name='IEC958 Playback Switch' off" + ] +} diff --git a/ucm/sof-glkda7219max/Hdmi2.conf b/ucm/sof-glkda7219max/Hdmi2.conf new file mode 100644 index 00000000..d24bf0e8 --- /dev/null +++ b/ucm/sof-glkda7219max/Hdmi2.conf @@ -0,0 +1,31 @@ +SectionVerb { + + EnableSequence [ + cdev "hw:sofglkda7219max" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + ] +} + +SectionDevice."HDMI2" { + Comment "HDMI2/DP2 Playback" + + Value { + PlaybackPCM "hw:sofglkda7219max,6" + PlaybackChannels "2" + JackControl "HDMI/DP,pcm=6 Jack" + PlaybackPriority "400" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + cset "name='IEC958 Playback Switch',index=1 on" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + cset "name='IEC958 Playback Switch',index=1 off" + ] +} diff --git a/ucm/sof-glkda7219max/Hdmi3.conf b/ucm/sof-glkda7219max/Hdmi3.conf new file mode 100644 index 00000000..6f9590ff --- /dev/null +++ b/ucm/sof-glkda7219max/Hdmi3.conf @@ -0,0 +1,31 @@ +SectionVerb { + + EnableSequence [ + cdev "hw:sofglkda7219max" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + ] +} + +SectionDevice."HDMI3" { + Comment "HDMI3/DP3 Playback" + + Value { + PlaybackPCM "hw:sofglkda7219max,7" + PlaybackChannels "2" + JackControl "HDMI/DP,pcm=7 Jack" + PlaybackPriority "500" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + cset "name='IEC958 Playback Switch',index=2 on" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + cset "name='IEC958 Playback Switch',index=2 on" + ] +} diff --git a/ucm/sof-glkda7219max/HiFi.conf b/ucm/sof-glkda7219max/HiFi.conf new file mode 100644 index 00000000..bb847507 --- /dev/null +++ b/ucm/sof-glkda7219max/HiFi.conf @@ -0,0 +1,112 @@ +SectionVerb { + + EnableSequence [ + cdev "hw:sofglkda7219max" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + ] +} + +SectionDevice."Speaker" { + Comment "Speaker Playback" + + Value { + PlaybackPCM "hw:sofglkda7219max,0" + PlaybackChannels "2" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + cset "name='Spk Switch' on" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + cset "name='Spk Switch' off" + ] +} + +SectionDevice."Headset Playback" { + Comment "Headset Playback" + + Value { + PlaybackPCM "hw:sofglkda7219max,1" + PlaybackChannels "2" + JackName "sofglkda7219max Headset Jack" + JackControl "Headset Jack" + JackType "gpio" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + cset "name='Headphone Switch' on" + cset "name='Headphone Jack Switch' on" + cset "name='Playback Digital Switch' on" + cset "name='Mixer Out FilterL DACL Switch' on" + cset "name='Mixer Out FilterR DACR Switch' on" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + cset "name='Headphone Switch' off" + cset "name='Headphone Jack Switch' off" + cset "name='Playback Digital Switch' off" + cset "name='Mixer Out FilterL DACL Switch' off" + cset "name='Mixer Out FilterR DACR Switch' off" + ] +} + +SectionDevice."Mic" { + Comment "Headset Capture" + + Value { + CapturePCM "hw:sofglkda7219max,1" + CaptureChannels "2" + JackName "sofglkda7219max Headset Jack" + JackControl "Headset Jack" + JackType "gpio" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + cset "name='Headphone Switch' on" + cset "name='Headset Mic Switch' on" + cset "name='Headphone Jack Switch' on" + cset "name='Mixer In Mic Switch' on" + cset "name='Capture Digital Switch' on" + cset "name='Mixer In Mic Switch' on" + cset "name='Mixin Switch' on" + cset "name='Mic Switch' on" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + cset "name='Headphone Switch' off" + cset "name='Headset Mic Switch' off" + cset "name='Headphone Jack Switch' off" + cset "name='Mixer In Mic Switch' off" + cset "name='Capture Digital Switch' off" + cset "name='Mixer In Mic Switch' off" + cset "name='Mixin Switch' off" + cset "name='Mic Switch' off" + ] +} + +SectionDevice."DMIC" { + Comment "DMIC Capture" + + Value { + CapturePCM "hw:sofglkda7219max,99" + CaptureChannels "4" + } + + EnableSequence [ + cdev "hw:sofglkda7219max" + ] + + DisableSequence [ + cdev "hw:sofglkda7219max" + ] +} diff --git a/ucm/sof-glkda7219max/sof-glkda7219max.conf b/ucm/sof-glkda7219max/sof-glkda7219max.conf new file mode 100644 index 00000000..04f6f1a1 --- /dev/null +++ b/ucm/sof-glkda7219max/sof-glkda7219max.conf @@ -0,0 +1,32 @@ +SectionUseCase."HiFi" { + File "HiFi.conf" + Comment "Default" +} + +SectionUseCase."Hdmi1" { + File "Hdmi1.conf" + Comment "Play to Hdmi1" +} + +SectionUseCase."Hdmi2" { + File "Hdmi2.conf" + Comment "Play to Hdmi2" +} + +SectionUseCase."Hdmi3" { + File "Hdmi3.conf" + Comment "Play to Hdmi3" +} + +SectionDefaults [ + cdev "hw:sofglkda7219max" + cset "name='Headphone Switch' off" + cset "name='Headphone Jack Switch' off" + cset "name='Mic Volume' 50" + cset "name='Out DACL Mux' DAIL" + cset "name='Out DACR Mux' DAIR" + cset "name='Out DAIL Mux' ADC" + cset "name='Out DAIR Mux' ADC" + cset "name='Gain Ramp Rate' 1" + cset "name='Playback Digital Volume' 115" +]