forked from pool/alsa-utils
Takashi Iwai
84cb1887f1
Speaker, etc mixer elements in alsactl init OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=43
105 lines
4.1 KiB
Diff
105 lines
4.1 KiB
Diff
From 9fa7cd2176a6be077f61c0f050f257beedf8b0c0 Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Fri, 4 Nov 2011 17:01:57 +0100
|
|
Subject: [PATCH] alsactl: Initialize Front Speaker, etc
|
|
|
|
Add missing initialization of surround and CLFE playback volumes and
|
|
switches. Ditto for "Front Speaker", etc.
|
|
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
alsactl/init/default | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
1 files changed, 70 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/alsactl/init/default b/alsactl/init/default
|
|
index b7cb941..af64cb1 100644
|
|
--- a/alsactl/init/default
|
|
+++ b/alsactl/init/default
|
|
@@ -53,6 +53,36 @@ CTL{name}="Front Playback Switch",CTL{do_search}=="1", \
|
|
CTL{values}="on"
|
|
|
|
CTL{reset}="mixer"
|
|
+CTL{name}="Surround Playback Volume",PROGRAM!="__ctl_search",GOTO=""
|
|
+# if master volume control is present, turn front 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}="Surround Playback Switch",CTL{do_search}=="1", \
|
|
+ CTL{values}="on"
|
|
+
|
|
+CTL{reset}="mixer"
|
|
+CTL{name}="Center Playback Volume",PROGRAM!="__ctl_search",GOTO=""
|
|
+# if master volume control is present, turn front 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}="Center Playback Switch",CTL{do_search}=="1", \
|
|
+ CTL{values}="on"
|
|
+
|
|
+CTL{reset}="mixer"
|
|
+CTL{name}="LFE Playback Volume",PROGRAM!="__ctl_search",GOTO=""
|
|
+# if master volume control is present, turn front 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}="LFE Playback Switch",CTL{do_search}=="1", \
|
|
+ CTL{values}="on"
|
|
+
|
|
+CTL{reset}="mixer"
|
|
CTL{name}="Headphone Playback Volume",PROGRAM!="__ctl_search",GOTO=""
|
|
# if master volume control is present, turn headphone volume to max
|
|
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
|
|
@@ -84,6 +114,46 @@ CTL{name}="Speaker 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=""
|
|
+ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
|
+CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
|
|
+LABEL=""
|
|
+CTL{name}="Front Speaker 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=""
|
|
+ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
|
+CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
|
|
+LABEL=""
|
|
+CTL{name}="Surround Speaker 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=""
|
|
+ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
|
+CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
|
|
+LABEL=""
|
|
+CTL{name}="Center Speaker 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=""
|
|
+ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
|
+CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
|
|
+LABEL=""
|
|
+CTL{name}="LFE Speaker Playback Switch",CTL{do_search}=="1", \
|
|
+ CTL{values}="on"
|
|
+
|
|
+CTL{reset}="mixer"
|
|
CTL{name}="PC Speaker Playback Volume",CTL{do_search}=="1", \
|
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
|
CTL{name}="PC Speaker Playback Switch",CTL{do_search}=="1", \
|
|
--
|
|
1.7.7
|
|
|