Thanks Maarten, that really makes the sample rate adjustment to not be
noticed by the listener.
Unfortunately, I still get the underrun issues. Here is a log snippet:
D: module-loopback.c: Loopback overall latency is 46.98 ms + 150.19 ms +
135.29 ms = 332.46 ms
D: module-loopback.c: Should buffer 23600 bytes, buffered at minimum 0 bytes
I: module-loopback.c: New rate of 43510 Hz not within 2â° of 44264 Hz,
forcing smaller adjustment
D: module-loopback.c: [alsa_output.pci-0000_00_1b.0.analog-stereo]
Updated sampling rate to 44175 Hz.
D: module-loopback.c: Loopback overall latency is 45.68 ms + 115.25 ms +
137.67 ms = 298.60 ms
D: module-loopback.c: Should buffer 23552 bytes, buffered at minimum 0 bytes
I: module-loopback.c: New rate of 43512 Hz not within 2â° of 44175 Hz,
forcing smaller adjustment
D: module-loopback.c: [alsa_output.pci-0000_00_1b.0.analog-stereo]
Updated sampling rate to 44086 Hz.
D: alsa-sink.c: Wakeup from ALSA!
I: module-loopback.c: Coud not peek into queue
I: module-loopback.c: Coud not peek into queue
I: module-loopback.c: Coud not peek into queue
I: module-loopback.c: Coud not peek into queue
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Requesting rewind due to end of underrun.
D: module-loopback.c: Loopback overall latency is 52.43 ms + 268.86 ms +
135.29 ms = 456.58 ms
D: module-loopback.c: Should buffer 23512 bytes, buffered at minimum 0 bytes
I: module-loopback.c: New rate of 43513 Hz not within 2â° of 44086 Hz,
forcing smaller adjustment
D: module-loopback.c: [alsa_output.pci-0000_00_1b.0.analog-stereo]
Updated sampling rate to 43997 Hz.
D: alsa-sink.c: Wakeup from ALSA!
Thanks,
Cristina
On 02/22/2011 04:23 PM, Maarten Bosmans wrote:
2011/2/22 Cristina Cristea<doina.crist...@gmail.com>:
Hi guys,
First of all, sorry if this problem has been discussed before. I'm new on
this list and haven't seen it on the archives.
Shortly, I'm experiencing small underruns when playing music from the phone
to my computer through bluetooth. At about every 5-6 minutes, the music
stops for 1-2 sec. and these messages are showed by pulseaudio:
D: protocol-native.c: Underrun on 'lt-pacat', 0 bytes in queue.
D: protocol-native.c: Requesting rewind due to end of underrun.
D: alsa-sink.c: Requested to rewind 65536 bytes.
D: alsa-sink.c: Limited to 44400 bytes.
D: alsa-sink.c: before: 11100
D: alsa-sink.c: after: 11100
D: alsa-sink.c: Rewound 44400 bytes.src-sinc-best-quality
D: sink.c: Processing rewind...
D: sink-input.c: Have to rewind 44400 bytes on render memblockq.
D: source.c: Processing rewind...
I am using pacat and paplay apps as follows: parec -r --format s16le
--channels 2 --rate 44100 | paplay -p
I also tried to redirect audio with module-loopback module: load-module
module-loopback source=bluez_source.00_23_76_E3_F3_C5
sink=alsa_output.0.analog-stereo
The results are still dissatisfactory:
-the CPU load is about 60%
-every 10 seconds, module-loopback is changing the sample rate which is not
so pleasant for the listener:
I: module-loopback.c: Loopback overall latency is 56.37 ms + 493.72 ms +
135.29 ms = 685.38 ms
I: module-loopback.c: Should buffer 23552 bytes, buffered at minimum 24288
bytes
I: module-loopback.c: Old rate 44167 Hz, new rate 44118 Hz
You can pass adjust_time=0 to module-loopback. This way the adjustment
is never made and if the source and sink have the same rates, no
resampling is necessary. The rate change from the log snippet above is
inaudible, so should not be unpleasant for the listener.
Without adjusting the rate, you will probably get the underruns every
5-6 minutes, just as in the pacat case. Can you try git master? At
least this commit
http://git.0pointer.de/?p=pulseaudio.git;a=commit;h=8b4cb54595baeeb1d9b7d11a842ef7946e43a55a
should make the experience with module-loopback a bit better. (without
adjust_time=0)
-underruns are still showing and pulseaudio displays:
I: module-loopback.c: Coud not peek into queue
I'm running a meego and have this sound card:
0 [MID ]: HDA-Intel - HDA Intel MID
HDA Intel MID at 0xd2c00000 irq 16
I'm not sure if this is a bluez or pulseaudio issue. I have tried my
bluetooth and a bluetooth dongle and there is no difference.
My question is: is there a better way to route audio in this case? One that
could synchronize better the bluetooth and the sound card?
Thanks,
Cristina
Maarten
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss