jack_connect w/ libasound_module_pcm_jack.so...?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

jack_connect w/ libasound_module_pcm_jack.so...?

jackdevel
Hello,

Here's the short version of my question:

Can I use jack_connect (or similar) to clone a stereo channel that's
currently being output on a particular jack output to one or more
additional jack outputs if the input is coming from Alsa's "jack
plugin" (libasound_module_pcm_jack.so)?  I do not know what input to
use that jack_connect will accept...

Here's the long version of my question:

I am have two M-Audio Delta1010LT audio cards.  These cards have 8
analog outputs each.  So, I can drive up to 8 "rooms" (stereo pairs)
using these two cards.

I use jack to allow me to simultaneously play a different song to
each room.  This is because Alsa by itself hogs the whole card and
will only let me play one room at a time.

Full configs appear at the bottom of this message...  Basically I
use Alsa's "multi plugin" to allow the two cards to be treated as
one, then I use Alsa's "jack plugin" (libasound_module_pcm_jack.so)
to allow Alsa aware apps like aplay to route audio through jack for
the actual playback.  This allows me to do something like:

  #
  # load Alsa and set volume %50
  #
  /etc/init.d/alsa reload              # volume set 0
  for h in $(seq 0 1) ; do             # 2 cards
    for d in $(seq 0 7) ; do           # 8 DACs per card
      amixer -D hw:$h set DAC,$d 50%   # volume set 50%
    done
  done

  #
  # load Jack
  #
  jackd -R -d alsa -P multi_playback -r 44100 &


  #
  # play different songs to multiple rooms simultaneously
  #
  aplay -Droom1 song_01.wav &
  aplay -Droom2 song_02.wav &
  aplay -Droom3 song_03.wav &
  # etc...

I would like to say to jack to do something like: "what's currently
on room1 should also be sent to room2 and room3".

Thanks!

PS -

I'm running Debian etch w/:

  jackd_0.102.20-1
  libasound2_1.0.13-2
  libasound2-plugins_1.0.13-3
  linux-image-2.6.18-3-686

Here's what jack_lsp shows:

  alsa_pcm:playback_1
  alsa_pcm:playback_2
  alsa_pcm:playback_3
  alsa_pcm:playback_4
  alsa_pcm:playback_5
  alsa_pcm:playback_6
  alsa_pcm:playback_7
  alsa_pcm:playback_8
  alsa_pcm:playback_9
  alsa_pcm:playback_10
  alsa_pcm:playback_11
  alsa_pcm:playback_12
  alsa_pcm:playback_13
  alsa_pcm:playback_14
  alsa_pcm:playback_15
  alsa_pcm:playback_16

My /etc/asound.conf looks like this:

# -------------------------------------------

pcm.multi_capture {
  type multi
  slaves.a.pcm hw:0
  slaves.a.channels 12
  slaves.b.pcm hw:1
  slaves.b.channels 12

# First 8 channels of first soundcard (capture)
  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave a
  bindings.1.channel 1
  bindings.2.slave a
  bindings.2.channel 2
  bindings.3.slave a
  bindings.3.channel 3
  bindings.4.slave a
  bindings.4.channel 4
  bindings.5.slave a
  bindings.5.channel 5
  bindings.6.slave a
  bindings.6.channel 6
  bindings.7.slave a
  bindings.7.channel 7

# First 8 channels of second soundcard (capture)
  bindings.8.slave b
  bindings.8.channel 0
  bindings.9.slave b
  bindings.9.channel 1
  bindings.10.slave b
  bindings.10.channel 2
  bindings.11.slave b
  bindings.11.channel 3
  bindings.12.slave b
  bindings.12.channel 4
  bindings.13.slave b                                                                        
  bindings.13.channel 5                                                                      
  bindings.14.slave b
  bindings.14.channel 6
  bindings.15.slave b
  bindings.15.channel 7
}

ctl.multi_capture {
  type hw
  card 0
}

pcm.multi_playback {
  type multi
  slaves.a.pcm hw:0
  slaves.a.channels 10
  slaves.b.pcm hw:1
  slaves.b.channels 10

# First 8 channels of first soundcard (playback)
  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave a
  bindings.1.channel 1
  bindings.2.slave a
  bindings.2.channel 2
  bindings.3.slave a
  bindings.3.channel 3
  bindings.4.slave a
  bindings.4.channel 4
  bindings.5.slave a
  bindings.5.channel 5
  bindings.6.slave a
  bindings.6.channel 6
  bindings.7.slave a
  bindings.7.channel 7

# First 8 channels of second soundcard (playback)
  bindings.8.slave b
  bindings.8.channel 0
  bindings.9.slave b
  bindings.9.channel 1
  bindings.10.slave b
  bindings.10.channel 2
  bindings.11.slave b
  bindings.11.channel 3
  bindings.12.slave b
  bindings.12.channel 4
  bindings.13.slave b
  bindings.13.channel 5
  bindings.14.slave b
  bindings.14.channel 6
  bindings.15.slave b
  bindings.15.channel 7
}

ctl.multi_playback {
  type hw
  card 0
}


pcm.room1 {
  type plug
  slave { pcm "jack1" }
}
pcm.jack1 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_1
    1 alsa_pcm:playback_2
  }
}
pcm.room2 {
  type plug
  slave { pcm "jack2" }
}
pcm.jack2 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_3
    1 alsa_pcm:playback_4
  }
}
pcm.room3 {
  type plug
  slave { pcm "jack3" }
}
pcm.jack3 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_5
    1 alsa_pcm:playback_6
  }
}
pcm.room4 {
  type plug
  slave { pcm "jack4" }
}
pcm.jack4 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_7
    1 alsa_pcm:playback_8
  }
}

pcm.room5 {
  type plug
  slave { pcm "jack5" }
}
pcm.jack5 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_9
    1 alsa_pcm:playback_10
  }
}
pcm.room6 {
  type plug
  slave { pcm "jack6" }
}
pcm.jack6 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_11
    1 alsa_pcm:playback_12
  }
}
pcm.room7 {
  type plug
  slave { pcm "jack7" }
}
pcm.jack7 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_13
    1 alsa_pcm:playback_14
  }
}
pcm.room8 {
  type plug
  slave { pcm "jack8" }
}
pcm.jack8 {
  type jack
  playback_ports {
    0 alsa_pcm:playback_15
    1 alsa_pcm:playback_16
  }
}


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel