Hello community,

here is the log from the commit of package alsa-ucm-conf for openSUSE:Factory 
checked in at 2020-02-21 16:40:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa-ucm-conf (Old)
 and      /work/SRC/openSUSE:Factory/.alsa-ucm-conf.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa-ucm-conf"

Fri Feb 21 16:40:29 2020 rev:3 rq:774845 version:1.2.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa-ucm-conf/alsa-ucm-conf.changes      
2020-01-24 13:06:03.317310006 +0100
+++ /work/SRC/openSUSE:Factory/.alsa-ucm-conf.new.26092/alsa-ucm-conf.changes   
2020-02-21 16:41:09.725889675 +0100
@@ -1,0 +2,35 @@
+Wed Feb 12 20:42:40 CET 2020 - [email protected]
+
+- Backport upstream fixes: cleanup and correctsion for ucm2:
+  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
+  0024-VEYRON-I2S-corrections-and-fixes.patch
+  0025-SDP4430-corrections-and-fixes.patch
+  0026-chtrt5645-corrections-and-fixes.patch
+  0027-GoogleNyan-corrections-and-fixes.patch
+  0028-PAZ00-corrections-and-fixes.patch
+  0029-SDP4430-corrections-and-fixes.patch
+  0030-PandaBoard-corrections-and-fixes.patch
+  0031-PandaBoardES-corrections-and-fixes.patch
+  0032-kblrt5660-corrections-and-fixes.patch
+  0033-bytcr-rt5640-corrections-and-fixes.patch
+  0034-bytcht-es8316-corrections-and-fixes.patch
+  0035-sof-hda-dsp-corrections-and-fixes.patch
+  0036-ucm2-treewide-remove-Playback-and-Capture-channels-2.patch
+
+-------------------------------------------------------------------

New:
----
  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
  0024-VEYRON-I2S-corrections-and-fixes.patch
  0025-SDP4430-corrections-and-fixes.patch
  0026-chtrt5645-corrections-and-fixes.patch
  0027-GoogleNyan-corrections-and-fixes.patch
  0028-PAZ00-corrections-and-fixes.patch
  0029-SDP4430-corrections-and-fixes.patch
  0030-PandaBoard-corrections-and-fixes.patch
  0031-PandaBoardES-corrections-and-fixes.patch
  0032-kblrt5660-corrections-and-fixes.patch
  0033-bytcr-rt5640-corrections-and-fixes.patch
  0034-bytcht-es8316-corrections-and-fixes.patch
  0035-sof-hda-dsp-corrections-and-fixes.patch
  0036-ucm2-treewide-remove-Playback-and-Capture-channels-2.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alsa-ucm-conf.spec ++++++
--- /var/tmp/diff_new_pack.BZ28Gr/_old  2020-02-21 16:41:11.865893951 +0100
+++ /var/tmp/diff_new_pack.BZ28Gr/_new  2020-02-21 16:41:11.881893983 +0100
@@ -29,6 +29,36 @@
 Patch4:         0004-bytcht-es8316-Fix-missing-including-of-HeadPhones.co.patch
 Patch5:         0005-ucm2-fix-the-verb-path-in-chtrt5645-chtrt5645-dmic2..patch
 Patch6:         0006-broadwell-rt286-add-support-for-hardware-volume-conf.patch
+Patch7:         0007-broxton-rt298-corrections-cleanups.patch
+Patch8:         0008-bytcr-rt5640-cleanups-and-corrections.patch
+Patch9:         0009-bytcr-rt5651-cleanups-and-corrections.patch
+Patch10:        0010-bytcht-cx2072x-cleanups-and-corrections.patch
+Patch11:        0011-bytcht-es8316-cleanups-and-corrections.patch
+Patch12:        0012-DAISY-I2S-added-back-PCM-devices.patch
+Patch13:        0013-DB410c-cleanups-and-corrections.patch
+Patch14:        0014-DB820c-cleanups-and-corrections.patch
+Patch15:        0015-Dell-WD15-Dock-cleaups-and-corrections.patch
+Patch16:        0016-HDA-Intel-HiFi-dual-fixes-and-corrections.patch
+Patch17:        0017-cht-bsw-rt5672-fixes-and-corrections.patch
+Patch18:        0018-chtnau8824-fixes-and-corrections.patch
+Patch19:        0019-skylake-rt286-fixes-and-corrections.patch
+Patch20:        0020-SDP4430-corrections-and-fixes.patch
+Patch21:        0021-sof-hda-dsp-fix-typo-PlaybackMixerMaster-PlaybackMas.patch
+Patch22:        0022-broadwell-rt286-add-correct-prefix-to-Priority-field.patch
+Patch23:        0023-GoogleNyan-comment-CaptureControl-what-is-this.patch
+Patch24:        0024-VEYRON-I2S-corrections-and-fixes.patch
+Patch25:        0025-SDP4430-corrections-and-fixes.patch
+Patch26:        0026-chtrt5645-corrections-and-fixes.patch
+Patch27:        0027-GoogleNyan-corrections-and-fixes.patch
+Patch28:        0028-PAZ00-corrections-and-fixes.patch
+Patch29:        0029-SDP4430-corrections-and-fixes.patch
+Patch30:        0030-PandaBoard-corrections-and-fixes.patch
+Patch31:        0031-PandaBoardES-corrections-and-fixes.patch
+Patch32:        0032-kblrt5660-corrections-and-fixes.patch
+Patch33:        0033-bytcr-rt5640-corrections-and-fixes.patch
+Patch34:        0034-bytcht-es8316-corrections-and-fixes.patch
+Patch35:        0035-sof-hda-dsp-corrections-and-fixes.patch
+Patch36:        0036-ucm2-treewide-remove-Playback-and-Capture-channels-2.patch
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
@@ -43,6 +73,36 @@
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
+%patch21 -p1
+%patch22 -p1
+%patch23 -p1
+%patch24 -p1
+%patch25 -p1
+%patch26 -p1
+%patch27 -p1
+%patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
+%patch36 -p1
 
 %build
 

++++++ 0007-broxton-rt298-corrections-cleanups.patch ++++++
>From b70e91923bfa61989acb32801bee259a4c04674d Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Thu, 23 Jan 2020 14:13:10 +0100
Subject: [PATCH 07/36] broxton-rt298: corrections, cleanups

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/broxton-rt298/Hdmi.conf          | 43 ++++++++++++++++++++++++
 ucm2/broxton-rt298/Hdmi1.conf         | 23 -------------
 ucm2/broxton-rt298/Hdmi2.conf         | 23 -------------
 ucm2/broxton-rt298/HiFi.conf          | 63 ++++++++++++++++++++---------------
 ucm2/broxton-rt298/broxton-rt298.conf | 18 +++-------
 5 files changed, 84 insertions(+), 86 deletions(-)
 create mode 100644 ucm2/broxton-rt298/Hdmi.conf
 delete mode 100644 ucm2/broxton-rt298/Hdmi1.conf
 delete mode 100644 ucm2/broxton-rt298/Hdmi2.conf

diff --git a/ucm2/broxton-rt298/Hdmi.conf b/ucm2/broxton-rt298/Hdmi.conf
new file mode 100644
index 000000000000..fc64fe77743f
--- /dev/null
+++ b/ucm2/broxton-rt298/Hdmi.conf
@@ -0,0 +1,43 @@
+# Usecase for device HDMI1/Display Port stereo playback on Intel 
SKYLAKE/KABYLAKE platforms
+
+SectionDevice."HDMI1" {
+       Comment "HDMI/Display Port 1 Stereo"
+
+       Value {
+               PlaybackPCM "hw:${CardId},4"
+               PlaybackPriority 500
+               If.1 {
+                       Condition {
+                               Type ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=4 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=4 Jack"
+                       }
+               }
+       }
+}
+
+SectionDevice."HDMI2" {
+       Comment "HDMI/Display Port 2 Stereo"
+
+       Value {
+               PlaybackPCM "hw:${CardId},5"
+               PlaybackPriority 600
+               If.1 {
+                       Condition {
+                               Type ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=5 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=5 Jack"
+                       }
+               }
+       }
+}
diff --git a/ucm2/broxton-rt298/Hdmi1.conf b/ucm2/broxton-rt298/Hdmi1.conf
deleted file mode 100644
index ede176bace07..000000000000
--- a/ucm2/broxton-rt298/Hdmi1.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-# Usecase for device HDMI1/Display Port stereo playback on Intel 
SKYLAKE/KABYLAKE platforms
-# For Audio in I2S mode
-
-SectionDevice."Hdmi1" {
-        Comment "HDMI/Display Port 1 Stereo"
-
-        Value {
-                PlaybackPCM "hw:${CardId},4"
-                PlaybackPriority "3"
-               If.1 {
-                       Condition {
-                               Type ControlExists
-                               Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
-                       }
-                       True {
-                               JackControl "HDMI/DP,pcm=4 Jack"
-                       }
-                       False {
-                               JackControl "HDMI/DP, pcm=4 Jack"
-                       }
-               }
-        }
-}
diff --git a/ucm2/broxton-rt298/Hdmi2.conf b/ucm2/broxton-rt298/Hdmi2.conf
deleted file mode 100644
index 9718bae23392..000000000000
--- a/ucm2/broxton-rt298/Hdmi2.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-# Usecase for device HDMI1/Display Port stereo playback on Intel 
SKYLAKE/KABYLAKE platforms
-# For Audio in I2S mode
-
-SectionDevice."Hdmi2" {
-        Comment "HDMI/Display Port 2 Stereo"
-
-        Value {
-               PlaybackPCM "hw:${CardId},5"
-               PlaybackPriority "4"
-               If.1 {
-                       Condition {
-                               Type ControlExists
-                               Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
-                       }
-                       True {
-                               JackControl "HDMI/DP,pcm=5 Jack"
-                       }
-                       False {
-                               JackControl "HDMI/DP, pcm=5 Jack"
-                       }
-               }
-        }
-}
diff --git a/ucm2/broxton-rt298/HiFi.conf b/ucm2/broxton-rt298/HiFi.conf
index 630d5e1eb175..6f5b9a594f65 100644
--- a/ucm2/broxton-rt298/HiFi.conf
+++ b/ucm2/broxton-rt298/HiFi.conf
@@ -9,31 +9,29 @@ SectionVerb {
 
        Value {
                TQ "HiFi"
-               CapturePCM "hw:${CardId},1"
-               PlaybackPCM "hw:${CardId},0"
        }
 }
 
-SectionDevice."DigitalMic" {
-       Comment "DMIC Stereo"
+SectionDevice."Speaker" {
+       Comment "Speaker"
 
        ConflictingDevice [
-               "Headset"
+               "Headphones"
        ]
 
        EnableSequence [
-               cset "name='media0_out mo dmic01_hifi_in mi Switch' 1"
-               cset "name='media0_out mo codec0_in mi Switch' 0"
-               cset "name='Mic Jack Switch' 0"
-
+               cset "name='SPO Switch' 1"
+               cset "name='Speaker Playback Switch' 1,1"
+               cset "name='Speaker Switch' 1"
+               cset "name='HPO L Switch' 0"
+               cset "name='HPO R Switch' 0"
        ]
 
-       DisableSequence [
-               cset "name='media0_out mo codec0_in mi Switch' 1"
-               cset "name='media0_out mo dmic01_hifi_in mi Switch' 0"
-               cset "name='Mic Jack Switch' 1"
-               cset "name='ADC 0 Mux' 0"
-       ]
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               JackHWMute "Headphones"
+       }
 }
 
 SectionDevice."Headphones" {
@@ -51,36 +49,45 @@ SectionDevice."Headphones" {
        ]
 
        Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
 }
 
-SectionDevice."Speaker" {
-       Comment "Speaker"
+SectionDevice."Mic" {
+       Comment "Digital Microphone"
 
        ConflictingDevice [
-               "Headphones"
+               "Headset"
        ]
 
        EnableSequence [
-               cset "name='SPO Switch' 1"
-               cset "name='Speaker Playback Switch' 1,1"
-               cset "name='Speaker Switch' 1"
-               cset "name='HPO L Switch' 0"
-               cset "name='HPO R Switch' 0"
+               cset "name='media0_out mo dmic01_hifi_in mi Switch' 1"
+               cset "name='media0_out mo codec0_in mi Switch' 0"
+               cset "name='Mic Jack Switch' 0"
+
+       ]
+
+       DisableSequence [
+               cset "name='media0_out mo codec0_in mi Switch' 1"
+               cset "name='media0_out mo dmic01_hifi_in mi Switch' 0"
+               cset "name='Mic Jack Switch' 1"
+               cset "name='ADC 0 Mux' 0"
        ]
 
        Value {
-               JackHWMute "Headphones"
+               CapturePriority 100
+               CapturePCM "hw:${CardId},1"
        }
 }
 
 SectionDevice."Headset" {
-       Comment "Headset Mic"
+       Comment "Headset Microphone"
 
        ConflictingDevice [
-               "DigitalMic"
+               "Mic"
        ]
 
        EnableSequence [
@@ -97,6 +104,10 @@ SectionDevice."Headset" {
        ]
 
        Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
                JackControl "Mic Jack"
        }
 }
+
+<broxton-rt298/Hdmi.conf>
diff --git a/ucm2/broxton-rt298/broxton-rt298.conf 
b/ucm2/broxton-rt298/broxton-rt298.conf
index 8752e915854a..1332dc5e55a9 100644
--- a/ucm2/broxton-rt298/broxton-rt298.conf
+++ b/ucm2/broxton-rt298/broxton-rt298.conf
@@ -8,21 +8,11 @@ SectionUseCase."HiFi" {
        Comment "Play and record HiFi quality Music"
 }
 
-SectionUseCase."Hdmi1" {
-        File "Hdmi1.conf"
-        Comment "Play on Hdmi/DP 1"
-}
-
-SectionUseCase."Hdmi2" {
-        File "Hdmi2.conf"
-        Comment "Play on Hdmi/DP 2"
-}
-
 ValueDefaults {
-       PlaybackChannels "2"
-       PlaybackPriority "1"
-       CaptureChannels "2"
-       CapturePriority "2"
+       PlaybackChannels 2
+       PlaybackPriority 1
+       CaptureChannels 2
+       CapturePriority 2
 }
 
 SectionDefaults [
-- 
2.16.4

++++++ 0008-bytcr-rt5640-cleanups-and-corrections.patch ++++++
>From e1f9bdb95e1cf90c17a44fa5734b41b6656d648d Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Thu, 23 Jan 2020 19:03:53 +0100
Subject: [PATCH 08/36] bytcr-rt5640: cleanups and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/codecs/rt5640/DigitalMics.conf     | 8 ++++----
 ucm2/codecs/rt5640/HeadPhones.conf      | 4 +++-
 ucm2/codecs/rt5640/HeadsetMic.conf      | 8 ++++----
 ucm2/codecs/rt5640/IN1-InternalMic.conf | 6 +++---
 ucm2/codecs/rt5640/IN3-InternalMic.conf | 8 ++++----
 ucm2/codecs/rt5640/MonoSpeaker.conf     | 6 ++++--
 ucm2/codecs/rt5640/Speaker.conf         | 4 +++-
 7 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/ucm2/codecs/rt5640/DigitalMics.conf 
b/ucm2/codecs/rt5640/DigitalMics.conf
index 36982c476317..17cae1953677 100644
--- a/ucm2/codecs/rt5640/DigitalMics.conf
+++ b/ucm2/codecs/rt5640/DigitalMics.conf
@@ -1,10 +1,8 @@
-SectionDevice."DigitalMics" {
+SectionDevice."Mic" {
        Comment "Internal Digital Microphones"
 
        ConflictingDevice [
-               "IN1-InternalMics"
-               "IN3-InternalMics"
-               "HeadsetMic"
+               "Headset"
        ]
 
        EnableSequence [
@@ -22,6 +20,8 @@ SectionDevice."DigitalMics" {
        ]
 
        Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},0"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/HeadPhones.conf 
b/ucm2/codecs/rt5640/HeadPhones.conf
index e37442dc73f8..dccc943490c1 100644
--- a/ucm2/codecs/rt5640/HeadPhones.conf
+++ b/ucm2/codecs/rt5640/HeadPhones.conf
@@ -32,7 +32,9 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
        }
 }
diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf 
b/ucm2/codecs/rt5640/HeadsetMic.conf
index a99b29533ced..f6d9423963ac 100644
--- a/ucm2/codecs/rt5640/HeadsetMic.conf
+++ b/ucm2/codecs/rt5640/HeadsetMic.conf
@@ -1,10 +1,8 @@
-SectionDevice."HeadsetMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        ConflictingDevice [
-               "IN1-InternalMics"
-               "IN3-InternalMics"
-               "DigitalMics"
+               "Mic"
        ]
 
        EnableSequence [
@@ -38,6 +36,8 @@ SectionDevice."HeadsetMic" {
        ]
 
        Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId},0"
                CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf 
b/ucm2/codecs/rt5640/IN1-InternalMic.conf
index 95fc89eb4c58..435cce83dc13 100644
--- a/ucm2/codecs/rt5640/IN1-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf
@@ -1,10 +1,8 @@
-SectionDevice."IN1-InternalMics" {
+SectionDevice."Mic" {
        Comment "Internal Microphone on IN1"
 
        ConflictingDevice [
-               "DigitalMics"
                "HeadsetMic"
-               "IN3-InternalMics"
        ]
 
        EnableSequence [
@@ -41,6 +39,8 @@ SectionDevice."IN1-InternalMics" {
        ]
 
        Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},0"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf 
b/ucm2/codecs/rt5640/IN3-InternalMic.conf
index b8270e9605fa..4d4060e23324 100644
--- a/ucm2/codecs/rt5640/IN3-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf
@@ -1,10 +1,8 @@
-SectionDevice."IN3-InternalMics" {
+SectionDevice."Mic" {
        Comment "Internal Microphone on IN3"
 
        ConflictingDevice [
-               "DigitalMics"
-               "HeadsetMic"
-               "IN1-InternalMics"
+               "Headset"
        ]
 
        EnableSequence [
@@ -41,6 +39,8 @@ SectionDevice."IN3-InternalMics" {
        ]
 
        Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},0"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf 
b/ucm2/codecs/rt5640/MonoSpeaker.conf
index ee4eff31f6c7..6ca51e2397d1 100644
--- a/ucm2/codecs/rt5640/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5640/MonoSpeaker.conf
@@ -1,4 +1,4 @@
-SectionDevice."MonoSpeaker" {
+SectionDevice."Speaker" {
        Comment "Mono Speaker"
 
        ConflictingDevice [
@@ -37,6 +37,8 @@ SectionDevice."MonoSpeaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf
index 564a6b308ce6..09b99cf6410d 100644
--- a/ucm2/codecs/rt5640/Speaker.conf
+++ b/ucm2/codecs/rt5640/Speaker.conf
@@ -37,6 +37,8 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackPriority 100
+               PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0009-bytcr-rt5651-cleanups-and-corrections.patch ++++++
>From 38989bd8f548a5b79d53c8278a5f25a5b3904d5f Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Thu, 23 Jan 2020 19:39:08 +0100
Subject: [PATCH 09/36] bytcr-rt5651: cleanups and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/bytcr-rt5651/HiFi-Components.conf     |  7 +++++--
 ucm2/bytcr-rt5651/HiFi-LongName.conf       |  6 ++++--
 ucm2/bytcr-rt5651/HiFi.conf                |  5 -----
 ucm2/codecs/rt5651/DigitalMic.conf         | 12 +++---------
 ucm2/codecs/rt5651/HeadPhones-swapped.conf |  5 +++--
 ucm2/codecs/rt5651/HeadPhones.conf         |  5 +++--
 ucm2/codecs/rt5651/IN1-InternalMic.conf    | 14 ++++----------
 ucm2/codecs/rt5651/IN12-InternalMic.conf   | 14 ++++----------
 ucm2/codecs/rt5651/IN2-HeadsetMic.conf     | 12 +++++-------
 ucm2/codecs/rt5651/IN2-InternalMic.conf    | 14 ++++----------
 ucm2/codecs/rt5651/IN3-HeadsetMic.conf     | 12 +++++-------
 ucm2/codecs/rt5651/MonoSpeaker.conf        |  7 ++++---
 ucm2/codecs/rt5651/Speaker.conf            |  5 +++--
 13 files changed, 47 insertions(+), 71 deletions(-)

diff --git a/ucm2/bytcr-rt5651/HiFi-Components.conf 
b/ucm2/bytcr-rt5651/HiFi-Components.conf
index 235838e553a2..53ebcbe252c8 100644
--- a/ucm2/bytcr-rt5651/HiFi-Components.conf
+++ b/ucm2/bytcr-rt5651/HiFi-Components.conf
@@ -42,6 +42,11 @@ If.dmic1 {
        }
        True {
                <codecs/rt5651/DigitalMic.conf>
+               <codecs/rt5651/IN2-HeadsetMic.conf>
+               SectionDevice."Mic".ConflictingDevice.0 "Headset"
+       }
+       False {
+               <codecs/rt5651/IN3-HeadsetMic.conf>
        }
 }
 
@@ -77,5 +82,3 @@ If.in12 {
                <codecs/rt5651/IN12-InternalMic.conf>
        }
 }
-
-<codecs/rt5651/IN3-HeadsetMic.conf>
diff --git a/ucm2/bytcr-rt5651/HiFi-LongName.conf 
b/ucm2/bytcr-rt5651/HiFi-LongName.conf
index 58eb722d485b..e6dd90813681 100644
--- a/ucm2/bytcr-rt5651/HiFi-LongName.conf
+++ b/ucm2/bytcr-rt5651/HiFi-LongName.conf
@@ -42,6 +42,10 @@ If.dmic1 {
        }
        True {
                <codecs/rt5651/DigitalMic.conf>
+               <codecs/rt5651/IN2-HeadsetMic.conf>
+       }
+       False {
+               <codecs/rt5651/IN3-HeadsetMic.conf>
        }
 }
 
@@ -77,5 +81,3 @@ If.in12 {
                <codecs/rt5651/IN12-InternalMic.conf>
        }
 }
-
-<codecs/rt5651/IN3-HeadsetMic.conf>
diff --git a/ucm2/bytcr-rt5651/HiFi.conf b/ucm2/bytcr-rt5651/HiFi.conf
index 1f031f25e872..8a9a402da328 100644
--- a/ucm2/bytcr-rt5651/HiFi.conf
+++ b/ucm2/bytcr-rt5651/HiFi.conf
@@ -10,11 +10,6 @@ SectionVerb {
        DisableSequence [
                <platforms/bytcr/PlatformDisableSeq.conf>
        ]
-
-       Value {
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
 }
 
 If.0 {
diff --git a/ucm2/codecs/rt5651/DigitalMic.conf 
b/ucm2/codecs/rt5651/DigitalMic.conf
index 7a0c4d4e59e9..fa1de4c2afb7 100644
--- a/ucm2/codecs/rt5651/DigitalMic.conf
+++ b/ucm2/codecs/rt5651/DigitalMic.conf
@@ -1,14 +1,6 @@
-SectionDevice."DigitalMic" {
+SectionDevice."Mic" {
        Comment "Internal Digital Microphone"
 
-       ConflictingDevice [
-               "InternalMic-IN1"
-               "InternalMic-IN2"
-               "InternalMic-IN12"
-               "HeadsetMic-IN2"
-               "HeadsetMic-IN3"
-       ]
-
        EnableSequence [
                cset "name='Stereo1 ADC MIXL ADC2 Switch' on"
                cset "name='Stereo1 ADC MIXR ADC2 Switch' on"
@@ -22,6 +14,8 @@ SectionDevice."DigitalMic" {
        ]
 
        Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5651/HeadPhones-swapped.conf 
b/ucm2/codecs/rt5651/HeadPhones-swapped.conf
index f5260a3734fb..7e91aa271345 100644
--- a/ucm2/codecs/rt5651/HeadPhones-swapped.conf
+++ b/ucm2/codecs/rt5651/HeadPhones-swapped.conf
@@ -3,7 +3,6 @@ SectionDevice."Headphones" {
 
        ConflictingDevice [
                "Speaker"
-               "MonoSpeaker"
        ]
 
        EnableSequence [
@@ -33,7 +32,9 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackChannels 2
+               PlaybackPCM "hw:${CardId}"
                JackControl "Headphone Jack"
        }
 }
diff --git a/ucm2/codecs/rt5651/HeadPhones.conf 
b/ucm2/codecs/rt5651/HeadPhones.conf
index 0a87b32f5be5..18a41082b78f 100644
--- a/ucm2/codecs/rt5651/HeadPhones.conf
+++ b/ucm2/codecs/rt5651/HeadPhones.conf
@@ -3,7 +3,6 @@ SectionDevice."Headphones" {
 
        ConflictingDevice [
                "Speaker"
-               "MonoSpeaker"
        ]
 
        EnableSequence [
@@ -24,7 +23,9 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
        }
 }
diff --git a/ucm2/codecs/rt5651/IN1-InternalMic.conf 
b/ucm2/codecs/rt5651/IN1-InternalMic.conf
index 01b786e17f5d..13c7cb6137af 100644
--- a/ucm2/codecs/rt5651/IN1-InternalMic.conf
+++ b/ucm2/codecs/rt5651/IN1-InternalMic.conf
@@ -1,14 +1,6 @@
-SectionDevice."InternalMic-IN1" {
+SectionDevice."Mic" {
        Comment "Internal Microphone on IN1"
 
-       ConflictingDevice [
-               "DigitalMic"
-               "InternalMic-IN2"
-               "InternalMic-IN12"
-               "HeadsetMic-IN2"
-               "HeadsetMic-IN3"
-       ]
-
        EnableSequence [
                cset "name='Internal Mic Switch' on"
                cset "name='RECMIXL BST1 Switch' on"
@@ -26,6 +18,8 @@ SectionDevice."InternalMic-IN1" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5651/IN12-InternalMic.conf 
b/ucm2/codecs/rt5651/IN12-InternalMic.conf
index 44cc53ab4c73..e0175418b059 100644
--- a/ucm2/codecs/rt5651/IN12-InternalMic.conf
+++ b/ucm2/codecs/rt5651/IN12-InternalMic.conf
@@ -1,14 +1,6 @@
-SectionDevice."InternalMic-IN12" {
+SectionDevice."Mic" {
        Comment "Internal Microphones on IN1 and IN2"
 
-       ConflictingDevice [
-               "DigitalMic"
-               "InternalMic-IN1"
-               "InternalMic-IN2"
-               "HeadsetMic-IN2"
-               "HeadsetMic-IN3"
-       ]
-
        EnableSequence [
                cset "name='Internal Mic Switch' on"
                cset "name='RECMIXL BST1 Switch' on"
@@ -30,6 +22,8 @@ SectionDevice."InternalMic-IN12" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5651/IN2-HeadsetMic.conf 
b/ucm2/codecs/rt5651/IN2-HeadsetMic.conf
index 177f70b0c269..5b514390a178 100644
--- a/ucm2/codecs/rt5651/IN2-HeadsetMic.conf
+++ b/ucm2/codecs/rt5651/IN2-HeadsetMic.conf
@@ -1,12 +1,8 @@
-SectionDevice."HeadsetMic-IN2" {
+SectionDevice."Headset" {
        Comment "Headset Microphone on IN2"
 
        ConflictingDevice [
-               "DigitalMic"
-               "InternalMic-IN1"
-               "InternalMic-IN2"
-               "InternalMic-IN12"
-               "HeadsetMic-IN3"
+               "Mic"
        ]
 
        EnableSequence [
@@ -26,7 +22,9 @@ SectionDevice."HeadsetMic-IN2" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 }
diff --git a/ucm2/codecs/rt5651/IN2-InternalMic.conf 
b/ucm2/codecs/rt5651/IN2-InternalMic.conf
index 611ca6c7553c..9eeef4d0b5a3 100644
--- a/ucm2/codecs/rt5651/IN2-InternalMic.conf
+++ b/ucm2/codecs/rt5651/IN2-InternalMic.conf
@@ -1,14 +1,6 @@
-SectionDevice."InternalMic-IN2" {
+SectionDevice."Mic" {
        Comment "Internal Microphone on IN2"
 
-       ConflictingDevice [
-               "DigitalMic"
-               "InternalMic-IN1"
-               "InternalMic-IN12"
-               "HeadsetMic-IN2"
-               "HeadsetMic-IN3"
-       ]
-
        EnableSequence [
                cset "name='Internal Mic Switch' on"
                cset "name='RECMIXL BST2 Switch' on"
@@ -26,6 +18,8 @@ SectionDevice."InternalMic-IN2" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5651/IN3-HeadsetMic.conf 
b/ucm2/codecs/rt5651/IN3-HeadsetMic.conf
index 3231e78e4e2d..d579dcd8504e 100644
--- a/ucm2/codecs/rt5651/IN3-HeadsetMic.conf
+++ b/ucm2/codecs/rt5651/IN3-HeadsetMic.conf
@@ -1,12 +1,8 @@
-SectionDevice."HeadsetMic-IN3" {
+SectionDevice."Headset" {
        Comment "Headset Microphone on IN3"
 
        ConflictingDevice [
-               "DigitalMic"
-               "InternalMic-IN1"
-               "InternalMic-IN2"
-               "InternalMic-IN12"
-               "HeadsetMic-IN2"
+               "Mic"
        ]
 
        EnableSequence [
@@ -26,7 +22,9 @@ SectionDevice."HeadsetMic-IN3" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 }
diff --git a/ucm2/codecs/rt5651/MonoSpeaker.conf 
b/ucm2/codecs/rt5651/MonoSpeaker.conf
index c2276c6fbbee..9c780a0bbf52 100644
--- a/ucm2/codecs/rt5651/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5651/MonoSpeaker.conf
@@ -1,8 +1,7 @@
-SectionDevice."MonoSpeaker" {
+SectionDevice."Speaker" {
        Comment "Mono Speaker"
 
        ConflictingDevice [
-               "Speaker"
                "Headphones"
        ]
 
@@ -42,6 +41,8 @@ SectionDevice."MonoSpeaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5651/Speaker.conf b/ucm2/codecs/rt5651/Speaker.conf
index 463d13b5525c..efc12e54fc8b 100644
--- a/ucm2/codecs/rt5651/Speaker.conf
+++ b/ucm2/codecs/rt5651/Speaker.conf
@@ -2,7 +2,6 @@ SectionDevice."Speaker" {
        Comment "Speakers"
 
        ConflictingDevice [
-               "MonoSpeaker"
                "Headphones"
        ]
 
@@ -24,6 +23,8 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0010-bytcht-cx2072x-cleanups-and-corrections.patch ++++++
>From 9b0f31cc65b558c0eee98be583b8a8108341e53d Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Thu, 23 Jan 2020 19:45:00 +0100
Subject: [PATCH 10/36] bytcht-cx2072x: cleanups and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/bytcht-cx2072x/HiFi.conf        | 5 -----
 ucm2/codecs/cx2072x/HeadPhones.conf  | 4 +++-
 ucm2/codecs/cx2072x/HeadsetMic.conf  | 8 +++++---
 ucm2/codecs/cx2072x/InternalMic.conf | 8 +++++---
 ucm2/codecs/cx2072x/Speaker.conf     | 4 +++-
 5 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/ucm2/bytcht-cx2072x/HiFi.conf b/ucm2/bytcht-cx2072x/HiFi.conf
index 60e022974790..b329ea4ed399 100644
--- a/ucm2/bytcht-cx2072x/HiFi.conf
+++ b/ucm2/bytcht-cx2072x/HiFi.conf
@@ -8,11 +8,6 @@ SectionVerb {
                <codecs/cx2072x/DisableSeq.conf>
                <platforms/bytcr/PlatformDisableSeq.conf>
        ]
-
-       Value {
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
 }
 
 <codecs/cx2072x/Speaker.conf>
diff --git a/ucm2/codecs/cx2072x/HeadPhones.conf 
b/ucm2/codecs/cx2072x/HeadPhones.conf
index b5d3d3a15402..484d020be7e8 100644
--- a/ucm2/codecs/cx2072x/HeadPhones.conf
+++ b/ucm2/codecs/cx2072x/HeadPhones.conf
@@ -16,7 +16,9 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
        }
 }
diff --git a/ucm2/codecs/cx2072x/HeadsetMic.conf 
b/ucm2/codecs/cx2072x/HeadsetMic.conf
index 0a59750f8f4a..b1a777114df4 100644
--- a/ucm2/codecs/cx2072x/HeadsetMic.conf
+++ b/ucm2/codecs/cx2072x/HeadsetMic.conf
@@ -1,8 +1,8 @@
-SectionDevice."HeadsetMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        ConflictingDevice [
-               "InternalMic"
+               "Mic"
        ]
 
        EnableSequence [
@@ -17,7 +17,9 @@ SectionDevice."HeadsetMic" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 }
diff --git a/ucm2/codecs/cx2072x/InternalMic.conf 
b/ucm2/codecs/cx2072x/InternalMic.conf
index e358c35c1847..831c3cc63f5c 100644
--- a/ucm2/codecs/cx2072x/InternalMic.conf
+++ b/ucm2/codecs/cx2072x/InternalMic.conf
@@ -1,8 +1,8 @@
-SectionDevice."InternalMic" {
+SectionDevice."Mic" {
        Comment "Internal Microphone"
 
        ConflictingDevice [
-               "HeadsetMic"
+               "Headset"
        ]
 
        EnableSequence [
@@ -17,6 +17,8 @@ SectionDevice."InternalMic" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/cx2072x/Speaker.conf b/ucm2/codecs/cx2072x/Speaker.conf
index a83aeae9a1d3..f60e3559d1f7 100644
--- a/ucm2/codecs/cx2072x/Speaker.conf
+++ b/ucm2/codecs/cx2072x/Speaker.conf
@@ -16,6 +16,8 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0011-bytcht-es8316-cleanups-and-corrections.patch ++++++
>From 7248ff84f18dc56d289937a81adfdc3852ee8a8f Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Thu, 23 Jan 2020 19:53:52 +0100
Subject: [PATCH 11/36] bytcht-es8316: cleanups and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/codecs/es8316/HeadPhones.conf      |  7 ++++---
 ucm2/codecs/es8316/IN1-HeadsetMic.conf  | 10 +++++-----
 ucm2/codecs/es8316/IN1-InternalMic.conf | 10 +++++-----
 ucm2/codecs/es8316/IN2-HeadsetMic.conf  | 10 +++++-----
 ucm2/codecs/es8316/IN2-InternalMic.conf |  6 ++++--
 ucm2/codecs/es8316/MonoSpeaker.conf     |  7 ++++---
 ucm2/codecs/es8316/Speaker.conf         |  4 +++-
 7 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/ucm2/codecs/es8316/HeadPhones.conf 
b/ucm2/codecs/es8316/HeadPhones.conf
index 3f3e591d3a93..603b40c2e6c1 100644
--- a/ucm2/codecs/es8316/HeadPhones.conf
+++ b/ucm2/codecs/es8316/HeadPhones.conf
@@ -3,7 +3,6 @@ SectionDevice."Headphones" {
 
        ConflictingDevice [
                "Speaker"
-               "MonoSpeaker"
        ]
 
        EnableSequence [
@@ -15,8 +14,10 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
-               JackHWMute "Speaker MonoSpeaker"
+               JackHWMute "Speaker"
        }
 }
diff --git a/ucm2/codecs/es8316/IN1-HeadsetMic.conf 
b/ucm2/codecs/es8316/IN1-HeadsetMic.conf
index 997a50bac5bf..d798270dd444 100644
--- a/ucm2/codecs/es8316/IN1-HeadsetMic.conf
+++ b/ucm2/codecs/es8316/IN1-HeadsetMic.conf
@@ -1,10 +1,8 @@
-SectionDevice."HeadsetMic-IN1" {
+SectionDevice."Headset" {
        Comment "Headset Microphone on IN1"
 
        ConflictingDevice [
-               "InternalMic-IN1"
-               "InternalMic-IN2"
-               "HeadsetMic-IN2"
+               "Mic"
        ]
 
        EnableSequence [
@@ -17,7 +15,9 @@ SectionDevice."HeadsetMic-IN1" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId},0"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 }
diff --git a/ucm2/codecs/es8316/IN1-InternalMic.conf 
b/ucm2/codecs/es8316/IN1-InternalMic.conf
index 70a77b9287d0..31c5cda6a314 100644
--- a/ucm2/codecs/es8316/IN1-InternalMic.conf
+++ b/ucm2/codecs/es8316/IN1-InternalMic.conf
@@ -1,10 +1,8 @@
-SectionDevice."InternalMic-IN1" {
+SectionDevice."Mic" {
        Comment "Internal Microphone on IN1"
 
        ConflictingDevice [
-               "InternalMic-IN2"
-               "HeadsetMic-IN1"
-               "HeadsetMic-IN2"
+               "Headset"
        ]
 
        EnableSequence [
@@ -17,6 +15,8 @@ SectionDevice."InternalMic-IN1" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/es8316/IN2-HeadsetMic.conf 
b/ucm2/codecs/es8316/IN2-HeadsetMic.conf
index 1ab122110796..28f26f8d4c4d 100644
--- a/ucm2/codecs/es8316/IN2-HeadsetMic.conf
+++ b/ucm2/codecs/es8316/IN2-HeadsetMic.conf
@@ -1,10 +1,8 @@
-SectionDevice."HeadsetMic-IN2" {
+SectionDevice."Headset" {
        Comment "Headset Microphone on IN2"
 
        ConflictingDevice [
-               "InternalMic-IN1"
-               "InternalMic-IN2"
-               "HeadsetMic-IN1"
+               "Mic"
        ]
 
        EnableSequence [
@@ -17,7 +15,9 @@ SectionDevice."HeadsetMic-IN2" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId},0"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 }
diff --git a/ucm2/codecs/es8316/IN2-InternalMic.conf 
b/ucm2/codecs/es8316/IN2-InternalMic.conf
index 7809f8a4775a..8c0418fde5ba 100644
--- a/ucm2/codecs/es8316/IN2-InternalMic.conf
+++ b/ucm2/codecs/es8316/IN2-InternalMic.conf
@@ -1,4 +1,4 @@
-SectionDevice."InternalMic-IN2" {
+SectionDevice."Mic" {
        Comment "Internal Microphone on IN2"
 
        ConflictingDevice [
@@ -17,6 +17,8 @@ SectionDevice."InternalMic-IN2" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId},0"
+               CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/es8316/MonoSpeaker.conf 
b/ucm2/codecs/es8316/MonoSpeaker.conf
index 704556a8f9c8..f11f2b7f2d41 100644
--- a/ucm2/codecs/es8316/MonoSpeaker.conf
+++ b/ucm2/codecs/es8316/MonoSpeaker.conf
@@ -1,8 +1,7 @@
-SectionDevice."MonoSpeaker" {
+SectionDevice."Speaker" {
        Comment "Mono Speaker"
 
        ConflictingDevice [
-               "Speaker"
                "Headphones"
        ]
 
@@ -32,6 +31,8 @@ SectionDevice."MonoSpeaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackChannels 2
        }
 }
diff --git a/ucm2/codecs/es8316/Speaker.conf b/ucm2/codecs/es8316/Speaker.conf
index 0e77746fd474..a1e4491a8577 100644
--- a/ucm2/codecs/es8316/Speaker.conf
+++ b/ucm2/codecs/es8316/Speaker.conf
@@ -15,6 +15,8 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},0"
+               PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0012-DAISY-I2S-added-back-PCM-devices.patch ++++++
>From 2ccb7969e0be03c1a47260dbb34d0c7865c5593f Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Thu, 23 Jan 2020 19:56:19 +0100
Subject: [PATCH 12/36] DAISY-I2S: added back PCM devices

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/DAISY-I2S/HiFi.conf | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/ucm2/DAISY-I2S/HiFi.conf b/ucm2/DAISY-I2S/HiFi.conf
index 02292f2f22e4..877f6ff02937 100644
--- a/ucm2/DAISY-I2S/HiFi.conf
+++ b/ucm2/DAISY-I2S/HiFi.conf
@@ -27,6 +27,11 @@ SectionDevice."Headphones" {
                cset "name='Left Speaker Mixer Left DAC1 Switch' on"
                cset "name='Right Speaker Mixer Right DAC1 Switch' on"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+       }
 }
 
 SectionDevice."Mic" {
@@ -43,4 +48,9 @@ SectionDevice."Mic" {
                cset "name='DMIC1 Left Capture Switch' on"
                cset "name='DMIC1 Right Capture Switch' on"
        ]
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+       }
 }
-- 
2.16.4

++++++ 0013-DB410c-cleanups-and-corrections.patch ++++++
>From 1a824b16b8fc26122deec2a6307b8294dc1bc497 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Fri, 24 Jan 2020 10:07:14 +0100
Subject: [PATCH 13/36] DB410c: cleanups and corrections

---
 ucm2/DB410c/HDMI.conf |  9 ++++++---
 ucm2/DB410c/HiFi.conf | 50 ++++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 46 insertions(+), 13 deletions(-)

diff --git a/ucm2/DB410c/HDMI.conf b/ucm2/DB410c/HDMI.conf
index d08a50b9aa42..fa44132227ff 100644
--- a/ucm2/DB410c/HDMI.conf
+++ b/ucm2/DB410c/HDMI.conf
@@ -4,12 +4,15 @@
 SectionVerb {
        Value {
                TQ "HiFi"
-               PlaybackPCM "plughw:${CardId},0"
-               PlaybackChannels "2"
+               PlaybackChannels 2
        }
 }
 
-SectionDevice."HDMI-stereo" {
+SectionDevice."HDMI" {
        # Name "HDMI-stereo"
        Comment "HDMI Digital Stereo Output"
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "plughw:${CardId}"
+       }
 }
diff --git a/ucm2/DB410c/HiFi.conf b/ucm2/DB410c/HiFi.conf
index 848d02fd78f1..1b2716ab8bf1 100644
--- a/ucm2/DB410c/HiFi.conf
+++ b/ucm2/DB410c/HiFi.conf
@@ -2,14 +2,9 @@
 # Author: Srinivas Kandagatla <[email protected]>
 
 SectionVerb {
-
-       # ALSA PCM
        Value {
-               # ALSA PCM device for HiFi
-               PlaybackPCM "plughw:${CardId},1"
-               CapturePCM "plughw:${CardId},2"
-               PlaybackChannels "2"
-               CaptureChannels "2"
+               PlaybackChannels 2
+               CaptureChannels 2
        }
 }
 
@@ -33,6 +28,11 @@ SectionDevice."Speaker" {
                cset "name='SPK DAC Switch' 0"
                cset "name='RX3 MIX1 INP1' ZERO"
        ]
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "plughw:${CardId},1"
+       }
 }
 
 
@@ -64,6 +64,11 @@ SectionDevice."Headphones" {
                cset "name='RX1 MIX1 INP1' ZERO"
                cset "name='RX2 MIX1 INP1' ZERO"
        ]
+
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "plughw:${CardId},1"
+       }
 }
 
 SectionDevice."Earpiece" {
@@ -73,6 +78,11 @@ SectionDevice."Earpiece" {
                "Speaker"
                "Headphones"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "plughw:${CardId},1"
+       }
 }
 
 SectionDevice."Handset" {
@@ -90,9 +100,14 @@ SectionDevice."Handset" {
                cset "name='ADC2 Volume' 0"
                cset "name='DEC1 MUX' ZERO"
        ]
+
+       Value {
+               CapturePriority 400
+               CapturePCM "plughw:${CardId},2"
+       }
 }
 
-SectionDevice."PrimaryMic" {
+SectionDevice."Mic1" {
        Comment "Primary Microphone"
 
        EnableSequence [
@@ -105,9 +120,14 @@ SectionDevice."PrimaryMic" {
                cset "name='DEC1 MUX' ZERO"
                cset "name='ADC1 Volume' 0"
        ]
+
+       Value {
+               CapturePriority 300
+               CapturePCM "plughw:${CardId},2"
+       }
 }
 
-SectionDevice."SecondaryMic" {
+SectionDevice."Mic2" {
        Comment "Secondary Microphone"
 
        EnableSequence [
@@ -122,9 +142,14 @@ SectionDevice."SecondaryMic" {
                cset "name='ADC2 Volume' 0"
                cset "name='ADC2 MUX' ZERO"
        ]
+
+       Value {
+               CapturePriority 200
+               CapturePCM "plughw:${CardId},2"
+       }
 }
 
-SectionDevice."DigitalMic" {
+SectionDevice."Mic3" {
        Comment "Digital Microphone"
 
        EnableSequence [
@@ -135,4 +160,9 @@ SectionDevice."DigitalMic" {
        DisableSequence [
                cset "name='DEC1 MUX' ZERO"
        ]
+
+       Value {
+               CapturePriority 100
+               CapturePCM "plughw:${CardId},2"
+       }
 }
-- 
2.16.4

++++++ 0014-DB820c-cleanups-and-corrections.patch ++++++
>From 86a9fad7760fa40282821a3d7818ac881dd2f92d Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Fri, 24 Jan 2020 10:14:41 +0100
Subject: [PATCH 14/36] DB820c: cleanups and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/DB820c/HDMI.conf | 10 ++++++----
 ucm2/DB820c/HiFi.conf |  8 +++++---
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ucm2/DB820c/HDMI.conf b/ucm2/DB820c/HDMI.conf
index 76c0e9283a33..c0d40f690f66 100644
--- a/ucm2/DB820c/HDMI.conf
+++ b/ucm2/DB820c/HDMI.conf
@@ -8,14 +8,14 @@ SectionVerb {
 
         DisableSequence [
                cset "name='HDMI Mixer MultiMedia1' 0"
+       ]
+
         Value {
                 TQ "HiFi"
-                PlaybackPCM "plughw:${CardId},0"
         }
 }
 
-SectionDevice."HDMI-stereo" {
-        #Name "HDMI-stereo"
+SectionDevice."HDMI" {
         Comment "HDMI Digital Stereo Output"
 
         EnableSequence [
@@ -27,6 +27,8 @@ SectionDevice."HDMI-stereo" {
         ]
 
         Value {
-                PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "plughw:${CardId}"
+               PlaybackChannels 2
         }
 }
diff --git a/ucm2/DB820c/HiFi.conf b/ucm2/DB820c/HiFi.conf
index fa7770e1be42..501c263bc648 100644
--- a/ucm2/DB820c/HiFi.conf
+++ b/ucm2/DB820c/HiFi.conf
@@ -67,12 +67,13 @@ SectionDevice."Headphones" {
        ]
 
        Value {
+               PlaybackPriority 100
                PlaybackPCM "plughw:${CardId},1"
-               PlaybackChannels "2"
+               PlaybackChannels 2
        }
 }
 
-SectionDevice."HandsetMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        EnableSequence [
@@ -93,7 +94,8 @@ SectionDevice."HandsetMic" {
        ]
 
        Value {
+               CapturePriority 100
                CapturePCM "plughw:${CardId},2"
-               CaptureChannels "1"
+               CaptureChannels 1
        }
 }
-- 
2.16.4

++++++ 0015-Dell-WD15-Dock-cleaups-and-corrections.patch ++++++
>From 42d0227c417e732ac76328e4168d885b07211f92 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Fri, 24 Jan 2020 10:15:58 +0100
Subject: [PATCH 15/36] Dell-WD15-Dock: cleaups and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/Dell-WD15-Dock/Dell-WD15-Dock.conf |  6 ------
 ucm2/Dell-WD15-Dock/HiFi.conf           | 26 --------------------------
 ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf | 29 +++++++++++++++++++++++++++++
 ucm2/USB-Audio/Dell-WD15-Dock.conf      |  6 ++++++
 4 files changed, 35 insertions(+), 32 deletions(-)
 delete mode 100644 ucm2/Dell-WD15-Dock/Dell-WD15-Dock.conf
 delete mode 100644 ucm2/Dell-WD15-Dock/HiFi.conf
 create mode 100644 ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf
 create mode 100644 ucm2/USB-Audio/Dell-WD15-Dock.conf

diff --git a/ucm2/Dell-WD15-Dock/Dell-WD15-Dock.conf 
b/ucm2/Dell-WD15-Dock/Dell-WD15-Dock.conf
deleted file mode 100644
index 7b96a54249bc..000000000000
--- a/ucm2/Dell-WD15-Dock/Dell-WD15-Dock.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-Syntax 2
-Comment "USB-audio on Dell WD15 docking station"
-SectionUseCase."HiFi" {
-       File "HiFi.conf"
-       Comment "Default"
-}
diff --git a/ucm2/Dell-WD15-Dock/HiFi.conf b/ucm2/Dell-WD15-Dock/HiFi.conf
deleted file mode 100644
index 3b02f81dafc5..000000000000
--- a/ucm2/Dell-WD15-Dock/HiFi.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-SectionDevice."Headphones" {
-       Comment "Headphones"
-
-       Value {
-               PlaybackChannels "2"
-               PlaybackPCM "hw:${CardId},0"
-       }
-}
-
-SectionDevice."LineOut" {
-       Comment "Line Out"
-
-       Value {
-               PlaybackChannels "2"
-               PlaybackPCM "hw:${CardId},1"
-       }
-}
-
-SectionDevice."Mic" {
-       Comment "Microphone"
-
-       Value {
-               CaptureChannels "2"
-               CapturePCM "hw:${CardId},0"
-       }
-}
diff --git a/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf 
b/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf
new file mode 100644
index 000000000000..37b7e0d11b82
--- /dev/null
+++ b/ucm2/USB-Audio/Dell-WD15-Dock-HiFi.conf
@@ -0,0 +1,29 @@
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackChannels 2
+               PlaybackPCM "hw:${CardId}"
+       }
+}
+
+SectionDevice."Line" {
+       Comment "Line Out"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackChannels 2
+               PlaybackPCM "hw:${CardId},1"
+       }
+}
+
+SectionDevice."Mic" {
+       Comment "Microphone"
+
+       Value {
+               CapturePriority 100
+               CaptureChannels 2
+               CapturePCM "hw:${CardId}"
+       }
+}
diff --git a/ucm2/USB-Audio/Dell-WD15-Dock.conf 
b/ucm2/USB-Audio/Dell-WD15-Dock.conf
new file mode 100644
index 000000000000..1fbac9e5c1bd
--- /dev/null
+++ b/ucm2/USB-Audio/Dell-WD15-Dock.conf
@@ -0,0 +1,6 @@
+Syntax 2
+Comment "USB-audio on Dell WD15 docking station"
+SectionUseCase."HiFi" {
+       File "Dell-WD15-Dock-HiFi.conf"
+       Comment "Default"
+}
-- 
2.16.4

++++++ 0016-HDA-Intel-HiFi-dual-fixes-and-corrections.patch ++++++
>From dfad18452427460bf50c55a2c06f9460b2db2123 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Fri, 24 Jan 2020 11:06:29 +0100
Subject: [PATCH 16/36] HDA-Intel/HiFi-dual: fixes and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/HDA Intel PCH/HDAudio-DualCodecs.conf         |   6 -
 .../HDAudio-Gigabyte-ALC1220DualCodecs.conf        |   1 -
 ucm2/HDA Intel PCH/HDAudio-Lenovo-DualCodecs.conf  |   1 -
 ucm2/HDA Intel PCH/HiFi-dual.conf                  | 144 ---------------------
 ucm2/HDA-Intel/HDAudio-DualCodecs.conf             |   6 +
 .../HDAudio-Gigabyte-ALC1220DualCodecs.conf        |   1 +
 ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf      |   1 +
 ucm2/HDA-Intel/HiFi-dual.conf                      | 118 +++++++++++++++++
 8 files changed, 126 insertions(+), 152 deletions(-)
 delete mode 100644 ucm2/HDA Intel PCH/HDAudio-DualCodecs.conf
 delete mode 120000 ucm2/HDA Intel PCH/HDAudio-Gigabyte-ALC1220DualCodecs.conf
 delete mode 120000 ucm2/HDA Intel PCH/HDAudio-Lenovo-DualCodecs.conf
 delete mode 100644 ucm2/HDA Intel PCH/HiFi-dual.conf
 create mode 100644 ucm2/HDA-Intel/HDAudio-DualCodecs.conf
 create mode 120000 ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf
 create mode 120000 ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf
 create mode 100644 ucm2/HDA-Intel/HiFi-dual.conf

diff --git a/ucm2/HDA Intel PCH/HDAudio-DualCodecs.conf b/ucm2/HDA Intel 
PCH/HDAudio-DualCodecs.conf
deleted file mode 100644
index 8aaabd0c819d..000000000000
--- a/ucm2/HDA Intel PCH/HDAudio-DualCodecs.conf        
+++ /dev/null
@@ -1,6 +0,0 @@
-Syntax 2
-Comment "HDAudio with dual HD-audio codecs"
-SectionUseCase."HiFi" {
-       File "HiFi-dual.conf"
-       Comment "Default"
-}
diff --git a/ucm2/HDA Intel PCH/HDAudio-Gigabyte-ALC1220DualCodecs.conf 
b/ucm2/HDA Intel PCH/HDAudio-Gigabyte-ALC1220DualCodecs.conf
deleted file mode 120000
index 89801aaa2c40..000000000000
--- a/ucm2/HDA Intel PCH/HDAudio-Gigabyte-ALC1220DualCodecs.conf        
+++ /dev/null
@@ -1 +0,0 @@
-HDAudio-DualCodecs.conf
\ No newline at end of file
diff --git a/ucm2/HDA Intel PCH/HDAudio-Lenovo-DualCodecs.conf b/ucm2/HDA Intel 
PCH/HDAudio-Lenovo-DualCodecs.conf
deleted file mode 120000
index 89801aaa2c40..000000000000
--- a/ucm2/HDA Intel PCH/HDAudio-Lenovo-DualCodecs.conf 
+++ /dev/null
@@ -1 +0,0 @@
-HDAudio-DualCodecs.conf
\ No newline at end of file
diff --git a/ucm2/HDA Intel PCH/HiFi-dual.conf b/ucm2/HDA Intel 
PCH/HiFi-dual.conf
deleted file mode 100644
index 63b3fe61edc0..000000000000
--- a/ucm2/HDA Intel PCH/HiFi-dual.conf 
+++ /dev/null
@@ -1,144 +0,0 @@
-SectionVerb {
-       Value {
-               TQ "HiFi"
-       }
-
-       EnableSequence [
-               cset "name='Front Playback Volume' 100%"
-               cset "name='Front Playback Switch' on"
-               cset "name='Rear-Panel Capture Volume' 100%"
-               cset "name='Rear-Panel Capture Switch' on"
-       ]
-
-       DisableSequence [
-               cset "name='Front Playback Volume' 0"
-               cset "name='Front Playback Switch' off"
-               cset "name='Rear-Panel Capture Volume' 0"
-               cset "name='Rear-Panel Capture Switch' off"
-       ]
-}
-
-SectionDevice."Speaker" {
-       Comment "Speaker"
-
-       Value {
-               PlaybackChannels "2"
-               PlaybackPCM "hw:${CardId},4"
-       }
-
-       ConflictingDevice [
-               "Headphone"
-       ]
-
-       EnableSequence [
-               cset "name='Speaker Playback Switch' on"
-               cset "name='Speaker Playback Volume' 100%"
-       ]
-
-       DisableSequence [
-               cset "name='Speaker Playback Volume' 0"
-               cset "name='Speaker Playback Switch' off"
-       ]
-}
-
-SectionDevice."LineOut" {
-       Comment "Line Out"
-
-       Value {
-               PlaybackChannels "2"
-               PlaybackPCM "hw:${CardId},0"
-               JackControl "Line Out Jack"
-               JackHWMute "Speaker"
-       }
-}
-
-SectionDevice."Headphones" {
-       Comment "Headphones"
-
-       Value {
-               PlaybackChannels "2"
-               PlaybackPCM "hw:${CardId},4"
-               JackControl "Front Headphone Jack"
-               JackHWMute "Speaker"
-       }
-
-       ConflictingDevice [
-               "Speaker"
-       ]
-
-       EnableSequence [
-               cset "name='Headphone Playback Switch' on"
-               cset "name='Headphone Playback Volume' 100%"
-       ]
-
-       DisableSequence [
-               cset "name='Headphone Playback Volume' 0"
-               cset "name='Headphone Playback Switch' off"
-       ]
-}
-
-SectionDevice."LineIn" {
-       Comment "Rear Line In"
-
-       Value {
-               CaptureChannels "2"
-               CapturePCM "hw:${CardId},0"
-               JackControl "Line Jack"
-       }
-
-       ConflictingDevice [
-               "RearMic"
-       ]
-
-       EnableSequence [
-               cset "name='Input Source' Line"
-               If.0 {
-                       Condition {
-                               Type ControlExists
-                               Control "name='Line Boost Volume'"
-                       }
-                       True {
-                               cset "name='Line Boost Volume' 3"
-                       }
-               }
-       ]
-}
-
-SectionDevice."RearMic" {
-       Comment "Rear Microphone"
-
-       Value {
-               CaptureChannels "2"
-               CapturePCM "hw:${CardId},0"
-               # CapturePriority "150"
-               JackHWMute "LineIn"
-       }
-
-       ConflictingDevice [
-               "LineIn"
-       ]
-
-       EnableSequence [
-               cset "name='Input Source' Rear Mic"
-       ]
-}
-
-SectionDevice."FrontMic" {
-       Comment "Front Microphone"
-
-       Value {
-               CaptureChannels "2"
-               CapturePCM "hw:${CardId},4"
-               JackControl "Front Mic Jack"
-       }
-
-       EnableSequence [
-               cset "name='Front-Panel Capture Volume' 100%"
-               cset "name='Front-Panel Capture Switch' on"
-       ]
-
-       DisableSequence [
-               cset "name='Front-Panel Capture Volume' 0"
-               cset "name='Front-Panel Capture Switch' off"
-       ]
-}
diff --git a/ucm2/HDA-Intel/HDAudio-DualCodecs.conf 
b/ucm2/HDA-Intel/HDAudio-DualCodecs.conf
new file mode 100644
index 000000000000..8aaabd0c819d
--- /dev/null
+++ b/ucm2/HDA-Intel/HDAudio-DualCodecs.conf
@@ -0,0 +1,6 @@
+Syntax 2
+Comment "HDAudio with dual HD-audio codecs"
+SectionUseCase."HiFi" {
+       File "HiFi-dual.conf"
+       Comment "Default"
+}
diff --git a/ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf 
b/ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf
new file mode 120000
index 000000000000..89801aaa2c40
--- /dev/null
+++ b/ucm2/HDA-Intel/HDAudio-Gigabyte-ALC1220DualCodecs.conf
@@ -0,0 +1 @@
+HDAudio-DualCodecs.conf
\ No newline at end of file
diff --git a/ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf 
b/ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf
new file mode 120000
index 000000000000..89801aaa2c40
--- /dev/null
+++ b/ucm2/HDA-Intel/HDAudio-Lenovo-DualCodecs.conf
@@ -0,0 +1 @@
+HDAudio-DualCodecs.conf
\ No newline at end of file
diff --git a/ucm2/HDA-Intel/HiFi-dual.conf b/ucm2/HDA-Intel/HiFi-dual.conf
new file mode 100644
index 000000000000..846c6db75a51
--- /dev/null
+++ b/ucm2/HDA-Intel/HiFi-dual.conf
@@ -0,0 +1,118 @@
+SectionVerb {
+       Value {
+               TQ "HiFi"
+               PlaybackChannels 2
+               CaptureChannels 2
+       }
+
+       EnableSequence [
+               cset "name='Front Playback Volume' 100%"
+               cset "name='Front Playback Switch' on"
+               cset "name='Rear-Panel Capture Volume' 100%"
+               cset "name='Rear-Panel Capture Switch' on"
+       ]
+
+       DisableSequence [
+               cset "name='Front Playback Volume' 0"
+               cset "name='Front Playback Switch' off"
+               cset "name='Rear-Panel Capture Volume' 0"
+               cset "name='Rear-Panel Capture Switch' off"
+       ]
+}
+
+SectionDevice."Speaker" {
+       Comment "Speaker"
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},4"
+               PlaybackMixerElem "Speaker"
+       }
+
+       ConflictingDevice [
+               "Headphones"
+       ]
+}
+
+SectionDevice."Line1" {
+       Comment "Line Out"
+
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               JackControl "Line Out Jack"
+               JackHWMute "Speaker"
+       }
+}
+
+SectionDevice."Headphones" {
+       Comment "Headphones"
+
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId},4"
+               PlaybackMixerElem "Headphone"
+               JackControl "Front Headphone Jack"
+               JackHWMute "Speaker"
+       }
+
+       ConflictingDevice [
+               "Speaker"
+       ]
+}
+
+SectionDevice."Line2" {
+       Comment "Rear Line In"
+
+       Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               JackControl "Line Jack"
+       }
+
+       ConflictingDevice [
+               "Mic2"
+       ]
+
+       EnableSequence [
+               cset "name='Input Source' Line"
+               If.0 {
+                       Condition {
+                               Type ControlExists
+                               Control "name='Line Boost Volume'"
+                       }
+                       True {
+                               cset "name='Line Boost Volume' 3"
+                       }
+               }
+       ]
+}
+
+SectionDevice."Mic2" {
+       Comment "Rear Microphone"
+
+       Value {
+               CapturePriority 300
+               CapturePCM "hw:${CardId}"
+               JackHWMute "Line2"
+       }
+
+       ConflictingDevice [
+               "Line2"
+       ]
+
+       EnableSequence [
+               cset "name='Input Source' Rear Mic"
+       ]
+}
+
+SectionDevice."Mic1" {
+       Comment "Front Microphone"
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},4"
+               CaptureMixerElem "Front-Panel"
+               JackControl "Front Mic Jack"
+       }
+}
-- 
2.16.4

++++++ 0017-cht-bsw-rt5672-fixes-and-corrections.patch ++++++
>From ffae896c7e958198b795c9680e4e4fb64b88c8ea Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Fri, 24 Jan 2020 14:35:10 +0100
Subject: [PATCH 17/36] cht-bsw-rt5672: fixes and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf |  9 ++++-----
 ucm2/cht-bsw-rt5672/HiFi.conf              |  5 -----
 ucm2/codecs/rt5672/DMIC1.conf              |  8 +++++---
 ucm2/codecs/rt5672/DMIC2.conf              |  8 +++++---
 ucm2/codecs/rt5672/HeadPhones.conf         |  8 +++++---
 ucm2/codecs/rt5672/HeadsetMic.conf         | 10 ++++++----
 ucm2/codecs/rt5672/MonoSpeaker.conf        |  8 +++++---
 ucm2/codecs/rt5672/Speaker.conf            | 10 ++++++----
 8 files changed, 36 insertions(+), 30 deletions(-)

diff --git a/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf 
b/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
index 2916490bbdb5..82c976bcdd25 100644
--- a/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
+++ b/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
@@ -9,15 +9,14 @@ SectionVerb {
        DisableSequence [
                <platforms/bytcr/PlatformDisableSeq.conf>
        ]
-
-       Value {
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
 }
 
 <codecs/rt5672/Speaker.conf>
+RenameDevice."Speaker1" "Speaker"
+RemoveDevice."Speaker2" "Speaker2"
 <codecs/rt5672/HeadPhones.conf>
 
 <codecs/rt5672/DMIC2.conf>
+RenameDevice."Mic2" "Mic"
+RemoveDevice."Mic1" "Mic1"
 <codecs/rt5672/HeadsetMic.conf>
diff --git a/ucm2/cht-bsw-rt5672/HiFi.conf b/ucm2/cht-bsw-rt5672/HiFi.conf
index 18c693283083..9a64cc30d2ca 100644
--- a/ucm2/cht-bsw-rt5672/HiFi.conf
+++ b/ucm2/cht-bsw-rt5672/HiFi.conf
@@ -9,11 +9,6 @@ SectionVerb {
        DisableSequence [
                <platforms/bytcr/PlatformDisableSeq.conf>
        ]
-
-       Value {
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
 }
 
 <codecs/rt5672/Speaker.conf>
diff --git a/ucm2/codecs/rt5672/DMIC1.conf b/ucm2/codecs/rt5672/DMIC1.conf
index b3da62780dd3..73983af48a37 100644
--- a/ucm2/codecs/rt5672/DMIC1.conf
+++ b/ucm2/codecs/rt5672/DMIC1.conf
@@ -1,9 +1,9 @@
-SectionDevice."DigitalMic-DMIC1" {
+SectionDevice."Mic1" {
        Comment "Internal Digital Microphone on DMIC1"
 
        ConflictingDevice [
-               "DigitalMic-DMIC2"
-               "HeadsetMic"
+               "Mic2"
+               "Headset"
        ]
 
        EnableSequence [
@@ -21,6 +21,8 @@ SectionDevice."DigitalMic-DMIC1" {
        ]
 
        Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5672/DMIC2.conf b/ucm2/codecs/rt5672/DMIC2.conf
index 38fe015a9629..751c95cf22f1 100644
--- a/ucm2/codecs/rt5672/DMIC2.conf
+++ b/ucm2/codecs/rt5672/DMIC2.conf
@@ -1,9 +1,9 @@
-SectionDevice."DigitalMic-DMIC2" {
+SectionDevice."Mic2" {
        Comment "Internal Digital Microphone on DMIC2"
 
        ConflictingDevice [
-               "DigitalMic-DMIC1"
-               "HeadsetMic"
+               "Mic1"
+               "Headset"
        ]
 
        EnableSequence [
@@ -21,6 +21,8 @@ SectionDevice."DigitalMic-DMIC2" {
        ]
 
        Value {
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5672/HeadPhones.conf 
b/ucm2/codecs/rt5672/HeadPhones.conf
index 350fb2b4ed73..0542f7790052 100644
--- a/ucm2/codecs/rt5672/HeadPhones.conf
+++ b/ucm2/codecs/rt5672/HeadPhones.conf
@@ -2,8 +2,8 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        ConflictingDevice [
-               "Speaker"
-               "MonoSpeaker"
+               "Speaker1"
+               "Speaker2"
        ]
 
        EnableSequence [
@@ -15,7 +15,9 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
        }
 }
diff --git a/ucm2/codecs/rt5672/HeadsetMic.conf 
b/ucm2/codecs/rt5672/HeadsetMic.conf
index fd02cb3a676a..f407579b302d 100644
--- a/ucm2/codecs/rt5672/HeadsetMic.conf
+++ b/ucm2/codecs/rt5672/HeadsetMic.conf
@@ -1,9 +1,9 @@
-SectionDevice."HeadsetMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        ConflictingDevice [
-               "DigitalMic-DMIC1"
-               "DigitalMic-DMIC2"
+               "Mic1"
+               "Mic2"
        ]
 
        EnableSequence [
@@ -30,7 +30,9 @@ SectionDevice."HeadsetMic" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 300
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 }
diff --git a/ucm2/codecs/rt5672/MonoSpeaker.conf 
b/ucm2/codecs/rt5672/MonoSpeaker.conf
index 6308ad953c7f..0849c6744bea 100644
--- a/ucm2/codecs/rt5672/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5672/MonoSpeaker.conf
@@ -1,8 +1,8 @@
-SectionDevice."MonoSpeaker" {
+SectionDevice."Speaker2" {
        Comment "Mono Speaker"
 
        ConflictingDevice [
-               "Speaker"
+               "Speaker1"
                "Headphones"
        ]
 
@@ -19,6 +19,8 @@ SectionDevice."MonoSpeaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5672/Speaker.conf b/ucm2/codecs/rt5672/Speaker.conf
index e4391ccca589..44e73aa875c3 100644
--- a/ucm2/codecs/rt5672/Speaker.conf
+++ b/ucm2/codecs/rt5672/Speaker.conf
@@ -1,8 +1,8 @@
-SectionDevice."Speaker" {
-       Comment "Speakers"
+SectionDevice."Speaker1" {
+       Comment "Stereo Speakers"
 
        ConflictingDevice [
-               "MonoSpeaker"
+               "Speaker2"
                "Headphones"
        ]
 
@@ -15,6 +15,8 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0018-chtnau8824-fixes-and-corrections.patch ++++++
>From 54f0ed010f7353b37a7b0eee109537675323b9d8 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Fri, 24 Jan 2020 14:39:26 +0100
Subject: [PATCH 18/36] chtnau8824: fixes and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/chtnau8824/HiFi-mono.conf       | 3 ---
 ucm2/chtnau8824/HiFi.conf            | 8 --------
 ucm2/codecs/nau8824/HeadPhones.conf  | 5 +++--
 ucm2/codecs/nau8824/HeadsetMic.conf  | 8 +++++---
 ucm2/codecs/nau8824/InternalMic.conf | 9 +++++----
 ucm2/codecs/nau8824/MonoSpeaker.conf | 7 ++++---
 ucm2/codecs/nau8824/Speaker.conf     | 5 +++--
 7 files changed, 20 insertions(+), 25 deletions(-)

diff --git a/ucm2/chtnau8824/HiFi-mono.conf b/ucm2/chtnau8824/HiFi-mono.conf
index 3433d03b416c..26d6a56d6374 100644
--- a/ucm2/chtnau8824/HiFi-mono.conf
+++ b/ucm2/chtnau8824/HiFi-mono.conf
@@ -3,9 +3,6 @@ SectionVerb {
 
        Value {
                TQ "HiFi"
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
        }
 
        EnableSequence [
diff --git a/ucm2/chtnau8824/HiFi.conf b/ucm2/chtnau8824/HiFi.conf
index 9f7ac74bba40..fd8b741cf326 100644
--- a/ucm2/chtnau8824/HiFi.conf
+++ b/ucm2/chtnau8824/HiFi.conf
@@ -1,13 +1,5 @@
 
 SectionVerb {
-
-       Value {
-               TQ "HiFi"
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
-
        EnableSequence [
                <platforms/bytcr/PlatformEnableSeq.conf>
                <codecs/nau8824/EnableSeq.conf>
diff --git a/ucm2/codecs/nau8824/HeadPhones.conf 
b/ucm2/codecs/nau8824/HeadPhones.conf
index f35f4e20f21e..6623365af66e 100644
--- a/ucm2/codecs/nau8824/HeadPhones.conf
+++ b/ucm2/codecs/nau8824/HeadPhones.conf
@@ -2,12 +2,13 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
        }
 
        ConflictingDevice [
-               "MonoSpeaker"
                "Speaker"
        ]
 
diff --git a/ucm2/codecs/nau8824/HeadsetMic.conf 
b/ucm2/codecs/nau8824/HeadsetMic.conf
index bc17f9fde421..738163861d69 100644
--- a/ucm2/codecs/nau8824/HeadsetMic.conf
+++ b/ucm2/codecs/nau8824/HeadsetMic.conf
@@ -1,13 +1,15 @@
-SectionDevice."HeadsetMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 300
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
 
        ConflictingDevice [
-               "InternalMic"
+               "Mic"
        ]
 
        EnableSequence [
diff --git a/ucm2/codecs/nau8824/InternalMic.conf 
b/ucm2/codecs/nau8824/InternalMic.conf
index 3793d6435253..731a261cf93a 100644
--- a/ucm2/codecs/nau8824/InternalMic.conf
+++ b/ucm2/codecs/nau8824/InternalMic.conf
@@ -1,13 +1,14 @@
-SectionDevice."InternalMic" {
+SectionDevice."Mic" {
        Comment "Internal Microphone"
 
        Value {
-               CaptureChannels "2"
-               CapturePriority "150"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 
        ConflictingDevice [
-               "HeadsetMic"
+               "Headset"
        ]
 
        EnableSequence [
diff --git a/ucm2/codecs/nau8824/MonoSpeaker.conf 
b/ucm2/codecs/nau8824/MonoSpeaker.conf
index 5321c8af1eaa..b02a22cb682e 100644
--- a/ucm2/codecs/nau8824/MonoSpeaker.conf
+++ b/ucm2/codecs/nau8824/MonoSpeaker.conf
@@ -1,12 +1,13 @@
-SectionDevice."MonoSpeaker" {
+SectionDevice."Speaker" {
        Comment "Mono Speaker"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 
        ConflictingDevice [
-               "Speaker"
                "Headphones"
        ]
 
diff --git a/ucm2/codecs/nau8824/Speaker.conf b/ucm2/codecs/nau8824/Speaker.conf
index 474c37392b51..365879585a98 100644
--- a/ucm2/codecs/nau8824/Speaker.conf
+++ b/ucm2/codecs/nau8824/Speaker.conf
@@ -2,11 +2,12 @@ SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 
        ConflictingDevice [
-               "MonoSpeaker"
                "Headphones"
        ]
 
-- 
2.16.4

++++++ 0019-skylake-rt286-fixes-and-corrections.patch ++++++
>From ed9918179e37e091a861cea57022d45ff50b2bca Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Mon, 27 Jan 2020 16:01:21 +0100
Subject: [PATCH 19/36] skylake-rt286: fixes and corrections

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/skylake-rt286/Hdmi1.conf         |  7 +++----
 ucm2/skylake-rt286/Hdmi2.conf         |  7 +++----
 ucm2/skylake-rt286/HiFi.conf          | 36 ++++++++++++++++-------------------
 ucm2/skylake-rt286/skylake-rt286.conf | 14 ++------------
 4 files changed, 24 insertions(+), 40 deletions(-)

diff --git a/ucm2/skylake-rt286/Hdmi1.conf b/ucm2/skylake-rt286/Hdmi1.conf
index 975fd39896ee..5a569434d075 100644
--- a/ucm2/skylake-rt286/Hdmi1.conf
+++ b/ucm2/skylake-rt286/Hdmi1.conf
@@ -1,16 +1,15 @@
 # Usecase for device HDMI1/Display Port stereo playback on Intel 
SKYLAKE/KABYLAKE platforms
 # For Audio in I2S mode
 
-SectionDevice."Hdmi1" {
+SectionDevice."HDMI1" {
         Comment "HDMI/Display Port 1 Stereo"
 
         Value {
+               PlaybackPriority 300
                 PlaybackPCM "hw:${CardId},4"
-                PlaybackChannels "2"
-                PlaybackPriority "3"
                If.1 {
                        Condition {
-                               ControlExists
+                               Type ControlExists
                                Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
                        }
                        True {
diff --git a/ucm2/skylake-rt286/Hdmi2.conf b/ucm2/skylake-rt286/Hdmi2.conf
index d6ca62f72be6..d2780b6d4b1f 100644
--- a/ucm2/skylake-rt286/Hdmi2.conf
+++ b/ucm2/skylake-rt286/Hdmi2.conf
@@ -1,16 +1,15 @@
 # Usecase for device HDMI2/Display Port stereo playback on Intel 
SKYLAKE/KABYLAKE platforms
 # For Audio in I2S mode
 
-SectionDevice."Hdmi2" {
+SectionDevice."HDMI2" {
         Comment "HDMI/Display Port 2 Stereo"
 
         Value {
+               PlaybackPriority 400
                 PlaybackPCM "hw:${CardId},5"
-                PlaybackChannels "2"
-                PlaybackPriority "4"
                If.1 {
                        Condition {
-                               ControlExists
+                               Type ControlExists
                                Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
                        }
                        True {
diff --git a/ucm2/skylake-rt286/HiFi.conf b/ucm2/skylake-rt286/HiFi.conf
index 489170f33acf..9e94a1b1072d 100644
--- a/ucm2/skylake-rt286/HiFi.conf
+++ b/ucm2/skylake-rt286/HiFi.conf
@@ -2,15 +2,12 @@
 # For Audio in I2S mode on Intel SKYLAKE/KABYLAKE platforms
 
 SectionVerb {
-
        EnableSequence [
                cset "name='media0_out mo dmic01_hifi_in mi Switch' 1"
        ]
 
        Value {
                TQ "HiFi"
-               CapturePCM "hw:${CardId},1"
-               PlaybackPCM "hw:${CardId},0"
        }
 }
 
@@ -20,6 +17,7 @@ SectionDevice."Headphones" {
        ConflictingDevice [
                "Speaker"
        ]
+
        EnableSequence [
                cset "name='HPO L Switch' 1"
                cset "name='HPO R Switch' 1"
@@ -27,11 +25,9 @@ SectionDevice."Headphones" {
                cset "name='Speaker Playback Switch' 0,0"
        ]
 
-       DisableSequence [
-       ]
        Value {
-               PlaybackChannels "2"
-               PlaybackPriority "1"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -43,6 +39,7 @@ SectionDevice."Speaker" {
        ConflictingDevice [
                "Headphones"
        ]
+
        EnableSequence [
                cset "name='SPO Switch' 1"
                cset "name='Speaker Playback Switch' 1,1"
@@ -51,20 +48,18 @@ SectionDevice."Speaker" {
                cset "name='HPO R Switch' 0"
        ]
 
-       DisableSequence [
-       ]
        Value {
-               PlaybackChannels "2"
-               PlaybackPriority "1"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
                JackHWMute "Headphones"
        }
 }
 
 SectionDevice."Headset" {
-       Comment "Headset Mic"
+       Comment "Headset Microphone"
 
        ConflictingDevice [
-               "dmiccap"
+               "Mic"
        ]
        EnableSequence [
                cset "name='media0_out mo codec0_in mi Switch' 1"
@@ -79,15 +74,14 @@ SectionDevice."Headset" {
                cset "name='media0_out mo codec0_in mi Switch' 0"
        ]
        Value {
-               CaptureChannels "2"
-               CapturePriority "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId},1"
                JackControl "Mic Jack"
        }
 }
 
-
-SectionDevice."dmiccap" {
-       Comment "DMIC Stereo"
+SectionDevice."Mic" {
+       Comment "Digital Stereo Microphone"
 
        ConflictingDevice [
                "Headset"
@@ -110,8 +104,10 @@ SectionDevice."dmiccap" {
                cset "name='ADC 0 Mux' 2"
        ]
        Value {
-               CaptureChannels "2"
-               CapturePriority "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId},1"
        }
 }
 
+<skylake-rt286/Hdmi1.conf>
+<skylake-rt286/Hdmi2.conf>
diff --git a/ucm2/skylake-rt286/skylake-rt286.conf 
b/ucm2/skylake-rt286/skylake-rt286.conf
index efb8a20e0533..4ea57773cd2a 100644
--- a/ucm2/skylake-rt286/skylake-rt286.conf
+++ b/ucm2/skylake-rt286/skylake-rt286.conf
@@ -8,19 +8,9 @@ SectionUseCase."HiFi" {
        Comment "Play and record HiFi quality Music"
 }
 
-SectionUseCase."Hdmi1" {
-        File "Hdmi1.conf"
-        Comment "Play on Hdmi/DP 1"
-}
-
-SectionUseCase."Hdmi2" {
-        File "Hdmi2.conf"
-        Comment "Play on Hdmi/DP 2"
-}
-
 ValueDefaults {
-       CaptureChannels "2"
-       CapturePriority "2"     
+       PlaybackChannels 2
+       CaptureChannels 2
 }
 
 SectionDefaults [
-- 
2.16.4

++++++ 0020-SDP4430-corrections-and-fixes.patch ++++++
>From 35c2bba4906a278d876503855c55c2e7f9247616 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Mon, 27 Jan 2020 16:06:25 +0100
Subject: [PATCH 20/36] SDP4430: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/SDP4430/FMAnalog.conf  | 11 +++-----
 ucm2/SDP4430/HiFiLP.conf    |  7 +++--
 ucm2/SDP4430/Record.conf    |  5 +++-
 ucm2/SDP4430/SDP4430.conf   |  2 +-
 ucm2/SDP4430/Voice.conf     |  6 +++--
 ucm2/SDP4430/VoiceAll.conf  | 63 --------------------------------------------
 ucm2/SDP4430/VoiceCall.conf | 64 +++++++++++++++++++++++++++++++++++++++++++++
 7 files changed, 82 insertions(+), 76 deletions(-)
 delete mode 100644 ucm2/SDP4430/VoiceAll.conf
 create mode 100644 ucm2/SDP4430/VoiceCall.conf

diff --git a/ucm2/SDP4430/FMAnalog.conf b/ucm2/SDP4430/FMAnalog.conf
index 96814652a275..2cfabf92cb57 100644
--- a/ucm2/SDP4430/FMAnalog.conf
+++ b/ucm2/SDP4430/FMAnalog.conf
@@ -9,19 +9,12 @@ SectionVerb {
                 cset "name='Capture Volume' 4"
        ]
 
-
        DisableSequence [
                 cset "name='AMIC_UL PDM Switch' 0"
                 cset "name='MUX_UL00' 0"
                 cset "name='MUX_UL01' 0"
                 cset "name='Capture Volume' 0"
        ]
-
-       # Optional TQ and ALSA PCMs
-       Value {
-               TQ "Music"
-                CapturePCM "hw:${CardId},0"
-       }
 }
 
 SectionDevice."Headset" {
@@ -38,5 +31,9 @@ SectionDevice."Headset" {
                 cset "name='Analog Right Capture Route' 3"
                 cset "name='Capture Preamplifier Volume' 0"
        ]
+
+       Value {
+                CapturePCM "hw:${CardId},0"
+       }
 }
 
diff --git a/ucm2/SDP4430/HiFiLP.conf b/ucm2/SDP4430/HiFiLP.conf
index 51380d946756..731ac210b479 100644
--- a/ucm2/SDP4430/HiFiLP.conf
+++ b/ucm2/SDP4430/HiFiLP.conf
@@ -18,10 +18,8 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
        Value {
                TQ "Music"
-               PlaybackPCM "hw:${CardId},6"
        }
 }
 
@@ -39,4 +37,9 @@ SectionDevice."Headset" {
                cset "name='HS Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},6"
+       }
 }
diff --git a/ucm2/SDP4430/Record.conf b/ucm2/SDP4430/Record.conf
index 9f62fd14bb97..d3c4955ac2d8 100644
--- a/ucm2/SDP4430/Record.conf
+++ b/ucm2/SDP4430/Record.conf
@@ -19,7 +19,6 @@ SectionVerb {
        # Optional TQ and ALSA PCMs
        Value {
                TQ "Music"
-               CapturePCM "hw:${CardId},0"
        }
 
 }
@@ -38,4 +37,8 @@ SectionDevice."Headset" {
                 cset "name='Analog Right Capture Route' 3"
                 cset "name='Capture Preamplifier Volume' 0"
        ]
+
+       Value {
+               CapturePCM "hw:${CardId},0"
+       }
 }
diff --git a/ucm2/SDP4430/SDP4430.conf b/ucm2/SDP4430/SDP4430.conf
index df5b5b97d74a..fd958903f290 100644
--- a/ucm2/SDP4430/SDP4430.conf
+++ b/ucm2/SDP4430/SDP4430.conf
@@ -13,7 +13,7 @@ SectionUseCase."HiFi" {
 }
 
 SectionUseCase."HiFi_Low_Power" {
-       File "HiHiLP.conf"
+       File "HiFiLP.conf"
        Comment "Play HiFi quality Music in Low Power Mode"
 }
 
diff --git a/ucm2/SDP4430/Voice.conf b/ucm2/SDP4430/Voice.conf
index 7d10a1711bcc..15cd4f08e310 100644
--- a/ucm2/SDP4430/Voice.conf
+++ b/ucm2/SDP4430/Voice.conf
@@ -18,10 +18,8 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
        Value {
                TQ "Voice"
-               PlaybackPCM "hw:${CardId},2"
        }
 }
 
@@ -39,4 +37,8 @@ SectionDevice."Headset" {
                cset "name='HS Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPCM "hw:${CardId},2"
+       }
 }
diff --git a/ucm2/SDP4430/VoiceAll.conf b/ucm2/SDP4430/VoiceAll.conf
deleted file mode 100644
index 07843c552ade..000000000000
--- a/ucm2/SDP4430/VoiceAll.conf
+++ /dev/null
@@ -1,63 +0,0 @@
-# Use case Configuration for TI SDP4430 HiFi Music
-# By Liam Girdwood <[email protected]>
-
-SectionVerb {
-       EnableSequence [
-                cset "name='AMIC_UL PDM Switch' 1"
-                cset "name='Sidetone Mixer Capture' 1"
-                cset "name='MUX_VX0' 9"
-                cset "name='MUX_VX1' 10"
-               cset "name='DL1 Mixer Voice' 1"
-               cset "name='Sidetone Mixer Playback' 1"
-                cset "name='DL1 PDM Switch' 1"
-               cset "name='DL1 Voice Playback Volume' 90,90"
-                cset "name='Capture Volume' 4"
-                cset "name='Capture Mixer Voice Capture' 90,90"
-                cset "name='SDT DL Volume' 120"
-       ]
-
-
-       DisableSequence [
-                cset "name='AMIC_UL PDM Switch' 0"
-                cset "name='Sidetone Mixer Capture' 0"
-                cset "name='MUX_VX0' 0"
-                cset "name='MUX_VX1' 0"
-               cset "name='DL1 Mixer Voice' 0"
-               cset "name='Sidetone Mixer Playback' 0"
-                cset "name='DL1 PDM Switch' 0"
-               cset "name='DL1 Voice Playback Volume' 0,0"
-                cset "name='Capture Volume' 0"
-               cset "name='DL1 Voice Playback Volume' 0,0"
-                cset "name='SDT DL Volume' 0"
-       ]
-
-       # Optional TQ and ALSA PCMs
-       Value {
-               TQ "Voice"
-                CapturePCM "hw:${CardId},2"
-               PlaybackPCM "hw:${CardId},2"
-       }
-}
-
-SectionDevice."Headset" {
-       Comment "SDP4430 3.5mm Headset"
-       
-       EnableSequence [
-                cset "name='Analog Left Capture Route' 0"
-                cset "name='Analog Right Capture Route' 0"
-                cset "name='Capture Preamplifier Volume' 2"
-                cset "name='HS Left Playback' 1"
-                cset "name='HS Right Playback' 1"
-                cset "name='Headset Playback Volume' 13"
-       ]
-
-       DisableSequence [
-                cset "name='Analog Left Capture Route' 3"
-                cset "name='Analog Right Capture Route' 3"
-                cset "name='Capture Preamplifier Volume' 0"
-               cset "name='HS Right Playback' 0"
-               cset "name='HS Left Playback' 0"
-                cset "name='Headset Playback Volume' 0"
-       ]
-}
-
diff --git a/ucm2/SDP4430/VoiceCall.conf b/ucm2/SDP4430/VoiceCall.conf
new file mode 100644
index 000000000000..2f02a2ba0247
--- /dev/null
+++ b/ucm2/SDP4430/VoiceCall.conf
@@ -0,0 +1,64 @@
+# Use case Configuration for TI SDP4430 HiFi Music
+# By Liam Girdwood <[email protected]>
+
+SectionVerb {
+       EnableSequence [
+                cset "name='AMIC_UL PDM Switch' 1"
+                cset "name='Sidetone Mixer Capture' 1"
+                cset "name='MUX_VX0' 9"
+                cset "name='MUX_VX1' 10"
+               cset "name='DL1 Mixer Voice' 1"
+               cset "name='Sidetone Mixer Playback' 1"
+                cset "name='DL1 PDM Switch' 1"
+               cset "name='DL1 Voice Playback Volume' 90,90"
+                cset "name='Capture Volume' 4"
+                cset "name='Capture Mixer Voice Capture' 90,90"
+                cset "name='SDT DL Volume' 120"
+       ]
+
+
+       DisableSequence [
+                cset "name='AMIC_UL PDM Switch' 0"
+                cset "name='Sidetone Mixer Capture' 0"
+                cset "name='MUX_VX0' 0"
+                cset "name='MUX_VX1' 0"
+               cset "name='DL1 Mixer Voice' 0"
+               cset "name='Sidetone Mixer Playback' 0"
+                cset "name='DL1 PDM Switch' 0"
+               cset "name='DL1 Voice Playback Volume' 0,0"
+                cset "name='Capture Volume' 0"
+               cset "name='DL1 Voice Playback Volume' 0,0"
+                cset "name='SDT DL Volume' 0"
+       ]
+
+       Value {
+               TQ "Voice"
+       }
+}
+
+SectionDevice."Headset" {
+       Comment "SDP4430 3.5mm Headset"
+       
+       EnableSequence [
+                cset "name='Analog Left Capture Route' 0"
+                cset "name='Analog Right Capture Route' 0"
+                cset "name='Capture Preamplifier Volume' 2"
+                cset "name='HS Left Playback' 1"
+                cset "name='HS Right Playback' 1"
+                cset "name='Headset Playback Volume' 13"
+       ]
+
+       DisableSequence [
+                cset "name='Analog Left Capture Route' 3"
+                cset "name='Analog Right Capture Route' 3"
+                cset "name='Capture Preamplifier Volume' 0"
+               cset "name='HS Right Playback' 0"
+               cset "name='HS Left Playback' 0"
+                cset "name='Headset Playback Volume' 0"
+       ]
+
+       Value {
+                CapturePCM "hw:${CardId},2"
+               PlaybackPCM "hw:${CardId},2"
+       }
+}
-- 
2.16.4

++++++ 0021-sof-hda-dsp-fix-typo-PlaybackMixerMaster-PlaybackMas.patch ++++++
>From 9de65f1f733d178be0e61e3c9f37df1031ab6a81 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 28 Jan 2020 17:57:43 +0100
Subject: [PATCH 21/36] sof-hda-dsp: fix typo (PlaybackMixerMaster ->
 PlaybackMasterElem)

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/sof-hda-dsp/HiFi.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf
index 5c7236d7bd02..71cef496d0ca 100644
--- a/ucm2/sof-hda-dsp/HiFi.conf
+++ b/ucm2/sof-hda-dsp/HiFi.conf
@@ -21,7 +21,7 @@ SectionDevice."Headphones1" {
                PlaybackPriority 200
                PlaybackPCM "hw:${CardId},0"
                PlaybackMixerElem "Headphone"
-               PlaybackMixerMaster "Master"
+               PlaybackMasterElem "Master"
                PlaybackVolume "Headphone Playback Volume"
                PlaybackSwitch "Headphone Playback Switch"
                PlaybackChannels "2"
-- 
2.16.4

++++++ 0022-broadwell-rt286-add-correct-prefix-to-Priority-field.patch ++++++
>From 4fd064eb56bec3a47f8380fd1498bbc190cca703 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 28 Jan 2020 18:15:22 +0100
Subject: [PATCH 22/36] broadwell-rt286: add correct prefix to Priority field
 names

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/broadwell-rt286/HiFi.conf | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ucm2/broadwell-rt286/HiFi.conf b/ucm2/broadwell-rt286/HiFi.conf
index e766250dfac8..96b89a0ff0d0 100644
--- a/ucm2/broadwell-rt286/HiFi.conf
+++ b/ucm2/broadwell-rt286/HiFi.conf
@@ -21,7 +21,7 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               Priority 100
+               PlaybackPriority 100
                PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
                PlaybackMixerElem "DAC0"
@@ -49,7 +49,7 @@ SectionDevice."Headphones" {
        ]
 
        Value {
-               Priority 200
+               PlaybackPriority 200
                PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
                PlaybackMixerElem "DAC0"
@@ -76,9 +76,9 @@ SectionDevice."Mic" {
        ]
 
        Value {
-               Priority 100
+               CapturePriority 100
                CapturePCM "hw:${CardId}"
-               CaptureChannels "2"
+               CaptureChannels 2
                CaptureMixerElem "Mic"
                CaptureMasterElem "ADC0"
        }
@@ -101,9 +101,9 @@ SectionDevice."Handset" {
        ]
 
        Value {
-               Priority 200
+               CapturePriority 200
                CapturePCM "hw:${CardId}"
-               CaptureChannels "2"
+               CaptureChannels 2
                CaptureMixerElem "Mic"
                CaptureMasterElem "ADC0"
                JackDev "rt286-jack"
-- 
2.16.4

++++++ 0023-GoogleNyan-comment-CaptureControl-what-is-this.patch ++++++
>From dbf9201ef6cc0008e3d1d10d28490c47689aed0e Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 28 Jan 2020 18:16:54 +0100
Subject: [PATCH 23/36] GoogleNyan: comment CaptureControl, what is this?

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/GoogleNyan/HiFi.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ucm2/GoogleNyan/HiFi.conf b/ucm2/GoogleNyan/HiFi.conf
index 1f7e93c6826b..0bcd8e8b435e 100644
--- a/ucm2/GoogleNyan/HiFi.conf
+++ b/ucm2/GoogleNyan/HiFi.conf
@@ -50,7 +50,7 @@ SectionDevice."Headphones" {
 
 SectionDevice."Mic" {
        Value {
-               CaptureControl "MIC2"
+               #CaptureControl "MIC2"
        }
        EnableSequence [
                cset "name='Int Mic Switch' off"
-- 
2.16.4

++++++ 0024-VEYRON-I2S-corrections-and-fixes.patch ++++++
>From eed10701463b605ba5b6587d897deff742cbb5a0 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 17:48:10 +0100
Subject: [PATCH 24/36] VEYRON-I2S: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/VEYRON-I2S/HiFi.conf | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/ucm2/VEYRON-I2S/HiFi.conf b/ucm2/VEYRON-I2S/HiFi.conf
index 8d07c7337fd7..bed87c54cbd9 100644
--- a/ucm2/VEYRON-I2S/HiFi.conf
+++ b/ucm2/VEYRON-I2S/HiFi.conf
@@ -45,25 +45,31 @@ SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
        }
+
        EnableSequence [
                cset "name='Speaker Switch' on"
        ]
+
        DisableSequence [
                cset "name='Speaker Switch' off"
        ]
 }
 
-SectionDevice."Internal Mic" {
-       Comment "Int Mic"
+SectionDevice."Mic" {
+       Comment "Internal Microphone"
 
        Value {
-               CapturePCM "hw:${CardId},0"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
        }
+
        EnableSequence [
                cset "name='Int Mic Switch' on"
        ]
+
        DisableSequence [
                cset "name='Int Mic Switch' off"
        ]
@@ -73,7 +79,8 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        Value {
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
        }
 
        EnableSequence [
@@ -88,11 +95,12 @@ SectionDevice."Headphones" {
        ]
 }
 
-SectionDevice."Mic" {
-       Comment "Headset Mic"
+SectionDevice."Headset" {
+       Comment "Headset Microphone"
 
        Value {
-               CapturePCM "hw:${CardId},0"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
        }
 
        EnableSequence [
-- 
2.16.4

++++++ 0025-SDP4430-corrections-and-fixes.patch ++++++
>From c44072f1e12f29de45484d9de946b505c1f4789b Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 17:52:37 +0100
Subject: [PATCH 25/36] SDP4430: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/SDP4430/FMAnalog.conf  | 1 +
 ucm2/SDP4430/Record.conf    | 1 +
 ucm2/SDP4430/Voice.conf     | 1 +
 ucm2/SDP4430/VoiceCall.conf | 2 ++
 4 files changed, 5 insertions(+)

diff --git a/ucm2/SDP4430/FMAnalog.conf b/ucm2/SDP4430/FMAnalog.conf
index 2cfabf92cb57..da21ab1ddad2 100644
--- a/ucm2/SDP4430/FMAnalog.conf
+++ b/ucm2/SDP4430/FMAnalog.conf
@@ -33,6 +33,7 @@ SectionDevice."Headset" {
        ]
 
        Value {
+               CapturePriority 100
                 CapturePCM "hw:${CardId},0"
        }
 }
diff --git a/ucm2/SDP4430/Record.conf b/ucm2/SDP4430/Record.conf
index d3c4955ac2d8..44e722b28f12 100644
--- a/ucm2/SDP4430/Record.conf
+++ b/ucm2/SDP4430/Record.conf
@@ -39,6 +39,7 @@ SectionDevice."Headset" {
        ]
 
        Value {
+               CapturePriority 100
                CapturePCM "hw:${CardId},0"
        }
 }
diff --git a/ucm2/SDP4430/Voice.conf b/ucm2/SDP4430/Voice.conf
index 15cd4f08e310..21103328054d 100644
--- a/ucm2/SDP4430/Voice.conf
+++ b/ucm2/SDP4430/Voice.conf
@@ -39,6 +39,7 @@ SectionDevice."Headset" {
        ]
 
        Value {
+               PlaybackPriority 100
                PlaybackPCM "hw:${CardId},2"
        }
 }
diff --git a/ucm2/SDP4430/VoiceCall.conf b/ucm2/SDP4430/VoiceCall.conf
index 2f02a2ba0247..d7d5c9033bdb 100644
--- a/ucm2/SDP4430/VoiceCall.conf
+++ b/ucm2/SDP4430/VoiceCall.conf
@@ -58,7 +58,9 @@ SectionDevice."Headset" {
        ]
 
        Value {
+               CapturePriority 100
                 CapturePCM "hw:${CardId},2"
+               PlaybackPriority 100
                PlaybackPCM "hw:${CardId},2"
        }
 }
-- 
2.16.4

++++++ 0026-chtrt5645-corrections-and-fixes.patch ++++++
>From 4b7f489f6d2fa1e89592fbd1a01f87b725bc7c9c Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 18:44:49 +0100
Subject: [PATCH 26/36] chtrt5645: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/chtrt5645/HiFi-dmic1.conf                   | 32 ++++++++++++------------
 ucm2/chtrt5645/HiFi-dmic2.conf                   | 30 +++++++++++-----------
 ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf | 21 ++++++++--------
 ucm2/chtrt5645/HiFi.conf                         | 21 ++++++++--------
 ucm2/codecs/rt5645/AnalogMic.conf                |  5 ++--
 5 files changed, 54 insertions(+), 55 deletions(-)

diff --git a/ucm2/chtrt5645/HiFi-dmic1.conf b/ucm2/chtrt5645/HiFi-dmic1.conf
index 86164c9e0ff4..4748bd9315ca 100644
--- a/ucm2/chtrt5645/HiFi-dmic1.conf
+++ b/ucm2/chtrt5645/HiFi-dmic1.conf
@@ -2,10 +2,6 @@ SectionVerb {
        # ALSA PCM
        Value {
                TQ "HiFi"
-
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
        }
 
        EnableSequence [
@@ -29,7 +25,9 @@ SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 
        ConflictingDevice [
@@ -50,7 +48,9 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -69,12 +69,13 @@ SectionDevice."Headphones" {
        ]
 }
 
-SectionDevice."DMic" {
+SectionDevice."Mic" {
        Comment "Internal Microphone"
 
        Value {
-               CaptureChannels "2"
-               CapturePriority "150"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 
        EnableSequence [
@@ -91,13 +92,15 @@ SectionDevice."DMic" {
        ]
 }
 
-SectionDevice."HSMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
-               JackHWMute "DMic"
+               JackHWMute "Mic"
        }
 
        EnableSequence [
@@ -113,9 +116,6 @@ SectionDevice."HSMic" {
        ]
 
        DisableSequence [
-               <codecs/rt5645/HSMicEnableSeq.conf>
-
-               cset "name='Mono ADC MIXL ADC1 Switch' on"
-               cset "name='Mono ADC MIXR ADC1 Switch' on"
+               <codecs/rt5645/HSMicDisableSeq.conf>
        ]
 }
diff --git a/ucm2/chtrt5645/HiFi-dmic2.conf b/ucm2/chtrt5645/HiFi-dmic2.conf
index 5c947ae43afe..459b9f578566 100644
--- a/ucm2/chtrt5645/HiFi-dmic2.conf
+++ b/ucm2/chtrt5645/HiFi-dmic2.conf
@@ -2,10 +2,6 @@ SectionVerb {
        # ALSA PCM
        Value {
                TQ "HiFi"
-
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
        }
 
        EnableSequence [
@@ -29,7 +25,9 @@ SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 
        ConflictingDevice [
@@ -50,7 +48,9 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -69,12 +69,13 @@ SectionDevice."Headphones" {
        ]
 }
 
-SectionDevice."DMic" {
+SectionDevice."Mic" {
        Comment "Internal Microphone"
 
        Value {
-               CaptureChannels "2"
-               CapturePriority "150"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 
        EnableSequence [
@@ -93,11 +94,13 @@ SectionDevice."DMic" {
        ]
 }
 
-SectionDevice."HSMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
                JackHWMute "DMic"
        }
@@ -115,9 +118,6 @@ SectionDevice."HSMic" {
        ]
 
        DisableSequence [
-               <codecs/rt5645/HSMicEnableSeq.conf>
-
-               cset "name='Mono ADC MIXL ADC1 Switch' on"
-               cset "name='Mono ADC MIXR ADC1 Switch' on"
+               <codecs/rt5645/HSMicDisableSeq.conf>
        ]
 }
diff --git a/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf 
b/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
index a1bca67ebaf0..fe410f37818d 100644
--- a/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
+++ b/ucm2/chtrt5645/HiFi-mono-speaker-analog-mic.conf
@@ -2,10 +2,6 @@ SectionVerb {
        # ALSA PCM
        Value {
                TQ "HiFi"
-
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
        }
 
        EnableSequence [
@@ -29,7 +25,9 @@ SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 
        ConflictingDevice [
@@ -54,7 +52,9 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -79,11 +79,13 @@ SectionDevice."Headphones" {
 
 <codecs/rt5645/AnalogMic.conf>
 
-SectionDevice."HSMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
                JackHWMute "Mic"
        }
@@ -102,8 +104,5 @@ SectionDevice."HSMic" {
 
        DisableSequence [
                <codecs/rt5645/HSMicDisableSeq.conf>
-
-               cset "name='Mono ADC MIXL ADC1 Switch' on"
-               cset "name='Mono ADC MIXR ADC1 Switch' on"
        ]
 }
diff --git a/ucm2/chtrt5645/HiFi.conf b/ucm2/chtrt5645/HiFi.conf
index 7b2a66353891..954bf68d3032 100644
--- a/ucm2/chtrt5645/HiFi.conf
+++ b/ucm2/chtrt5645/HiFi.conf
@@ -2,10 +2,6 @@ SectionVerb {
        # ALSA PCM
        Value {
                TQ "HiFi"
-
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
        }
 
        EnableSequence [
@@ -29,7 +25,9 @@ SectionDevice."Speaker" {
        Comment "Speaker"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
        }
 
        ConflictingDevice [
@@ -50,7 +48,9 @@ SectionDevice."Headphones" {
        Comment "Headphones"
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
        }
@@ -71,11 +71,13 @@ SectionDevice."Headphones" {
 
 <codecs/rt5645/AnalogMic.conf>
 
-SectionDevice."HSMic" {
+SectionDevice."Headset" {
        Comment "Headset Microphone"
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 200
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
                JackControl "Headset Mic Jack"
                JackHWMute "Mic"
        }
@@ -94,8 +96,5 @@ SectionDevice."HSMic" {
 
        DisableSequence [
                <codecs/rt5645/HSMicDisableSeq.conf>
-
-               cset "name='Mono ADC MIXL ADC1 Switch' on"
-               cset "name='Mono ADC MIXR ADC1 Switch' on"
        ]
 }
diff --git a/ucm2/codecs/rt5645/AnalogMic.conf 
b/ucm2/codecs/rt5645/AnalogMic.conf
index d52fe61e4470..5583cdb8cddb 100644
--- a/ucm2/codecs/rt5645/AnalogMic.conf
+++ b/ucm2/codecs/rt5645/AnalogMic.conf
@@ -2,8 +2,9 @@ SectionDevice."Mic" {
        Comment "Internal Analog Microphone"
 
        Value {
-               CaptureChannels "2"
-               CapturePriority "150"
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+               CaptureChannels 2
        }
 
        EnableSequence [
-- 
2.16.4

++++++ 0027-GoogleNyan-corrections-and-fixes.patch ++++++
>From 3a92d95926e9289daf7b82335866b1561ccefc0d Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 18:48:05 +0100
Subject: [PATCH 27/36] GoogleNyan: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/GoogleNyan/HiFi.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ucm2/GoogleNyan/HiFi.conf b/ucm2/GoogleNyan/HiFi.conf
index 0bcd8e8b435e..542859160b4c 100644
--- a/ucm2/GoogleNyan/HiFi.conf
+++ b/ucm2/GoogleNyan/HiFi.conf
@@ -38,6 +38,10 @@ SectionVerb {
 }
 
 SectionDevice."Headphones" {
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+       }
        EnableSequence [
                cset "name='Speakers Switch' off"
                cset "name='Headphones Switch' on"
@@ -50,6 +54,8 @@ SectionDevice."Headphones" {
 
 SectionDevice."Mic" {
        Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
                #CaptureControl "MIC2"
        }
        EnableSequence [
-- 
2.16.4

++++++ 0028-PAZ00-corrections-and-fixes.patch ++++++
>From c546a3466d0d801b3d5a8fb6c2cd840a068e72f2 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 18:52:18 +0100
Subject: [PATCH 28/36] PAZ00: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/PAZ00/HiFi.conf   | 4 ++++
 ucm2/PAZ00/Record.conf | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/ucm2/PAZ00/HiFi.conf b/ucm2/PAZ00/HiFi.conf
index 6e30cbef4222..7f5de05946e7 100644
--- a/ucm2/PAZ00/HiFi.conf
+++ b/ucm2/PAZ00/HiFi.conf
@@ -32,4 +32,8 @@ SectionDevice."Headset" {
         # Internal speaker
         cset "name='Int Spk Switch' on"
     ]
+    Value {
+       PlaybackPriority 100
+       PlaybackPCM "hw:${CardId}"
+    }
 }
diff --git a/ucm2/PAZ00/Record.conf b/ucm2/PAZ00/Record.conf
index 3cb57b2f47a8..20dbac42c325 100644
--- a/ucm2/PAZ00/Record.conf
+++ b/ucm2/PAZ00/Record.conf
@@ -52,4 +52,8 @@ SectionDevice."Headset" {
         # Internal mic
         cset "name='DMIC En Capture Switch' on"
     ]
+    Value {
+       CapturePriority 100
+       CapturePCM "hw:${CardId}"
+    }
 }
-- 
2.16.4

++++++ 0029-SDP4430-corrections-and-fixes.patch ++++++
>From 3b6bfaa6b5c08b78ee0cbb9b1b1137fc20f92a63 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 18:58:27 +0100
Subject: [PATCH 29/36] SDP4430: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/SDP4430/FMAnalog.conf | 2 +-
 ucm2/SDP4430/HiFi.conf     | 5 +++++
 ucm2/SDP4430/Record.conf   | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ucm2/SDP4430/FMAnalog.conf b/ucm2/SDP4430/FMAnalog.conf
index da21ab1ddad2..e2132d2dddbf 100644
--- a/ucm2/SDP4430/FMAnalog.conf
+++ b/ucm2/SDP4430/FMAnalog.conf
@@ -34,7 +34,7 @@ SectionDevice."Headset" {
 
        Value {
                CapturePriority 100
-                CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
        }
 }
 
diff --git a/ucm2/SDP4430/HiFi.conf b/ucm2/SDP4430/HiFi.conf
index af5b8fb9428b..8e44a953067a 100644
--- a/ucm2/SDP4430/HiFi.conf
+++ b/ucm2/SDP4430/HiFi.conf
@@ -49,4 +49,9 @@ SectionDevice."Headset" {
                cset "name='HS Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+       }
 }
diff --git a/ucm2/SDP4430/Record.conf b/ucm2/SDP4430/Record.conf
index 44e722b28f12..49837e2c4ebf 100644
--- a/ucm2/SDP4430/Record.conf
+++ b/ucm2/SDP4430/Record.conf
@@ -40,6 +40,6 @@ SectionDevice."Headset" {
 
        Value {
                CapturePriority 100
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
        }
 }
-- 
2.16.4

++++++ 0030-PandaBoard-corrections-and-fixes.patch ++++++
>From 1e7ea2a0d7afe51447e7efb71f8f03c39b6fcb64 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 19:11:10 +0100
Subject: [PATCH 30/36] PandaBoard: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/PandaBoard/FMAnalog.conf  |  9 ++++++---
 ucm2/PandaBoard/HiFi.conf      | 18 +++++++++++-------
 ucm2/PandaBoard/HiFiLP.conf    |  8 ++++++--
 ucm2/PandaBoard/Record.conf    |  8 ++++++--
 ucm2/PandaBoard/Voice.conf     |  8 ++++++--
 ucm2/PandaBoard/VoiceCall.conf | 12 ++++++++----
 6 files changed, 43 insertions(+), 20 deletions(-)

diff --git a/ucm2/PandaBoard/FMAnalog.conf b/ucm2/PandaBoard/FMAnalog.conf
index 11a2288be4b9..29cbbe84c56a 100644
--- a/ucm2/PandaBoard/FMAnalog.conf
+++ b/ucm2/PandaBoard/FMAnalog.conf
@@ -17,10 +17,9 @@ SectionVerb {
                 cset "name='Capture Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Music"
-                CapturePCM "hw:${CardId},0"
        }
 }
 
@@ -38,5 +37,9 @@ SectionDevice."Headset" {
                 cset "name='Analog Right Capture Route' 3"
                 cset "name='Capture Preamplifier Volume' 0"
        ]
-}
 
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+       }
+}
diff --git a/ucm2/PandaBoard/HiFi.conf b/ucm2/PandaBoard/HiFi.conf
index 1b161250b3d3..5de0c8fe7921 100644
--- a/ucm2/PandaBoard/HiFi.conf
+++ b/ucm2/PandaBoard/HiFi.conf
@@ -26,13 +26,10 @@ SectionVerb {
                 cset "name='Headset Playback Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
-#      Value {
-#              TQ "Music"
-#              PlaybackPCM "hw:${CardId},0"
-#                PlaybackVolume "name='DL1 Media Playback Volume' 90,90"
-#                PlaybackSwitch "name='DL1 PDM Switch' 1"
-#      }
+       # Optional TQ
+       Value {
+               TQ "Music"
+       }
 }
 
 SectionDevice."Headset" {
@@ -49,4 +46,11 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               # PlaybackVolume "name='DL1 Media Playback Volume' 90,90"
+               # PlaybackSwitch "name='DL1 PDM Switch' 1"
+       }
 }
diff --git a/ucm2/PandaBoard/HiFiLP.conf b/ucm2/PandaBoard/HiFiLP.conf
index 92de382dab78..c735248b23c7 100644
--- a/ucm2/PandaBoard/HiFiLP.conf
+++ b/ucm2/PandaBoard/HiFiLP.conf
@@ -18,10 +18,9 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Music"
-               PlaybackPCM "hw:${CardId},6"
        }
 }
 
@@ -39,4 +38,9 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},6"
+       }
 }
diff --git a/ucm2/PandaBoard/Record.conf b/ucm2/PandaBoard/Record.conf
index 1fbe74c99df7..e88d6c3a86ec 100644
--- a/ucm2/PandaBoard/Record.conf
+++ b/ucm2/PandaBoard/Record.conf
@@ -18,10 +18,9 @@ SectionVerb {
                 cset "name='Capture Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Music"
-               CapturePCM "hw:${CardId},0"
        }
 
 }
@@ -40,4 +39,9 @@ SectionDevice."Headset" {
                 cset "name='Analog Right Capture Route' 3"
                 cset "name='Capture Preamplifier Volume' 0"
        ]
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+       }
 }
diff --git a/ucm2/PandaBoard/Voice.conf b/ucm2/PandaBoard/Voice.conf
index 42af48a4b517..6843cc8f3eb2 100644
--- a/ucm2/PandaBoard/Voice.conf
+++ b/ucm2/PandaBoard/Voice.conf
@@ -18,10 +18,9 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Voice"
-               PlaybackPCM "hw:${CardId},2"
        }
 }
 
@@ -39,4 +38,9 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},2"
+       }
 }
diff --git a/ucm2/PandaBoard/VoiceCall.conf b/ucm2/PandaBoard/VoiceCall.conf
index c20bf5cbb2b6..9a8099ef5317 100644
--- a/ucm2/PandaBoard/VoiceCall.conf
+++ b/ucm2/PandaBoard/VoiceCall.conf
@@ -31,11 +31,9 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Voice"
-                CapturePCM "hw:${CardId},2"
-               PlaybackPCM "hw:${CardId},2"
        }
 }
 
@@ -59,5 +57,11 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
-}
 
+       Value {
+               CapturePriority 100
+                CapturePCM "hw:${CardId},2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},2"
+       }
+}
-- 
2.16.4

++++++ 0031-PandaBoardES-corrections-and-fixes.patch ++++++
>From 95f4da477fdb6a06ed321e6f2c0f7fc7d170b2e0 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 4 Feb 2020 19:21:47 +0100
Subject: [PATCH 31/36] PandaBoardES: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/PandaBoardES/FMAnalog.conf  |  9 ++++++---
 ucm2/PandaBoardES/HiFi.conf      | 18 +++++++++++-------
 ucm2/PandaBoardES/HiFiLP.conf    |  8 ++++++--
 ucm2/PandaBoardES/Record.conf    |  8 ++++++--
 ucm2/PandaBoardES/Voice.conf     |  8 ++++++--
 ucm2/PandaBoardES/VoiceCall.conf | 10 +++++++---
 6 files changed, 42 insertions(+), 19 deletions(-)

diff --git a/ucm2/PandaBoardES/FMAnalog.conf b/ucm2/PandaBoardES/FMAnalog.conf
index a4d5a23b7f4f..9920bcc90e21 100644
--- a/ucm2/PandaBoardES/FMAnalog.conf
+++ b/ucm2/PandaBoardES/FMAnalog.conf
@@ -17,10 +17,9 @@ SectionVerb {
                 cset "name='Capture Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Music"
-                CapturePCM "hw:${CardId},0"
        }
 }
 
@@ -38,5 +37,9 @@ SectionDevice."Headset" {
                 cset "name='Analog Right Capture Route' 3"
                 cset "name='Capture Preamplifier Volume' 0"
        ]
-}
 
+       Value {
+               CapturePriority 100
+                CapturePCM "hw:${CardId}"
+       }
+}
diff --git a/ucm2/PandaBoardES/HiFi.conf b/ucm2/PandaBoardES/HiFi.conf
index 856dd9f90262..aa78e47f728e 100644
--- a/ucm2/PandaBoardES/HiFi.conf
+++ b/ucm2/PandaBoardES/HiFi.conf
@@ -26,13 +26,10 @@ SectionVerb {
                 cset "name='Headset Playback Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
-#      Value {
-#              TQ "Music"
-#              PlaybackPCM "hw:${CardId},0"
-#                PlaybackVolume "name='DL1 Media Playback Volume' 90,90"
-#                PlaybackSwitch "name='DL1 PDM Switch' 1"
-#      }
+       # Optional TQ
+       Value {
+               TQ "Music"
+       }
 }
 
 SectionDevice."Headset" {
@@ -49,4 +46,11 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               # PlaybackVolume "name='DL1 Media Playback Volume' 90,90"
+               # PlaybackSwitch "name='DL1 PDM Switch' 1"
+       }
 }
diff --git a/ucm2/PandaBoardES/HiFiLP.conf b/ucm2/PandaBoardES/HiFiLP.conf
index a6a258d282e7..23164edfdec5 100644
--- a/ucm2/PandaBoardES/HiFiLP.conf
+++ b/ucm2/PandaBoardES/HiFiLP.conf
@@ -18,10 +18,9 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Music"
-               PlaybackPCM "hw:${CardId},6"
        }
 }
 
@@ -39,4 +38,9 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},6"
+       }
 }
diff --git a/ucm2/PandaBoardES/Record.conf b/ucm2/PandaBoardES/Record.conf
index 57ad61261586..8cc6fdf911d3 100644
--- a/ucm2/PandaBoardES/Record.conf
+++ b/ucm2/PandaBoardES/Record.conf
@@ -17,10 +17,9 @@ SectionVerb {
                 cset "name='Capture Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Music"
-               CapturePCM "hw:${CardId},0"
        }
 
 }
@@ -39,4 +38,9 @@ SectionDevice."Headset" {
                 cset "name='Analog Right Capture Route' 3"
                 cset "name='Capture Preamplifier Volume' 0"
        ]
+
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId}"
+       }
 }
diff --git a/ucm2/PandaBoardES/Voice.conf b/ucm2/PandaBoardES/Voice.conf
index a198c238f657..e37e7ecd15ec 100644
--- a/ucm2/PandaBoardES/Voice.conf
+++ b/ucm2/PandaBoardES/Voice.conf
@@ -18,10 +18,9 @@ SectionVerb {
                 cset "name='SDT DL Volume' 0"
        ]
 
-       # Optional TQ and ALSA PCMs
+       # Optional TQ
        Value {
                TQ "Voice"
-               PlaybackPCM "hw:${CardId},2"
        }
 }
 
@@ -39,4 +38,9 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
+
+       Value {
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},2"
+       }
 }
diff --git a/ucm2/PandaBoardES/VoiceCall.conf b/ucm2/PandaBoardES/VoiceCall.conf
index 4aed020c238b..3e6e09212581 100644
--- a/ucm2/PandaBoardES/VoiceCall.conf
+++ b/ucm2/PandaBoardES/VoiceCall.conf
@@ -34,8 +34,6 @@ SectionVerb {
        # Optional TQ and ALSA PCMs
        Value {
                TQ "Voice"
-                CapturePCM "hw:${CardId},2"
-               PlaybackPCM "hw:${CardId},2"
        }
 }
 
@@ -59,5 +57,11 @@ SectionDevice."Headset" {
                cset "name='Headset Left Playback' 0"
                 cset "name='Headset Playback Volume' 0"
        ]
-}
 
+       Value {
+               CapturePriority 100
+               CapturePCM "hw:${CardId},2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId},2"            
+       }
+}
-- 
2.16.4

++++++ 0032-kblrt5660-corrections-and-fixes.patch ++++++
>From d2f2b3649b2ea4caa2fc93cdabe9ed813efbae68 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 5 Feb 2020 02:54:11 +0100
Subject: [PATCH 32/36] kblrt5660: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/kblrt5660/Hdmi1.conf | 28 +++++++++++++++++++---------
 ucm2/kblrt5660/Hdmi2.conf | 30 ++++++++++++++++++++----------
 ucm2/kblrt5660/HiFi.conf  | 26 ++++++++++----------------
 3 files changed, 49 insertions(+), 35 deletions(-)

diff --git a/ucm2/kblrt5660/Hdmi1.conf b/ucm2/kblrt5660/Hdmi1.conf
index b6adbaa834dc..ccf51183fdd3 100755
--- a/ucm2/kblrt5660/Hdmi1.conf
+++ b/ucm2/kblrt5660/Hdmi1.conf
@@ -1,14 +1,24 @@
 # Usecase for device HDMI1/Display Port stereo playback on Intel KABYLAKE 
platforms
 # For Audio in I2S mode
 
-SectionDevice."Hdmi1" {
-        Comment "HDMI/Display Port 1 Stereo"
+SectionDevice."HDMI1" {
+       Comment "HDMI/Display Port 1 Stereo"
 
-        Value {
-                PlaybackPCM "hw:${CardId},2"
-                PlaybackChannels "2"
-                PlaybackPriority "2"
-                JackControl "HDMI/DP, pcm=4 Jack"
-        }
+       Value {
+               PlaybackPriority 200
+               PlaybackPCM "hw:${CardId},2"
+               PlaybackChannels 2
+               If.1 {
+                       Condition {
+                               Type ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=4 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=4 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=4 Jack"
+                       }
+               }
+       }
 }
-
diff --git a/ucm2/kblrt5660/Hdmi2.conf b/ucm2/kblrt5660/Hdmi2.conf
index 19e9bd0b300b..c5e400166ed7 100755
--- a/ucm2/kblrt5660/Hdmi2.conf
+++ b/ucm2/kblrt5660/Hdmi2.conf
@@ -1,14 +1,24 @@
-# Usecase for device HDMI2/Display Port stereo playback on Intel KABYLAKE 
platforms
+# Usecase for device HDMI1/Display Port stereo playback on Intel KABYLAKE 
platforms
 # For Audio in I2S mode
 
-SectionDevice."Hdmi2" {
-        Comment "HDMI/Display Port 2 Stereo"
+SectionDevice."HDMI2" {
+       Comment "HDMI/Display Port 2 Stereo"
 
-        Value {
-                PlaybackPCM "hw:${CardId},3"
-                PlaybackChannels "2"
-                PlaybackPriority "3"
-                JackControl "HDMI/DP, pcm=5 Jack"
-        }
+       Value {
+               PlaybackPriority 300
+               PlaybackPCM "hw:${CardId},3"
+               PlaybackChannels 2
+               If.1 {
+                       Condition {
+                               Type ControlExists
+                               Control "iface=CARD,name='HDMI/DP,pcm=5 Jack'"
+                       }
+                       True {
+                               JackControl "HDMI/DP,pcm=5 Jack"
+                       }
+                       False {
+                               JackControl "HDMI/DP, pcm=5 Jack"
+                       }
+               }
+       }
 }
-
diff --git a/ucm2/kblrt5660/HiFi.conf b/ucm2/kblrt5660/HiFi.conf
index af0d805a3aa7..0f5d46dafb15 100755
--- a/ucm2/kblrt5660/HiFi.conf
+++ b/ucm2/kblrt5660/HiFi.conf
@@ -1,18 +1,8 @@
 # UCM for Intel Kabylake platforms with RT5660
 # For Audio in I2S mode
 
-SectionVerb {
-
-       # ALSA PCM
-       Value {
-               # ALSA PCM device for HiFi
-               PlaybackPCM "hw:${CardId},0"
-               CapturePCM "hw:${CardId},1"
-       }
-}
-
-SectionDevice."LineOut" {
-       Comment "LineOut playback"
+SectionDevice."Line1" {
+       Comment "Line playback"
 
        EnableSequence [
                cset "name='DAC1 Playback Volume' 30"
@@ -36,14 +26,16 @@ SectionDevice."LineOut" {
        ]
 
        Value {
-               PlaybackChannels "2"
+               PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
+               PlaybackChannels 2
                JackDev "rt5660-jack"
                JackControl "Line Out Jack"
        }
 }
 
-SectionDevice."LineIn" {
-       Comment "LineIn capture"
+SectionDevice."Line2" {
+       Comment "Line capture"
 
        EnableSequence [
                cset "name='ADC Capture Volume' 30"
@@ -67,7 +59,9 @@ SectionDevice."LineIn" {
        ]
 
        Value {
-               CaptureChannels "2"
+               CapturePriority 100
+               CapturePCM "hw:${CardId},1"             
+               CaptureChannels 2
                JackDev "rt5660-jack"
                JackControl "Line In Jack"
        }
-- 
2.16.4

++++++ 0033-bytcr-rt5640-corrections-and-fixes.patch ++++++
>From 1e2eddb7e38474f239f9c8f9387c7a04a1bff7e3 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 5 Feb 2020 03:13:06 +0100
Subject: [PATCH 33/36] bytcr-rt5640: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/bytcr-rt5640/HiFi.conf             | 5 -----
 ucm2/codecs/rt5640/DigitalMics.conf     | 2 +-
 ucm2/codecs/rt5640/HeadPhones.conf      | 3 +--
 ucm2/codecs/rt5640/HeadsetMic.conf      | 2 +-
 ucm2/codecs/rt5640/IN1-InternalMic.conf | 4 ++--
 ucm2/codecs/rt5640/IN3-InternalMic.conf | 2 +-
 ucm2/codecs/rt5640/MonoSpeaker.conf     | 3 +--
 ucm2/codecs/rt5640/Speaker.conf         | 3 +--
 8 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/ucm2/bytcr-rt5640/HiFi.conf b/ucm2/bytcr-rt5640/HiFi.conf
index a616106d38c3..e71eb2266110 100644
--- a/ucm2/bytcr-rt5640/HiFi.conf
+++ b/ucm2/bytcr-rt5640/HiFi.conf
@@ -10,11 +10,6 @@ SectionVerb {
        DisableSequence [
                <platforms/bytcr/PlatformDisableSeq.conf>
        ]
-
-       Value {
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
 }
 
 If.0 {
diff --git a/ucm2/codecs/rt5640/DigitalMics.conf 
b/ucm2/codecs/rt5640/DigitalMics.conf
index 17cae1953677..9cd8a8c4d9cd 100644
--- a/ucm2/codecs/rt5640/DigitalMics.conf
+++ b/ucm2/codecs/rt5640/DigitalMics.conf
@@ -21,7 +21,7 @@ SectionDevice."Mic" {
 
        Value {
                CapturePriority 100
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/HeadPhones.conf 
b/ucm2/codecs/rt5640/HeadPhones.conf
index dccc943490c1..7859b7a6bfb3 100644
--- a/ucm2/codecs/rt5640/HeadPhones.conf
+++ b/ucm2/codecs/rt5640/HeadPhones.conf
@@ -3,7 +3,6 @@ SectionDevice."Headphones" {
 
        ConflictingDevice [
                "Speaker"
-               "MonoSpeaker"
        ]
 
        EnableSequence [
@@ -33,7 +32,7 @@ SectionDevice."Headphones" {
 
        Value {
                PlaybackPriority 300
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
                JackControl "Headphone Jack"
        }
diff --git a/ucm2/codecs/rt5640/HeadsetMic.conf 
b/ucm2/codecs/rt5640/HeadsetMic.conf
index f6d9423963ac..40e0abedd5f7 100644
--- a/ucm2/codecs/rt5640/HeadsetMic.conf
+++ b/ucm2/codecs/rt5640/HeadsetMic.conf
@@ -37,7 +37,7 @@ SectionDevice."Headset" {
 
        Value {
                CapturePriority 200
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
diff --git a/ucm2/codecs/rt5640/IN1-InternalMic.conf 
b/ucm2/codecs/rt5640/IN1-InternalMic.conf
index 435cce83dc13..7d76c4f17d41 100644
--- a/ucm2/codecs/rt5640/IN1-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN1-InternalMic.conf
@@ -2,7 +2,7 @@ SectionDevice."Mic" {
        Comment "Internal Microphone on IN1"
 
        ConflictingDevice [
-               "HeadsetMic"
+               "Headset"
        ]
 
        EnableSequence [
@@ -40,7 +40,7 @@ SectionDevice."Mic" {
 
        Value {
                CapturePriority 100
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/IN3-InternalMic.conf 
b/ucm2/codecs/rt5640/IN3-InternalMic.conf
index 4d4060e23324..2df29386d1f8 100644
--- a/ucm2/codecs/rt5640/IN3-InternalMic.conf
+++ b/ucm2/codecs/rt5640/IN3-InternalMic.conf
@@ -40,7 +40,7 @@ SectionDevice."Mic" {
 
        Value {
                CapturePriority 100
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/MonoSpeaker.conf 
b/ucm2/codecs/rt5640/MonoSpeaker.conf
index 6ca51e2397d1..70ab80922fb1 100644
--- a/ucm2/codecs/rt5640/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5640/MonoSpeaker.conf
@@ -3,7 +3,6 @@ SectionDevice."Speaker" {
 
        ConflictingDevice [
                "Headphones"
-               "Speaker"
        ]
 
        EnableSequence [
@@ -38,7 +37,7 @@ SectionDevice."Speaker" {
 
        Value {
                PlaybackPriority 100
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
        }
 }
diff --git a/ucm2/codecs/rt5640/Speaker.conf b/ucm2/codecs/rt5640/Speaker.conf
index 09b99cf6410d..3b4b2968fb56 100644
--- a/ucm2/codecs/rt5640/Speaker.conf
+++ b/ucm2/codecs/rt5640/Speaker.conf
@@ -3,7 +3,6 @@ SectionDevice."Speaker" {
 
        ConflictingDevice [
                "Headphones"
-               "MonoSpeaker"
        ]
 
        EnableSequence [
@@ -37,8 +36,8 @@ SectionDevice."Speaker" {
        ]
 
        Value {
-               PlaybackPCM "hw:${CardId},0"
                PlaybackPriority 100
+               PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0034-bytcht-es8316-corrections-and-fixes.patch ++++++
>From 6a1044da7b104251502421c56c9be42407bd9281 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 5 Feb 2020 03:19:33 +0100
Subject: [PATCH 34/36] bytcht-es8316: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/bytcht-es8316/HiFi.conf            | 5 -----
 ucm2/codecs/es8316/HeadPhones.conf      | 2 +-
 ucm2/codecs/es8316/IN1-HeadsetMic.conf  | 2 +-
 ucm2/codecs/es8316/IN2-HeadsetMic.conf  | 2 +-
 ucm2/codecs/es8316/IN2-InternalMic.conf | 6 ++----
 ucm2/codecs/es8316/MonoSpeaker.conf     | 2 +-
 ucm2/codecs/es8316/Speaker.conf         | 3 +--
 7 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/ucm2/bytcht-es8316/HiFi.conf b/ucm2/bytcht-es8316/HiFi.conf
index 768f0109babd..af053d09421c 100644
--- a/ucm2/bytcht-es8316/HiFi.conf
+++ b/ucm2/bytcht-es8316/HiFi.conf
@@ -7,11 +7,6 @@ SectionVerb {
        DisableSequence [
                <platforms/bytcr/PlatformDisableSeq.conf>
        ]
-
-       Value {
-               PlaybackPCM "hw:${CardId}"
-               CapturePCM "hw:${CardId}"
-       }
 }
 
 If.0 {
diff --git a/ucm2/codecs/es8316/HeadPhones.conf 
b/ucm2/codecs/es8316/HeadPhones.conf
index 603b40c2e6c1..6a05e5488979 100644
--- a/ucm2/codecs/es8316/HeadPhones.conf
+++ b/ucm2/codecs/es8316/HeadPhones.conf
@@ -15,7 +15,7 @@ SectionDevice."Headphones" {
 
        Value {
                PlaybackPriority 200
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
                JackControl "Headphone Jack"
                JackHWMute "Speaker"
diff --git a/ucm2/codecs/es8316/IN1-HeadsetMic.conf 
b/ucm2/codecs/es8316/IN1-HeadsetMic.conf
index d798270dd444..e9f90614c646 100644
--- a/ucm2/codecs/es8316/IN1-HeadsetMic.conf
+++ b/ucm2/codecs/es8316/IN1-HeadsetMic.conf
@@ -16,7 +16,7 @@ SectionDevice."Headset" {
 
        Value {
                CapturePriority 200
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
diff --git a/ucm2/codecs/es8316/IN2-HeadsetMic.conf 
b/ucm2/codecs/es8316/IN2-HeadsetMic.conf
index 28f26f8d4c4d..377d84d3a0f2 100644
--- a/ucm2/codecs/es8316/IN2-HeadsetMic.conf
+++ b/ucm2/codecs/es8316/IN2-HeadsetMic.conf
@@ -16,7 +16,7 @@ SectionDevice."Headset" {
 
        Value {
                CapturePriority 200
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
                JackControl "Headset Mic Jack"
        }
diff --git a/ucm2/codecs/es8316/IN2-InternalMic.conf 
b/ucm2/codecs/es8316/IN2-InternalMic.conf
index 8c0418fde5ba..f0ff6f183f5a 100644
--- a/ucm2/codecs/es8316/IN2-InternalMic.conf
+++ b/ucm2/codecs/es8316/IN2-InternalMic.conf
@@ -2,9 +2,7 @@ SectionDevice."Mic" {
        Comment "Internal Microphone on IN2"
 
        ConflictingDevice [
-               "InternalMic-IN1"
-               "HeadsetMic-IN1"
-               "HeadsetMic-IN2"
+               "Headset"
        ]
 
        EnableSequence [
@@ -18,7 +16,7 @@ SectionDevice."Mic" {
 
        Value {
                CapturePriority 100
-               CapturePCM "hw:${CardId},0"
+               CapturePCM "hw:${CardId}"
                CaptureChannels 2
        }
 }
diff --git a/ucm2/codecs/es8316/MonoSpeaker.conf 
b/ucm2/codecs/es8316/MonoSpeaker.conf
index f11f2b7f2d41..64a7e76046a0 100644
--- a/ucm2/codecs/es8316/MonoSpeaker.conf
+++ b/ucm2/codecs/es8316/MonoSpeaker.conf
@@ -32,7 +32,7 @@ SectionDevice."Speaker" {
 
        Value {
                PlaybackPriority 100
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
        }
 }
diff --git a/ucm2/codecs/es8316/Speaker.conf b/ucm2/codecs/es8316/Speaker.conf
index a1e4491a8577..58fe078409ee 100644
--- a/ucm2/codecs/es8316/Speaker.conf
+++ b/ucm2/codecs/es8316/Speaker.conf
@@ -2,7 +2,6 @@ SectionDevice."Speaker" {
        Comment "Speakers"
 
        ConflictingDevice [
-               "MonoSpeaker"
                "Headphones"
        ]
 
@@ -16,7 +15,7 @@ SectionDevice."Speaker" {
 
        Value {
                PlaybackPriority 100
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackChannels 2
        }
 }
-- 
2.16.4

++++++ 0035-sof-hda-dsp-corrections-and-fixes.patch ++++++
>From acf80f98692ab6f409e77cddb1bb55b387da4b17 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 5 Feb 2020 03:24:00 +0100
Subject: [PATCH 35/36] sof-hda-dsp: corrections and fixes

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 ucm2/sof-hda-dsp/HDA-Capture-value.conf |  4 ++--
 ucm2/sof-hda-dsp/Hdmi.conf              |  6 +++---
 ucm2/sof-hda-dsp/HiFi.conf              | 14 +++++++-------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ucm2/sof-hda-dsp/HDA-Capture-value.conf 
b/ucm2/sof-hda-dsp/HDA-Capture-value.conf
index b3e90aaa7193..5f3c2a38899d 100644
--- a/ucm2/sof-hda-dsp/HDA-Capture-value.conf
+++ b/ucm2/sof-hda-dsp/HDA-Capture-value.conf
@@ -1,5 +1,5 @@
-CapturePCM "hw:${CardId},0"
+CapturePCM "hw:${CardId}"
 CaptureMixerElem "Capture"
 CaptureVolume "Capture Volume"
 CaptureSwitch "Capture Switch"
-CaptureChannels "2"
+CaptureChannels 2
diff --git a/ucm2/sof-hda-dsp/Hdmi.conf b/ucm2/sof-hda-dsp/Hdmi.conf
index 7418fa79f993..1982c7269ed5 100644
--- a/ucm2/sof-hda-dsp/Hdmi.conf
+++ b/ucm2/sof-hda-dsp/Hdmi.conf
@@ -14,7 +14,7 @@ SectionDevice."HDMI1" {
        Value {
                PlaybackPriority 500
                PlaybackPCM "hw:${CardId},3"
-               PlaybackChannels "2"
+               PlaybackChannels 2
                JackControl "HDMI/DP,pcm=3 Jack"
        }
 }
@@ -33,7 +33,7 @@ SectionDevice."HDMI2" {
        Value {
                PlaybackPriority 600
                PlaybackPCM "hw:${CardId},4"
-               PlaybackChannels "2"
+               PlaybackChannels 2
                JackControl "HDMI/DP,pcm=4 Jack"
        }
 }
@@ -52,7 +52,7 @@ SectionDevice."HDMI3" {
        Value {
                PlaybackPriority 700
                PlaybackPCM "hw:${CardId},5"
-               PlaybackChannels "2"
+               PlaybackChannels 2
                JackControl "HDMI/DP,pcm=5 Jack"
        }
 }
diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf
index 71cef496d0ca..6dfdabe2ff40 100644
--- a/ucm2/sof-hda-dsp/HiFi.conf
+++ b/ucm2/sof-hda-dsp/HiFi.conf
@@ -19,12 +19,12 @@ SectionDevice."Headphones1" {
 
        Value {
                PlaybackPriority 200
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackMixerElem "Headphone"
                PlaybackMasterElem "Master"
                PlaybackVolume "Headphone Playback Volume"
                PlaybackSwitch "Headphone Playback Switch"
-               PlaybackChannels "2"
+               PlaybackChannels 2
                If.jack {
                        Condition {
                                Type ControlExists
@@ -72,12 +72,12 @@ SectionDevice."Speaker" {
 
        Value {
                PlaybackPriority 100
-               PlaybackPCM "hw:${CardId},0"
+               PlaybackPCM "hw:${CardId}"
                PlaybackMixerElem "Speaker"
                PlaybackMasterElem "Master"
                PlaybackVolume "Speaker Playback Volume"
                PlaybackSwitch "Speaker Playback Switch"
-               PlaybackChannels "2"
+               PlaybackChannels 2
        }
 }
 
@@ -93,7 +93,7 @@ If.monomic {
                        Comment "Headphones Stereo Microphone"
 
                        ConflictingDevice [
-                               "HeadsetMic"
+                               "Headset"
                        ]
 
                        EnableSequence [
@@ -147,10 +147,10 @@ SectionDevice."Mic" {
                                Needle "cfg-dmics:4"
                        }
                        True {
-                               CaptureChannels "4"
+                               CaptureChannels 4
                        }
                        False {
-                               CaptureChannels "2"
+                               CaptureChannels 2
                        }
                }
                If.vol {
-- 
2.16.4

++++++ 0036-ucm2-treewide-remove-Playback-and-Capture-channels-2.patch ++++++
++++ 945 lines (skipped)


Reply via email to