Fix direct renaming of hashed controls
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | ALSA: control: add snd_ctl_rename()include/ sound/ | +24 | 0 replies | |
| 2/6 | ALSA: usb-audio: Use snd_ctl_rename() to rename a controlsound/ | +1 | 0 replies | |
| 3/6 | ALSA: hda/realtek: Use snd_ctl_rename() to rename a controlsound/ | +1 | 0 replies | |
| 4/6 | ALSA: emu10k1: Use snd_ctl_rename() to rename a controlsound/ | +1 | 0 replies | |
| 5/6 | ALSA: ca0106: Use snd_ctl_rename() to rename a controlsound/ | +1 | 0 replies | |
| 6/6 | ALSA: ac97: Use snd_ctl_rename() to rename a controlsound/ | +24 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6] Fix direct renaming of hashed controls
From: "Maciej S. Szmigiero" <[email protected]>
I've noticed that some of mixer controls on my sound card seem to be partially broken on the 6.0 kernel - alsactl wasn't able to find them when restoring the mixer state.
The issue was traced down to the recent addition of hashed controls lookup in commit c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups").
Since that commit it is *not* enough to just directly update the control name field (like some of ALSA drivers were doing).
Now the hash entries for the modified control have to be updated too.
This patch set adds a snd_ctl_rename() function that takes care of doing this operation properly for callers that already have the relevant struct snd_kcontrol at hand and hold the control write lock (or simply haven't registered the card yet).
These prerequisites hold true for all the call sites modified.
The core controls change and the emu10k1 patch were runtime tested. Similar patches for other devices were only compile tested.
include/sound/control.h | 1 + sound/core/control.c | 23 +++++++++++++++++++++++ sound/pci/ac97/ac97_codec.c | 32 ++++++++++++++++++++++++-------- sound/pci/ca0106/ca0106_mixer.c | 2 +- sound/pci/emu10k1/emumixer.c | 2 +- sound/pci/hda/patch_realtek.c | 2 +- sound/usb/mixer.c | 2 +- 7 files changed, 52 insertions(+), 12 deletions(-)