tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

default (10866B)


      1 #
      2 # Default ALSA volume levels and setting when initialization database fails.
      3 #
      4 # Basic rules are:
      5 #  - keep volumes at minimal level, but sound should be hearable
      6 #  - enable standard outputs for playback and main microphone for recording
      7 #
      8 
      9 # **************************************************************************
     10 # playback
     11 # **************************************************************************
     12 
     13 ENV{ppercent}:="75%"
     14 ENV{cpercent}:="75%"
     15 ENV{pvolume}:="-20dB"
     16 ENV{cvolume}:="12dB"
     17 ENV{has_pmaster_vol}:="false"
     18 
     19 CTL{reset}="mixer"
     20 CTL{name}="Playback Volume",CTL{do_search}=="1", \
     21   CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     22 CTL{name}="Playback Switch",CTL{do_search}=="1", \
     23   CTL{values}="on"
     24 
     25 CTL{reset}="mixer"
     26 CTL{name}="Master Playback Volume",CTL{do_search}=="1", \
     27   ENV{has_pmaster_vol}:="true", \
     28   CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     29 CTL{name}="Master Playback Switch",CTL{do_search}=="1", \
     30   CTL{values}="on"
     31 
     32 CTL{reset}="mixer"
     33 CTL{name}="Master Front Playback Volume",CTL{do_search}=="1", \
     34   ENV{has_pmaster_vol}:="true", \
     35   CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     36 CTL{name}="Master Front Playback Switch",CTL{do_search}=="1", \
     37   CTL{values}="on"
     38 
     39 CTL{reset}="mixer"
     40 CTL{name}="Master Digital Playback Volume",CTL{do_search}=="1", \
     41   CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     42 CTL{name}="Master Digital Playback Switch",CTL{do_search}=="1", \
     43   CTL{values}="on"
     44 
     45 CTL{reset}="mixer"
     46 CTL{name}="Line Out Playback Volume",PROGRAM!="__ctl_search",GOTO=""
     47 # if master volume control is present, turn line out volume to max
     48 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
     49 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
     50 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     51 LABEL=""
     52 CTL{name}="Line Out Playback Switch",CTL{do_search}=="1", \
     53   CTL{values}="on"
     54 
     55 CTL{reset}="mixer"
     56 CTL{name}="Front Playback Volume",PROGRAM!="__ctl_search",GOTO=""
     57 # if master volume control is present, turn front volume to max
     58 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
     59 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
     60 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     61 LABEL=""
     62 CTL{name}="Front Playback Switch",CTL{do_search}=="1", \
     63   CTL{values}="on"
     64 
     65 CTL{reset}="mixer"
     66 CTL{name}="Surround Playback Volume",PROGRAM!="__ctl_search",GOTO=""
     67 # if master volume control is present, turn front volume to max
     68 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
     69 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
     70 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     71 LABEL=""
     72 CTL{name}="Surround Playback Switch",CTL{do_search}=="1", \
     73   CTL{values}="on"
     74 
     75 CTL{reset}="mixer"
     76 CTL{name}="Center Playback Volume",PROGRAM!="__ctl_search",GOTO=""
     77 # if master volume control is present, turn front volume to max
     78 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
     79 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
     80 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     81 LABEL=""
     82 CTL{name}="Center Playback Switch",CTL{do_search}=="1", \
     83   CTL{values}="on"
     84 
     85 CTL{reset}="mixer"
     86 CTL{name}="LFE Playback Volume",PROGRAM!="__ctl_search",GOTO=""
     87 # if master volume control is present, turn front volume to max
     88 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
     89 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
     90 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
     91 LABEL=""
     92 CTL{name}="LFE Playback Switch",CTL{do_search}=="1", \
     93   CTL{values}="on"
     94 
     95 CTL{reset}="mixer"
     96 CTL{name}="Headphone Playback Volume",PROGRAM!="__ctl_search",GOTO=""
     97 # if master volume control is present, turn headphone volume to max
     98 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
     99 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    100 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    101 LABEL=""
    102 CTL{name}="Headphone Playback Switch",CTL{do_search}=="1", \
    103   CTL{values}="on"
    104 
    105 CTL{reset}="mixer"
    106 CTL{name}="Headphone Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search",\
    107   GOTO=""
    108 # if master volume control is present, turn headphone volume to max
    109 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    110 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    111 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    112 LABEL=""
    113 CTL{name}="Headphone Playback Switch",CTL{index}="1",CTL{do_search}=="1", \
    114   CTL{values}="on"
    115 
    116 CTL{reset}="mixer"
    117 CTL{name}="Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
    118 # if master volume control is present, turn speaker volume to max
    119 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    120 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    121 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    122 LABEL=""
    123 CTL{name}="Speaker Playback Switch",CTL{do_search}=="1", \
    124   CTL{values}="on"
    125 
    126 CTL{reset}="mixer"
    127 CTL{name}="Front Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
    128 # if master volume control is present, turn speaker volume to max
    129 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    130 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    131 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    132 LABEL=""
    133 CTL{name}="Front Speaker Playback Switch",CTL{do_search}=="1", \
    134   CTL{values}="on"
    135 
    136 CTL{reset}="mixer"
    137 CTL{name}="Surround Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
    138 # if master volume control is present, turn speaker volume to max
    139 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    140 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    141 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    142 LABEL=""
    143 CTL{name}="Surround Speaker Playback Switch",CTL{do_search}=="1", \
    144   CTL{values}="on"
    145 
    146 CTL{reset}="mixer"
    147 CTL{name}="Center Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
    148 # if master volume control is present, turn speaker volume to max
    149 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    150 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    151 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    152 LABEL=""
    153 CTL{name}="Center Speaker Playback Switch",CTL{do_search}=="1", \
    154   CTL{values}="on"
    155 
    156 CTL{reset}="mixer"
    157 CTL{name}="LFE Speaker Playback Volume",PROGRAM!="__ctl_search",GOTO=""
    158 # if master volume control is present, turn speaker volume to max
    159 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    160 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    161 CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    162 LABEL=""
    163 CTL{name}="LFE Speaker Playback Switch",CTL{do_search}=="1", \
    164   CTL{values}="on"
    165 
    166 CTL{reset}="mixer"
    167 CTL{name}="PC Speaker Playback Volume",CTL{do_search}=="1", \
    168   CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
    169 CTL{name}="PC Speaker Playback Switch",CTL{do_search}=="1", \
    170   CTL{values}="on"
    171 
    172 CTL{reset}="mixer"
    173 CTL{name}="PCM Playback Volume",PROGRAM!="__ctl_search", \
    174  CTL{name}="PCM Volume",PROGRAM!="__ctl_search", GOTO=""
    175 # if master volume control is present, turn PCM volume to max
    176 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    177 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    178 # exception - some HDA codecs have shifted dB range
    179 CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO=""
    180 CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO=""
    181 CTL{write}!="$env{pvolume}",CTL{values}="75%"
    182 LABEL=""
    183 CTL{name}="PCM Playback Switch",CTL{do_search}=="1", CTL{values}="on"
    184 CTL{name}="PCM Switch",CTL{do_search}=="1",CTL{values}="on"
    185 
    186 CTL{reset}="mixer"
    187 CTL{name}="PCM Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search", \
    188   CTL{name}="PCM Volume",PROGRAM!="__ctl_search",GOTO=""
    189 # if master volume control is present, turn PCM volume to max
    190 ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO=""
    191 ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO=""
    192 # exception - some HDA codecs have shifted dB range
    193 CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO=""
    194 CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO=""
    195 CTL{write}!="$env{pvolume}",CTL{values}="75%"
    196 LABEL=""
    197 CTL{name}="PCM Playback Switch",CTL{index}="1",CTL{do_search}=="1", \
    198   CTL{values}="on"
    199 CTL{name}="PCM Switch",CTL{index}="1",CTL{do_search}=="1", \
    200   CTL{values}="on"
    201 
    202 CTL{reset}="mixer"
    203 CTL{name}="DAC Playback Volume",CTL{do_search}=="1", \
    204   CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
    205 CTL{name}="DAC Playback Switch",CTL{do_search}=="1", \
    206   CTL{values}="on"
    207 
    208 CTL{reset}="mixer"
    209 CTL{name}="Synth Playback Volume",CTL{do_search}=="1", \
    210   CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
    211 CTL{name}="Synth Playback Switch",CTL{do_search}=="1", \
    212   CTL{values}="on"
    213 
    214 CTL{reset}="mixer"
    215 CTL{name}="Wave Playback Volume",CTL{do_search}=="1", \
    216   CTL{values}="100%"
    217 CTL{name}="Wave Playback Switch",CTL{do_search}=="1", \
    218   CTL{values}="on"
    219 
    220 CTL{reset}="mixer"
    221 CTL{name}="Music Playback Volume",CTL{do_search}=="1", \
    222   CTL{values}="100%"
    223 CTL{name}="Music Playback Switch",CTL{do_search}=="1", \
    224   CTL{values}="on"
    225 
    226 CTL{reset}="mixer"
    227 CTL{name}="CD Playback Volume",CTL{do_search}=="1", \
    228   CTL{values}="0%"
    229 CTL{name}="CD Playback Switch",CTL{do_search}=="1", \
    230   CTL{values}="off"
    231 
    232 CTL{reset}="mixer"
    233 CTL{name}="Mono Playback Volume",CTL{do_search}=="1", \
    234   CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
    235 CTL{name}="Mono Playback Switch",CTL{do_search}=="1", \
    236   CTL{values}="on"
    237 
    238 CTL{reset}="mixer"
    239 CTL{name}="Master Mono Playback Volume",CTL{do_search}=="1", \
    240   CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
    241 CTL{name}="Master Mono Playback Switch",CTL{do_search}=="1", \
    242   CTL{values}="on"
    243 
    244 CTL{reset}="mixer"
    245 CTL{name}="AC97 Playback Volume",CTL{do_search}=="1", \
    246   CTL{values}="100%"
    247 CTL{name}="AC97 Playback Switch",CTL{do_search}=="1", \
    248   CTL{values}="on"
    249 
    250 #
    251 # Powermacs
    252 #
    253 
    254 CTL{reset}="mixer"
    255 CTL{name}="DRC Range",CTL{do_search}=="1", \
    256   CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}"
    257 
    258 # **************************************************************************
    259 # capture
    260 # **************************************************************************
    261 
    262 CTL{reset}="mixer"
    263 CTL{name}="Capture Volume",CTL{do_search}=="1", \
    264   CTL{write}!="$env{cvolume}",CTL{values}="$env{cpercent}"
    265 CTL{name}="Capture Switch",CTL{do_search}=="1", \
    266   CTL{values}="on"
    267 
    268 CTL{name}="Capture Source",PROGRAM!="__ctl_search", GOTO=""
    269 CTL{enums}=="*|Internal Mic|*",CTL{values}="Internal Mic", GOTO=""
    270 CTL{enums}=="*|Mic|*",CTL{values}="Mic"
    271 LABEL=""
    272 
    273 CTL{name}="Input Source",PROGRAM!="__ctl_search", GOTO=""
    274 CTL{enums}=="*|Internal Mic|*",CTL{values}="Internal Mic", GOTO=""
    275 CTL{enums}=="*|Mic|*",CTL{values}="Mic"
    276 LABEL=""
    277 
    278 CTL{name}="Digital Input Source",PROGRAM!="__ctl_search", GOTO=""
    279 CTL{enums}=="*|Digital Mic 1|*",CTL{values}="Digital Mic 1", GOTO=""
    280 CTL{enums}=="*|Mic|*",CTL{values}="Mic"
    281 LABEL=""
    282 
    283 CTL{name}="Mic Boost",CTL{do_search}=="1", CTL{values}="on"
    284 CTL{name}="Internal Mic Boost",CTL{do_search}=="1", CTL{values}="on"