aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_do_dac.sh
blob: 7ae913e2016ec6f86e6a5232f97df05c2e144c40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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