2008-05-23 17:05:14 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# alsa-init card#
|
|
|
|
|
|
|
|
/usr/bin/set_default_volume -f $1 >/dev/null 2>&1
|
2011-03-31 15:03:56 +02:00
|
|
|
test -s /var/lib/alsa/asound.state && /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1
|
2009-02-19 17:35:34 +01:00
|
|
|
# increase buffer-preallocation size (for PA)
|
|
|
|
if [ -f /proc/asound/card$1/pcm0p/sub0/prealloc_max ]; then
|
2014-11-17 14:53:19 +01:00
|
|
|
[ $(cat /proc/asound/card$1/pcm0p/sub0/prealloc_max) -le 1024 ] ||
|
2009-02-19 17:35:34 +01:00
|
|
|
echo 1024 > /proc/asound/card$1/pcm0p/sub0/prealloc
|
|
|
|
fi
|
|
|
|
|
2008-05-23 17:05:14 +02:00
|
|
|
exit 0
|