mirror of
https://github.com/AquaMorph/dotfiles.git
synced 2025-04-30 01:35:34 +00:00
Automatic ES-9 setup
This commit is contained in:
parent
ed2ab233cd
commit
327f36cce4
9
scripts/audio/es9start.sh
Normal file → Executable file
9
scripts/audio/es9start.sh
Normal file → Executable file
@ -3,15 +3,16 @@
|
|||||||
# Script to add another audio interface if available.
|
# Script to add another audio interface if available.
|
||||||
|
|
||||||
# Import library
|
# Import library
|
||||||
source $(dirname ${BASH_SOURCE[0]})/audio-lib.sh
|
source $(dirname $(realpath ${BASH_SOURCE[0]}))/audio-lib.sh
|
||||||
|
|
||||||
DEVICE_NAME='ES-9'
|
DEVICE_NAME='ES-9'
|
||||||
DEVICE_NUM=$(getCardNumber $DEVICE_NAME)
|
DEVICE_NUM=$(getCardNumber $DEVICE_NAME)
|
||||||
checkCard $DEVICE_NAME $DEVICE_NUM
|
checkCard $DEVICE_NAME $DEVICE_NUM
|
||||||
|
|
||||||
|
|
||||||
echo $DEVICE_NUM
|
|
||||||
|
|
||||||
# Start up audio interface
|
# Start up audio interface
|
||||||
alsa_in -d hw:$DEVICE_NUM -j "$DEVICE_NAME In" -c 16 -q 1 &
|
alsa_in -d hw:$DEVICE_NUM -j "$DEVICE_NAME In" -c 16 -q 1 &
|
||||||
alsa_out -d hw:$DEVICE_NUM -j "$DEVICE_NAME Out" -c 16 -q 1 &
|
alsa_out -d hw:$DEVICE_NUM -j "$DEVICE_NAME Out" -c 16 -q 1 &
|
||||||
|
pkill es5jack || true
|
||||||
|
es5jack >/dev/null 2>/dev/null &
|
||||||
|
sleep 0.1
|
||||||
|
jack_connect ES-5:out "$DEVICE_NAME Out:playback_9" || true
|
||||||
|
1
scripts/audio/es9stop.sh
Normal file → Executable file
1
scripts/audio/es9stop.sh
Normal file → Executable file
@ -4,3 +4,4 @@
|
|||||||
|
|
||||||
pkill alsa_in
|
pkill alsa_in
|
||||||
pkill alsa_out
|
pkill alsa_out
|
||||||
|
pkill es5jack
|
||||||
|
14
systemd/user/es-9.service
Normal file
14
systemd/user/es-9.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=ES-9 Audio Interface
|
||||||
|
BindsTo=dev-snd-by\x2did-usb\x2dExpert_Sleepers_Ltd_ES\x2d9\x2d01.device
|
||||||
|
After=dev-snd-by\x2did-usb\x2dExpert_Sleepers_Ltd_ES\x2d9\x2d01.device
|
||||||
|
Requisite=dev-snd-by\x2did-usb\x2dExpert_Sleepers_Ltd_ES\x2d9\x2d01.device
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=dev-snd-by\x2did-usb\x2dExpert_Sleepers_Ltd_ES\x2d9\x2d01.device
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=true
|
||||||
|
ExecStart=%h/.config/scripts/audio/es9start.sh
|
||||||
|
ExecStop=%h/.config/scripts/audio/es9stop.sh
|
Loading…
x
Reference in New Issue
Block a user