mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-10 04:27:43 -05:00
control: ucm: add ioctl to retrieve full card components
The fixed-size components field in SNDRV_CTL_IOCTL_CARD_INFO can be too small on systems with many audio devices. The kernel [1] will provide a new ioctl to read the full string while truncating the original in card_info if it grows too big. Make sure the code falls back to original if the new ioctl is not supported. [1]: https://lore.kernel.org/all/20260122111249.67319-1-mstrozek@opensource.cirrus.com/ Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
This commit is contained in:
parent
75ed5f05ba
commit
d4cf5da490
17 changed files with 180 additions and 5 deletions
|
|
@ -466,6 +466,12 @@ static int snd_ctl_remap_card_info(snd_ctl_t *ctl, snd_ctl_card_info_t *info)
|
|||
return snd_ctl_card_info(priv->child, info);
|
||||
}
|
||||
|
||||
static int snd_ctl_remap_card_components(snd_ctl_t *ctl, snd_ctl_card_components_t *components)
|
||||
{
|
||||
snd_ctl_remap_t *priv = ctl->private_data;
|
||||
return snd_ctl_card_components(priv->child, components);
|
||||
}
|
||||
|
||||
static int snd_ctl_remap_elem_list(snd_ctl_t *ctl, snd_ctl_elem_list_t *list)
|
||||
{
|
||||
snd_ctl_remap_t *priv = ctl->private_data;
|
||||
|
|
@ -1185,6 +1191,7 @@ static const snd_ctl_ops_t snd_ctl_remap_ops = {
|
|||
.async = snd_ctl_remap_async,
|
||||
.subscribe_events = snd_ctl_remap_subscribe_events,
|
||||
.card_info = snd_ctl_remap_card_info,
|
||||
.card_components = snd_ctl_remap_card_components,
|
||||
.element_list = snd_ctl_remap_elem_list,
|
||||
.element_info = snd_ctl_remap_elem_info,
|
||||
.element_read = snd_ctl_remap_elem_read,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue