aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/4a-play9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/4a-play b/bin/4a-play
index 620f311..7650d4d 100755
--- a/bin/4a-play
+++ b/bin/4a-play
@@ -19,8 +19,15 @@ if [ "$#" == "0" ]; then
usage
fi
+avirt=$(cat /proc/modules | grep avirt_ap_loopback | head -n1 | cut -d ' ' -f 1)
+if [ x$avirt == x ]; then
+hwdev=Loopback,0,2
+else
+hwdev=avirt,0
+fi
+
FILEPATH="$( realpath "$1" )"
-DEVICE=${2:-'hw:Loopback,0,2'}
+DEVICE=${2:-"hw:$hwdev"}
ROLE=${3:-'multimedia'}
CARDID=$( echo "$DEVICE" | cut -d':' -f2 | cut -d',' -f1 )