Audio config: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Install jackd1 (not jackd2 since it depends on dbus, meh). | Install jackd1 (not jackd2 since it depends on dbus, meh). | ||
Make sure to enable rtprio and memlock permissions, the jackd installer on debian asks for this. | |||
Put this in /etc/environment | Put this in /etc/environment | ||
<pre><nowiki> | <pre><nowiki> | ||
export JACK_PROMISCUOUS_SERVER="" | export JACK_PROMISCUOUS_SERVER="" | ||
</nowiki></pre> | </nowiki></pre> | ||
Make a new file /root/jackd_start, chmod to 755 and put this in it: | |||
<pre><nowiki> | <pre><nowiki> | ||
#!/bin/ | #!/bin/bash | ||
#make sure jackd is terminated when this script ends | |||
cleanup() | |||
{ | |||
killall jackd | |||
exit 0 | |||
} | |||
trap cleanup SIGINT | |||
trap cleanup SIGTERM | |||
# | #JACK_PROMISCUOUS_SERVER is exported here and in /etc/environment | ||
#this tells jackd and libjack to use /dev/shm/jack instead of /dev/shm/jack-<uid> | |||
#and to set the permissions to 777, however umask needs to be set to 0 first | |||
export JACK_PROMISCUOUS_SERVER="" | |||
#allow rtprio and mem locking | |||
ulimit -l unlimited | |||
ulimit -r 95 | |||
#start jackd with -l passed to su to make the environment a login shell, restart when it dies | |||
while [ 1 ] | |||
do | |||
su -l -c "mkdir ~/.jackd; umask 0; jackd -R -d alsa -d jack51 -r 48000 -p 1024 -n 2 -i 2 -o 6 2>&1 | tee ~/.jackd/jackd.log" || true | |||
sleep 1 | |||
done | |||
</nowiki></pre> | |||
Put this in /etc/rc.local | |||
<pre><nowiki> | |||
/root/jackd_start& | |||
</nowiki></pre> | |||
At the top of /etc/init.d/mpd change | |||
<pre><nowiki> | |||
#!/bin/sh | |||
</nowiki></pre> | |||
to | |||
<pre><nowiki> | |||
#!/bin/bash | |||
</nowiki></pre> | |||
Then change | |||
<pre><nowiki> | |||
# Exit if the package is not installed | |||
[ -x "$DAEMON" ] || exit 0 | |||
exit 0 | |||
</nowiki></pre> | </nowiki></pre> | ||
into | |||
<pre><nowiki> | <pre><nowiki> | ||
# | # Exit if the package is not installed | ||
[ -x "$DAEMON" ] || exit 0 | |||
# | #JACK_PROMISCUOUS_SERVER is exported here and in /etc/environment | ||
#this tells jackd and libjack to use /dev/shm/jack instead of /dev/shm/jack-<uid> | |||
#and to set the permissions to 777 | |||
export JACK_PROMISCUOUS_SERVER="" | |||
# | #allow rtprio and mem locking | ||
ulimit -l unlimited | |||
ulimit -r 95 | |||
</nowiki></pre> | </nowiki></pre> | ||
Use this /etc/asound.conf file | Use this /etc/asound.conf file | ||
<pre><nowiki> | <pre><nowiki> | ||
ctl.jack51 { | ctl.jack51 { | ||
type hw | type hw | ||
card 0 | #card 0 | ||
card Audigy | |||
} | } | ||
Line 185: | Line 86: | ||
# route for mmap workaround | # route for mmap workaround | ||
type plug | type plug | ||
slave.pcm "surround51:CARD=Audigy" | |||
slave.pcm "surround51" | #slave.pcm "surround51" | ||
slave.channels 6 | slave.channels 6 | ||
route_policy duplicate | route_policy duplicate | ||
Line 193: | Line 94: | ||
# 2 channels only | # 2 channels only | ||
type hw | type hw | ||
card 0 | #card 0 | ||
card Audigy | |||
} | } | ||
} | } | ||
</nowiki></pre> | </nowiki></pre> |
Revision as of 17:47, 2 September 2012
Install jackd1 (not jackd2 since it depends on dbus, meh). Make sure to enable rtprio and memlock permissions, the jackd installer on debian asks for this.
Put this in /etc/environment
export JACK_PROMISCUOUS_SERVER=""
Make a new file /root/jackd_start, chmod to 755 and put this in it:
#!/bin/bash #make sure jackd is terminated when this script ends cleanup() { killall jackd exit 0 } trap cleanup SIGINT trap cleanup SIGTERM #JACK_PROMISCUOUS_SERVER is exported here and in /etc/environment #this tells jackd and libjack to use /dev/shm/jack instead of /dev/shm/jack-<uid> #and to set the permissions to 777, however umask needs to be set to 0 first export JACK_PROMISCUOUS_SERVER="" #allow rtprio and mem locking ulimit -l unlimited ulimit -r 95 #start jackd with -l passed to su to make the environment a login shell, restart when it dies while [ 1 ] do su -l -c "mkdir ~/.jackd; umask 0; jackd -R -d alsa -d jack51 -r 48000 -p 1024 -n 2 -i 2 -o 6 2>&1 | tee ~/.jackd/jackd.log" || true sleep 1 done
Put this in /etc/rc.local
/root/jackd_start&
At the top of /etc/init.d/mpd change
#!/bin/sh
to
#!/bin/bash
Then change
# Exit if the package is not installed [ -x "$DAEMON" ] || exit 0
into
# Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 #JACK_PROMISCUOUS_SERVER is exported here and in /etc/environment #this tells jackd and libjack to use /dev/shm/jack instead of /dev/shm/jack-<uid> #and to set the permissions to 777 export JACK_PROMISCUOUS_SERVER="" #allow rtprio and mem locking ulimit -l unlimited ulimit -r 95
Use this /etc/asound.conf file
ctl.jack51 { type hw #card 0 card Audigy } pcm.jack51 { # "asym" allows for different # handling of in/out devices type asym playback.pcm { # route for mmap workaround type plug slave.pcm "surround51:CARD=Audigy" #slave.pcm "surround51" slave.channels 6 route_policy duplicate } capture.pcm { # 2 channels only type hw #card 0 card Audigy } }