2

I'm a musician and I'm new to PI/Raspbian/Linux. I'm using a Raspberry PI 2 with Pure Data (PD) for a multichannel audio installation. I have one 5.1 USB soundcard (6 channels) but for my installation I need 8 output channels, so I need to add another USB sound card (normal, stereo, 2 channels) and create a virtual device that can control both cards.

Both sound cards are detected and work with my Raspberry PI 2. I have tried to combine these two using ALSA instructions for modifying the asoundrc file ($ nano .asoundrc).

http://www.alsa-project.org/main/index.php/Asoundrc

However, after spending hours on this, I don't know if I'm missing something but the virtual device doesn't show up on the list of devices when I open Pure Data (I'm only opening it with the command: $ pd-extended). I have tried to install Pulseaudio and Jack, but everything just got more complicated and I had no success.

This is how my asoundrc file looks like:

pcm.multi {
        type multi;
        slaves.a.pcm "hw:1,0";
        slaves.a.channels 6;
        slaves.b.pcm "hw:2,0";
        slaves.b.channels 2;
        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;
        #second soundcard
        bindings.6.slave b; 
        bindings.6.channel 6;
        bindings.7.slave b;
        bindings.7.channel 7;
}
ctl.multi {
        type hw;
        card 0;
}
pcm.ttable {
        type route;
        slave.pcm "multi";
         slave.channels 8;
    ttable.0.0 1;
    ttable.1.1 1;
    ttable.2.2 1;
    ttable.3.3 1;
    ttable.4.4 1;
    ttable.5.5 1;
    ttable.6.6 1;
    ttable.7.7 1;

ctl.ttable {
        type hw;
        card 0;
}

And this is what I have if I execute $aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Device_1 [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And my devices are ($ cat /proc/asound/cards):

 0 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 1 [Device         ]: USB-Audio - USB Sound Device
                      USB Sound Device at usb-3f980000.usb-1.2, full speed
 2 [Device_1       ]: USB-Audio - USB PnP Sound Device
                      C-Media Electronics Inc. USB PnP Sound Device at usb-3f980000.usb-1.3, full spe

When I open Pure Data I'm selecting ALSA and in Audio Settings I can't see any virtual device called "multi". Is there any other way I can test this virtual multichannel device?

What should I do from here? Do you have any other suggestions? I'm completely lost and any help will be appreciated. Thanks!

migrated from raspberrypi.stackexchange.com Jan 6 '16 at 16:38

This question came from our site for users and developers of hardware and software for Raspberry Pi.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy