Re: [PATCH 5/5] cht-bsw-rt5672: Fix HiFi-stereo-dmic2 conf not loading / working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux