alsa-project / alsa-lib

The Advanced Linux Sound Architecture (ALSA) - library
GNU Lesser General Public License v2.1
366 stars 177 forks source link

alsa-lib-1.2.6 regression, no audio #199

Closed gkubaryk closed 2 years ago

gkubaryk commented 2 years ago

after upgrading the following packages, there is no audio: =media-plugins/alsa-plugins-1.2.6 =media-sound/alsa-utils-1.2.6 =media-libs/alsa-ucm-conf-1.2.6 =media-libs/alsa-lib-1.2.6

I checked each of the four individually and the last one (alsa-lib, 1.2.5.1) is the one that restored audio.

alsa-info.sh output, as run from 1.2.5.1 (but it downloaded the newer version of the script to /tmp) is at http://alsa-project.org/db/?f=f94a60ff547f9cce9e872acae67fdf35473fa754

let me know if I can be of further assistance; I need the audio working for the rest of the day but would be able to provide output from 1.2.6 tomorrow perhaps, if desired.

gkubaryk commented 2 years ago

eh decided to go ahead and diagnose more ... using tags 1.2.5.1 good and 1.2.6 bad. bisected to f547b2e35f71e89397e8b29cd0b9083bb68b00a6

perexg commented 2 years ago

Could you show me output from alsaucm -c hw:1 set _verb HiFi and alsaucm -c hw:1 dump text outputs (put http links here to gist or pastebin only). Thank you.

tiwai commented 2 years ago

eh decided to go ahead and diagnose more ... using tags 1.2.5.1 good and 1.2.6 bad. bisected to f547b2e

It's likely the change in uc_mgr_alibcfg_by_device(), where the name string is passed as-is now while it was name+4 to drop the prefix.

perexg commented 2 years ago

It's likely the change in uc_mgr_alibcfg_by_device(), where the name string is passed as-is now while it was name+4 to drop the prefix.

It's fixed in 050f18c525d44f3edbdd14bff189e40e45cc8b89 and 7ffe3d41626279e43fddfec8a02f520c3b79190e. It looks like an UCM configuration issue.

gkubaryk commented 2 years ago

It's fixed in 050f18c and 7ffe3d4. It looks like an UCM configuration issue.

those two commits are in 1.2.6 though, which is the release that is not working

gkubaryk commented 2 years ago

Could you show me output from alsaucm -c hw:1 set _verb HiFi and alsaucm -c hw:1 dump text outputs (put http links here to gist or pastebin only). Thank you.

https://gist.github.com/gkubaryk/5985599230687f52352cd8c440c0c499

perexg commented 2 years ago

The dump seems like for the 1.2.5 version.

gkubaryk commented 2 years ago

it is, let me switch everything back to 1.2.6, will have new output shortly.

gkubaryk commented 2 years ago

https://gist.github.com/gkubaryk/4b279a0ab2971752060cd9df622011a5

perexg commented 2 years ago

It's correct. It looks like another bug. Could you show me the log from pulseaudio ? https://fedoraproject.org/wiki/How_to_debug_PulseAudio_problems

gkubaryk commented 2 years ago

like so? https://gist.github.com/gkubaryk/c0e9821388f6b8fd35b2e96493ad640d

perexg commented 2 years ago

No, I meant the debug log (-vvv). But it seems that your problem is similar to https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1246 (the invalid type errors). I can reproduce here - working on it.

gkubaryk commented 2 years ago

this more useful? https://gist.github.com/gkubaryk/19d1fc975176cfcf65bcfa7925b5f9f3

perexg commented 2 years ago

Yes, it's the same issue. Thank you. Give me few minutes.

Dec  9 03:46:25 localhost pulseaudio[4400]: [pulseaudio] alsa-util.c: Trying _ucm0001.hw:Generic,7 with SND_PCM_NO_AUTO_FORMAT ...
Dec  9 03:46:25 localhost pulseaudio[4400]: [pulseaudio] pcm_hw.c: Invalid type for subdevice
Dec  9 03:46:25 localhost pulseaudio[4400]: [pulseaudio] alsa-util.c: Error opening PCM device _ucm0001.hw:Generic,7: Invalid argument
perexg commented 2 years ago

Thank you for your help and co-operation. The fix is in https://github.com/alsa-project/alsa-lib/commit/4b22871ee5a3bbc8eef7039bfc8db5e65ff3895f .

gkubaryk commented 2 years ago

unfortunately, with 4b22871 applied atop alsa-lib-1.2.6, the issue persists

https://gist.github.com/gkubaryk/e3b9a184bcd3068fdbe51279863276f0

perexg commented 2 years ago

It's not relevant to alsa-lib. Could yout try fix in https://github.com/alsa-project/alsa-ucm-conf/commit/60ea26507390bad3742af2272ba08b21f009d0ef ?

gkubaryk commented 2 years ago

I confirm that between 4b22871 and alsa-project/alsa-ucm-conf@60ea265 - all is well!

Thank you for your work on this. Do you think there will be a 1.2.6.1 soon with these improvements? In the meantime I am using /etc/portage/patches locally so this specific version for these two packages is patched for me.

perexg commented 2 years ago

I'll try to release 1.2.6.1 alsa-lib and alsa-ucm-conf bugfix packages in next hours. Thank you for your report again.