aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_do_dac.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbin/executable_do_dac.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/executable_do_dac.sh b/bin/executable_do_dac.sh
new file mode 100755
index 0000000..7ae913e
--- /dev/null
+++ b/bin/executable_do_dac.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+USB_CARD="alsa_card.usb-FiiO_DigiHug_USB_Audio-01"
+USB_SINK="alsa_output.usb-FiiO_DigiHug_USB_Audio-01.iec958-stereo"
+SPEAKERS="alsa_output.pci-0000_00_1b.0.analog-stereo"
+
+pacmd set-sink-mute "${SPEAKERS}" 1
+pacmd set-card-profile "${USB_CARD}" output:iec958-stereo
+pacmd set-sink-mute "${USB_SINK}" 0
+
+if pacmd list-modules | grep module-ladspa-sink; then
+ pacmd unload-module module-ladspa-sink
+fi
+pacmd load-module module-ladspa-sink sink_name=binaural sink_master="${USB_SINK}" plugin=bs2b label=bs2b control=700,4.5
+
+for s in $(pacmd list-sink-inputs | awk '$1 == "index:" {print $2}')
+do
+ pacmd move-sink-input $s "${USB_SINK}" >/dev/null 2>&1
+done