ALSA: ctxfi: Refactor resource alloc for sparse mappings
authorHarin Lee <me@harin.net>
Mon, 24 Nov 2025 18:04:59 +0000 (03:04 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 25 Nov 2025 07:02:16 +0000 (08:02 +0100)
commita2dbaeb5c61ef110ceefe0d48fe94d428d3bcf16
tree0f607876cd91e47cbffb3dbbfff5f51a929f86a3
parent9bb003a1f98b11b80238d522778115ad07355149
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
sound/pci/ctxfi/ctatc.c
sound/pci/ctxfi/ctatc.h