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/c9605484d165d2b707f78eef14a2...
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/fb48ad9e4f6b84fd4ade689bd79e...
Jaroslav
Regards,
Hans