Re: (no subject)

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

 



On Monday 18 May 2009, Johan Bakker wrote:

> The problem is that i cannot output sound to HDMI and SPDIF simultaniously. 
> I tried .asoundrc with the copy and multi plugin but had no luck.
> 
> Is it possible to play sound on both devices simultaniously?

in principle it should be. Have you tried something like the 
.asoundrc in attach?

(found it somewhere on the 'net, perhaps on the MythTV WiKi or 
something like that).

I have tried a similar config and (as far as I kept the same rate
on both outputs) it worked. I only had problem trying to resample
at different rates the different "duplicate" outputs.


Ciao,
                                Paolo.

--
You can still escape from the GATES of hell: Use Linux!
#ALSA Configuration (In Depth)
#
# I finally had a reason to get into ALSA in more depth, so this page will summarize what I learned as well as 
# describe my dual card setup.... but not right now, b/c I am tired :). For now I am just dropping random bits 
# of info here. 
# Current setup in /etc/asound.conf 
# Here is a diagram of what this config does:
#
#                                                                           'nforce'              nForce2,0
#                                                  4-channel             _______________         ____________
#             SOFTVOL               ROUTE            MULTI          0L  |     PLUG      |       |            |
#          ______________         __________       _________   /------->|    convert    |------>|            |
#   0L    |              |  0L   |          |  0L |         | /         | rate & format |       | Sound card |
# ------->|   Software   |------>|\---------|---->|---------|-      1R  |    for HW     |       |            |
#         |    volume    |       | \        |     |         |  /------->|               |------>|            |
#   1R    |  attenuation |  1R   |  \       |  1R |         | /         |_______________|       |____________|
# ------->|              |------>|---\------|---->|---------|-           _______________
#         |______________|       |\   \     |  2L |         |       0L  |     PLUG      |        ____________
#            'softvol'           | \   \----|---->|---------|---------->|    convert    |------>|            |
#                                |  \       |  3R |         |       1R  | rate & format |       | Sound card |
#                                |   \------|---->|---------|---------->|     for HW    |------>|            |
#                                |__________|     |_________|           |_______________|       |____________|
#                                   'both'          'multi'               'audiophile'             M2496,0
#                               
#

################################################## BEGIN ##################################################

# Give our cards friendly aliases. Note that we are wrapping the cards with 'plug' plugin
# in order to perform automatic conversion of the stream from the original format into 
# the format suitable for each individual card.
#
pcm.nforce "plughw:nForce2,0"
pcm.audiophile "plughw:M2496,0"

pcm.!default main_device

# 'asym' plugin allows us to create assymetrical devices which have different 
# interfaces handling playback and recording streams.
# This configuration ensures that playback is sent through the complicated routing,
# but recording streams are fetched directly from Audiophile
#
pcm.main_device {
        type asym
        playback.pcm "softvol"
        capture.pcm "audiophile"
}

# This device acts as a software volume control
pcm.softvol {
    type            softvol
    slave {
        pcm         "both"
    }
    control {
        name        "SoftMaster"        # This is the name of the mixer control
        card        M2496
    }
}

# Here we are using the 'route' plugin to send the signal unchanged to a 
# 4-channel device. Since the incoming stream is only 2-channel, we use
# the transfer table to copy channel 0 slave's input channel 0, 
# channel 1 to slave's 1, and again channel 0 to slave's 2 and channel 1
# to slave's 3. The last column (1.0) is the volume, which we are leaving unchanged
#
pcm.both {
        type route
        slave {
                pcm multi
                channels 4
        }
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
}

# 'multi' plugin allows us to create many slave devices and then distribute the stream's
# channels between the slaves.
# Here we define Slave a for the nforce card (headphones) and Slave b for the Audiophile.
# Then we use channel binding to send channels 0 and 1 to the headphones and channels
# 2 and 3 to the speakers
#
pcm.multi {
        type multi
        slaves.a {
                pcm "nforce"
                channels 2
        }
        slaves.b {
                pcm "audiophile"
                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.dsp0 {
    type plug
    slave.pcm "softvol"
}

ctl.main_device {
    type hw
    card M2496
}
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
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