mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-09 17:45:41 +01:00
alsactl init: use empty GOTOs in init/default file to increase readability
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
eb2e4706f0
commit
11b60426b3
1 changed files with 37 additions and 37 deletions
|
@ -36,43 +36,43 @@ CTL{name}="Master Digital Playback Switch",PROGRAM=="__ctl_search", \
|
|||
CTL{values}="on"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="Front Playback Volume",PROGRAM!="__ctl_search",GOTO="front0_end"
|
||||
CTL{name}="Front 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="front0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="front0_end"
|
||||
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="front0_end"
|
||||
LABEL=""
|
||||
CTL{name}="Front Playback Switch",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="Headphone Playback Volume",PROGRAM!="__ctl_search",GOTO="headphone0_end"
|
||||
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="headphone0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="headphone0_end"
|
||||
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="headphone0_end"
|
||||
LABEL=""
|
||||
CTL{name}="Headphone Playback Switch",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="Headphone Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search",\
|
||||
GOTO="headphone1_end"
|
||||
GOTO=""
|
||||
# if master volume control is present, turn headphone volume to max
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="headphone1_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="headphone1_end"
|
||||
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="headphone1_end"
|
||||
LABEL=""
|
||||
CTL{name}="Headphone Playback Switch",CTL{index}="1",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO="speaker0_end"
|
||||
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="speaker0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="speaker0_end"
|
||||
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="speaker0_end"
|
||||
LABEL=""
|
||||
CTL{name}="Speaker Playback Switch",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
||||
|
@ -84,29 +84,29 @@ CTL{name}="PC Speaker Playback Switch",PROGRAM=="__ctl_search", \
|
|||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="PCM Playback Volume",PROGRAM!="__ctl_search", \
|
||||
CTL{name}="PCM Volume",PROGRAM!="__ctl_search", GOTO="pcm0_end"
|
||||
CTL{name}="PCM Volume",PROGRAM!="__ctl_search", GOTO=""
|
||||
# if master volume control is present, turn PCM volume to max
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="pcm0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="pcm0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
||||
# exception - some HDA codecs have shifted dB range
|
||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO="pcm0_end"
|
||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO="pcm0_end"
|
||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO=""
|
||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO=""
|
||||
CTL{write}!="$env{pvolume}",CTL{values}="75%"
|
||||
LABEL="pcm0_end"
|
||||
LABEL=""
|
||||
CTL{name}="PCM Playback Switch",PROGRAM=="__ctl_search", CTL{values}="on"
|
||||
CTL{name}="PCM Switch",PROGRAM=="__ctl_search",CTL{values}="on"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="PCM Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search", \
|
||||
CTL{name}="PCM Volume",PROGRAM!="__ctl_search",GOTO="pcm1_end"
|
||||
CTL{name}="PCM Volume",PROGRAM!="__ctl_search",GOTO=""
|
||||
# if master volume control is present, turn PCM volume to max
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="pcm1_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="pcm1_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
||||
# exception - some HDA codecs have shifted dB range
|
||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO="pcm1_end"
|
||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO="pcm1_end"
|
||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO=""
|
||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO=""
|
||||
CTL{write}!="$env{pvolume}",CTL{values}="75%"
|
||||
LABEL="pcm1_end"
|
||||
LABEL=""
|
||||
CTL{name}="PCM Playback Switch",CTL{index}="1",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
CTL{name}="PCM Switch",CTL{index}="1",PROGRAM=="__ctl_search", \
|
||||
|
@ -137,15 +137,15 @@ CTL{name}="Music Playback Switch",PROGRAM=="__ctl_search", \
|
|||
CTL{values}="on"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="CD Playback Volume",PROGRAM!="__ctl_search", GOTO="cd0_end"
|
||||
CTL{name}="CD Playback Volume",PROGRAM!="__ctl_search", GOTO=""
|
||||
# if master volume control is present, turn CD volume to max
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="cd0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="cd0_end"
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
|
||||
ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
|
||||
# exception - some HDA codecs have shifted dB range
|
||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO="cd0_end"
|
||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO="cd0_end"
|
||||
CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO=""
|
||||
CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO=""
|
||||
CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
|
||||
LABEL="cd0_end"
|
||||
LABEL=""
|
||||
CTL{name}="CD Playback Switch",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
||||
|
@ -185,11 +185,11 @@ CTL{name}="Capture Volume",PROGRAM=="__ctl_search", \
|
|||
CTL{name}="Capture Switch",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
||||
CTL{name}="Input Source",PROGRAM!="__ctl_search", GOTO="end_input_source"
|
||||
CTL{name}="Input Source",PROGRAM!="__ctl_search", GOTO=""
|
||||
CTL{enums}=="*|Internal Mic|*",CTL{values}="Internal Mic", \
|
||||
GOTO="end_input_source"
|
||||
GOTO=""
|
||||
CTL{enums}=="*|Mic|*",CTL{values}="Mic"
|
||||
LABEL="end_input_source"
|
||||
LABEL=""
|
||||
|
||||
CTL{name}="Internal Mic Boost",PROGRAM=="__ctl_search", \
|
||||
CTL{values}="on"
|
||||
|
|
Loading…
Reference in a new issue