parent
b6b76d627b
commit
9763484300
@ -1,2 +0,0 @@
|
||||
# Calculate path=/etc/runlevels
|
||||
|
@ -1 +0,0 @@
|
||||
# Calculate name=alsasound append=remove
|
@ -1,54 +0,0 @@
|
||||
# Calculate format=patch
|
||||
<reg>(\s*ebegin "Restoring Mixer Levels"
|
||||
|
||||
\s*if \[ ! -r "\$\{alsastatedir\}/asound.state" \] ; then)
|
||||
(\s*ewarn "No mixer config in \${alsastatedir}/asound.state, you have to unmute your card!")
|
||||
(\s*eend 0
|
||||
\s*return 0
|
||||
\s*fi)</reg>
|
||||
<text>\1
|
||||
einfo "Setting up ALSA Mixer Levels"
|
||||
# set output volumes to 70%
|
||||
amixer scontrols | grep -v Mic | sed -nr "/Wave|Master|Front|LFE|Center|Side|Speaker|Surround|PCM/ s/.*'([^']+)'.*/\\\\1/p" | xargs -I {} amixer -q set "{}" 85% unmute &>/dev/null
|
||||
# reduce beep
|
||||
amixer scontrols | sed -nr "/Beep/ s/.*'([^']+)'.*/\\\\1/p" | xargs -I {} amixer -q set "{}" 10% mute &>/dev/null
|
||||
# mute all mics
|
||||
amixer scontrols | sed -nr "/Mic/ s/.*'([^']+)'.*/\\\\1/p" | xargs -I {} amixer -q set "{}" 0% mute &>/dev/null
|
||||
save
|
||||
if ! grep -q "PCM Playback Volume" ${alsastatedir}/asound.state
|
||||
then
|
||||
sed -ri "s/^\}/\
|
||||
control.99 \{\\n\
|
||||
iface MIXER\\n\
|
||||
name 'PCM Playback Volume'\\n\
|
||||
value.0 255\\n\
|
||||
value.1 255\\n\
|
||||
comment \{\\n\
|
||||
access 'read write user'\\n\
|
||||
type INTEGER\\n\
|
||||
count 2\\n\
|
||||
range '0 - 255'\\n\
|
||||
tlv '0000000100000008ffffec1400000014'\\n\
|
||||
dbmin -5100\\n\
|
||||
dbmax 0\\n\
|
||||
dbvalue.0 0\\n\
|
||||
dbvalue.1 0\\n\
|
||||
}\\n\
|
||||
\}\\n\
|
||||
\}\\n\
|
||||
/" ${alsastatedir}/asound.state && restore
|
||||
fi
|
||||
\3</text>
|
||||
<reg>(\s*ebegin "Loading ALSA modules"
|
||||
\s*eindent
|
||||
\s*load_modules)
|
||||
(\s*eoutdent)
|
||||
(\s*eend \$\? \|\| return 1)
|
||||
(\s*fi
|
||||
|
||||
\s*if \[ ! -d /proc/asound \]; then)</reg>
|
||||
<text>\1
|
||||
RES=$?
|
||||
\2
|
||||
eend $RES || return 1
|
||||
\4</text>
|
@ -0,0 +1,6 @@
|
||||
# Calculate dotall format=patch ini(update.revision)<10&&pkg(media-sound/alsa-utils)!= path=/etc/init.d name=alsasound merge=media-sound/alsa-utils
|
||||
|
||||
#-ini(update.revision,10)-#
|
||||
|
||||
<reg>\n\s*einfo "Setting up ALSA Mixer Levels".*?&&\s*restore\s*fi</reg>
|
||||
<text>\n\t\tewarn "No mixer config in ${alsastatedir}/asound.state, you have to unmute your card!"</text>
|
Loading…
Reference in new issue