Re: [PATCH v3 2/2] ALSA: control: add ioctl to retrieve full card components

Maciej Strozek
2026-03-05T09:55:36Z

W dniu wto, 03.03.2026 o godzinie 16∶47 +0100, użytkownik Takashi Iwai
napisał:
> >
> > + */
> > +struct snd_ctl_card_components {
> > + int card;
> > + unsigned int length;
> > + unsigned char *components;
> > +};
>
> And the ioctl can serve for two purposes:
>
> - When length=0 is set, the kernel stores the current number of bytes
>   and returns without copying.  User-space can use this mode for
>   allocating the buffer.
>
In alsa-lib all data must be allocated beforehand, so this length==0
query is not very useful there, it will just go into a [512] array
anyway. Are there any other users that may benefit from this?

--
Regards,
Maciej