Duplicating audio output while maintaining 7.1 output.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a .asoundrc on my media server that outputs 7.1 over HDMI
(Nvidia g220) that's worked great but now I want to also send audio to
ffserver so I can listen to any audio playing on the media server from
other devices (phone and my AV receiver) in other areas as well.

The current .asoundrc is:

### Begin Dump ###
pcm.!default {
        type hw
        card 1
        device 7
}

ctl.!default {
        type hw
        card 1
}
### End Dump ###

And on my desktop (which doesn't require special card # and device #
to be specified) I used this to test out ffserver to get audio to my
phone and receiver in another room:

### Begin Dump ###
pcm.!default {
  type asym
  playback.pcm "LoopAndReal"
  capture.pcm "hw:0,0"
}

pcm.LoopAndReal {
  type plug
  slave.pcm mdev
  route_policy "duplicate"
}

pcm.mdev {
  type multi
  slaves.a.pcm pcm.MixReale
  slaves.a.channels 2
  slaves.b.pcm pcm.MixLoopback
  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.MixReale {
  type dmix
  ipc_key 1024
  slave {
    pcm "hw:0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
  }
}

pcm.MixLoopback {
  type dmix
  ipc_key 1025
  slave {
    pcm "hw:Loopback,0,0"
    rate 48000
    #rate 44100
    periods 128
    period_time 0
    period_size 1024 # must be power of 2
    buffer_size 8192
  }
}
### End Dump ###



So my question is, how do I preserve a 7.1 output to over HDMI but
downmix audio to 2 channels for sending to ffserver?  I saw one
.asoundrc that had all sorta of additional bindings.(0-5) and table
work for 5.1 output but that's a little over my skill level with alsa.

Does a 7.1 have to have all sorta of extra bindings and table work for
8 channel output on one of the devices or is there a easier way to
keep the .asoundrc simple and just have to specify "keep output
working like it has been but also duplicate the audio"?

Thanks.

Brandon

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux