[pulseaudio-discuss] Toslink capture looback latency problem
NicoHood
pulseaudio-discuss at nicohood.de
Mon Jan 29 14:52:57 UTC 2018
On 01/29/2018 03:29 PM, Georg Chini wrote:
> On 29.01.2018 14:44, NicoHood wrote:
>> On 01/29/2018 01:39 PM, Georg Chini wrote:
>>> On 29.01.2018 12:52, Nico wrote:
>>>> Hi,
>>>> I want to capture the audio stream of my TV with my PCI-E Toslink sound
>>>> card and play it back on my usb XLR soundcard. The reason why I do that
>>>> is to use my own music boxes rather than the TV speakers. With
>>>> toslink +
>>>> XLR I do not have problems with ground loops etc.
>>>>
>>>> I am using the pulseaudio loopback module with its default
>>>> configuration. The problem is, that the delay between picture and sound
>>>> is about one second off, and the longer I wait, the more delay it gets
>>>> (30 seconds and more). It is no usable like this.
>>>>
>>>> I tried to play with the latencies of source, sink and the tv delay
>>>> itself without sucess. I also tried streaming with pacat directly as
>>>> described here:
>>>> https://thelinuxexperiment.com/fix-pulseaudio-loopback-delay/
>>>>
>>>> I also tried to change different parameters of the loopback module or
>>>> the sources/sinks, but that did not help. I never changed any global
>>>> pulseaudio config to avoid larger configuration issues. The CPU
>>>> usage of
>>>> pulseaudio is at 3% with the loopback module
>>>>
>>>> Can anyone help me to get rid of this lag?
>>>>
>>> Hi Nico,
>>>
>>> which version of PA are you using? Can you provide logs?
>>>
>>> Regards
>>> Georg
>>>
>> Hi Georg,
>> oh sure I completely forgot:
>>
>> pulseaudio 11.1-1 (Arch Linux)
>> uname -a: Linux zebes 4.14.15-1-ARCH #1 SMP PREEMPT Tue Jan 23 21:49:25
>> UTC 2018 x86_64 GNU/Linux
>>
>> Here is a logfile:
>> LANG=C pulseaudio -vvvv --log-time=1 > ~/pulseverbose.log 2>&1
>> https://gist.github.com/NicoHood/85976f426e1621e599253ee1a95230dd
>>
>> Regards
>> Nico
>
> This is weird. It looks like the source sample rate is so much higher
> than the sink rate that module-loopback can't adapt. No idea why
> this happens. Does it work with another input?
>
>
I've tested it also with the builtin front microphone input (2nd
revision on gist) and with the PCIE Analog line in (3rd gist revision).
You can view the changes here:
https://gist.github.com/NicoHood/85976f426e1621e599253ee1a95230dd/revisions
The problem only occurs with the digital, optical TOSLINK input from my
Samsung TV. For some other reason the sound distortion for the analog
input is now (temporary) gone. However I still want to get that TOSLINK
running :/
More information about the pulseaudio-discuss
mailing list