Added audio scripts
This commit is contained in:
parent
f81fdd7cfa
commit
2d58fc19c7
13
audio/71Remap/71remap.sh
Normal file
13
audio/71Remap/71remap.sh
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Installation:
|
||||||
|
# Get device name using this command: pacmd list-sinks | grep surround
|
||||||
|
# Remove "pacmd" and add to /etc/pulse/default.pa
|
||||||
|
|
||||||
|
# Notes;
|
||||||
|
# Additional line required for 7.1 instead of 5.1
|
||||||
|
# Verify right-left mapping for center/lfe device
|
||||||
|
|
||||||
|
pacmd load-module module-remap-sink sink_name="Channel12" remix=no master=alsa_output.pci-0000_00_1b.0.analog-surround-51 channels=2 master_channel_map=front-left,front-right channel_map=front-left,front-right sink_properties=device.description="Channel12"
|
||||||
|
|
||||||
|
pacmd load-module module-remap-sink sink_name="Channel34" remix=no master=alsa_output.pci-0000_00_1b.0.analog-surround-51 channels=2 master_channel_map=rear-left,rear-right channel_map=front-left,front-right sink_properties=device.description="Channel34"
|
||||||
|
|
||||||
|
pacmd load-module module-remap-sink sink_name="Channel56" remix=no master=alsa_output.pci-0000_00_1b.0.analog-surround-51 channels=2 master_channel_map=front-center,lfe channel_map=front-left,front-right sink_properties=device.description="Channel56"
|
20
audio/AudioKontrol1/AudioKontrolPort2.sh
Executable file
20
audio/AudioKontrol1/AudioKontrolPort2.sh
Executable file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# change samplerate in /etc/pulse/daemon.conf config to 192000
|
||||||
|
# verify with:
|
||||||
|
# less /proc/asound/card1/pcm0p/sub1/hw_params
|
||||||
|
|
||||||
|
|
||||||
|
# get name and card_name using: pacmd list-sinks
|
||||||
|
|
||||||
|
id=`pacmd dump | grep -e load.*Kontrol.* | head -n 1 | sed "s/.*device_id=\"//g" | sed "s/\".*//g"`
|
||||||
|
|
||||||
|
pacmd load-module module-alsa-card device_id="$id" name="usb-Native_Instruments_Audio_Kontrol_1_SN-SN-2U38Y8KE8O-00-AudioKontrol1.analog-stereo" card_name="alsa_card.usb-Native_Instruments_Audio_Kontrol_1_SN-SN-2U38Y8KE8O-01-AudioKontrol1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1" sink_properties=device.description=AudioKontrol34
|
||||||
|
|
||||||
|
# sink_properties="device.description='Audio Kontrol 3/4'"
|
||||||
|
|
||||||
|
# warning: device id might change!!!!
|
||||||
|
|
||||||
|
|
||||||
|
# OLD CODE=
|
||||||
|
# pacmd load-module module-alsa-card device_id="$id" name="usb-Native_Instruments_Audio_Kontrol_1_SN-SN-2U38Y8KE8O-01-AudioKontrol1" card_name="alsa_card.usb-Native_Instruments_Audio_Kontrol_1_SN-SN-2U38Y8KE8O-01-AudioKontrol1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.discovered=1" sink_properties="device.description='Audio Kontrol 3/4'"
|
70
audio/AudioKontrol1/audioKontrol1_asoundrc
Normal file
70
audio/AudioKontrol1/audioKontrol1_asoundrc
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# Makes the subdevices aka channel 1&2 and 3&4 available for alsa applications
|
||||||
|
pcm_slave.sl12 {
|
||||||
|
pcm "hw:AudioKontrol1,0,0"
|
||||||
|
format S24_3BE
|
||||||
|
channels 2
|
||||||
|
rate 192000
|
||||||
|
}
|
||||||
|
|
||||||
|
pcm.channel12 {
|
||||||
|
type plug
|
||||||
|
slave sl12
|
||||||
|
#slave.pcm pulse
|
||||||
|
}
|
||||||
|
|
||||||
|
pcm_slave.sl34 {
|
||||||
|
pcm "hw:AudioKontrol1,0,1"
|
||||||
|
format S24_3BE
|
||||||
|
channels 2
|
||||||
|
rate 192000
|
||||||
|
}
|
||||||
|
|
||||||
|
pcm.channel34 {
|
||||||
|
type plug
|
||||||
|
slave sl34
|
||||||
|
#slave.pcm pulse
|
||||||
|
}
|
||||||
|
|
||||||
|
# create a virtual four-channel device with two sound devices:
|
||||||
|
# This is in fact two interleaved stereo streams in
|
||||||
|
# different memory locations, so JACK will complain that it
|
||||||
|
# cannot get mmap-based access. see below.
|
||||||
|
pcm.multi {
|
||||||
|
type multi;
|
||||||
|
slaves.a.pcm "hw:AudioKontrol1,0,0";
|
||||||
|
slaves.a.channels 2;
|
||||||
|
slaves.b.pcm "hw:AudioKontrol1,0,1";
|
||||||
|
slaves.b.channels 2;
|
||||||
|
bindings.0.slave a;
|
||||||
|
bindings.0.channel 0;
|
||||||
|
bindings.1.slave a;
|
||||||
|
bindings.1.channel 1;
|
||||||
|
bindings.2.slave b;
|
||||||
|
bindings.2.channel 0;
|
||||||
|
bindings.3.slave b;
|
||||||
|
bindings.3.channel 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# JACK will be unhappy if there is no mixer to talk to, so we set
|
||||||
|
# this to the usb card.
|
||||||
|
ctl.multi {
|
||||||
|
type hw;
|
||||||
|
card AudioKontrol1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# This creates a 4 channel interleaved pcm stream based on
|
||||||
|
# the multi device. JACK will work with this one.
|
||||||
|
pcm.ttable {
|
||||||
|
type route;
|
||||||
|
slave.pcm "multi";
|
||||||
|
slave.channels 4;
|
||||||
|
ttable.0.0 1;
|
||||||
|
ttable.1.1 1;
|
||||||
|
ttable.2.2 1;
|
||||||
|
ttable.3.3 1;
|
||||||
|
}
|
||||||
|
# see above.
|
||||||
|
ctl.ttable {
|
||||||
|
type hw;
|
||||||
|
card AudioKontrol1;
|
||||||
|
}
|
7
audio/README.MD
Normal file
7
audio/README.MD
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# Scripts to configure audio devices in Linux
|
||||||
|
|
||||||
|
## 7.1. Remapping
|
||||||
|
Remaps a 5.1 surround sound card to 3 individual stereo devices.
|
||||||
|
|
||||||
|
## Audio Kontrol 1
|
||||||
|
How to get the Audio Kontrol 1 by NI to work.
|
Loading…
Reference in New Issue
Block a user