diff --git a/packages/jelos/sources/scripts/set-audio b/packages/jelos/sources/scripts/set-audio index cc07c85fb..838f9fd73 100755 --- a/packages/jelos/sources/scripts/set-audio +++ b/packages/jelos/sources/scripts/set-audio @@ -162,7 +162,19 @@ ctl.!default { pcm.!default { type plug - slave.pcm "dmixer" + slave.pcm "softvol" +} + +pcm.softvol { + type softvol + slave.pcm "dmixer" + control { + name "Pre-Amp" + card ${CARD} + } + min_dB -5.0 + max_dB 20.0 + resolution 6 } pcm.dmixer { @@ -171,8 +183,8 @@ pcm.dmixer { slave { pcm "${HWDEV}" period_time 0 - period_size 1024 - buffer_size 8192 + period_size 4096 + buffer_size 131072 rate 176400 } bindings { @@ -186,10 +198,22 @@ EOF pcm.!default { type plug slave { - pcm "${HWDEV}" + pcm "softvol" } } +pcm.softvol { + type softvol + slave.pcm "dmixer" + control { + name "Pre-Amp" + card ${CARD} + } + min_dB -5.0 + max_dB 20.0 + resolution 6 +} + ctl.!default { type hw card ${CARD} diff --git a/packages/sysutils/autostart/sources/common/005-alsa b/packages/sysutils/autostart/sources/common/005-alsa index 08360d6f5..39863344d 100755 --- a/packages/sysutils/autostart/sources/common/005-alsa +++ b/packages/sysutils/autostart/sources/common/005-alsa @@ -29,5 +29,7 @@ then alsactl restore -f /storage/.config/asound.state fi +amixer -M set Pre-Amp -- 80% + VOL=$(get_setting "audio.volume" 2>/dev/null) amixer -M set "${DEVICE_AUDIO_MIXER}" ${VOL}%