[PATCH 0/2] ALSA: usb-audio: Fix stale quirk control caches after write failures

Cássio Gabriel posted 2 patches 1 month, 2 weeks ago
sound/usb/mixer_quirks.c | 61 +++++++++++++++++++++++++++++++++++++-----------
1 file changed, 47 insertions(+), 14 deletions(-)
[PATCH 0/2] ALSA: usb-audio: Fix stale quirk control caches after write failures
Posted by Cássio Gabriel 1 month, 2 weeks ago
This series fixes stale software cache handling in several usb-audio
mixer quirks.

A number of quirk callbacks update kcontrol->private_value before
issuing vendor or class writes. When such a write fails, the driver can
keep reporting and later replaying a value the device never accepted,
because the corresponding get and resume paths consume the cached state.

- Patch 1 fixes the simple single-write quirk callbacks by restoring the
  previous cache on error.
- Patch 2 fixes the RME Babyface Pro packed-state callbacks by updating
  the cache only after a successful write, since those helpers already
  take explicit arguments and do not need private_value to be updated
  before the USB request.

The split keeps the generic quirk fixes separate from the Babyface Pro
packed-state logic and keeps each patch tied to its own introducing bug.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
---
Cássio Gabriel (2):
      ALSA: usb-audio: Roll back quirk control caches on write errors
      ALSA: usb-audio: Update Babyface Pro control caches only after successful writes

 sound/usb/mixer_quirks.c | 61 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 47 insertions(+), 14 deletions(-)
---
base-commit: 7b04e87c2a10db9c65b3133949bbe1b738b6ed7e
change-id: 20260418-alsa-usb-quirks-cache-rollback-43a07052f22c

Best regards,
--  
Cássio Gabriel <cassiogabrielcontato@gmail.com>

Re: [PATCH 0/2] ALSA: usb-audio: Fix stale quirk control caches after write failures
Posted by Takashi Iwai 1 month, 2 weeks ago
On Wed, 29 Apr 2026 15:20:00 +0200,
Cássio Gabriel wrote:
> 
> This series fixes stale software cache handling in several usb-audio
> mixer quirks.
> 
> A number of quirk callbacks update kcontrol->private_value before
> issuing vendor or class writes. When such a write fails, the driver can
> keep reporting and later replaying a value the device never accepted,
> because the corresponding get and resume paths consume the cached state.
> 
> - Patch 1 fixes the simple single-write quirk callbacks by restoring the
>   previous cache on error.
> - Patch 2 fixes the RME Babyface Pro packed-state callbacks by updating
>   the cache only after a successful write, since those helpers already
>   take explicit arguments and do not need private_value to be updated
>   before the USB request.
> 
> The split keeps the generic quirk fixes separate from the Babyface Pro
> packed-state logic and keeps each patch tied to its own introducing bug.
> 
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
> ---
> Cássio Gabriel (2):
>       ALSA: usb-audio: Roll back quirk control caches on write errors
>       ALSA: usb-audio: Update Babyface Pro control caches only after successful writes

Applied both to for-next branch.  Thanks.


Takashi