Bug 218605
Summary: | Commit 1601cd53c7e3 causes userspace regression in probably alsa-ucm-conf or maybe PipeWire | ||
---|---|---|---|
Product: | Drivers | Reporter: | Niklāvs Koļesņikovs (pinkflames.linux) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | NEW --- | ||
Severity: | normal | CC: | alexander, kl, tiwai |
Priority: | P3 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | Yes | Bisected commit-id: | 1601cd53c7e3197181277326dbfc131d20a74e46 |
Description
Niklāvs Koļesņikovs
2024-03-15 19:45:56 UTC
Thanks for the report. Indeed the change of the existing control name elements could lead to a regression. I applied the patch with a hope that there would be only few such breakage, but it seems that it's more visible than my wish, unfortunately. I guess the issue is only for the devices with the fixed configuration like UCM, and those could be worked around with the additional fixed mapping or making the change conditional with a blacklist / whitelist. But it needs a bit more intensive tests. I'm going to revert the change for 6.9-rc1. We may take this again in a modified form later for 6.10. Hmm, the regression is unfortunate. If my grep-fu serves me right, only 5 alsa-ucm configurations appear to rely on PCM naming. I wonder if it would acceptable to handle the new names on the alsa-ucm side by adding conditions in those few places for the new names. Alternatively, none of these rules appear to apply to devices with Headset or Headphone outputs, so restricting the patch to headsets would avoid breakage while still benefiting from userspace recognizing headphones and headsets correctly. I'm not sure if that counts but I do have the HDA spec PC front audio headphone jack wired up and in use. The chip itself can be configured by integrator to support, I believe, two such headphone jacks. But maybe we're talking about different things? > I'm not sure if that counts but I do have the HDA spec PC front audio
> headphone jack wired up and in use. The chip itself can be configured by
> integrator to support, I believe, two such headphone jacks. But maybe we're
> talking about different things?
HDA is unaffected, and the number of connectors shouldn't matter (apart from your UCM configuration needing to support it).
The discussed change only affected naming of controls for USB audio devices, based on the exposed audio control descriptors that define what controls are available (e.g., volume and mute, selectors, effects) and what the controls connect to (e.g., "sound comes from USB, goes into a mixer, then into volume control, then to speakers").
The old logic tried to name the control using its input first:
- USB -> Volume/Mute -> Headset: "PCM Playback Volume"
- USB -> Volume/Mute -> Speaker: "PCM Playback Volume"
- USB -> Sidetone Mixer -> Volume/Mute -> Headset: "Headset Playback Volume"
- USB -> Sidetone Mixer -> Volume/Mute -> Speaker: "Speaker Playback Volume"
For the last two, the presence of a sidetone mixer makes naming based on input fail, falling back to using the output - thus giving a good name almost in error.
The new logic prioritized the output if the input had no useful information:
- USB -> Volume/Mute -> Headphones: "Headset Playback Volume"
- USB -> Volume/Mute -> Speaker: "Speaker Playback Volume"
- USB -> Sidetone Mixer -> Volume/Mute -> Headset: "Headset Playback Volume"
- USB -> Sidetone Mixer -> Volume/Mute -> Speaker: "Speaker Playback Volume"
More consistent, and ensured that headphones and headsets without sidetone mixers also showed up correctly instead of being branded "PCM".
(Sidetone mixers inject microphone input into headsets or speakers to make you not feel like you have earplugs in your ears when talking - look for a "Mic Playback" control - and is often present on headsets and headphone/mic jacks)
Sorry, I meant the HDA specified front panel audio header, which replaced the older AC97(?) motherboard header i.e. it's a regular tower PC with the usual front audio headphone and mic ports. So I do have a headphones jack but probably no microphone input injection functionality. It is now increasingly common to deploy USB audio as motherboard on-board audio, which at least for my audio codec means that instead of directly attaching via I2S, there's now a USB device controller packaged along with the same old HDA audio codec IC, making it appear as a hotpluggable UAC device. From about 2022/2023 onwards this is increasingly common in higher end motherboards while other devices, I guess, are supposed to use the SoundWire approach with its lower BOM and smaller footprint. That's also fine. It should reasonably only become a regression in the cases where: 1. A USB audio device exposes simple controls (e.g. no side-tone mixer) 2. No dedicated name is provided (explicit names appear somewhat rare) 3. A UCM configuration exists for this setup directly referencing a control by name (e.g. PCM Playback Volume"), this failing to take effect While USB audio is very common, on my inspection it seems that very few UCM configurations are affected. Ideally we want both meaningful names so that things work well out of the box *and* working UCM configurations for things that don't work well out of the box. Agreed. As I said, I'm not really against fixing alsa-ucm-conf instead. All I wanted to highlight, is that while the number of devices might not be large, there's reasons to think it will affect thousands upon thousands of PC motherboards and will likely pop up as a regression if some distro ships a new enough kernel with old alsa-ucm-conf, which while hopefully unlikely is not entirely impossible e.g. Ubuntu LTS with a considerably newer HWE kernel. I'll just use this place to apologize for accidentally sending a top replied e-mail to the mailing list. I do not use e-mail, so I did not realize that the three dots at the bottom of the panel were the collapsed original e-mail about the revocation commit. |