Author Topic: Default jack2alsa/alsa2jack connections  (Read 9903 times)

0 Members and 1 Guest are viewing this topic.

Offline ehjay

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • AVLinux User
Default jack2alsa/alsa2jack connections
« on: November 23, 2016, 12:30:30 PM »
I had a tough time getting jack to connect by default to alsa the way I needed.   My default recording device has 34 channels.  Channels 33 & 34 are the "mixed" output of 32 channel mixer and I want to have those 2 channels be the default alsa channels.  At first I thought the trick was to create a patch with my desired routing and enable it by default along with the flag in qjackqtl which clears the existing routing.  However, since and associated scripts have delays built into them, the default routing shows up after the patch bay has been loaded. This means that the jack2alsa device has connections to 33,34 and 1,2.  I instead copied and modified start_jackutils and aloop_daemon to make the default connection that I wanted:

  jack_connect(client, "system:capture_33", "jack2alsa:playback_1")
  jack_connect(client, "system:capture_34", "jack2alsa:playback_2")

I am not a big fan of modifying code to configure a system.  I'd like to propose that aloop_daemon use a config file to configure these connections.  Say, /etc/aloopd.conf
An example in xml (comments desired)
  <playback channel="1">system:capture_33</playback>
  <playback channel="2">system:capture_34</playback>

I could potentially make the modifications to aloop_daemon to support this and post it.

Or maybe it is better that aloop_daemon doesn't make any connections at all, requiring the user to configure the patch bay for those connections.