Alsa: how to duplicate a stream on 2 outputs and save system configs?

Viewed 8789

My sound card is Audigy SE [SB0570].

I want to play the same stereo stream not only on speakers but on headphones too, simultaneously.

I try this config on my empty ~/.asoundrc

pcm.quad {
    type multi

    slaves.a.pcm "hw:0,0" #green hole
    slaves.a.channels 2
    slaves.b.pcm "hw:0,2" #black hole
    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
}

pcm.!default quad

and it works just as I want. But sharing channel between many streams is broken now and I can't play 2 mp3 files at the same time.

By the way /etc/asound.conf is empty too. I don't know where is the real system alsa configs are, may be this /var/lib/alsa/asound.state fat extremely hard understandable with 4705 lines and hundreds of control.## blocks.

1 Answers
Related