mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
media-session: link AUX nodes as well
Anything can link to an AUX node if nothing else is available, just like the UNKNOWN and MONO ports.
This commit is contained in:
parent
3348fd9885
commit
0caafffa12
1 changed files with 8 additions and 0 deletions
|
|
@ -1788,6 +1788,12 @@ static const struct pw_proxy_events proxy_link_events = {
|
|||
.destroy = proxy_link_destroy
|
||||
};
|
||||
|
||||
static bool channel_is_aux(uint32_t channel)
|
||||
{
|
||||
return channel >= SPA_AUDIO_CHANNEL_START_Aux &&
|
||||
channel <= SPA_AUDIO_CHANNEL_LAST_Aux;
|
||||
}
|
||||
|
||||
static int score_ports(struct sm_port *out, struct sm_port *in)
|
||||
{
|
||||
int score = 0;
|
||||
|
|
@ -1810,8 +1816,10 @@ static int score_ports(struct sm_port *out, struct sm_port *in)
|
|||
(out->channel == SPA_AUDIO_CHANNEL_MONO && in->channel == SPA_AUDIO_CHANNEL_FC))
|
||||
score += 50;
|
||||
else if (in->channel == SPA_AUDIO_CHANNEL_UNKNOWN ||
|
||||
channel_is_aux(in->channel) ||
|
||||
in->channel == SPA_AUDIO_CHANNEL_MONO ||
|
||||
out->channel == SPA_AUDIO_CHANNEL_UNKNOWN ||
|
||||
channel_is_aux(out->channel) ||
|
||||
out->channel == SPA_AUDIO_CHANNEL_MONO)
|
||||
score += 10;
|
||||
if (score > 0 && !in->visited)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue