mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 12:46:31 +01:00
alsactl: changes in initialization files
- handle virtual master for T61 and TM8100 - when master volume control is available, initialize PCM & CD playback volumes to 0dB Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
94ac54bff1
commit
4818e2701b
2 changed files with 47 additions and 23 deletions
|
@ -10,57 +10,72 @@
|
||||||
# playback
|
# playback
|
||||||
# **************************************************************************
|
# **************************************************************************
|
||||||
|
|
||||||
ENV{volume}:="-20dB"
|
ENV{ppercent}:="75%"
|
||||||
|
ENV{cpercent}:="75%"
|
||||||
|
ENV{pvolume}:="-20dB"
|
||||||
ENV{cvolume}:="12dB"
|
ENV{cvolume}:="12dB"
|
||||||
|
ENV{has_pmaster_vol}:="false"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Master Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Master Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
ENV{has_pmaster_vol}:="true", \
|
||||||
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Master Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Master Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Master Digital Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Master Digital Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Master Digital Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Master Digital Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Front Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Front Playback Volume",PROGRAM!="__ctl_search",GOTO="front0_end"
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
# if master volume control is present, turn front volume to max
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="front0_end"
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="front0_end"
|
||||||
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
|
LABEL="front0_end"
|
||||||
CTL{name}="Front Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Front Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Headphone Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Headphone Playback Volume",PROGRAM=="__ctl_search",GOTO="headphone0_end"
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
# if master volume control is present, turn headphone volume to max
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="headphone0_end"
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="headphone0_end"
|
||||||
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
|
LABEL="headphone0_end"
|
||||||
CTL{name}="Headphone Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Headphone Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Speaker Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Speaker Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Speaker Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Speaker Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="PC Speaker Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="PC Speaker Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="PC Speaker Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="PC Speaker Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="PCM Playback Volume",PROGRAM!="__ctl_search",GOTO="pcm0_end"
|
CTL{name}="PCM Playback Volume",PROGRAM!="__ctl_search",GOTO="pcm0_end"
|
||||||
|
# if master volume control is present, turn PCM volume to max
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="pcm0_end"
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="pcm0_end"
|
||||||
# exception - some HDA codecs have shifted dB range
|
# exception - some HDA codecs have shifted dB range
|
||||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="pcm0_end"
|
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="pcm0_end"
|
||||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="pcm0_end"
|
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="pcm0_end"
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="75%"
|
||||||
LABEL="pcm0_end"
|
LABEL="pcm0_end"
|
||||||
CTL{name}="PCM Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="PCM Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
@ -68,23 +83,26 @@ CTL{name}="PCM Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="PCM Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search", \
|
CTL{name}="PCM Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search", \
|
||||||
GOTO="pcm1_end"
|
GOTO="pcm1_end"
|
||||||
|
# if master volume control is present, turn PCM volume to max
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="pcm1_end"
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="pcm1_end"
|
||||||
# exception - some HDA codecs have shifted dB range
|
# exception - some HDA codecs have shifted dB range
|
||||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="pcm1_end"
|
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="pcm1_end"
|
||||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="pcm1_end"
|
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="pcm1_end"
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="75%"
|
||||||
LABEL="pcm1_end"
|
LABEL="pcm1_end"
|
||||||
CTL{name}="PCM Playback Switch",CTL{index}="1",PROGRAM=="__ctl_search", \
|
CTL{name}="PCM Playback Switch",CTL{index}="1",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="DAC Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="DAC Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="DAC Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="DAC Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Synth Playback Volume",,PROGRAM=="__ctl_search", \
|
CTL{name}="Synth Playback Volume",,PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Synth Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Synth Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
|
@ -102,22 +120,26 @@ CTL{name}="Music Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="CD Playback Volume",PROGRAM!="__ctl_search", GOTO="cd0_end"
|
CTL{name}="CD Playback Volume",PROGRAM!="__ctl_search", GOTO="cd0_end"
|
||||||
|
# if master volume control is present, turn CD volume to max
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="cd0_end"
|
||||||
|
ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="cd0_end"
|
||||||
# exception - some HDA codecs have shifted dB range
|
# exception - some HDA codecs have shifted dB range
|
||||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="cd0_end"
|
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="cd0_end"
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="cd0_end"
|
||||||
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
LABEL="cd0_end"
|
LABEL="cd0_end"
|
||||||
CTL{name}="CD Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="CD Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Mono Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Mono Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Mono Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Mono Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Master Mono Playback Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Master Mono Playback Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
CTL{name}="Master Mono Playback Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Master Mono Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
|
@ -133,17 +155,15 @@ CTL{name}="AC97 Playback Switch",PROGRAM=="__ctl_search", \
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="DRC Range",PROGRAM=="__ctl_search", \
|
CTL{name}="DRC Range",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
|
||||||
|
|
||||||
# **************************************************************************
|
# **************************************************************************
|
||||||
# capture
|
# capture
|
||||||
# **************************************************************************
|
# **************************************************************************
|
||||||
|
|
||||||
ENV{volume}:="20dB"
|
|
||||||
|
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
CTL{name}="Capture Volume",PROGRAM=="__ctl_search", \
|
CTL{name}="Capture Volume",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="$env{cvolume}",RESULT!="0",CTL{values}="75%"
|
CTL{values}="$env{cvolume}",RESULT!="0",CTL{values}="$env{cpercent}"
|
||||||
CTL{name}="Capture Switch",PROGRAM=="__ctl_search", \
|
CTL{name}="Capture Switch",PROGRAM=="__ctl_search", \
|
||||||
CTL{values}="on"
|
CTL{values}="on"
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,12 @@ RESULT="false", EXIT="return"
|
||||||
LABEL="Acer Travelmate 8100"
|
LABEL="Acer Travelmate 8100"
|
||||||
# playback
|
# playback
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
|
CTL{name}="Master Playback Volume", CTL{value}="-21dB"
|
||||||
|
CTL{name}="Master Playback Switch", CTL{value}="on"
|
||||||
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
|
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
|
||||||
CTL{name}="Front Playback Volume", CTL{value}="-29dB,-29dB"
|
CTL{name}="Front Playback Volume", CTL{value}="-29dB,-29dB"
|
||||||
CTL{name}="Front Playback Switch", CTL{value}="on,on"
|
CTL{name}="Front Playback Switch", CTL{value}="on,on"
|
||||||
CTL{name}="PCM Playback Volume", CTL{value}="-21dB,-21dB"
|
CTL{name}="PCM Playback Volume", CTL{value}="0dB,0dB"
|
||||||
# capture
|
# capture
|
||||||
CTL{name}="Input Source", CTL{value}="Mic"
|
CTL{name}="Input Source", CTL{value}="Mic"
|
||||||
CTL{name}="Capture Volume", CTL{value}="20dB,20dB"
|
CTL{name}="Capture Volume", CTL{value}="20dB,20dB"
|
||||||
|
@ -24,8 +26,10 @@ RESULT="true", EXIT="return"
|
||||||
LABEL="Lenovo T61"
|
LABEL="Lenovo T61"
|
||||||
# playback
|
# playback
|
||||||
CTL{reset}="mixer"
|
CTL{reset}="mixer"
|
||||||
|
CTL{name}="Master Playback Volume", CTL{value}="-13.5dB"
|
||||||
|
CTL{name}="Master Playback Switch", CTL{value}="on"
|
||||||
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
|
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
|
||||||
CTL{name}="PCM Playback Volume", CTL{value}="-13.5dB,-13.5dB"
|
CTL{name}="PCM Playback Volume", CTL{value}="0dB,0dB"
|
||||||
# capture
|
# capture
|
||||||
CTL{name}="Input Source", CTL{value}="Internal Mic"
|
CTL{name}="Input Source", CTL{value}="Internal Mic"
|
||||||
CTL{name}="Internal Mic Boost", CTL{value}="1"
|
CTL{name}="Internal Mic Boost", CTL{value}="1"
|
||||||
|
|
Loading…
Reference in a new issue