Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a way to create a virtual sound device in Linux, which would use channel outputs of my sound card.

I have no experience in Linux and therefore am asking more experienced users for help. I have latest Ubuntu Desktop 10.10 installed on my VirtualBox machine. What I want to do is to be able to create multiple virtual audio devices and then configure them to use different output channels of my M-Audio ProFire 610 sound card. The reason I want to do it is that I will use these devices in Java afterwards, and Java doesn't support directly selecting channels in the sound card, therefore I need to do it outside of Java.

In OS X I can do this by messing arround with Audio MIDI Setup utility, maybe there is something ready made for Linux, too? This is how it looks on OS X:

enter image description here

enter image description here

I am looking for any help, hints, tips - well anything that will help me achieve this.

share|improve this question
    
How you do it depends a lot on which version of Ubuntu (9.xx, 10.xx) you are running. Could you clarify? I am assuming you are just interested in audio devices, not MIDI. –  jwernerny Feb 24 '11 at 17:59
    
Thank you for your comment. I installed Ubuntu Desktop Edition 10.10 64bit, which I downloaded from the official website. After installation it went online and downloaded nearly 600mb of updates, too. –  rkrv. Feb 25 '11 at 8:45
    
please uncheck the definitive answer, it is now void of content - the link there is dead. –  cipricus May 11 at 18:28

1 Answer 1

up vote 1 down vote accepted

You will have to edit ALSA configuration files in order to achieve this, which unfortunately involves a significant amount of black magic.

Here's an example taken from the ALSA wiki showing how to split a card's front and rear stereo outputs into two independent audio devices:

pcm.dshare {
    type dmix
    ipc_key 2048
    slave {
        pcm "hw:0"
        rate 44100
        period_time 0
        period_size 1024
        buffer_size 8192
        channels 4
    }
    bindings {
        0 0
        1 1
        2 2
        3 3
    }
}
pcm.frontx {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.0 1
    ttable.1.1 1
}
pcm.rearx {
    type plug
    slave {
        pcm "dshare"
        channels 4
    }
    ttable.0.2 1
    ttable.1.3 1
}
share|improve this answer
    
Maybe you know if Ubuntu Desktop Edition 10.10 64bit comes with ALSA already installed? –  rkrv. Mar 21 '11 at 11:59
    
@rkrv.: These days ALSA is the only method for playing audio under Linux. There are other alternative access methods (OSS, JACK, etc.) but they all sit on top of ALSA. So yes, it's already installed :-) –  Malvineous Mar 22 '11 at 10:21
    
please add details to your answer, which was marked as definitive. as it is, it is void, because the link is dead –  cipricus May 11 at 18:21
    
@cipricus: I have updated the external link and included the relevant content in my answer too. Hope this helps. –  Malvineous Jun 6 at 9:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.