From b06814cdc896706170e66c0bb47effe87c1ce851 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 21 Mar 2022 15:34:58 +0100 Subject: [PATCH] ucm2: HDA - add second Line output (Front) BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141 Signed-off-by: Jaroslav Kysela --- ucm2/HDA/HiFi-analog.conf | 44 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) 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" + } + } +} -- 2.47.1