Help configuring different bitrates/delays out of 2 soundcards

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

 



Hi list,

First post here.

I have a problem. I have a atom/Ion based htpc and want to use HDMI and 
SPDIF on the Ion to output 2 channels. I have configured everything with 
the asound.conf file below and I get audio out of both HDMI and SPDIF 
nicely. I have two problems:

1) Audio is timed differently through the two interfaces. I'd like to 
add a hundred or so milliseconds delay to both channels of one of the 
outputs. Is there a way of doing this to get the two outputs in sync?

2) The HDMI output can only handle 48kHz output, the SPDIF can handle 
44.1kHz or 48kHz. I want to be able to output bit-perfect 44.1 out of 
the SPDIF port when playing CDs. The SPDIF port will output 44.1kHz if I 
output to it alone (with a different config file), but the whole 
playback chain defaults to 48kHz as soon as the HDMI is used, no matter 
what sampling rate the source material has. Is there a way of getting a 
44.1kHz signal out of the SPDIF port whilst replicating and sample rate 
converting it to 48kHz out through the HDMI port?

Many thanks

Andy

-- asound.conf file:

#
# Define the "2ip_to_4op" port
#   Here it is a router that takes 2 input channels
#   and routes them to 4 output channels for the pcm.multi pcm to take
#   It defines a 4 channel output with the slave command
#   and then routes channel 0 input to channel 0 & 2 output
#   and routes channel 1 to outputs 1 and 3
#   all with a unitary gain
#
pcm.2ip_to_4op {
         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
}

#
# Define the S/PDIF output (hw:0,1) as "digital_1"
pcm.digital_1 {
         type hw
         card 0
         device 1
         channels 2
}

#
# Define the HDMI output (hw:0,3) as "digital_2"
pcm.digital_2 {
         type hw
         card 0
         device 3
         channels 2
}

#
# Define the multi process which takes it's 4 channel input from
# the "2ip_to_4op" pcm process. The device type plugin is a multi
# and defines two slave outputs (a and b). It then binds channels 0
# and 1 to slave.a channels 0 and 1 and binds channels 2 and 3 to
# slave.b channels 0 and 1.
#
pcm.multi {
         type multi
         slaves.a {
                 pcm "digital_1"
                 channels 2
         }

         slaves.b {
                 pcm "digital_2"
                 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
}

------------------------------------------------------------------------------
_______________________________________________
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