Skip to content

Commit

Permalink
alsa-mixer: Rework output port priorities
Browse files Browse the repository at this point in the history
Implement the following precedence of ports on an ALSA card:

Headphones > HDMI > Line Out > Speakers > Default

Where "Default" is for cards which do not export controls with more
specific names.

https://phabricator.endlessm.com/T15601
  • Loading branch information
jprvita committed Aug 14, 2018
1 parent 5b1abd1 commit 40d00e7
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
; See analog-output.conf.common for an explanation on the directives

[General]
priority = 89
priority = 98
description-key = analog-output-headphones

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/analog-output-headphones.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
; See analog-output.conf.common for an explanation on the directives

[General]
priority = 90
priority = 99
description-key = analog-output-headphones

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/analog-output-lineout.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

[General]
priority = 99
priority = 80
description-key = analog-output-lineout

[Jack Line Out]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/analog-output-speaker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
; See analog-output.conf.common for an explanation on the directives

[General]
priority = 100
priority = 79
description-key = analog-output-speaker

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/analog-output.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
; See analog-output.conf.common for an explanation on the directives

[General]
priority = 99
priority = 78

[Element Hardware Master]
switch = mute
Expand Down
12 changes: 6 additions & 6 deletions src/modules/alsa/mixer/paths/analog-output.conf.common
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,14 @@ switch = off
[Element Analog Output]
enumeration = select

[Option Analog Output:Speakers]
name = output-speaker
priority = 10

[Option Analog Output:Headphones]
name = output-headphones
priority = 9
priority = 10

[Option Analog Output:FP Headphones]
name = output-headphones
priority = 8
priority = 9

[Option Analog Output:Speakers]
name = output-speaker
priority = 7
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-0.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort
priority = 59
priority = 89
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-1.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 2
priority = 58
priority = 88
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-2.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 3
priority = 57
priority = 87
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-3.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 4
priority = 56
priority = 86
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-4.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 5
priority = 55
priority = 85
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-5.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 6
priority = 54
priority = 84
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-6.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 7
priority = 53
priority = 83
eld-device = auto

[Properties]
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alsa/mixer/paths/hdmi-output-7.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[General]
description = HDMI / DisplayPort 8
priority = 52
priority = 82
eld-device = auto

[Properties]
Expand Down

0 comments on commit 40d00e7

Please sign in to comment.