From 3900bfa7c57eb195aaa8e3693beac4d49011cf3c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 12 May 2020 17:46:14 +0200 Subject: [PATCH] ucm2: Add profile for Chromebook Asus C300 ASUS Chromebook C300 alias Google QUAWKS is an Intel Baytrail platform with max98090 codec. This patch adds the basic UCM snippet for the max98090 codec and HiFi.conf for this model. Note that MIC2 is used for the headset mic. If another model with this codec uses a different ADC port, we'd need to create another profile snippet and rename the device. BugLink: https://apibugzilla.suse.com/show_bug.cgi?id=1171492 Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf | 6 +++++ ucm2/chtmax98090/HiFi-Quawks.conf | 18 ++++++++++++++ ucm2/codecs/max98090/EnableSeq.conf | 25 +++++++++++++++++++ ucm2/codecs/max98090/Headphones.conf | 25 +++++++++++++++++++ ucm2/codecs/max98090/HeadsetMic.conf | 32 +++++++++++++++++++++++++ ucm2/codecs/max98090/InternalMic.conf | 25 +++++++++++++++++++ ucm2/codecs/max98090/Speaker.conf | 24 +++++++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf create mode 100644 ucm2/chtmax98090/HiFi-Quawks.conf create mode 100644 ucm2/codecs/max98090/EnableSeq.conf create mode 100644 ucm2/codecs/max98090/Headphones.conf create mode 100644 ucm2/codecs/max98090/HeadsetMic.conf create mode 100644 ucm2/codecs/max98090/InternalMic.conf create mode 100644 ucm2/codecs/max98090/Speaker.conf diff --git a/ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf b/ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf new file mode 100644 index 0000000..850897f --- /dev/null +++ b/ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf @@ -0,0 +1,6 @@ +Syntax 2 +Comment "ASUS C300 built-in audio" +SectionUseCase."HiFi" { + File "HiFi-Quawks.conf" + Comment "Default" +} diff --git a/ucm2/chtmax98090/HiFi-Quawks.conf b/ucm2/chtmax98090/HiFi-Quawks.conf new file mode 100644 index 0000000..37d5821 --- /dev/null +++ b/ucm2/chtmax98090/HiFi-Quawks.conf @@ -0,0 +1,18 @@ +SectionVerb { + Value { + TQ "HiFi" + } + + EnableSequence [ + + + # volume values modified + cset "name='Headphone Volume' 25" + cset "name='Speaker Volume' 32" + ] +} + + + + + diff --git a/ucm2/codecs/max98090/EnableSeq.conf b/ucm2/codecs/max98090/EnableSeq.conf new file mode 100644 index 0000000..a04420f --- /dev/null +++ b/ucm2/codecs/max98090/EnableSeq.conf @@ -0,0 +1,25 @@ +cset "name='Left Speaker Mixer Left DAC Switch' on" +cset "name='Right Speaker Mixer Right DAC Switch' on" +cset "name='Digital EQ 3 Band Switch' off" +cset "name='Digital EQ 5 Band Switch' off" +cset "name='Digital EQ 7 Band Switch' off" +cset "name='Biquad Switch' off" +cset "name='Filter Mode' Music" +cset "name='ADC Oversampling Rate' 0" + +cset "name='DMIC Mux' DMIC" +cset "name='MIC2 Mux' IN34" +cset "name='MIC2 Volume' 10" +cset "name='MIC2 Boost Volume' 0" + +cset "name='ADCR Boost Volume' 4" +cset "name='ADCL Boost Volume' 4" +cset "name='ADCR Volume' 11" +cset "name='ADCL Volume' 11" + +cset "name='Headphone Volume' 10" +cset "name='Speaker Volume' 10" + +cset "name='Speaker Left Mixer Volume' 3" +cset "name='Speaker Right Mixer Volume' 3" +cset "name='Playback Path DC Blocking' on" diff --git a/ucm2/codecs/max98090/Headphones.conf b/ucm2/codecs/max98090/Headphones.conf new file mode 100644 index 0000000..66f99a4 --- /dev/null +++ b/ucm2/codecs/max98090/Headphones.conf @@ -0,0 +1,25 @@ +SectionDevice."Headphones" { + Comment "Headphones" + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId}" + JackControl "Headphone Jack" + } + + ConflictingDevice [ + "Speaker" + ] + + EnableSequence [ + cset "name='Headphone Left Switch' on" + cset "name='Headphone Right Switch' on" + cset "name='Headphone Switch' on" + ] + + DisableSequence [ + cset "name='Headphone Left Switch' off" + cset "name='Headphone Right Switch' off" + cset "name='Headphone Switch' off" + ] +} diff --git a/ucm2/codecs/max98090/HeadsetMic.conf b/ucm2/codecs/max98090/HeadsetMic.conf new file mode 100644 index 0000000..43f5e9c --- /dev/null +++ b/ucm2/codecs/max98090/HeadsetMic.conf @@ -0,0 +1,32 @@ +# Headset Microphone via MIC2 +SectionDevice."Headset" { + Comment "Headset Microphone" + + Value { + CapturePriority 200 + CapturePCM "hw:${CardId}" + JackControl "Headset Mic Jack" + } + + ConflictingDevice [ + "Mic" + ] + + EnableSequence [ + cset "name='Headset Mic Switch' on" + cset "name='DMIC Mux' ADC" + cset "name='Record Path DC Blocking' on" + + cset "name='Left ADC Mixer MIC2 Switch' on" + cset "name='Right ADC Mixer MIC2 Switch' on" + ] + + DisableSequence [ + cset "name='Headset Mic Switch' off" + cset "name='DMIC Mux' DMIC" + cset "name='Record Path DC Blocking' off" + + cset "name='Left ADC Mixer MIC2 Switch' off" + cset "name='Right ADC Mixer MIC2 Switch' off" + ] +} diff --git a/ucm2/codecs/max98090/InternalMic.conf b/ucm2/codecs/max98090/InternalMic.conf new file mode 100644 index 0000000..01967a6 --- /dev/null +++ b/ucm2/codecs/max98090/InternalMic.conf @@ -0,0 +1,25 @@ +# internal microphone via DMIC +SectionDevice."Mic" { + Comment "Internal Microphone" + + Value { + CapturePriority 100 + CapturePCM "hw:${CardId}" + } + + ConflictingDevice [ + "Mic" + ] + + EnableSequence [ + cset "name='Int Mic Switch' on" + cset "name='DMIC Mux' DMIC" + cset "name='Record Path DC Blocking' off" + ] + + DisableSequence [ + cset "name='Int Mic Switch' off" + cset "name='DMIC Mux' ADC" + cset "name='Record Path DC Blocking' on" + ] +} diff --git a/ucm2/codecs/max98090/Speaker.conf b/ucm2/codecs/max98090/Speaker.conf new file mode 100644 index 0000000..fc65e5e --- /dev/null +++ b/ucm2/codecs/max98090/Speaker.conf @@ -0,0 +1,24 @@ +SectionDevice."Speaker" { + Comment "Speaker" + + Value { + PlaybackPriority 100 + PlaybackPCM "hw:${CardId}" + } + + ConflictingDevice [ + "Headphones" + ] + + EnableSequence [ + cset "name='Speaker Left Switch' on" + cset "name='Speaker Right Switch' on" + cset "name='Ext Spk Switch' on" + ] + + DisableSequence [ + cset "name='Speaker Left Switch' off" + cset "name='Speaker Right Switch' off" + cset "name='Ext Spk Switch' off" + ] +} -- 2.47.1