diff -Nru alsa-ucm-conf-1.2.2/debian/changelog alsa-ucm-conf-1.2.2/debian/changelog --- alsa-ucm-conf-1.2.2/debian/changelog 2020-09-15 21:58:46.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/changelog 2020-10-09 11:41:27.000000000 +0800 @@ -1,3 +1,15 @@ +alsa-ucm-conf (1.2.2-1ubuntu0.5) focal; urgency=medium + + * d/p/0019-ucm2-Add-profile-for-Chromebook-Asus-C300.patch + * d/p/0020-ucm2-enable-possible-SOF-support-in-profile-for-Chro.patch + * d/p/0021-ucm2-chtmax98090-add-generic-HiFi.conf-and-SOF-suppo.patch + * d/p/0022-chtmax98090-add-generic-chtmax98090.conf-and-move-Qu.patch + * d/p/0023-Correct-conflicting-mic-in-max98090.patch + Add ucm files for ASUS C300 chromebook which is Intel cherrytrail + platform and uses max98090 audio codec. (LP: #1871306) + + -- Hui Wang Fri, 09 Oct 2020 11:41:27 +0800 + alsa-ucm-conf (1.2.2-1ubuntu0.4) focal; urgency=medium * d/p/0001-ucm2-USB-Audio-Add-more-support-to-Lenovo-ThinkStati.patch diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0019-ucm2-Add-profile-for-Chromebook-Asus-C300.patch alsa-ucm-conf-1.2.2/debian/patches/0019-ucm2-Add-profile-for-Chromebook-Asus-C300.patch --- alsa-ucm-conf-1.2.2/debian/patches/0019-ucm2-Add-profile-for-Chromebook-Asus-C300.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0019-ucm2-Add-profile-for-Chromebook-Asus-C300.patch 2020-10-09 11:40:19.000000000 +0800 @@ -0,0 +1,235 @@ +From b20bc02cdf7829487273bc3a405422f1d037ecae Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 12 May 2020 17:46:14 +0200 +Subject: [PATCH 19/23] 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 +(cherry picked from commit 3900bfa7c57eb195aaa8e3693beac4d49011cf3c) +Signed-off-by: Hui Wang +--- + 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.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0020-ucm2-enable-possible-SOF-support-in-profile-for-Chro.patch alsa-ucm-conf-1.2.2/debian/patches/0020-ucm2-enable-possible-SOF-support-in-profile-for-Chro.patch --- alsa-ucm-conf-1.2.2/debian/patches/0020-ucm2-enable-possible-SOF-support-in-profile-for-Chro.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0020-ucm2-enable-possible-SOF-support-in-profile-for-Chro.patch 2020-10-09 11:40:19.000000000 +0800 @@ -0,0 +1,41 @@ +From 55978d9fd8f35b951639845b0412962d055c4f09 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Thu, 28 May 2020 21:07:45 +0200 +Subject: [PATCH 20/23] ucm2: enable possible SOF support in profile for + Chromebook Asus C300 + +Signed-off-by: Jaroslav Kysela +(cherry picked from commit b081ac49ad9cbea298c3dcc6f029f331e369a213) +Signed-off-by: Hui Wang +--- + ucm2/chtmax98090/HiFi-Quawks.conf | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/ucm2/chtmax98090/HiFi-Quawks.conf b/ucm2/chtmax98090/HiFi-Quawks.conf +index 37d5821..363233d 100644 +--- a/ucm2/chtmax98090/HiFi-Quawks.conf ++++ b/ucm2/chtmax98090/HiFi-Quawks.conf +@@ -3,8 +3,19 @@ SectionVerb { + TQ "HiFi" + } + ++ If.platform { ++ Condition { ++ Type ControlExists ++ Control "name='media0_in Gain 0 Switch'" ++ } ++ True { ++ EnableSequence [ ++ ++ ] ++ } ++ } ++ + EnableSequence [ +- + + # volume values modified + cset "name='Headphone Volume' 25" +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0021-ucm2-chtmax98090-add-generic-HiFi.conf-and-SOF-suppo.patch alsa-ucm-conf-1.2.2/debian/patches/0021-ucm2-chtmax98090-add-generic-HiFi.conf-and-SOF-suppo.patch --- alsa-ucm-conf-1.2.2/debian/patches/0021-ucm2-chtmax98090-add-generic-HiFi.conf-and-SOF-suppo.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0021-ucm2-chtmax98090-add-generic-HiFi.conf-and-SOF-suppo.patch 2020-10-09 11:40:19.000000000 +0800 @@ -0,0 +1,52 @@ +From 158b3ef6a539bb52352e30367ba52d7b667aed8c Mon Sep 17 00:00:00 2001 +From: Pierre-Louis Bossart +Date: Thu, 28 May 2020 17:59:01 -0500 +Subject: [PATCH 21/23] ucm2: chtmax98090: add generic HiFi.conf and SOF + support + +Tested on Cyan Chromebook with both SOF and SST drivers. + +Signed-off-by: Pierre-Louis Bossart +Signed-off-by: Jaroslav Kysela +(backported from commit cf5171b2bf69369c3b7c03495887b372e1ba1f2b) +Signed-off-by: Hui Wang +--- + ucm2/chtmax98090/HiFi.conf | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + create mode 100644 ucm2/chtmax98090/HiFi.conf + +diff --git a/ucm2/chtmax98090/HiFi.conf b/ucm2/chtmax98090/HiFi.conf +new file mode 100644 +index 0000000..f4a8138 +--- /dev/null ++++ b/ucm2/chtmax98090/HiFi.conf +@@ -0,0 +1,26 @@ ++SectionVerb { ++ Value { ++ TQ "HiFi" ++ } ++ ++ If.platform { ++ Condition { ++ Type ControlExists ++ Control "name='media0_in Gain 0 Switch'" ++ } ++ True { ++ EnableSequence [ ++ ++ ] ++ } ++ } ++ ++ EnableSequence [ ++ ++ ] ++} ++ ++ ++ ++ ++ +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0022-chtmax98090-add-generic-chtmax98090.conf-and-move-Qu.patch alsa-ucm-conf-1.2.2/debian/patches/0022-chtmax98090-add-generic-chtmax98090.conf-and-move-Qu.patch --- alsa-ucm-conf-1.2.2/debian/patches/0022-chtmax98090-add-generic-chtmax98090.conf-and-move-Qu.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0022-chtmax98090-add-generic-chtmax98090.conf-and-move-Qu.patch 2020-10-09 11:40:19.000000000 +0800 @@ -0,0 +1,106 @@ +From 45522c0fd14297234e11dbe4ea1d7eb134bfa18a Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Fri, 29 May 2020 15:48:36 +0200 +Subject: [PATCH 22/23] chtmax98090: add generic chtmax98090.conf and move + Quawks init to the generic HiFi.conf + +Signed-off-by: Jaroslav Kysela +(cherry picked from commit b4e4b463054ed7f59e748ade295dcce93d452030) +Signed-off-by: Hui Wang +--- + ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf | 6 ----- + ucm2/chtmax98090/HiFi-Quawks.conf | 29 ------------------------- + ucm2/chtmax98090/HiFi.conf | 15 +++++++++++++ + ucm2/chtmax98090/chtmax98090.conf | 5 +++++ + 4 files changed, 20 insertions(+), 35 deletions(-) + delete mode 100644 ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf + delete mode 100644 ucm2/chtmax98090/HiFi-Quawks.conf + create mode 100644 ucm2/chtmax98090/chtmax98090.conf + +diff --git a/ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf b/ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf +deleted file mode 100644 +index 850897f..0000000 +--- a/ucm2/chtmax98090/GOOGLE-Quawks-1.0.conf ++++ /dev/null +@@ -1,6 +0,0 @@ +-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 +deleted file mode 100644 +index 363233d..0000000 +--- a/ucm2/chtmax98090/HiFi-Quawks.conf ++++ /dev/null +@@ -1,29 +0,0 @@ +-SectionVerb { +- Value { +- TQ "HiFi" +- } +- +- If.platform { +- Condition { +- Type ControlExists +- Control "name='media0_in Gain 0 Switch'" +- } +- True { +- EnableSequence [ +- +- ] +- } +- } +- +- EnableSequence [ +- +- # volume values modified +- cset "name='Headphone Volume' 25" +- cset "name='Speaker Volume' 32" +- ] +-} +- +- +- +- +- +diff --git a/ucm2/chtmax98090/HiFi.conf b/ucm2/chtmax98090/HiFi.conf +index f4a8138..e5015f7 100644 +--- a/ucm2/chtmax98090/HiFi.conf ++++ b/ucm2/chtmax98090/HiFi.conf +@@ -18,6 +18,21 @@ SectionVerb { + EnableSequence [ + + ] ++ ++ If.Quawks { ++ Condition { ++ Type String ++ Haystack "${CardLongName}" ++ Needle "GOOGLE-Quawks-1.0" ++ } ++ True { ++ EnableSequence [ ++ # volume values modified ++ cset "name='Headphone Volume' 25" ++ cset "name='Speaker Volume' 32" ++ ] ++ } ++ } + } + + +diff --git a/ucm2/chtmax98090/chtmax98090.conf b/ucm2/chtmax98090/chtmax98090.conf +new file mode 100644 +index 0000000..84f7a1c +--- /dev/null ++++ b/ucm2/chtmax98090/chtmax98090.conf +@@ -0,0 +1,5 @@ ++Syntax 2 ++SectionUseCase."HiFi" { ++ File "HiFi.conf" ++ Comment "Play HiFi quality Music" ++} +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/0023-Correct-conflicting-mic-in-max98090.patch alsa-ucm-conf-1.2.2/debian/patches/0023-Correct-conflicting-mic-in-max98090.patch --- alsa-ucm-conf-1.2.2/debian/patches/0023-Correct-conflicting-mic-in-max98090.patch 1970-01-01 08:00:00.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/0023-Correct-conflicting-mic-in-max98090.patch 2020-10-09 11:40:19.000000000 +0800 @@ -0,0 +1,34 @@ +From eb811c9d8661a20dd89c197b978f80accfb50b96 Mon Sep 17 00:00:00 2001 +From: jacobopantoja +Date: Thu, 6 Aug 2020 13:53:07 +0200 +Subject: [PATCH 23/23] Correct conflicting mic in max98090 + +'mic' was conflicting 'mic' instead of 'headset', thus preventing correct configuration regarding microphones. + +With this corrected, introducing a headset enables 'headset' mic and disables internal 'mic', whereas releasing the headset disables 'headset' mic and enables internal 'mic' + +BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/43 +From: acobopantoja@gmail.com +Signed-off-by: Jaroslav Kysela +(cherry picked from commit d3ffca2f9846afcc046a4253d914afe905a1a382) +Signed-off-by: Hui Wang +--- + ucm2/codecs/max98090/InternalMic.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ucm2/codecs/max98090/InternalMic.conf b/ucm2/codecs/max98090/InternalMic.conf +index 01967a6..25056f5 100644 +--- a/ucm2/codecs/max98090/InternalMic.conf ++++ b/ucm2/codecs/max98090/InternalMic.conf +@@ -8,7 +8,7 @@ SectionDevice."Mic" { + } + + ConflictingDevice [ +- "Mic" ++ "Headset" + ] + + EnableSequence [ +-- +2.25.1 + diff -Nru alsa-ucm-conf-1.2.2/debian/patches/series alsa-ucm-conf-1.2.2/debian/patches/series --- alsa-ucm-conf-1.2.2/debian/patches/series 2020-09-15 21:58:46.000000000 +0800 +++ alsa-ucm-conf-1.2.2/debian/patches/series 2020-10-09 11:40:38.000000000 +0800 @@ -19,3 +19,9 @@ 0018-USB-Audio-Dell-WD15-Dock-make-input-and-output-volum.patch 0001-ucm2-USB-Audio-Add-more-support-to-Lenovo-ThinkStati.patch + +0019-ucm2-Add-profile-for-Chromebook-Asus-C300.patch +0020-ucm2-enable-possible-SOF-support-in-profile-for-Chro.patch +0021-ucm2-chtmax98090-add-generic-HiFi.conf-and-SOF-suppo.patch +0022-chtmax98090-add-generic-chtmax98090.conf-and-move-Qu.patch +0023-Correct-conflicting-mic-in-max98090.patch