Really confused about merging devices by .asoundrc

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
dewdrop_world
Established Member
Posts: 36
Joined: Mon Aug 09, 2010 10:17 pm
Location: Guangzhou, China
Contact:

Really confused about merging devices by .asoundrc

Post by dewdrop_world »

Trying to figure out how to use asoundrc to merge two "virtual" USB audio devices that live in the same card (M-Audio fast track pro). It has four output channels, but exposes them to alsa is a pair of stereo devices hw:1,0 and hw:1,1.

As of now .asoundrc reads like this:

Code: Select all

pcm.!default {
    type plug
    slave { pcm "jack" }
}

pcm.jack {
    type jack
    playback_ports {
        0 alsa_pcm:playback_1
        1 alsa_pcm:playback_2
    }
    capture_ports {
        0 alsa_pcm:capture_1
        1 alsa_pcm:capture_2
    }
}

pcm.merge {
    type multi;
    slaves.a.pcm "hw:1,0";
    slaves.a.channels 2;
    slaves.b.pcm "hw:1,1";
    slaves.b.channels 2;
    bindings.0.slave a;
    bindings.0.channel 0;
    bindings.1.slave a;
    bindings.1.channel 1;
    bindings.2.slave b;
    bindings.2.channel 0;
    bindings.3.slave b;
    bindings.3.channel 1;
}

ctl.merge {
    type hw
    card 0
}
But I'm not sure what to do in qjackctl to convince jack to use the merge device. Setting it as the output device (-P) fails pretty hard:

Code: Select all

JackAudioDriver::ProcessSync: read error, skip cycle
JackAudioDriver::ProcessSync: read error, skip cycle
JackAudioDriver::ProcessSync: read error, skip cycle
JackAudioDriver::ProcessSync: read error, skip cycle
JackAudioDriver::ProcessSync: read error, skip cycle
JackAudioDriver::ProcessSync: read error, skip cycle
JackAudioDriver::ProcessSync: read error, skip cycle
Unknown request 4294967295
jackd: ../common/JackGraphManager.cpp:45: void Jack::JackGraphManager::AssertPort(jack_port_id_t): Assertion `port_index < fPortMax' failed.
jackd: no process found
16:23:05.146 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = Connection refused
Cannot connect to server socket
jack server is not running or cannot be started
http://jackaudio.org/multiple_devices (the source of the pcm.merge definition) cleverly omits the Jack configuration itself.

http://www.alsa-project.org/main/index.php/Asoundrc recommends something about a ttable device (?? -- if this is necessary, why does the Jack page not mention it?) and suggests the command:

Code: Select all

jackd [-a] -R [-v] -d alsa -d ttable [-p 1024]
I adapt for my case:

Code: Select all

jackd -S -P60 -dalsa -d merge
... and get the same stream of ProcessSync errors, followed by a failed assertion.

Sorry if this is basic, but I don't know enough to know if the problem is in asoundrc or the Jack configuration.

Thanks,
James
dewdrop_world
Established Member
Posts: 36
Joined: Mon Aug 09, 2010 10:17 pm
Location: Guangzhou, China
Contact:

Re: Really confused about merging devices by .asoundrc

Post by dewdrop_world »

For other people's future reference: This could be either a kernel bug in 10.04 that's fixed in 12.04, or a firmware bug in the Intel USB controller.
Post Reply