alsa-ucm-conf/0001-sof-bdw-rt5677-initial-port-to-UCM2.patch
Takashi Iwai 0658f0347a Accepting request 784660 from home:tiwai:branches:multimedia:libs
- Update to alsa-ucm-conf 1.2.2:
  including previous fixes
- Backport recent upstream fixes: SOF, BDW-rt5677 and jack fixes;
  0001-sof-bdw-rt5677-initial-port-to-UCM2.patch
  0002-ucm2-treewide-JackHWMute-fixes.patch
  0003-sof-hda-dsp-Support-systems-without-integrated-graph.patch
- Drop obsoleted patches:
  0001-sof-hda-dsp-Fix-the-Dmic0-CaptureMixerElem-for-v1.4..patch
  0002-sof-hda-dsp-Use-more-strict-names-according-latest-u.patch
  0003-README-remove-topologies-note.patch
  0004-bytcht-es8316-Fix-missing-including-of-HeadPhones.co.patch
  0005-ucm2-fix-the-verb-path-in-chtrt5645-chtrt5645-dmic2..patch
  0006-broadwell-rt286-add-support-for-hardware-volume-conf.patch
  0007-broxton-rt298-corrections-cleanups.patch
  0008-bytcr-rt5640-cleanups-and-corrections.patch
  0009-bytcr-rt5651-cleanups-and-corrections.patch
  0010-bytcht-cx2072x-cleanups-and-corrections.patch
  0011-bytcht-es8316-cleanups-and-corrections.patch
  0012-DAISY-I2S-added-back-PCM-devices.patch
  0013-DB410c-cleanups-and-corrections.patch
  0014-DB820c-cleanups-and-corrections.patch
  0015-Dell-WD15-Dock-cleaups-and-corrections.patch
  0016-HDA-Intel-HiFi-dual-fixes-and-corrections.patch
  0017-cht-bsw-rt5672-fixes-and-corrections.patch
  0018-chtnau8824-fixes-and-corrections.patch
  0019-skylake-rt286-fixes-and-corrections.patch
  0020-SDP4430-corrections-and-fixes.patch
  0021-sof-hda-dsp-fix-typo-PlaybackMixerMaster-PlaybackMas.patch
  0022-broadwell-rt286-add-correct-prefix-to-Priority-field.patch
  0023-GoogleNyan-comment-CaptureControl-what-is-this.patch

OBS-URL: https://build.opensuse.org/request/show/784660
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-ucm-conf?expand=0&rev=9
2020-03-13 14:13:30 +00:00

236 lines
5.9 KiB
Diff

From 46222753fdddc86d6a0b92c465875f71c628a779 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Thu, 27 Feb 2020 12:40:20 -0600
Subject: [PATCH 1/3] sof-bdw-rt5677: initial port to UCM2
Tested on Pixel 2015/SAMUS Chromebook.
Known limitations:
Left/Right confusion (probably a firmware issue)
PulseAudio does not switch capture devices on headset plug
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
ucm2/sof-bdw-rt5677/HiFi.conf | 194 ++++++++++++++++++++++++++++++++
ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf | 6 +
2 files changed, 200 insertions(+)
create mode 100644 ucm2/sof-bdw-rt5677/HiFi.conf
create mode 100644 ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf
diff --git a/ucm2/sof-bdw-rt5677/HiFi.conf b/ucm2/sof-bdw-rt5677/HiFi.conf
new file mode 100644
index 000000000000..f4b144996d37
--- /dev/null
+++ b/ucm2/sof-bdw-rt5677/HiFi.conf
@@ -0,0 +1,194 @@
+# Use case Configuration for sof-bdw-rt5677
+# command-line sequence to switch playback/capture
+# alsaucm -c sof-bdw-rt5677 set _verb HiFi
+# alsaucm -c sof-bdw-rt5677 set _verb HiFi set _enadev Headphones
+
+
+SectionVerb {
+
+ EnableSequence [
+
+ cset "name='PDM1 L Mux' STO1 DAC MIX"
+ cset "name='PDM1 R Mux' STO1 DAC MIX"
+
+ # Adjust Master Playback volume if needed
+ # cset "name='Master Playback Volume' 30"
+
+ cset "name='OUT1 Playback Switch' off"
+ cset "name='OUT2 Playback Switch' off"
+
+ cset "name='DAC1 Playback Volume' 175"
+ cset "name='DAC2 Playback Volume' 175"
+ cset "name='DAC12 SRC Mux' STO1 DAC MIX"
+
+ cset "name='Stereo DAC MIXL ST L Switch' off"
+ cset "name='Stereo DAC MIXL DAC1 L Switch' off"
+ cset "name='Stereo DAC MIXL DAC2 L Switch' off"
+ cset "name='Stereo DAC MIXL DAC1 R Switch' on"
+
+ cset "name='Stereo DAC MIXR ST R Switch' off"
+ cset "name='Stereo DAC MIXR DAC1 R Switch' off"
+ cset "name='Stereo DAC MIXR DAC2 R Switch' off"
+ cset "name='Stereo DAC MIXR DAC1 L Switch' on"
+
+ cset "name='DAC1 MIXL Stereo ADC Switch' off"
+ cset "name='DAC1 MIXL DAC1 Switch' on"
+
+ cset "name='DAC1 MIXR Stereo ADC Switch' off"
+ cset "name='DAC1 MIXR DAC1 Switch' on"
+
+ cset "name='DAC1 Mux' IF1 DAC 01"
+
+ cset "name='Stereo1 DMIC Mux' DMIC1"
+ cset "name='Stereo1 ADC2 Mux' DMIC"
+ cset "name='Stereo1 ADC1 Mux' ADC1/2"
+
+ cset "name='Sto1 ADC MIXL ADC1 Switch' off"
+ cset "name='Sto1 ADC MIXL ADC2 Switch' off"
+ cset "name='Sto1 ADC MIXL ADC2 Switch' on"
+
+ cset "name='Sto1 ADC MIXR ADC1 Switch' off"
+ cset "name='Sto1 ADC MIXR ADC2 Switch' off"
+ cset "name='Sto1 ADC MIXR ADC2 Switch' on"
+
+ cset "name='IF1 ADC1 Mux' STO1 ADC MIX"
+ cset "name='IF1 ADC1 Swap Mux' L/R"
+
+ # Adjust Mic Capture Volume if needed
+ # cset "name='Mic Capture Volume' 30"
+
+ cset "name='ADC1 Capture Switch' on"
+ cset "name='ADC1 Capture Volume' 31"
+ cset "name='STO1 ADC Boost Volume' 2"
+
+ cset "name='Headphone Switch' off"
+ cset "name='Speaker Switch' on"
+
+ cset "name='Remote DMICs Switch' on"
+ cset "name='Mono DMIC L Mux' DMIC1"
+ cset "name='Mono ADC2 L Mux' DMIC"
+ cset "name='Mono ADC MIXL ADC1 Switch' off"
+ cset "name='Mono ADC MIXL ADC2 Switch' on"
+ cset "name='VAD ADC Mux' MONO ADC MIX L"
+ cset "name='IB01 Mux' VAD ADC/DAC1 FS"
+ cset "name='IB01 Bypass Mux' Bypass"
+ cset "name='Mono ADC Boost Volume' 2"
+ ]
+
+ DisableSequence [
+ ]
+}
+
+SectionDevice."Speaker" {
+ Comment "Speakers"
+
+ ConflictingDevice [
+ "Headphones"
+ ]
+
+ EnableSequence [
+ ]
+
+ DisableSequence [
+ ]
+
+ Value {
+ PlaybackPriority 100
+ PlaybackPCM "hw:${CardId}"
+ }
+}
+
+
+SectionDevice."Headphones" {
+ Comment "Headphones"
+
+ ConflictingDevice [
+ "Speaker"
+ ]
+
+ EnableSequence [
+ cset "name='Speaker Switch' off"
+ cset "name='Stereo DAC MIXL DAC1 R Switch' off"
+ cset "name='Stereo DAC MIXR DAC1 L Switch' off"
+ cset "name='Stereo DAC MIXL DAC1 L Switch' on"
+ cset "name='Stereo DAC MIXR DAC1 R Switch' on"
+ cset "name='OUT1 Playback Switch' on"
+ cset "name='OUT2 Playback Switch' on"
+ cset "name='Headphone Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Headphone Switch' off"
+ cset "name='OUT1 Playback Switch' off"
+ cset "name='OUT2 Playback Switch' off"
+ cset "name='Stereo DAC MIXL DAC1 L Switch' off"
+ cset "name='Stereo DAC MIXR DAC1 R Switch' off"
+ cset "name='Stereo DAC MIXL DAC1 R Switch' on"
+ cset "name='Stereo DAC MIXR DAC1 L Switch' on"
+ cset "name='Speaker Switch' on"
+ ]
+
+ Value {
+ PlaybackPriority 300
+ PlaybackPCM "hw:${CardId}"
+ JackControl "Headphone Jack"
+ JackHWMute "Speakers"
+ }
+}
+
+SectionDevice."Mic" {
+ Comment "Internal Microphone"
+
+ ConflictingDevice [
+ "Headset"
+ ]
+
+ EnableSequence [
+ ]
+
+ DisableSequence [
+ ]
+
+ Value {
+ CapturePriority 100
+ CapturePCM "hw:${CardId}"
+ }
+}
+
+SectionDevice."Headset" {
+ Comment "Headset Microphone"
+
+ ConflictingDevice [
+ "Mic"
+ ]
+
+ EnableSequence [
+ cset "name='Sto1 ADC MIXL ADC2 Switch' off"
+ cset "name='Sto1 ADC MIXR ADC2 Switch' off"
+ cset "name='Local DMICs Switch' off"
+
+ cset "name='IF1 ADC1 Swap Mux' L/L"
+
+ cset "name='Sto1 ADC MIXL ADC1 Switch' on"
+ cset "name='Sto1 ADC MIXR ADC1 Switch' on"
+ cset "name='Headset Mic Switch' on"
+ ]
+
+ DisableSequence [
+ cset "name='Sto1 ADC MIXL ADC1 Switch' off"
+ cset "name='Sto1 ADC MIXR ADC1 Switch' off"
+ cset "name='Headset Mic Switch' off"
+
+ cset "name='IF1 ADC1 Swap Mux' L/R"
+
+ cset "name='Sto1 ADC MIXL ADC2 Switch' on"
+ cset "name='Sto1 ADC MIXR ADC2 Switch' on"
+ cset "name='Local DMICs Switch' on"
+ ]
+
+ Value {
+ CapturePriority 300
+ CapturePCM "hw:${CardId}"
+ JackControl "Mic Jack"
+ }
+}
diff --git a/ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf b/ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf
new file mode 100644
index 000000000000..d672df281af8
--- /dev/null
+++ b/ucm2/sof-bdw-rt5677/sof-bdw-rt5677.conf
@@ -0,0 +1,6 @@
+Syntax 2
+
+SectionUseCase."HiFi" {
+ File "HiFi.conf"
+ Comment "Default"
+}
--
2.16.4