mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
alsa-pcm: allow setting number of channels
Allow passing the number of channels when creating a device to restrict the negotiated channels.
This commit is contained in:
parent
267eabaf69
commit
8168dfdbc1
5 changed files with 15 additions and 0 deletions
|
|
@ -770,6 +770,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
for (i = 0; info && i < info->n_items; i++) {
|
||||
if (!strcmp(info->items[i].key, SPA_KEY_API_ALSA_PATH)) {
|
||||
snprintf(this->props.device, 63, "%s", info->items[i].value);
|
||||
} else if (!strcmp(info->items[i].key, SPA_KEY_AUDIO_CHANNELS)) {
|
||||
this->default_channels = atoi(info->items[i].value);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue