I didn't want to clog up the IRC with this...

Here are some of the things I have learned about jack_control and how it works. Here is a list of what commands it understands:
Usage: jack_control [command] [command] ...
Commands:
exit - exit jack dbus service (stops jack server if currently running)
    help                       - print this help text
status - check whether jack server is started, return value is 0 if running and 1 otherwise start - start jack server if not currently started
    stop                       - stop jack server if currently started
sm - switch master to currently selected driver
    dl                         - get list of available drivers
    dg                         - get currently selected driver
    ds <driver>                - select driver
dp - get parameters of currently selected driver
    dpd <param>                - get long description for driver parameter
    dps <param> <value>        - set driver parameter
dpr <param> - reset driver parameter to its default value
    asd <driver>               - add slave driver
    rsd <driver>               - remove slave driver
    il                         - get list of available internals
    ip <name>                  - get parameters of given internal
ipd <name> <param> - get long description for internal parameter
    ips <name> <param> <value> - set internal parameter
ipr <name> <param> - reset internal parameter to its default value
    iload <name>               - load internal
    iunload <name>             - unload internal
    ep                         - get engine parameters
    epd <param>                - get long description for engine parameter
    eps <param> <value>        - set engine parameter
epr <param> - reset engine parameter to its default value

I spent some time looking at the output "get" forms of these commands as this tells you which params are available to change. The main commands that are used are the stop, start and exit commands which are obvious. The next most important command is sm. This is the last command to send after changing any parameters to make them take effect. For an example, here is the command that starts my jackdbus when I login:
---------------8<---------------
DELAY=1
DRIVER=alsa
DEV=hw:0
RATE=48000
FRAME=2048
PERIOD=2

#sleep $DELAY

jack_control ds $DRIVER dps device $DEV dps rate $RATE dps period $FRAME \
        dps nperiods $PERIOD start
-----------------8<--------------

I should be using DEV=hw:D66, Frame could be 1024 or even 512 on this machine. (I use 64 with PA still connected with no issues) USB,FW and AoIP should probably use PERIOD=3

I have made the settings variables for now with the idea that they may someday come from a config file or the environment. Notice the start is at the end after all the parameters are loaded. If I was changing these parameters "on the fly" then the start would be replaced by sm.

pretty simple. Basically, all the things jackd commandline can do jack_command can do too. Just a different syntax and the configuration is stored to a different place as well. So just going jack_control start will use the same settings as last run.

To change the latency on the fly, the command to use is jack_bufsize $FRAME

As with many things if the PA system files (in /etc) are changed there are errors when upgrading pulse because it notices the file has changed. I need to find out where I could add a file afterwards that would not interfere with upgrades.


--
Len Ovens
www.ovenwerks.net


--
ubuntu-studio-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-studio-devel

Reply via email to