From 002353dd6cba2622da748e91f9d8848ed2dc68d3 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Mon, 20 Oct 2014 12:12:57 +0200
Subject: [PATCH] alsactl init: Add init of "Headphone+LO" and "Speaker+LO"
controls
These two were recently added to the HDA driver, so make sure they
are initialized correctly.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
alsactl/init/default | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
@@ -104,6 +104,16 @@ CTL{name}="Headphone Playback Switch",CTL{index}="1",CTL{do_search}=="1", \
CTL{values}="on"
CTL{reset}="mixer"
+CTL{name}="Headphone+LO Playback Volume",PROGRAM!="__ctl_search",GOTO=""
+# if master volume control is present, turn headphone+LO volume to max
+ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
+ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
+CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
+LABEL=""
+CTL{name}="Headphone+LO Playback Switch",CTL{do_search}=="1", \
+ CTL{values}="on"
+
+CTL{reset}="mixer"
CTL{name}="Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
# if master volume control is present, turn speaker volume to max
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
@@ -114,6 +124,16 @@ CTL{name}="Speaker Playback Switch",CTL{do_search}=="1", \
CTL{values}="on"
CTL{reset}="mixer"
+CTL{name}="Speaker+LO Playback Volume",PROGRAM!="__ctl_search",GOTO=""
+# if master volume control is present, turn speaker+LO volume to max
+ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
+ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
+CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
+LABEL=""
+CTL{name}="Speaker+LO Playback Switch",CTL{do_search}=="1", \
+ CTL{values}="on"
+
+CTL{reset}="mixer"
CTL{name}="Front Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
# if master volume control is present, turn speaker volume to max
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
--
1.9.1