summaryrefslogtreecommitdiffstats
path: root/remote/modules/alsa/data/opt/openslx
diff options
context:
space:
mode:
authorJonathan Bauer2015-12-11 15:25:04 +0100
committerJonathan Bauer2015-12-11 15:25:04 +0100
commitbc9d6b1fe19fa67bc441babe9a924dbcf993a250 (patch)
tree77b2fdbc04fa3a6c618b922b0c1a7cca39c48ac8 /remote/modules/alsa/data/opt/openslx
parent[hardware-stats] Consider only user sessions to determine "in use" state (diff)
downloadtm-scripts-bc9d6b1fe19fa67bc441babe9a924dbcf993a250.tar.gz
tm-scripts-bc9d6b1fe19fa67bc441babe9a924dbcf993a250.tar.xz
tm-scripts-bc9d6b1fe19fa67bc441babe9a924dbcf993a250.zip
[alsa] force usage of the non-HDMI sound card if we have more than one
Diffstat (limited to 'remote/modules/alsa/data/opt/openslx')
-rwxr-xr-xremote/modules/alsa/data/opt/openslx/scripts/alsa-default_card20
1 files changed, 7 insertions, 13 deletions
diff --git a/remote/modules/alsa/data/opt/openslx/scripts/alsa-default_card b/remote/modules/alsa/data/opt/openslx/scripts/alsa-default_card
index ebdf6043..1e28aa4c 100755
--- a/remote/modules/alsa/data/opt/openslx/scripts/alsa-default_card
+++ b/remote/modules/alsa/data/opt/openslx/scripts/alsa-default_card
@@ -12,7 +12,7 @@ if [ -w "/etc" ]; then
elif [ -n "$HOME" ]; then
FILE="${HOME}/.asoundrc"
else
- FILE="$(/usr/bin/getent passwd root | awk -F ':' '{print $6}')/.asoundrc"
+ FILE="$(getent passwd root | awk -F ':' '{print $6}')/.asoundrc"
fi
if [ -e "${FILE}" -a "x$1" != "x--force" ]; then
@@ -31,17 +31,11 @@ if [ -z "${CARD}" ]; then
fi
cat > "${FILE}" <<HEREDOC
-pcm.!default {
- type hw
- card $CARD
-}
-ctl.!default {
- type hw
- card $CARD
-}
-timer.!default {
- type hw
- card $CARD
-}
+defaults.pcm.!card $CARD
+defaults.ctl.!card $CARD
+
+defaults.pcm.!device 0
+defaults.ctl.!device 0
+
HEREDOC