Attaining sync with a multi output without using lsdspa

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

 



Hi :)

I'm not sure if my mails are getting through. I've posted one mail
before this via two emails, but I don't receive them from the list
mailer — I'm actually not receiving any mail from the list, but I
don't know if that's just because it's quiet ...

Either way, I apologize if they *are* getting through and I'm spamming!

If my previous mail did get through, then I can update that and say
that my multi output is now working.

If it didn't, here's my current setup:

I've set up an alsa config for a single PCM device playing back in 48
kHz on a USB dongle and 44.1 kHz on my onboard Intel SPDIF connector.

It works great except for one detail: The 48 kHz output is slightly
delayed compared to the 44.1 kHz output, I assume due to libsamplerate
being in the processing chain in the 48 kHz output.

I'd like to add a small delay to the 44.1 kHz output, and I've seen
some examples of introducing delays to a virtual device by using
lsdspa. However, according to LSDSPA docs, all processing is done in
32 bits, and I would really prefer to avoid any format conversion...

So, I was hoping to do it by perhaps increasing the buffer or
something like that on the SPDIF output, but I can't figure out how.
The ALSA docs for slave pcm state that "buffer_time" and "period_time"
are valid fields, but if I try to use them, I get an error like,
"(snd_pcm_slave_conf) Unknown field buffer_size".

I cannot use buffer_size and friends on the plug or the slave as
they're only valid for hw types...

Is there a way to do this?

Thanks in advance,
Daniel :)



My current .asoundrc:



# AKA Secret Rabbit Code resampler (best conversion, highest CPU utilization):
defaults.pcm.rate_converter samplerate_best

# Virtual PCM device for the NAD DAC with literal format and rate conversion:
pcm.nad {
        type plug
        hint {
                show on
                description "NAD DAC 1 via wireless USB dongle"
        }
        slave {
                pcm "hw:Headset,0"
                format S16_LE
                channels 2
                rate 48000
        }
}

# Virtual PCM device for Intel SPDIF with literal format and rate conversion:
pcm.aa2 {
        type plug
        hint {
                show on
                description "AudioAlchemy 2.0 via Intel SPDIF coax plug"
        }
        slave {
                pcm "hw:Intel,1"
                format S16_LE
                channels 2
                rate 44100
#               buffer_time 13405
#               period_time 16384
        }
}

# Virtual PCM device that outputs through both the NAD and Intel devices:
pcm.both plug:both_route
pcm.both_route {
        type route
        slave.pcm {
                type multi
                slaves.b.pcm aa2
                slaves.a.pcm nad
                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;
        ttable.1.1 1;
        ttable.0.2 1;
        ttable.1.3 1;
}

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
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