ALSA: scarlett2: Refactor common port_count lookups
authorGeoffrey D. Bennett <g@b4.vu>
Sun, 24 Dec 2023 19:28:38 +0000 (05:58 +1030)
committerTakashi Iwai <tiwai@suse.de>
Fri, 29 Dec 2023 14:41:23 +0000 (15:41 +0100)
commit42caae0e20323af7c5b41ac089798f5590b54845
tree74892613668cc0c0388aca58026c22207b0fe9df
parente5fab78cd8e867b2201eadabe4871100881e2a64
ALSA: scarlett2: Refactor common port_count lookups

Rather than looking up the analogue and mixer I/O counts repeatedly in
info->port_count[SCARLETT2_PORT_TYPE_*][SCARLETT2_PORT_*], save those
numbers in private variables.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/db0a5b56bdff476e2e31ad8e5ee15008314412b7.1703444932.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer_scarlett2.c