mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa-ucm: Remove combination port generation logic
A previous commit makes mapping names depend on the UCM device name.
Since UCM device names are unique, this means a mapping will at most
have one port and thus no combination ports can be generated.
This removes the dead code in the pa_alsa_ucm_add_ports_combination()
function, unrolls the remaining code in its helper functions that it
used, and renames it to pa_alsa_ucm_add_port() to signal that it no
longer generates combinations.
Link: 0789a8fb76
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
[Wim: Apply to acp add_profiles(), acp_card_set_profile(), compat.h]
This commit is contained in:
parent
833c86d35b
commit
0fc80db7fe
4 changed files with 52 additions and 107 deletions
|
|
@ -511,7 +511,7 @@ static void add_profiles(pa_card *impl)
|
|||
}
|
||||
if (impl->use_ucm) {
|
||||
if (m->ucm_context.ucm_devices) {
|
||||
pa_alsa_ucm_add_ports_combination(NULL, &m->ucm_context,
|
||||
pa_alsa_ucm_add_port(NULL, &m->ucm_context,
|
||||
true, impl->ports, ap, NULL);
|
||||
pa_alsa_ucm_add_ports(&dev->ports, m->proplist, &m->ucm_context,
|
||||
true, impl, dev->pcm_handle, impl->profile_set->ignore_dB);
|
||||
|
|
@ -535,7 +535,7 @@ static void add_profiles(pa_card *impl)
|
|||
|
||||
if (impl->use_ucm) {
|
||||
if (m->ucm_context.ucm_devices) {
|
||||
pa_alsa_ucm_add_ports_combination(NULL, &m->ucm_context,
|
||||
pa_alsa_ucm_add_port(NULL, &m->ucm_context,
|
||||
false, impl->ports, ap, NULL);
|
||||
pa_alsa_ucm_add_ports(&dev->ports, m->proplist, &m->ucm_context,
|
||||
false, impl, dev->pcm_handle, impl->profile_set->ignore_dB);
|
||||
|
|
@ -1518,7 +1518,7 @@ int acp_card_set_profile(struct acp_card *card, uint32_t new_index, uint32_t fla
|
|||
if (impl->use_ucm) {
|
||||
/* Update ports priorities */
|
||||
if (am->ucm_context.ucm_devices) {
|
||||
pa_alsa_ucm_add_ports_combination(am->output.ports, &am->ucm_context,
|
||||
pa_alsa_ucm_add_port(am->output.ports, &am->ucm_context,
|
||||
true, impl->ports, np, NULL);
|
||||
}
|
||||
}
|
||||
|
|
@ -1531,7 +1531,7 @@ int acp_card_set_profile(struct acp_card *card, uint32_t new_index, uint32_t fla
|
|||
if (impl->use_ucm) {
|
||||
/* Update ports priorities */
|
||||
if (am->ucm_context.ucm_devices) {
|
||||
pa_alsa_ucm_add_ports_combination(am->input.ports, &am->ucm_context,
|
||||
pa_alsa_ucm_add_port(am->input.ports, &am->ucm_context,
|
||||
false, impl->ports, np, NULL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue