alsa-ucm-conf/0100-ucm2-Add-profile-for-Chromebook-Asus-C300.patch
Takashi Iwai 823fc1a5be Accepting request 809162 from home:tiwai:branches:multimedia:libs
- More catch up of upstream fixes: mostly cosmetic style fixes:
  0011-ucm2-remove-empty-enable-disable-sequence-sections.patch
  0012-ucm2-fix-indentation-use-tabs.patch
  0013-Add-initial-support-for-Realtek-ALC1220-TRX40-mother.patch
  0014-ucm2-fix-chtrt5650-configuration-ucm-validator.patch
  0015-bytcr-rt5651-fix-the-cfg-mic-in1-cfg-mic-in12-match-.patch
  0016-ucm-fix-wrong-If-in-sequence-in-HiFi-dual.conf.patch
- Add UCM profile for Chromebook Asus C300 (bsc#1171492):
  0100-ucm2-Add-profile-for-Chromebook-Asus-C300.patch

OBS-URL: https://build.opensuse.org/request/show/809162
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-ucm-conf?expand=0&rev=13
2020-05-27 06:46:59 +00:00

233 lines
6.4 KiB
Diff

From 383b14abd6dbb80a55b10cb8a5619a9601eda373 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
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 <tiwai@suse.de>
---
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 000000000000..850897fe2f2a
--- /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 000000000000..37d582130657
--- /dev/null
+++ b/ucm2/chtmax98090/HiFi-Quawks.conf
@@ -0,0 +1,18 @@
+SectionVerb {
+ Value {
+ TQ "HiFi"
+ }
+
+ EnableSequence [
+ <platforms/bytcr/PlatformEnableSeq.conf>
+ <codecs/max98090/EnableSeq.conf>
+ # volume values modified
+ cset "name='Headphone Volume' 25"
+ cset "name='Speaker Volume' 32"
+ ]
+}
+
+<codecs/max98090/Headphones.conf>
+<codecs/max98090/Speaker.conf>
+<codecs/max98090/InternalMic.conf>
+<codecs/max98090/HeadsetMic.conf>
diff --git a/ucm2/codecs/max98090/EnableSeq.conf b/ucm2/codecs/max98090/EnableSeq.conf
new file mode 100644
index 000000000000..a04420f4af3d
--- /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 000000000000..66f99a461512
--- /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 000000000000..43f5e9c38c3f
--- /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 000000000000..01967a65e8e0
--- /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 000000000000..fc65e5e204cf
--- /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.16.4