]> www.infradead.org Git - users/hch/misc.git/log
users/hch/misc.git
2 months agoALSA: ice1712: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:09 +0000 (16:43 +0200)]
ALSA: ice1712: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-35-tiwai@suse.de
2 months agoALSA: fm801: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:08 +0000 (16:43 +0200)]
ALSA: fm801: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-34-tiwai@suse.de
2 months agoALSA: es1968: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:07 +0000 (16:43 +0200)]
ALSA: es1968: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-33-tiwai@suse.de
2 months agoALSA: es1968: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:06 +0000 (16:43 +0200)]
ALSA: es1968: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-32-tiwai@suse.de
2 months agoALSA: es1938: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:05 +0000 (16:43 +0200)]
ALSA: es1938: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-31-tiwai@suse.de
2 months agoALSA: emu10k1x: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:04 +0000 (16:43 +0200)]
ALSA: emu10k1x: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-30-tiwai@suse.de
2 months agoALSA: emu10k1: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:03 +0000 (16:43 +0200)]
ALSA: emu10k1: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-29-tiwai@suse.de
2 months agoALSA: emu10k1: Use guard() for emu1010 FPGA locking
Takashi Iwai [Fri, 29 Aug 2025 14:43:02 +0000 (16:43 +0200)]
ALSA: emu10k1: Use guard() for emu1010 FPGA locking

The snd_emu1010_fpga_lock() and _unlock() call pairs can be simplified
gracefully with the introduction of guard().

Only code refactoring, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-28-tiwai@suse.de
2 months agoALSA: emu10k1: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:01 +0000 (16:43 +0200)]
ALSA: emu10k1: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-27-tiwai@suse.de
2 months agoALSA: echoaudio: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:43:00 +0000 (16:43 +0200)]
ALSA: echoaudio: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-26-tiwai@suse.de
2 months agoALSA: echoaudio: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:59 +0000 (16:42 +0200)]
ALSA: echoaudio: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-25-tiwai@suse.de
2 months agoALSA: ctxfi: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:58 +0000 (16:42 +0200)]
ALSA: ctxfi: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-24-tiwai@suse.de
2 months agoALSA: ctxfi: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:57 +0000 (16:42 +0200)]
ALSA: ctxfi: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-23-tiwai@suse.de
2 months agoALSA: cs5535audio: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:56 +0000 (16:42 +0200)]
ALSA: cs5535audio: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-22-tiwai@suse.de
2 months agoALSA: cs46xx: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:55 +0000 (16:42 +0200)]
ALSA: cs46xx: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-21-tiwai@suse.de
2 months agoALSA: cs46xx: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:54 +0000 (16:42 +0200)]
ALSA: cs46xx: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-20-tiwai@suse.de
2 months agoALSA: cs4281: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:53 +0000 (16:42 +0200)]
ALSA: cs4281: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-19-tiwai@suse.de
2 months agoALSA: cmipci: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:52 +0000 (16:42 +0200)]
ALSA: cmipci: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-18-tiwai@suse.de
2 months agoALSA: cmipci: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:51 +0000 (16:42 +0200)]
ALSA: cmipci: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-17-tiwai@suse.de
2 months agoALSA: ca0106: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:50 +0000 (16:42 +0200)]
ALSA: ca0106: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-16-tiwai@suse.de
2 months agoALSA: bt87x: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:49 +0000 (16:42 +0200)]
ALSA: bt87x: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-15-tiwai@suse.de
2 months agoALSA: aw2: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:48 +0000 (16:42 +0200)]
ALSA: aw2: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-14-tiwai@suse.de
2 months agoALSA: aw2: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:47 +0000 (16:42 +0200)]
ALSA: aw2: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-13-tiwai@suse.de
2 months agoALSA: atiixp: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:46 +0000 (16:42 +0200)]
ALSA: atiixp: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-12-tiwai@suse.de
2 months agoALSA: atiixp: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:45 +0000 (16:42 +0200)]
ALSA: atiixp: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-11-tiwai@suse.de
2 months agoALSA: ad1889: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:44 +0000 (16:42 +0200)]
ALSA: ad1889: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-10-tiwai@suse.de
2 months agoALSA: als4000: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:43 +0000 (16:42 +0200)]
ALSA: als4000: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-9-tiwai@suse.de
2 months agoALSA: als300: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:42 +0000 (16:42 +0200)]
ALSA: als300: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-8-tiwai@suse.de
2 months agoALSA: ens137x: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:41 +0000 (16:42 +0200)]
ALSA: ens137x: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-7-tiwai@suse.de
2 months agoALSA: ens137x: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:40 +0000 (16:42 +0200)]
ALSA: ens137x: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-6-tiwai@suse.de
2 months agoALSA: azt3328: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:39 +0000 (16:42 +0200)]
ALSA: azt3328: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-5-tiwai@suse.de
2 months agoALSA: ali5451: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:38 +0000 (16:42 +0200)]
ALSA: ali5451: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-4-tiwai@suse.de
2 months agoALSA: ac97: Use guard() for spin locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:37 +0000 (16:42 +0200)]
ALSA: ac97: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-3-tiwai@suse.de
2 months agoALSA: ac97: Use guard() for mutex locks
Takashi Iwai [Fri, 29 Aug 2025 14:42:36 +0000 (16:42 +0200)]
ALSA: ac97: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829144342.4290-2-tiwai@suse.de
2 months agoALSA: firewire: motu: Use guard() for spin locks
Takashi Iwai [Sat, 30 Aug 2025 08:03:50 +0000 (10:03 +0200)]
ALSA: firewire: motu: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://patch.msgid.link/20250830080351.25600-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoALSA: firewire: lib: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:23 +0000 (15:27 +0200)]
ALSA: firewire: lib: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-20-tiwai@suse.de
2 months agoALSA: firewire: tascam: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:22 +0000 (15:27 +0200)]
ALSA: firewire: tascam: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-19-tiwai@suse.de
2 months agoALSA: firewire: oxfw: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:21 +0000 (15:27 +0200)]
ALSA: firewire: oxfw: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-18-tiwai@suse.de
2 months agoALSA: firewire: fireworks: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:19 +0000 (15:27 +0200)]
ALSA: firewire: fireworks: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-16-tiwai@suse.de
2 months agoALSA: firewire: fireface: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:18 +0000 (15:27 +0200)]
ALSA: firewire: fireface: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-15-tiwai@suse.de
2 months agoALSA: firewire: digi00x: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:17 +0000 (15:27 +0200)]
ALSA: firewire: digi00x: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-14-tiwai@suse.de
2 months agoALSA: firewire: dice: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:16 +0000 (15:27 +0200)]
ALSA: firewire: dice: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-13-tiwai@suse.de
2 months agoALSA: firewire: bebob: Use guard() for spin locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:15 +0000 (15:27 +0200)]
ALSA: firewire: bebob: Use guard() for spin locks

Clean up the code using guard() for spin locks.

Merely code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-12-tiwai@suse.de
2 months agoALSA: firewire: lib: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:14 +0000 (15:27 +0200)]
ALSA: firewire: lib: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-11-tiwai@suse.de
2 months agoALSA: firewire: isight: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:13 +0000 (15:27 +0200)]
ALSA: firewire: isight: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-10-tiwai@suse.de
2 months agoALSA: firewire: fireface: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:12 +0000 (15:27 +0200)]
ALSA: firewire: fireface: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-9-tiwai@suse.de
2 months agoALSA: firewire: tascam: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:11 +0000 (15:27 +0200)]
ALSA: firewire: tascam: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-8-tiwai@suse.de
2 months agoALSA: firewire: oxfw: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:10 +0000 (15:27 +0200)]
ALSA: firewire: oxfw: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-7-tiwai@suse.de
2 months agoALSA: firewire: motu: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:09 +0000 (15:27 +0200)]
ALSA: firewire: motu: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-6-tiwai@suse.de
2 months agoALSA: firewire: fireworks: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:08 +0000 (15:27 +0200)]
ALSA: firewire: fireworks: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-5-tiwai@suse.de
2 months agoALSA: firewire: digi00x: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:07 +0000 (15:27 +0200)]
ALSA: firewire: digi00x: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-4-tiwai@suse.de
2 months agoALSA: firewire: dice: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:06 +0000 (15:27 +0200)]
ALSA: firewire: dice: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-3-tiwai@suse.de
2 months agoALSA: firewire: bebob: Use guard() for mutex locks
Takashi Iwai [Thu, 28 Aug 2025 13:27:05 +0000 (15:27 +0200)]
ALSA: firewire: bebob: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250828132802.9032-2-tiwai@suse.de
2 months agoMerge branch 'for-linus' into for-next
Takashi Iwai [Sat, 30 Aug 2025 07:42:45 +0000 (09:42 +0200)]
Merge branch 'for-linus' into for-next

Pull 6.17 devel branch for further auto-cleanup updates.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoALSA: hda: tas2781: reorder tas2563 calibration variables
Gergo Koteles [Fri, 29 Aug 2025 16:04:50 +0000 (18:04 +0200)]
ALSA: hda: tas2781: reorder tas2563 calibration variables

The tasdev_load_calibrated_data() function expects the calibration data
values in the cali_data buffer as R0, R0Low, InvR0, Power, TLim which
is not the same as what tas2563_save_calibration() writes to the buffer.

Reorder the EFI variables in the tas2563_save_calibration() function
to put the values in the buffer in the correct order.

Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://patch.msgid.link/20250829160450.66623-2-soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoALSA: hda: tas2781: fix tas2563 EFI data endianness
Gergo Koteles [Fri, 29 Aug 2025 16:04:49 +0000 (18:04 +0200)]
ALSA: hda: tas2781: fix tas2563 EFI data endianness

Before conversion to unify the calibration data management, the
tas2563_apply_calib() function performed the big endian conversion and
wrote the calibration data to the device. The writing is now done by the
common tasdev_load_calibrated_data() function, but without conversion.

Put the values into the calibration data buffer with the expected
endianness.

Fixes: 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://patch.msgid.link/20250829160450.66623-1-soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
Takashi Sakamoto [Fri, 29 Aug 2025 23:37:49 +0000 (08:37 +0900)]
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported

The ALSA HwDep character device of the firewire-motu driver incorrectly
returns EPOLLOUT in poll(2), even though the driver implements no operation
for write(2). This misleads userspace applications to believe write() is
allowed, potentially resulting in unnecessarily wakeups.

This issue dates back to the driver's initial code added by a commit
71c3797779d3 ("ALSA: firewire-motu: add hwdep interface"), and persisted
when POLLOUT was updated to EPOLLOUT by a commit a9a08845e9ac ('vfs: do
bulk POLL* -> EPOLL* replacement("").').

This commit fixes the bug.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://patch.msgid.link/20250829233749.366222-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoALSA: seq: oss/rw: Cleanup with guard
Takashi Iwai [Wed, 27 Aug 2025 08:05:17 +0000 (10:05 +0200)]
ALSA: seq: oss/rw: Cleanup with guard

Replace the manual spin lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-12-tiwai@suse.de
2 months agoALSA: seq: oss/synth: Clean up with guard and auto cleanup
Takashi Iwai [Wed, 27 Aug 2025 08:05:16 +0000 (10:05 +0200)]
ALSA: seq: oss/synth: Clean up with guard and auto cleanup

Use the auto-cleanup for the refcount management of seq_oss_synth
object.  The explicit call of snd_use_lock_free() is dropped by the
magic __free(seq_oss_synth) attribute.

Along with that, replace the manual mutex and spin locks with
guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-11-tiwai@suse.de
2 months agoALSA: seq: oss/midi: Cleanup with guard and auto-cleanup
Takashi Iwai [Wed, 27 Aug 2025 08:05:15 +0000 (10:05 +0200)]
ALSA: seq: oss/midi: Cleanup with guard and auto-cleanup

Use the auto-cleanup for the refcount management of seq_oss_midi
object.  The explicit call of snd_use_lock_free() is dropped by the
magic __free(seq_oss_midi) attribute.

Along with that, replace the manual mutex and spin locks with
guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-10-tiwai@suse.de
2 months agoALSA: seq: oss: Clean up core code with guard()
Takashi Iwai [Wed, 27 Aug 2025 08:05:14 +0000 (10:05 +0200)]
ALSA: seq: oss: Clean up core code with guard()

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-9-tiwai@suse.de
2 months agoALSA: seq: Clean up fifo locking with guard
Takashi Iwai [Wed, 27 Aug 2025 08:05:13 +0000 (10:05 +0200)]
ALSA: seq: Clean up fifo locking with guard

Yet more cleanup, now for seq_fifo.c about its refcount calls; the
manual refcount calls (either snd_use_lock_*() or snd_seq_fifo_lock())
are replaced with guard(snd_seq_fifo).

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-8-tiwai@suse.de
2 months agoALSA: seq: Clean up queue locking with auto cleanup
Takashi Iwai [Wed, 27 Aug 2025 08:05:12 +0000 (10:05 +0200)]
ALSA: seq: Clean up queue locking with auto cleanup

Yet more cleanup with the auto-cleanup macro: now we replace the
queuefree() calls with the magic pointer attribute
__free(snd_seq_queue).

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-7-tiwai@suse.de
2 months agoALSA: seq: Clean up port locking with auto cleanup
Takashi Iwai [Wed, 27 Aug 2025 08:05:11 +0000 (10:05 +0200)]
ALSA: seq: Clean up port locking with auto cleanup

Like the previous change in seq_clientmgr.c, introduce a new
auto-cleanup macro for the snd_seq_port_unlock(), and apply it
appropriately.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-6-tiwai@suse.de
2 months agoALSA: seq: Use auto-cleanup for client refcounting
Takashi Iwai [Wed, 27 Aug 2025 08:05:10 +0000 (10:05 +0200)]
ALSA: seq: Use auto-cleanup for client refcounting

The current code manages the refcount of client in a way like:

snd_seq_client *client;
client = clientptr(id);
....
snd_seq_client_unlock(client);

Now we introduce an auto-cleanup macro to manage the unlock
implicitly, namely, the above will be replaced like:

snd_seq_client *client __free(snd_seq_client) = NULL;
client = clientptr(id);

and we can forget the unref call.

A part of the code in snd_seq_deliver_single_event() is factored out
to a function, so that the auto-cleanups can be applied cleanly.

This also allows us to replace some left mutex lock/unlock with
guard(), and also reduce scoped_guard() to the normal guard(), too.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-5-tiwai@suse.de
2 months agoALSA: seq: Use guard() for mutex and rwsem locks
Takashi Iwai [Wed, 27 Aug 2025 08:05:09 +0000 (10:05 +0200)]
ALSA: seq: Use guard() for mutex and rwsem locks

There are a few manual calls of mutex and rwsem lock/unlock pairs in
seq_clientmngr.c, and those can be replaced nicely with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-4-tiwai@suse.de
2 months agoALSA: seq: Clean up spin lock with guard()
Takashi Iwai [Wed, 27 Aug 2025 08:05:08 +0000 (10:05 +0200)]
ALSA: seq: Clean up spin lock with guard()

Use guard() for spin locks to manage the sequencer client locking.

The code about the refcounting was modified with the new
snd_seq_client_ref() and *_unref() helpers instead of the ugly goto,
too.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-3-tiwai@suse.de
2 months agoALSA: seq: Simplify internal command operation from OSS layer
Takashi Iwai [Wed, 27 Aug 2025 08:05:07 +0000 (10:05 +0200)]
ALSA: seq: Simplify internal command operation from OSS layer

snd_seq_client_ioctl_lock() and *_unlock() are used only from a single
function of the OSS layer, and it's just to wrap the call of
snd_seq_kernel_client_ctl().

Provide another variant of snd_seq_kernel_client_ctl() that takes the
locks internally and drop the ugly snd_seq_client_ioctl_lock() and
*_unlock() implementations, instead.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827080520.7544-2-tiwai@suse.de
2 months agoALSA: hda/intel: Use guard() for spinlocks
Takashi Iwai [Wed, 27 Aug 2025 07:29:05 +0000 (09:29 +0200)]
ALSA: hda/intel: Use guard() for spinlocks

Replace the manual spin lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-26-tiwai@suse.de
2 months agoALSA: hda/common: Use guard() for spinlocks
Takashi Iwai [Wed, 27 Aug 2025 07:29:04 +0000 (09:29 +0200)]
ALSA: hda/common: Use guard() for spinlocks

Replace the manual spin lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-25-tiwai@suse.de
2 months agoALSA: hda/core: Use guard() for spinlocks
Takashi Iwai [Wed, 27 Aug 2025 07:29:03 +0000 (09:29 +0200)]
ALSA: hda/core: Use guard() for spinlocks

Replace the manual spin lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-24-tiwai@suse.de
2 months agoALSA: hda/ext: Use guard() for spinlocks
Takashi Iwai [Wed, 27 Aug 2025 07:29:02 +0000 (09:29 +0200)]
ALSA: hda/ext: Use guard() for spinlocks

Replace the manual spin lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-23-tiwai@suse.de
2 months agoALSA: hda/generic: Use auto cleanup for temporary buffers
Takashi Iwai [Wed, 27 Aug 2025 07:29:01 +0000 (09:29 +0200)]
ALSA: hda/generic: Use auto cleanup for temporary buffers

The release of temporary kmalloced buffers can be nicely handled via
the standard __free(kfree).

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-22-tiwai@suse.de
2 months agoALSA: hda/realtek: Use auto cleanup for temporary buffers
Takashi Iwai [Wed, 27 Aug 2025 07:29:00 +0000 (09:29 +0200)]
ALSA: hda/realtek: Use auto cleanup for temporary buffers

The release of temporary kmalloced buffers can be nicely handled via
the standard __free(kfree).

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-21-tiwai@suse.de
2 months agoALSA: hda/common: Use auto cleanup for temporary buffers
Takashi Iwai [Wed, 27 Aug 2025 07:28:59 +0000 (09:28 +0200)]
ALSA: hda/common: Use auto cleanup for temporary buffers

The release of temporary kmalloced buffers can be nicely handled via
the standard __free(kfree).

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-20-tiwai@suse.de
2 months agoALSA: hda/intel: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:58 +0000 (09:28 +0200)]
ALSA: hda/intel: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-19-tiwai@suse.de
2 months agoALSA: hda/analog: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:57 +0000 (09:28 +0200)]
ALSA: hda/analog: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-18-tiwai@suse.de
2 months agoALSA: hda/generic: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:56 +0000 (09:28 +0200)]
ALSA: hda/generic: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-17-tiwai@suse.de
2 months agoALSA: hda/component: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:55 +0000 (09:28 +0200)]
ALSA: hda/component: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-16-tiwai@suse.de
2 months agoALSA: hda/cs8409: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:54 +0000 (09:28 +0200)]
ALSA: hda/cs8409: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-15-tiwai@suse.de
2 months agoALSA: hda/tas2781: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:53 +0000 (09:28 +0200)]
ALSA: hda/tas2781: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-14-tiwai@suse.de
2 months agoALSA: hda/cs35l41: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:52 +0000 (09:28 +0200)]
ALSA: hda/cs35l41: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-13-tiwai@suse.de
2 months agoALSA: hda/realtek: Use guard() for mutex locks and COEF locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:51 +0000 (09:28 +0200)]
ALSA: hda/realtek: Use guard() for mutex locks and COEF locks

Replace the manual mutex lock/unlock pairs with guard().

Also, introduce the guard() for coef_mutex_lock() and _unlock() pairs,
and replace accordingly, too.  The coef_mutex_lock() and *_unlock()
are moved to readtek.h as static inline functions along with it.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-12-tiwai@suse.de
2 months agoALSA: hda/hdmi: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:50 +0000 (09:28 +0200)]
ALSA: hda/hdmi: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-11-tiwai@suse.de
2 months agoALSA: hda/ca0132: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:49 +0000 (09:28 +0200)]
ALSA: hda/ca0132: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-10-tiwai@suse.de
2 months agoALSA: hda/core: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:48 +0000 (09:28 +0200)]
ALSA: hda/core: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-9-tiwai@suse.de
2 months agoALSA: hda/common: Use guard() for mutex locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:47 +0000 (09:28 +0200)]
ALSA: hda/common: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard().

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-8-tiwai@suse.de
2 months agoALSA: hda: Use auto cleanup macros for DSP loader locks
Takashi Iwai [Wed, 27 Aug 2025 07:28:46 +0000 (09:28 +0200)]
ALSA: hda: Use auto cleanup macros for DSP loader locks

There are temporary DSP locking/unlocking patterns found in various
places, and those can be cleaned up nicely with the guard() macro
calling snd_hdac_dsp_lock() and *_unlock().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-7-tiwai@suse.de
2 months agoALSA: hda/common: Use cleanup macros for PM controls
Takashi Iwai [Wed, 27 Aug 2025 07:28:45 +0000 (09:28 +0200)]
ALSA: hda/common: Use cleanup macros for PM controls

The new macro CLASS(snd_hda_power_pm) can replace the manual
snd_hda_power_up_pm() and _down() calls gracefully.

A part of the code in codec_exec_verb() is factored out to a function,
so that the auto-cleanup can be well scoped.

Merely cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-6-tiwai@suse.de
2 months agoALSA: hda/realtek: Use cleanup macros for PM controls
Takashi Iwai [Wed, 27 Aug 2025 07:28:44 +0000 (09:28 +0200)]
ALSA: hda/realtek: Use cleanup macros for PM controls

The new macro CLASS(snd_hda_power_pm) can replace the manual
snd_hda_power_up_pm() and _down() calls gracefully.

Merely code cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-5-tiwai@suse.de
2 months agoALSA: hda/hdmi: Use cleanup macros for PM controls
Takashi Iwai [Wed, 27 Aug 2025 07:28:43 +0000 (09:28 +0200)]
ALSA: hda/hdmi: Use cleanup macros for PM controls

The new macro CLASS(snd_hda_power_pm) can replace the manual
snd_hda_power_up_pm() and _down() calls gracefully.

Merely code cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-4-tiwai@suse.de
2 months agoALSA: hda/ca0132: Use cleanup macros for PM controls
Takashi Iwai [Wed, 27 Aug 2025 07:28:42 +0000 (09:28 +0200)]
ALSA: hda/ca0132: Use cleanup macros for PM controls

The new macro CLASS(snd_hda_power) can replace the manual
snd_hda_power_up() and _down() calls as well as the *_pm_*() variants
gracefully.

Merely code cleanups and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-3-tiwai@suse.de
2 months agoALSA: hda: Introduce auto cleanup macros for PM
Takashi Iwai [Wed, 27 Aug 2025 07:28:41 +0000 (09:28 +0200)]
ALSA: hda: Introduce auto cleanup macros for PM

The temporary power up/down of the codec via snd_hda_power_up() and
_down() (or snd_hda_power_up_pm() and _down_pm()) is seen in various
places.  This patch introduces simple auto-cleanup macros for those
call patterns, so that the drivers don't have to call the
corresponding power-down calls explicitly.

Namely,
err = snd_hda_power_up(codec);
if (err < 0)
return err;
....
snd_power_down(codec);

can drop the *_down() call by replacing with
CLASS(snd_hda_power, pm)(codec);
if (pm.err < 0)
return pm.err;

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250827072916.31933-2-tiwai@suse.de
2 months agoALSA: docs: Add documents for recently changes in snd-usb-audio
Cryolitia PukNgae [Fri, 29 Aug 2025 08:46:06 +0000 (16:46 +0800)]
ALSA: docs: Add documents for recently changes in snd-usb-audio

Changed:
  - ignore_ctl_error
  - lowlatency
  - skip_validation
  - quirk_flags[19:24]

[ corrected a typo -- tiwai ]

Signed-off-by: Cryolitia PukNgae <cryolitia@uniontech.com>
Link: https://patch.msgid.link/20250829-sound-doc-v1-1-e0110452b03d@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoMerge tag 'asoc-fix-v6.17-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Fri, 29 Aug 2025 09:13:09 +0000 (11:13 +0200)]
Merge tag 'asoc-fix-v6.17-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.17

The main fixes here are for some of the cleanups done in the core in
this release, we had broken component lookup in the case with a single
bus and DMA controller.  Otherwise it's driver specific changes, the
shortlogs for the Intel WCL and rsnd drivers look like minor cleanups
but are actually bugfixes (adding an op needed for correct functionality
and reverting an inappropriate helper usage).

2 months agoALSA: usb-audio: Add mute TLV for playback volumes on more devices
qaqland [Fri, 29 Aug 2025 06:40:48 +0000 (14:40 +0800)]
ALSA: usb-audio: Add mute TLV for playback volumes on more devices

Applying the quirk of that, the lowest Playback mixer volume setting
mutes the audio output, on more devices.

Suggested-by: Cryolitia PukNgae <cryolitia@uniontech.com>
Signed-off-by: qaqland <anguoli@uniontech.com>
Link: https://patch.msgid.link/20250829-sound_quirk-v1-1-745529b44440@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoASoC: SOF: Intel: WCL: Add the sdw_process_wakeen op
Ajye Huang [Tue, 26 Aug 2025 15:40:40 +0000 (23:40 +0800)]
ASoC: SOF: Intel: WCL: Add the sdw_process_wakeen op

Add the missing op in the device description to avoid issues with jack
detection.

Fixes: 6b04629ae97a ("ASoC: SOF: Intel: add initial support for WCL")
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Message-ID: <20250826154040.2723998-1-ajye_huang@compal.corp-partner.google.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2 months agoALSA: hda: Avoid binding with SOF for SKL/KBL platforms
Takashi Iwai [Thu, 28 Aug 2025 14:11:00 +0000 (16:11 +0200)]
ALSA: hda: Avoid binding with SOF for SKL/KBL platforms

For Intel SKL and KBL platforms, it may be bound with one of three
HD-audio drivers (AVS, SOF and legacy).  AVS is the preferred one when
DMIC is detected, and that's how it's defined in the snd-intel-dspcfg
config table.

But, when AVS driver is disabled (CONFIG_SND_SOC_INTEL_AVS=n), the
device may be bound freely with either SOF or legacy driver.
Before 6.17, the legacy driver took it primarily, but on 6.17, likely
due to the recent code shuffling, SOF driver seems taking it at first,
and fails to probe.  For avoiding the regression, we should enforce to
bind those with the legacy HD-audio drvier when AVS is disabled.

This patch adds the extra two entries in intel-dspcfg table that are
applied only when CONFIG_SND_SOC_INTEL_AVS=n, for binding with the
legacy driver.

Note that there are entries for APL in that config table block, but
APL may be supported by SOF for certain setups, so the choice can't be
exclusive.  Hence this patch includes only SKL and KBL.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1248121
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250828141101.16294-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 months agoASoC: rsnd: tidyup direction name on rsnd_dai_connect()
Kuninori Morimoto [Tue, 26 Aug 2025 06:30:01 +0000 (06:30 +0000)]
ASoC: rsnd: tidyup direction name on rsnd_dai_connect()

commit 2c6b6a3e8b93 ("ASoC: rsnd: use snd_pcm_direction_name()") uses
snd_pcm_direction_name() instead of original method to get string
"Playback" or "Capture". But io->substream might be NULL in this timing.
Let's re-use original method.

Fixes: 2c6b6a3e8b93 ("ASoC: rsnd: use snd_pcm_direction_name()")
Reported-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn>
Tested-by: Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-ID: <87zfbmwq6v.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2 months agoALSA: lx_core: use int type to store negative error codes
Qianfeng Rong [Thu, 28 Aug 2025 08:13:10 +0000 (16:13 +0800)]
ALSA: lx_core: use int type to store negative error codes

Change the 'ret' variable from u16 to int to store negative error codes or
zero returned by lx_message_send_atomic().

Storing the negative error codes in unsigned type, doesn't cause an issue
at runtime but it's ugly as pants. Additionally, assigning negative error
codes to unsigned type may trigger a GCC warning when the -Wsign-conversion
flag is enabled.

No effect on runtime.

Fixes: 02bec4904508 ("ALSA: lx6464es - driver for the digigram lx6464es interface")
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Link: https://patch.msgid.link/20250828081312.393148-1-rongqianfeng@vivo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>