From: Jaroslav Kysela Date: Mon, 21 Mar 2022 14:34:58 +0000 (+0100) Subject: ucm2: HDA - add second Line output (Front) X-Git-Tag: v1.2.7~33 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b06814cdc896706170e66c0bb47effe87c1ce851;p=alsa-ucm-conf.git ucm2: HDA - add second Line output (Front) BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141 Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/HDA/HiFi-analog.conf b/ucm2/HDA/HiFi-analog.conf index 2434c6d..72834d1 100644 --- a/ucm2/HDA/HiFi-analog.conf +++ b/ucm2/HDA/HiFi-analog.conf @@ -1,6 +1,7 @@ # Generic HDA devices for analog I/O Define.DeviceFrontMic "" +Define.LineDevice "" Define.hpvol "Headphone" Define.hpjack "Headphone Jack" Define.loctl "Line" @@ -40,6 +41,16 @@ If.lineout { } } +If.linefront { + Condition { + Type ControlExists + Control "name='Front Playback Volume'" + } + True.Define { + LineDevice "1" + } +} + If.hplo { Condition { Type ControlExists @@ -222,7 +233,7 @@ If.line { Type ControlExists Control "name='${var:loctl} Playback Switch'" } - True.SectionDevice."Line" { + True.SectionDevice."Line${var:LineDevice}" { Comment "Line Output" If.conflict { @@ -254,3 +265,34 @@ If.line { } } } + +If.linefront { + Condition { + Type ControlExists + Control "name='Front Playback Switch'" + } + True.SectionDevice."Line2" { + Comment "Second Line Output" + + ConflictingDevice [ + "Line${var:LineDevice}" + ] + + EnableSequence [ + cset "name='Front Playback Switch' on" + ] + DisableSequence [ + cset "name='Front Playback Switch' off" + ] + + Value { + PlaybackPriority 250 + PlaybackPCM "hw:${CardId}" + PlaybackMixerElem "Front" + PlaybackMasterElem "Master" + PlaybackVolume "Front Playback Volume" + PlaybackSwitch "Front Playback Switch" + JackControl "Line Out Front Jack" + } + } +}