mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-28 06:46:42 -04:00
Merge branch 'fix-speaker-out' into 'master'
alsa: acp: don’t override user-selected port on availability changes See merge request pipewire/pipewire!2791
This commit is contained in:
commit
a272697877
3 changed files with 30 additions and 0 deletions
|
|
@ -990,11 +990,22 @@ static void card_port_available(void *data, uint32_t index,
|
||||||
|
|
||||||
for (i = 0; i < p->n_devices; i++) {
|
for (i = 0; i < p->n_devices; i++) {
|
||||||
struct acp_device *d = p->devices[i];
|
struct acp_device *d = p->devices[i];
|
||||||
|
struct acp_port *active_port = NULL;
|
||||||
|
uint32_t j;
|
||||||
uint32_t best;
|
uint32_t best;
|
||||||
|
|
||||||
if (!(d->flags & ACP_DEVICE_ACTIVE))
|
if (!(d->flags & ACP_DEVICE_ACTIVE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
for (j = 0; j < d->n_ports; j++) {
|
||||||
|
if (d->ports[j]->flags & ACP_PORT_ACTIVE) {
|
||||||
|
active_port = d->ports[j];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (active_port != NULL && active_port->available != ACP_AVAILABLE_NO)
|
||||||
|
continue;
|
||||||
|
|
||||||
best = acp_device_find_best_port_index(d, NULL);
|
best = acp_device_find_best_port_index(d, NULL);
|
||||||
acp_device_set_port(d, best, 0);
|
acp_device_set_port(d, best, 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,12 @@ volume = merge
|
||||||
override-map.1 = all
|
override-map.1 = all
|
||||||
override-map.2 = all-left,all-right
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
|
; Keep Line Out disabled in the headphones path so selecting headphones
|
||||||
|
; does not also drive speaker/line outputs on shared controls.
|
||||||
|
[Element Line Out]
|
||||||
|
switch = off
|
||||||
|
volume = off
|
||||||
|
|
||||||
; This path is intended to control the first headphones, not
|
; This path is intended to control the first headphones, not
|
||||||
; the second headphones. But it should not hurt if we leave the second
|
; the second headphones. But it should not hurt if we leave the second
|
||||||
; headphone jack enabled nonetheless.
|
; headphone jack enabled nonetheless.
|
||||||
|
|
|
||||||
|
|
@ -113,10 +113,23 @@ override-map.1 = all
|
||||||
override-map.2 = all-left,all-right
|
override-map.2 = all-left,all-right
|
||||||
required-any = any
|
required-any = any
|
||||||
|
|
||||||
|
[Element Line Out]
|
||||||
|
switch = mute
|
||||||
|
volume = merge
|
||||||
|
override-map.1 = all
|
||||||
|
override-map.2 = all-left,all-right
|
||||||
|
|
||||||
[Element Master Mono]
|
[Element Master Mono]
|
||||||
switch = off
|
switch = off
|
||||||
volume = off
|
volume = off
|
||||||
|
|
||||||
|
; Prefer manual routing decisions by disabling codec auto-mute here.
|
||||||
|
[Element Auto-Mute Mode]
|
||||||
|
enumeration = select
|
||||||
|
|
||||||
|
[Option Auto-Mute Mode:Disabled]
|
||||||
|
name = analog-output-lineout
|
||||||
|
|
||||||
[Element Line HP Swap]
|
[Element Line HP Swap]
|
||||||
switch = off
|
switch = off
|
||||||
required-any = any
|
required-any = any
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue