From 3d55072658a11d29e6c58b66daa8c0bcfab7ed5c Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 21 Mar 2022 15:15:05 +0100 Subject: [PATCH] ucm2: HDA - add support for 'Line Playback' controls BugLink: https://github.com/alsa-project/alsa-ucm-conf/issues/141 Signed-off-by: Jaroslav Kysela --- ucm2/HDA/HiFi-analog.conf | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/ucm2/HDA/HiFi-analog.conf b/ucm2/HDA/HiFi-analog.conf index 9c8510b..f1e8fa4 100644 --- a/ucm2/HDA/HiFi-analog.conf +++ b/ucm2/HDA/HiFi-analog.conf @@ -3,7 +3,8 @@ Define.DeviceFrontMic "" Define.hpvol "Headphone" Define.hpjack "Headphone Jack" -Define.lovol "Line Out" +Define.loctl "Line" +Define.lovol "Line" If.fmic { Condition { @@ -28,6 +29,17 @@ If.fmic { } } +If.lineout { + Condition { + Type ControlExists + Control "name='Line Out Playback Volume'" + } + True.Define { + loctl "Line Out" + lovol "Line Out" + } +} + If.hplo { Condition { Type ControlExists @@ -199,10 +211,10 @@ If.frontmic { } } -If.lineout { +If.line { Condition { Type ControlExists - Control "name='Line Out Playback Switch'" + Control "name='${var:loctl} Playback Switch'" } True.SectionDevice."Line" { Comment "Line Output" @@ -219,10 +231,10 @@ If.lineout { } EnableSequence [ - cset "name='Line Out Playback Switch' on" + cset "name='${var:loctl} Playback Switch' on" ] DisableSequence [ - cset "name='Line Out Playback Switch' off" + cset "name='${var:loctl} Playback Switch' off" ] Value { @@ -231,8 +243,8 @@ If.lineout { PlaybackMixerElem "${var:lovol}" PlaybackMasterElem "Master" PlaybackVolume "${var:lovol} Playback Volume" - PlaybackSwitch "Line Out Playback Switch" - JackControl "Line Out Jack" + PlaybackSwitch "${var:loctl} Playback Switch" + JackControl "${var:loctl} Jack" } } } -- 2.47.1