Takashi Iwai
a2fb0c4a6d
- Replace the asound.state path for older distros OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=73
15 lines
427 B
Bash
15 lines
427 B
Bash
#!/bin/sh
|
|
# alsa-init card#
|
|
|
|
/usr/bin/set_default_volume -f $1 >/dev/null 2>&1
|
|
test -s /var/lib/asound.state && /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1
|
|
# increase buffer-preallocation size (for PA)
|
|
if [ -f /proc/asound/card$1/pcm0p/sub0/prealloc_max ]; then
|
|
pmax=$(< /proc/asound/card$1/pcm0p/sub0/prealloc_max)
|
|
if [ $pmax -gt 1024 ]; then
|
|
echo 1024 > /proc/asound/card$1/pcm0p/sub0/prealloc
|
|
fi
|
|
fi
|
|
|
|
exit 0
|