[5/5] cht-bsw-rt5672: Fix HiFi-stereo-dmic2 conf not loading / working
diff mbox series

Message ID 20200405183454.34515-5-hdegoede@redhat.com
State New
Headers show
Series
  • [1/5] bytcr-rt5651: Fix dmic check in HiFi-Components.conf
Related show

Commit Message

Hans de Goede April 5, 2020, 6:34 p.m. UTC
Fix HiFi-stereo-dmic2 conf not loading because of references to
non existing devices in the ConflictingDevices sections.

Stop playing Rename + Remove tricks with the output (Speaker2) and
input (DMIC1) devices which we do not want to be part of this config,
this does not work now that we only allow devices which are actually
part of our config in the ConflictingDevices sections.

Instead start with only having devices which all configs have in
the ConflictingDevices sections (Headphones / Headset) and add the
other ones from our HiFi*.conf files after including the shared
basic configs.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1786723
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
I have tested that both HiFi.conf and HiFi-stereo-dmic2.conf work
properly after these changes.
---
 ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf | 6 ++----
 ucm2/cht-bsw-rt5672/HiFi.conf              | 8 ++++++++
 ucm2/codecs/rt5672/DMIC1.conf              | 1 -
 ucm2/codecs/rt5672/DMIC2.conf              | 1 -
 ucm2/codecs/rt5672/HeadPhones.conf         | 2 --
 ucm2/codecs/rt5672/HeadsetMic.conf         | 2 --
 ucm2/codecs/rt5672/MonoSpeaker.conf        | 1 -
 ucm2/codecs/rt5672/Speaker.conf            | 1 -
 8 files changed, 10 insertions(+), 12 deletions(-)

Comments

Jaroslav Kysela April 6, 2020, 9:34 a.m. UTC | #1
Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
> Fix HiFi-stereo-dmic2 conf not loading because of references to
> non existing devices in the ConflictingDevices sections.
> 
> Stop playing Rename + Remove tricks with the output (Speaker2) and
> input (DMIC1) devices which we do not want to be part of this config,
> this does not work now that we only allow devices which are actually
> part of our config in the ConflictingDevices sections.

The Remove and Rename operations should also manage (remove and rename) 
devices in ConflictingDevices/SupportedDevices sections. What's the exact 
error you hit?

If I simulate this via ucm-validator I get this device structure:

  Verb: "HiFi"
     File: HiFi-stereo-dmic2.conf
     Device: "Headphones"
       ConflictingDevices.0 = Speaker
       Value.PlaybackPriority = 300
       Value.PlaybackPCM = 'hw:${CardId}'
       Value.JackControl = 'Headphone Jack'
     Device: "Headset"
       ConflictingDevices.0 = Mic
       Value.CapturePriority = 300
       Value.CapturePCM = 'hw:${CardId}'
       Value.JackControl = 'Headset Mic Jack'
     Device: "Speaker"
       ConflictingDevices.0 = Headphones
       Value.PlaybackPriority = 200
       Value.PlaybackPCM = 'hw:${CardId}'
     Device: "Mic"
       ConflictingDevices.0 = Headset
       Value.CapturePriority = 200
       Value.CapturePCM = 'hw:${CardId}'

It appears like an issue in alsa-lib.

					Jaroslav
Hans de Goede April 6, 2020, 9:50 a.m. UTC | #2
Hi,

On 4/6/20 11:34 AM, Jaroslav Kysela wrote:
> Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
>> Fix HiFi-stereo-dmic2 conf not loading because of references to
>> non existing devices in the ConflictingDevices sections.
>>
>> Stop playing Rename + Remove tricks with the output (Speaker2) and
>> input (DMIC1) devices which we do not want to be part of this config,
>> this does not work now that we only allow devices which are actually
>> part of our config in the ConflictingDevices sections.
> 
> The Remove and Rename operations should also manage (remove and rename) devices in ConflictingDevices/SupportedDevices sections. What's the exact error you hit?
> 
> If I simulate this via ucm-validator I get this device structure:
> 
>   Verb: "HiFi"
>      File: HiFi-stereo-dmic2.conf
>      Device: "Headphones"
>        ConflictingDevices.0 = Speaker
>        Value.PlaybackPriority = 300
>        Value.PlaybackPCM = 'hw:${CardId}'
>        Value.JackControl = 'Headphone Jack'
>      Device: "Headset"
>        ConflictingDevices.0 = Mic
>        Value.CapturePriority = 300
>        Value.CapturePCM = 'hw:${CardId}'
>        Value.JackControl = 'Headset Mic Jack'
>      Device: "Speaker"
>        ConflictingDevices.0 = Headphones
>        Value.PlaybackPriority = 200
>        Value.PlaybackPCM = 'hw:${CardId}'
>      Device: "Mic"
>        ConflictingDevices.0 = Headset
>        Value.CapturePriority = 200
>        Value.CapturePCM = 'hw:${CardId}'
> 
> It appears like an issue in alsa-lib.

With an unmodified UCM2 profile I get the following:

[hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Speaker2'
ALSA lib parser.c:1433:(parse_verb_file) error: device management error in verb 'HiFi'
ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -2
alsaucm: error failed to open sound card cht-bsw-rt5672: No such file or directory

Note the _enadev does not matter, things break before it gets parsed,
if I replace Speaker with XXX I get the exact same errors.

I'm happy to try any alsa-lib patches on this (Thinkpad8) hw for you.

Regards,

Hans
Hans de Goede April 6, 2020, 10:02 a.m. UTC | #3
Hi,

On 4/6/20 11:34 AM, Jaroslav Kysela wrote:
> Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
>> Fix HiFi-stereo-dmic2 conf not loading because of references to
>> non existing devices in the ConflictingDevices sections.
>>
>> Stop playing Rename + Remove tricks with the output (Speaker2) and
>> input (DMIC1) devices which we do not want to be part of this config,
>> this does not work now that we only allow devices which are actually
>> part of our config in the ConflictingDevices sections.
> 
> The Remove and Rename operations should also manage (remove and rename) devices in ConflictingDevices/SupportedDevices sections. What's the exact error you hit?
> 
> If I simulate this via ucm-validator I get this device structure:
> 
>   Verb: "HiFi"
>      File: HiFi-stereo-dmic2.conf
>      Device: "Headphones"
>        ConflictingDevices.0 = Speaker
>        Value.PlaybackPriority = 300
>        Value.PlaybackPCM = 'hw:${CardId}'
>        Value.JackControl = 'Headphone Jack'
>      Device: "Headset"
>        ConflictingDevices.0 = Mic
>        Value.CapturePriority = 300
>        Value.CapturePCM = 'hw:${CardId}'
>        Value.JackControl = 'Headset Mic Jack'
>      Device: "Speaker"
>        ConflictingDevices.0 = Headphones
>        Value.PlaybackPriority = 200
>        Value.PlaybackPCM = 'hw:${CardId}'
>      Device: "Mic"
>        ConflictingDevices.0 = Headset
>        Value.CapturePriority = 200
>        Value.CapturePCM = 'hw:${CardId}'
> 
> It appears like an issue in alsa-lib.

Ok so I found the following weird:

RemoveDevice."Speaker2" "Speaker2"

At a hunch I removed the extra "Speaker2", now I get:

[hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Mic1'
...

Notice the error changed from being about Speaker2 to Mic1, so this looks good,
but then I did the same with the:

RemoveDevice."Mic1" "Mic1"

Line, dropping the extra "Mic1" I get:

[hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
ALSA lib parser.c:1183:(verb_device_management) error: cannot remove device 'Mic'
...

Which is weird...

Even weirder I was thinking that the Rename + Remove lines should be after the last
include, so that they also get applied to the Conflicting devices of e.g . the
Headphones Section Device, but if I move the Rename + Remove lines for the Mic
to the end of the HiFi-stereo-dmic2.conf file I get:

[hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
ALSA lib conf.c:1928:(_snd_config_load_with_include) _toplevel_:23:0:Unexpected end of file
ALSA lib utils.c:285:(uc_mgr_config_load) could not load configuration file /usr/share/alsa/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
ALSA lib parser.c:1349:(parse_verb_file) error: failed to open verb file /usr/share/alsa/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf : 0
ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -22
alsaucm: error failed to open sound card cht-bsw-rt5672: Invalid argument


Regards,

Hans
Hans de Goede April 6, 2020, 10:07 a.m. UTC | #4
Hi,

On 4/6/20 12:02 PM, Hans de Goede wrote:
> Hi,
> 
> On 4/6/20 11:34 AM, Jaroslav Kysela wrote:
>> Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
>>> Fix HiFi-stereo-dmic2 conf not loading because of references to
>>> non existing devices in the ConflictingDevices sections.
>>>
>>> Stop playing Rename + Remove tricks with the output (Speaker2) and
>>> input (DMIC1) devices which we do not want to be part of this config,
>>> this does not work now that we only allow devices which are actually
>>> part of our config in the ConflictingDevices sections.
>>
>> The Remove and Rename operations should also manage (remove and rename) devices in ConflictingDevices/SupportedDevices sections. What's the exact error you hit?
>>
>> If I simulate this via ucm-validator I get this device structure:
>>
>>   Verb: "HiFi"
>>      File: HiFi-stereo-dmic2.conf
>>      Device: "Headphones"
>>        ConflictingDevices.0 = Speaker
>>        Value.PlaybackPriority = 300
>>        Value.PlaybackPCM = 'hw:${CardId}'
>>        Value.JackControl = 'Headphone Jack'
>>      Device: "Headset"
>>        ConflictingDevices.0 = Mic
>>        Value.CapturePriority = 300
>>        Value.CapturePCM = 'hw:${CardId}'
>>        Value.JackControl = 'Headset Mic Jack'
>>      Device: "Speaker"
>>        ConflictingDevices.0 = Headphones
>>        Value.PlaybackPriority = 200
>>        Value.PlaybackPCM = 'hw:${CardId}'
>>      Device: "Mic"
>>        ConflictingDevices.0 = Headset
>>        Value.CapturePriority = 200
>>        Value.CapturePCM = 'hw:${CardId}'
>>
>> It appears like an issue in alsa-lib.
> 
> Ok so I found the following weird:
> 
> RemoveDevice."Speaker2" "Speaker2"
> 
> At a hunch I removed the extra "Speaker2", now I get:
> 
> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
> ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Mic1'
> ...
> 
> Notice the error changed from being about Speaker2 to Mic1, so this looks good,
> but then I did the same with the:
> 
> RemoveDevice."Mic1" "Mic1"
> 
> Line, dropping the extra "Mic1" I get:
> 
> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
> ALSA lib parser.c:1183:(verb_device_management) error: cannot remove device 'Mic'
> ...
> 
> Which is weird...
> 
> Even weirder I was thinking that the Rename + Remove lines should be after the last
> include, so that they also get applied to the Conflicting devices of e.g . the
> Headphones Section Device, but if I move the Rename + Remove lines for the Mic
> to the end of the HiFi-stereo-dmic2.conf file I get:
> 
> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
> ALSA lib conf.c:1928:(_snd_config_load_with_include) _toplevel_:23:0:Unexpected end of file
> ALSA lib utils.c:285:(uc_mgr_config_load) could not load configuration file /usr/share/alsa/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
> ALSA lib parser.c:1349:(parse_verb_file) error: failed to open verb file /usr/share/alsa/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf : 0
> ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -22
> alsaucm: error failed to open sound card cht-bsw-rt5672: Invalid argument

Last mail, sorry about the spam.

Ok, this is caused by me removing the extra "Mic1" at the end of the RemoveDevice line.

Things still do not work with the in my mind more logical order of
having these at the end though.

Regards,

Hans
Jaroslav Kysela April 6, 2020, 11:28 a.m. UTC | #5
Dne 06. 04. 20 v 11:50 Hans de Goede napsal(a):
> Hi,
> 
> On 4/6/20 11:34 AM, Jaroslav Kysela wrote:
>> Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
>>> Fix HiFi-stereo-dmic2 conf not loading because of references to
>>> non existing devices in the ConflictingDevices sections.
>>>
>>> Stop playing Rename + Remove tricks with the output (Speaker2) and
>>> input (DMIC1) devices which we do not want to be part of this config,
>>> this does not work now that we only allow devices which are actually
>>> part of our config in the ConflictingDevices sections.
>>
>> The Remove and Rename operations should also manage (remove and rename) devices in ConflictingDevices/SupportedDevices sections. What's the exact error you hit?
>>
>> If I simulate this via ucm-validator I get this device structure:
>>
>>    Verb: "HiFi"
>>       File: HiFi-stereo-dmic2.conf
>>       Device: "Headphones"
>>         ConflictingDevices.0 = Speaker
>>         Value.PlaybackPriority = 300
>>         Value.PlaybackPCM = 'hw:${CardId}'
>>         Value.JackControl = 'Headphone Jack'
>>       Device: "Headset"
>>         ConflictingDevices.0 = Mic
>>         Value.CapturePriority = 300
>>         Value.CapturePCM = 'hw:${CardId}'
>>         Value.JackControl = 'Headset Mic Jack'
>>       Device: "Speaker"
>>         ConflictingDevices.0 = Headphones
>>         Value.PlaybackPriority = 200
>>         Value.PlaybackPCM = 'hw:${CardId}'
>>       Device: "Mic"
>>         ConflictingDevices.0 = Headset
>>         Value.CapturePriority = 200
>>         Value.CapturePCM = 'hw:${CardId}'
>>
>> It appears like an issue in alsa-lib.
> 
> With an unmodified UCM2 profile I get the following:
> 
> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
> ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Speaker2'
> ALSA lib parser.c:1433:(parse_verb_file) error: device management error in verb 'HiFi'
> ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -2
> alsaucm: error failed to open sound card cht-bsw-rt5672: No such file or directory
> 
> Note the _enadev does not matter, things break before it gets parsed,
> if I replace Speaker with XXX I get the exact same errors.
> 
> I'm happy to try any alsa-lib patches on this (Thinkpad8) hw for you.

I think that I found the culprit. Could you test this, please?

https://github.com/alsa-project/alsa-lib/commit/c9605484d165d2b707f78eef14a224b0b47ba322

			Thank you,
				Jaroslav
Hans de Goede April 6, 2020, 12:13 p.m. UTC | #6
Hi,

On 4/6/20 1:28 PM, Jaroslav Kysela wrote:
> Dne 06. 04. 20 v 11:50 Hans de Goede napsal(a):
>> Hi,
>>
>> On 4/6/20 11:34 AM, Jaroslav Kysela wrote:
>>> Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
>>>> Fix HiFi-stereo-dmic2 conf not loading because of references to
>>>> non existing devices in the ConflictingDevices sections.
>>>>
>>>> Stop playing Rename + Remove tricks with the output (Speaker2) and
>>>> input (DMIC1) devices which we do not want to be part of this config,
>>>> this does not work now that we only allow devices which are actually
>>>> part of our config in the ConflictingDevices sections.
>>>
>>> The Remove and Rename operations should also manage (remove and rename) devices in ConflictingDevices/SupportedDevices sections. What's the exact error you hit?
>>>
>>> If I simulate this via ucm-validator I get this device structure:
>>>
>>>     Verb: "HiFi"
>>>        File: HiFi-stereo-dmic2.conf
>>>        Device: "Headphones"
>>>          ConflictingDevices.0 = Speaker
>>>          Value.PlaybackPriority = 300
>>>          Value.PlaybackPCM = 'hw:${CardId}'
>>>          Value.JackControl = 'Headphone Jack'
>>>        Device: "Headset"
>>>          ConflictingDevices.0 = Mic
>>>          Value.CapturePriority = 300
>>>          Value.CapturePCM = 'hw:${CardId}'
>>>          Value.JackControl = 'Headset Mic Jack'
>>>        Device: "Speaker"
>>>          ConflictingDevices.0 = Headphones
>>>          Value.PlaybackPriority = 200
>>>          Value.PlaybackPCM = 'hw:${CardId}'
>>>        Device: "Mic"
>>>          ConflictingDevices.0 = Headset
>>>          Value.CapturePriority = 200
>>>          Value.CapturePCM = 'hw:${CardId}'
>>>
>>> It appears like an issue in alsa-lib.
>>
>> With an unmodified UCM2 profile I get the following:
>>
>> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
>> ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Speaker2'
>> ALSA lib parser.c:1433:(parse_verb_file) error: device management error in verb 'HiFi'
>> ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -2
>> alsaucm: error failed to open sound card cht-bsw-rt5672: No such file or directory
>>
>> Note the _enadev does not matter, things break before it gets parsed,
>> if I replace Speaker with XXX I get the exact same errors.
>>
>> I'm happy to try any alsa-lib patches on this (Thinkpad8) hw for you.
> 
> I think that I found the culprit. Could you test this, please?
> 
> https://github.com/alsa-project/alsa-lib/commit/c9605484d165d2b707f78eef14a224b0b47ba322

I added that patch to the alsa-lib-1.2.2 package, did a build and
installed it, unfortunately it does not help:

[hans@localhost ~]$ rpm -q alsa-lib
alsa-lib-1.2.2-1.hdg1.fc33.x86_64
[hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Speaker2'
...

Regards,

Hans
Jaroslav Kysela April 6, 2020, 4:23 p.m. UTC | #7
Dne 06. 04. 20 v 14:13 Hans de Goede napsal(a):
> Hi,
> 
> On 4/6/20 1:28 PM, Jaroslav Kysela wrote:
>> Dne 06. 04. 20 v 11:50 Hans de Goede napsal(a):
>>> Hi,
>>>
>>> On 4/6/20 11:34 AM, Jaroslav Kysela wrote:
>>>> Dne 05. 04. 20 v 20:34 Hans de Goede napsal(a):
>>>>> Fix HiFi-stereo-dmic2 conf not loading because of references to
>>>>> non existing devices in the ConflictingDevices sections.
>>>>>
>>>>> Stop playing Rename + Remove tricks with the output (Speaker2) and
>>>>> input (DMIC1) devices which we do not want to be part of this config,
>>>>> this does not work now that we only allow devices which are actually
>>>>> part of our config in the ConflictingDevices sections.
>>>>
>>>> The Remove and Rename operations should also manage (remove and rename) devices in ConflictingDevices/SupportedDevices sections. What's the exact error you hit?
>>>>
>>>> If I simulate this via ucm-validator I get this device structure:
>>>>
>>>>      Verb: "HiFi"
>>>>         File: HiFi-stereo-dmic2.conf
>>>>         Device: "Headphones"
>>>>           ConflictingDevices.0 = Speaker
>>>>           Value.PlaybackPriority = 300
>>>>           Value.PlaybackPCM = 'hw:${CardId}'
>>>>           Value.JackControl = 'Headphone Jack'
>>>>         Device: "Headset"
>>>>           ConflictingDevices.0 = Mic
>>>>           Value.CapturePriority = 300
>>>>           Value.CapturePCM = 'hw:${CardId}'
>>>>           Value.JackControl = 'Headset Mic Jack'
>>>>         Device: "Speaker"
>>>>           ConflictingDevices.0 = Headphones
>>>>           Value.PlaybackPriority = 200
>>>>           Value.PlaybackPCM = 'hw:${CardId}'
>>>>         Device: "Mic"
>>>>           ConflictingDevices.0 = Headset
>>>>           Value.CapturePriority = 200
>>>>           Value.CapturePCM = 'hw:${CardId}'
>>>>
>>>> It appears like an issue in alsa-lib.
>>>
>>> With an unmodified UCM2 profile I get the following:
>>>
>>> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
>>> ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Speaker2'
>>> ALSA lib parser.c:1433:(parse_verb_file) error: device management error in verb 'HiFi'
>>> ALSA lib main.c:962:(snd_use_case_mgr_open) error: failed to import cht-bsw-rt5672 use case configuration -2
>>> alsaucm: error failed to open sound card cht-bsw-rt5672: No such file or directory
>>>
>>> Note the _enadev does not matter, things break before it gets parsed,
>>> if I replace Speaker with XXX I get the exact same errors.
>>>
>>> I'm happy to try any alsa-lib patches on this (Thinkpad8) hw for you.
>>
>> I think that I found the culprit. Could you test this, please?
>>
>> https://github.com/alsa-project/alsa-lib/commit/c9605484d165d2b707f78eef14a224b0b47ba322
> 
> I added that patch to the alsa-lib-1.2.2 package, did a build and
> installed it, unfortunately it does not help:
> 
> [hans@localhost ~]$ rpm -q alsa-lib
> alsa-lib-1.2.2-1.hdg1.fc33.x86_64
> [hans@localhost ~]$ alsaucm -c cht-bsw-rt5672 set _verb HiFi set _enadev Speaker
> ALSA lib parser.c:1138:(verb_dev_list_add) error: unable to find device 'Speaker2'
> ...

Another one line fix:

https://github.com/alsa-project/alsa-lib/commit/fb48ad9e4f6b84fd4ade689bd79e3a3c37d3e034

						Jaroslav


> 
> Regards,
> 
> Hans
>

Patch
diff mbox series

diff --git a/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf b/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
index 82c976b..5e06b42 100644
--- a/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
+++ b/ucm2/cht-bsw-rt5672/HiFi-stereo-dmic2.conf
@@ -12,11 +12,9 @@  SectionVerb {
 }
 
 <codecs/rt5672/Speaker.conf>
-RenameDevice."Speaker1" "Speaker"
-RemoveDevice."Speaker2" "Speaker2"
 <codecs/rt5672/HeadPhones.conf>
+SectionDevice."Headphones".ConflictingDevice.0 "Speaker1"
 
 <codecs/rt5672/DMIC2.conf>
-RenameDevice."Mic2" "Mic"
-RemoveDevice."Mic1" "Mic1"
 <codecs/rt5672/HeadsetMic.conf>
+SectionDevice."Headset".ConflictingDevice.0 "Mic2"
diff --git a/ucm2/cht-bsw-rt5672/HiFi.conf b/ucm2/cht-bsw-rt5672/HiFi.conf
index 9a64cc3..2dfa479 100644
--- a/ucm2/cht-bsw-rt5672/HiFi.conf
+++ b/ucm2/cht-bsw-rt5672/HiFi.conf
@@ -14,7 +14,15 @@  SectionVerb {
 <codecs/rt5672/Speaker.conf>
 <codecs/rt5672/MonoSpeaker.conf>
 <codecs/rt5672/HeadPhones.conf>
+SectionDevice."Speaker1".ConflictingDevice.1 "Speaker2"
+SectionDevice."Speaker2".ConflictingDevice.1 "Speaker1"
+SectionDevice."Headphones".ConflictingDevice.0 "Speaker1"
+SectionDevice."Headphones".ConflictingDevice.1 "Speaker2"
 
 <codecs/rt5672/DMIC1.conf>
 <codecs/rt5672/DMIC2.conf>
 <codecs/rt5672/HeadsetMic.conf>
+SectionDevice."Mic1".ConflictingDevice.1 "Mic2"
+SectionDevice."Mic2".ConflictingDevice.1 "Mic1"
+SectionDevice."Headset".ConflictingDevice.0 "Mic1"
+SectionDevice."Headset".ConflictingDevice.1 "Mic2"
diff --git a/ucm2/codecs/rt5672/DMIC1.conf b/ucm2/codecs/rt5672/DMIC1.conf
index 2018283..acc26f7 100644
--- a/ucm2/codecs/rt5672/DMIC1.conf
+++ b/ucm2/codecs/rt5672/DMIC1.conf
@@ -2,7 +2,6 @@  SectionDevice."Mic1" {
 	Comment "Internal Digital Microphone on DMIC1"
 
 	ConflictingDevice [
-		"Mic2"
 		"Headset"
 	]
 
diff --git a/ucm2/codecs/rt5672/DMIC2.conf b/ucm2/codecs/rt5672/DMIC2.conf
index 48e6170..abe139b 100644
--- a/ucm2/codecs/rt5672/DMIC2.conf
+++ b/ucm2/codecs/rt5672/DMIC2.conf
@@ -2,7 +2,6 @@  SectionDevice."Mic2" {
 	Comment "Internal Digital Microphone on DMIC2"
 
 	ConflictingDevice [
-		"Mic1"
 		"Headset"
 	]
 
diff --git a/ucm2/codecs/rt5672/HeadPhones.conf b/ucm2/codecs/rt5672/HeadPhones.conf
index 2c8d6e8..9178607 100644
--- a/ucm2/codecs/rt5672/HeadPhones.conf
+++ b/ucm2/codecs/rt5672/HeadPhones.conf
@@ -2,8 +2,6 @@  SectionDevice."Headphones" {
 	Comment "Headphones"
 
 	ConflictingDevice [
-		"Speaker1"
-		"Speaker2"
 	]
 
 	EnableSequence [
diff --git a/ucm2/codecs/rt5672/HeadsetMic.conf b/ucm2/codecs/rt5672/HeadsetMic.conf
index a764d82..e04c3ce 100644
--- a/ucm2/codecs/rt5672/HeadsetMic.conf
+++ b/ucm2/codecs/rt5672/HeadsetMic.conf
@@ -2,8 +2,6 @@  SectionDevice."Headset" {
 	Comment "Headset Microphone"
 
 	ConflictingDevice [
-		"Mic1"
-		"Mic2"
 	]
 
 	EnableSequence [
diff --git a/ucm2/codecs/rt5672/MonoSpeaker.conf b/ucm2/codecs/rt5672/MonoSpeaker.conf
index f08c9c6..88c39d2 100644
--- a/ucm2/codecs/rt5672/MonoSpeaker.conf
+++ b/ucm2/codecs/rt5672/MonoSpeaker.conf
@@ -2,7 +2,6 @@  SectionDevice."Speaker2" {
 	Comment "Mono Speaker"
 
 	ConflictingDevice [
-		"Speaker1"
 		"Headphones"
 	]
 
diff --git a/ucm2/codecs/rt5672/Speaker.conf b/ucm2/codecs/rt5672/Speaker.conf
index 8b7bcf8..c70ffae 100644
--- a/ucm2/codecs/rt5672/Speaker.conf
+++ b/ucm2/codecs/rt5672/Speaker.conf
@@ -2,7 +2,6 @@  SectionDevice."Speaker1" {
 	Comment "Stereo Speakers"
 
 	ConflictingDevice [
-		"Speaker2"
 		"Headphones"
 	]