public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ALSA: ctxfi: Clean up DAIO resource allocation
@ 2026-04-01  9:01 Harin Lee
  2026-04-01  9:01 ` [PATCH v2 1/3] ALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY Harin Lee
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Harin Lee @ 2026-04-01  9:01 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai; +Cc: linux-sound, linux-kernel, Harin Lee

Clean up the resource allocation in atc_get_resources() and related
functions, on top of the recent SPDIFI1 fixes.

The earlier refactoring introduced a kernel crash on hw20k2, where
daio_device_index() returned -EINVAL for the SPDIFI1 type and the
value was used as an unsigned array offset. On my development system
(64G memory), this did not manifest as a crash, making the bug
difficult to catch during testing.

Tested on the real hw20k2 hardware with mem=8G to verify the original
crash and confirm these patches.

Changes in v2:
 - Add atc_spdif_in_type() helper to avoid ternary operators in
   multiple places
 - Rewrite the SPDIFI type skip condition as explicit model checks

Harin Lee (3):
  ALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY
  ALSA: ctxfi: Use correct DAIO type for da_desc
  ALSA: ctxfi: Precompute SRC allocation loop bound

 sound/pci/ctxfi/ctatc.c  | 31 ++++++++++++++++---------------
 sound/pci/ctxfi/ctdaio.c |  5 ++---
 sound/pci/ctxfi/ctdaio.h |  2 +-
 3 files changed, 19 insertions(+), 19 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-01 12:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-01  9:01 [PATCH v2 0/3] ALSA: ctxfi: Clean up DAIO resource allocation Harin Lee
2026-04-01  9:01 ` [PATCH v2 1/3] ALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY Harin Lee
2026-04-01  9:01 ` [PATCH v2 2/3] ALSA: ctxfi: Use correct DAIO type for da_desc Harin Lee
2026-04-01  9:01 ` [PATCH v2 3/3] ALSA: ctxfi: Precompute SRC allocation loop bound Harin Lee
2026-04-01 12:44 ` [PATCH v2 0/3] ALSA: ctxfi: Clean up DAIO resource allocation Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox