10898 Commits

Author SHA1 Message Date
Harin Lee
c58f520e6a ALSA: ctxfi: Add support for Onkyo SE-300PCIE (OK0010)
Add support for the Onkyo SE-300PCIE, a Creative X-Fi CA20K2-based
sound card with a custom hardware implementation that differs
significantly from other CA20K2-based variants.

Changes:
 - PCI quirk entry for OK0010
 - Port 0x3 is utilized for dedicated RCA output (configured as I2S)
 - Modified GPIO pin mappings and states
 - 4-channel simultaneous ADC input support for line and microphone
   capture without input switching (similar to SB1270)
 - Simplified ADC initialization (no manual setup required)

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-7-me@harin.net
2025-11-25 08:02:16 +01:00
Harin Lee
9b4a22733c ALSA: ctxfi: Add support for dedicated RCA switching
Add feature to support switching between the dedicated RCA output and
the 7.1ch Front output. This is required for hardware that utilizes
separate DAC circuits for RCA and 7.1ch channels.

Changes:
 - Add dedicated_rca capability flag
 - Add "Analog Playback Route" mixer control
 - Implement logic to swap DAO inputs between RCA and Front ports

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-6-me@harin.net
2025-11-25 08:02:16 +01:00
Harin Lee
a2dbaeb5c6 ALSA: ctxfi: Refactor resource alloc for sparse mappings
Refactor atc_get_resources(), atc_connect_resources(), and
atc_release_resources() to allocate resources based on maximum type
definitions.

This allows specific resources to be conditionally skipped based on
capabilities. This is necessary for hardware variants where resource
allocations do not follow a sequential order.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-5-me@harin.net
2025-11-25 08:02:16 +01:00
Harin Lee
9bb003a1f9 ALSA: ctxfi: Use explicit output flag for DAIO resources
Replace the index-based type check with an explicit output flag in
struct daio and struct daio_desc.

This allows handling DAIO resource types correctly regardless of their
index. This is necessary for hardware variants where resource types do
not follow a sequential order.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-4-me@harin.net
2025-11-25 08:02:16 +01:00
Harin Lee
4b490e0d10 ALSA: ctxfi: Add ADC helper functions for GPIO
Add helper functions hw_adc_stop(), hw_adc_start(), and hw_adc_reset()
to encapsulate ADC reset sequence operations. These functions reduce
duplication by centralizing the GPIO-based ADC control logic.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-3-me@harin.net
2025-11-25 08:02:16 +01:00
Harin Lee
5ebd054272 ALSA: ctxfi: Add hw parameter to daio_mgr_dao_init()
Add a hw parameter to the daio_mgr_dao_init() function to provide
access to model-specific information. This is necessary for proper
configuration of S/PDIF and I2S output ports on different hardware
variants.

Signed-off-by: Harin Lee <me@harin.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251124180501.2760421-2-me@harin.net
2025-11-25 08:02:15 +01:00
Takashi Iwai
2e90ff5462 Merge branch 'for-linus' into for-next
Pull 6.18-devel branch for applying the further HD-audio fixups for HP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-20 09:49:30 +01:00
Haotian Zhang
d4371c266b ALSA: au88x0: Fix incorrect error handling for PCI config reads
__snd_vortex_probe() uses pci_read_config_word() that returns PCIBIOS_*
codes (positive values on error). However, the function checks 'err < 0'
which can never be true for PCIBIOS_* codes, causing errors to be silently
ignored.

Check for non-zero return value and convert PCIBIOS_* codes using
pcibios_err_to_errno() into normal errno before returning them.

Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn>
Reviewed-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20251117065559.1138-1-vulab@iscas.ac.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-17 17:23:52 +01:00
wangdicheng
4b1b92bdc4 ALSA: au88x0: Fix array bounds warning in EQ drivers
In file included from ../sound/pci/au88x0/au8830.c:15:
In function ‘vortex_Eqlzr_SetAllBandsFromActiveCoeffSet’,
../sound/pci/au88x0/au88x0_eq.c:571:9: error: ‘vortex_EqHw_SetRightGainsTarget’ reading 2 bytes from a region of size 0 [-Werror=stringop-overread]
	vortex_EqHw_SetRightGainsTarget(vortex, &(eq->this130[eq->this10]));

Modified the array access in vortex_Eqlzr_SetAllBandsFromActiveCoeffSet() to use pointer arithmetic instead of array indexing.
This resolves a compiler warning that incorrectly flagged a buffer overread when accessing the EQ gain array.
The this130 array has fixed size 20 and the index is safely within bounds, making the original code correct but confusing to static analysis.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20251107024525.38454-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-11-08 08:54:40 +01:00
tanze
a0deef0ed5 ALSA: maestro3: using vmalloc_array() to handle the code
Change array_size() to vmalloc_array(), due to vmalloc_array()
being optimized better, using fewer instructions, and handles
overflow more concisely.

Signed-off-by: tanze <tanze@kylinos.cn>
Link: https://patch.msgid.link/20251024105549.210654-1-tanze@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-10-27 10:04:51 +01:00
Jihed Chaibi
c29287bb32 ALSA: asihpi: Simplify error handling in PCM substream setup
Refactor error handling in the PCM substream setup to combine redundant
checks and improve code readability. Free the dpcm structure and return
appropriate error codes (-EBUSY for HPI_ERROR_OBJ_ALREADY_OPEN, -EIO
for other errors) in a single block.

Signed-off-by: Jihed Chaibi <jihed.chaibi.dev@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-15 09:25:47 +02:00
Chandra Mohan Sundar
400f60b274 ALSA: cs4281: Send the PCM period elapsed notification properly
As part of spin lock code cleanup using guard(), a new
variable (period_elapsed) was introduced. However this variable
is never set, causing period elapsed notification to be not sent.

Set the value of period_elapsed appropiately.

This issue was reported by static coverity analyzer.

Fixes: 7a5127c2c8 ("ALSA: cs4281: Use guard() for spin locks")
Signed-off-by: Chandra Mohan Sundar <chandramohan.explore@gmail.com>
Link: https://patch.msgid.link/20250906162158.564899-1-chandramohan.explore@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-06 19:55:10 +02:00
Dan Carpenter
8409816b1e ALSA: rme32: Fix serialization in snd_rme32_capture_adat_open()
We accidentally deleted the wrong line of code when we did the
conversion to guard() locks.  If the rme32->capture_substream has
already been set we should return -EBUSY.

Fixes: 8bb75ae244 ("ALSA: rme32: Use guard() for spin locks")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aLfXmIQRFTXr5h8O@stanley.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-09-03 09:21:58 +02:00
Takashi Iwai
8c0cb47e26 ALSA: ymfpci: 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-62-tiwai@suse.de
2025-09-01 13:52:43 +02:00
Takashi Iwai
dde5decc43 ALSA: vx222: 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-61-tiwai@suse.de
2025-09-01 13:52:43 +02:00
Takashi Iwai
9d60b94f13 ALSA: via82xx: 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-60-tiwai@suse.de
2025-09-01 13:52:43 +02:00
Takashi Iwai
62d8070db6 ALSA: trident: 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-59-tiwai@suse.de
2025-09-01 13:52:43 +02:00
Takashi Iwai
4f83e1da6e ALSA: trident: 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-58-tiwai@suse.de
2025-09-01 13:52:43 +02:00
Takashi Iwai
fa670cbaee ALSA: sonicvibes: 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-57-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
8e11f94ea1 ALSA: sis7019: 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-56-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
e7b99fdddf ALSA: sis7019: 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-55-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
bd6aa020ec ALSA: rme9652: 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-54-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
02699abfbd ALSA: hdspm: 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-53-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
d422878cae ALSA: hdsp: 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-52-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
d3424b8bf7 ALSA: rme96: 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-51-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
8bb75ae244 ALSA: rme32: 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-50-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
26e4346cff ALSA: pcxhr: 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-49-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
4751026c79 ALSA: oxygen: 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-48-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
8ecafe5dac ALSA: oxygen: 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-47-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
d1d88d2850 ALSA: nm256: 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-46-tiwai@suse.de
2025-09-01 13:52:42 +02:00
Takashi Iwai
6c56792a05 ALSA: nm256: 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-45-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
23ab90a965 ALSA: mixart: 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-44-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
35dea82a43 ALSA: maestro3: 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-43-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
3023cc514a ALSA: lx6464es: 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-42-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
e25667d3f3 ALSA: lola: 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-41-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
18aec9ea32 ALSA: lola: 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-40-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
aff742c156 ALSA: korg1212: 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-39-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
940653fff0 ALSA: korg1212: 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-38-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
220a76bbf7 ALSA: intel8x0: 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-37-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
d0b8e41904 ALSA: ice1712: 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-36-tiwai@suse.de
2025-09-01 13:52:41 +02:00
Takashi Iwai
9da230b3b2 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
2025-09-01 13:52:41 +02:00
Takashi Iwai
2b429331f5 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
2025-09-01 13:52:41 +02:00
Takashi Iwai
3ea4db1f20 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
819107cdeb 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
f9733d65a6 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
1af61c669b 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
3a0c3159f7 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
7c4a379e06 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
f44f745f75 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
2025-09-01 13:52:40 +02:00
Takashi Iwai
9bd92d6673 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
2025-09-01 13:52:40 +02:00