HDA-analog: Use phantom jacks to determine the device for single output
Improve previous commit (change) to determine the output type (device). Link: https://github.com/alsa-project/alsa-ucm-conf/issues/685 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
34c79da9ae
commit
4ead6a971c
1 changed files with 46 additions and 7 deletions
|
|
@ -86,12 +86,35 @@ If.outnone {
|
|||
Type String
|
||||
Empty "${var:hpvol}${var:spkvol}${var:lovol}"
|
||||
}
|
||||
True.If.master {
|
||||
Condition {
|
||||
Type ControlExists
|
||||
Control "name='Master Playback Switch'"
|
||||
True {
|
||||
If.spk {
|
||||
Condition {
|
||||
Type ControlExists
|
||||
Control "iface=CARD,name='Speaker Phantom Jack'"
|
||||
}
|
||||
True.Define.spkvol "Master"
|
||||
}
|
||||
If.line {
|
||||
Condition {
|
||||
Type ControlExists
|
||||
Control "iface=CARD,name='Line Phantom Jack'"
|
||||
}
|
||||
True.Define.lovol "Master"
|
||||
}
|
||||
If.lineout {
|
||||
Condition {
|
||||
Type ControlExists
|
||||
Control "iface=CARD,name='Line Out Phantom Jack'"
|
||||
}
|
||||
True.Define.lovol "Master"
|
||||
}
|
||||
If.last {
|
||||
Condition {
|
||||
Type ControlExists
|
||||
Control "name='Master Playback Switch'"
|
||||
}
|
||||
True.Define.hpvol "Master"
|
||||
}
|
||||
True.Define.hpvol "Master"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -177,10 +200,18 @@ If.spk {
|
|||
PlaybackPriority 100
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
PlaybackMixerElem "${var:spkvol}"
|
||||
PlaybackMasterElem "Master"
|
||||
PlaybackVolume "${var:spkvol} Playback Volume"
|
||||
PlaybackSwitch "${var:spkvol} Playback Switch"
|
||||
}
|
||||
|
||||
If.master {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "${var:spkvol}"
|
||||
String2 "Master"
|
||||
}
|
||||
False.Value.PlaybackMasterElem "Master"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -222,11 +253,19 @@ If.line {
|
|||
PlaybackPriority 300
|
||||
PlaybackPCM "hw:${CardId}"
|
||||
PlaybackMixerElem "${var:lovol}"
|
||||
PlaybackMasterElem "Master"
|
||||
PlaybackVolume "${var:lovol} Playback Volume"
|
||||
PlaybackSwitch "${var:loctl} Playback Switch"
|
||||
JackControl "${var:loctl} Jack"
|
||||
}
|
||||
|
||||
If.master {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "${var:lovol}"
|
||||
String2 "Master"
|
||||
}
|
||||
False.Value.PlaybackMasterElem "Master"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue