From 5e8772f95ceae8cdffedc2a5813c1ee2348f1356 Mon Sep 17 00:00:00 2001 From: Ella Stanforth Date: Sat, 13 Jul 2024 08:09:51 +0000 Subject: [PATCH] contrib: add example rules script --- contrib/libudev-zero-rules-helper.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 contrib/libudev-zero-rules-helper.sh diff --git a/contrib/libudev-zero-rules-helper.sh b/contrib/libudev-zero-rules-helper.sh new file mode 100755 index 00000000..2e14a00a --- /dev/null +++ b/contrib/libudev-zero-rules-helper.sh @@ -0,0 +1,15 @@ +#!/bin/sh -e + +if [ "$SUBSYSTEM" = "sound" ] +then + if printf '%s' "$SYSNAME" | grep '^card' > /dev/null + then + printf 'SOUND_INITIALIZED=1\n' + fi + + if printf '%s' "$SYSNAME" | grep '^pcmC.*D2c$' > /dev/null \ + && grep '^AppleJ' "$SYSPATH/device/id" 2>/dev/null + then + printf 'ACP_IGNORE=1\n' + fi +fi