I have a Raspberry Pi 3, with OSMC installed as its OS.

I used to have audio through HDMI and the 3.5mm jack at the same time, allowing me to either listen through the speakers of a TV, or through headphones, without the need to change the settings. However, since the 3.5mm jack produces too much hissing noise, I decided to buy a cheap USB dongle.

My question is how can I reroute audio to be outputted both through HDMI and the USB card simultaneously.

1 Answer 1


You can do this whether you are using a GPIO sound card or USB sound card. It may be better to use a GPIO sound card short list here, because it will have less latency then blocking out to USB using UAC2... But that remains to be seen.

Before I launch into how to implement this, have you considered using a sound card with both headphones and RCA outputs? If you are happy to take input to your TV from the RCA jacks, that may be neater, with fewer clock drift and format problems. Some of the listed GPIO sound cards have that feature.

You need to create an asoundrc which copies audio to both sound cards using ttable.

pcm.!default plug:both

pcm.both {
  type route;
  slave.pcm {
      type multi;
      slaves.a.pcm "card0";
      slaves.b.pcm "card1";
      slaves.a.channels 2;
      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;

  ttable.0.0 1; # Map card 0 ch0 to ch0
  ttable.1.1 1; # Map card 0 ch1 to ch1

  ttable.0.2 1; # copy audio from 0 to card 1 first ch at full vol.
  ttable.1.3 1; # copy audio from 1 to card 1 second ch at full vol.

Beware as you may get clock drift between the cards and various other formatting issues. To get around this, investigate using plughw as the device when defining the card in the slaves.a.pcm line and equivalent for b. Something like plughw:CARD=card0,DEV=0 where card0 is your actual card. This info can be found using the aplay -L command.

  • Thanks for your answer, but I have already bought a USB sound dongle (or what it's called), so a GPOI sound card is out of the question. I will try this to check if it works with the USB sound dongle.
    – gertab
    Sep 28, 2016 at 14:23
  • Just to add a note. I have an old USB nuForce uDAC that has 3.5mm headphone out and also rca outs. It puts out pretty nice sound and you cam probably find one for $20
    – pathfinder
    May 22, 2018 at 5:48
  • Would this also work for simultaneous audio through TRRS + HDMI (and maybe even Bluetooth, if a device is connected)? If so, what settings would I need to make for that? Should that be beyond the scope of a comment, let me know and I’ll make it a question.
    – user149408
    Jan 21 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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