Re: [PATCH v2 0/3] ALSA: ctxfi: Clean up DAIO resource allocation

From: Takashi Iwai

Date: Wed Apr 01 2026 - 09:23:45 EST


On Wed, 01 Apr 2026 11:01:56 +0200,
Harin Lee wrote:
>
> 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

Applied to for-next branch now. Thanks.


Takashi