<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 04.09.2017 00:23, Vladimir Lebedev
wrote:<br>
</div>
<blockquote
cite="mid:CAPQ8kBUeuC-DrwpzGOJggm2PgdD68AjR5r5YOc5EKXOu+Cu3hA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>Hi All,<br>
<br>
</div>
I'm trying to create bluetooth speaker from my nanopi neo plus
2 SBC (running Ubuntu 16.04.3 LTS with Linux 4.11.2 provided
by FriendlyElec). (With some pain) I've managed to make all
native linux clients to use pulseaudio server on nanopi as
network sink via zeroconf. But I'm stuck with bluetooth -
currently all my android devices can seamlessly connect to
pulseaudio server and are correctly negotiated as a2dp devices
but actual sound playback is horribly choppy.<br>
</div>
</div>
</blockquote>
<blockquote
cite="mid:CAPQ8kBUeuC-DrwpzGOJggm2PgdD68AjR5r5YOc5EKXOu+Cu3hA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>I've tried to play with priority and realtime settings,
performed NTP timesync on all devices involved(including
android phones), disabled WIFI on nanopi without any result.
Also it looks like that distance between bluetooth transmitter
and reciever doesn't play any role - skipping is constant. Or
I'm hearing it as constant.<br clear="all">
</div>
<div>
<div>
<div><br>
</div>
<div>My google-fu failed me so any help would be greatly
appreciated! I've already spent two days to no avail. I
think that my next step if posting here won't succeed will
be digging pulseaudio source code and a2dp spec and this
idea hurts =/<br>
<div dir="ltr"><br>
<span></span></div>
<div>Thanks and Regards,</div>
<div>Vladimir</div>
<div><br>
</div>
<div><br>
</div>
<div>pulse@garble:~$ /usr/bin/dbus-run-session
/usr/bin/pulseaudio -n --daemonize=no --realtime=no
--high-priority=no -L "module-suspend-on-idle" -L
"module-position-event-sounds" -L "module-alsa-sink
device=hw:1,0" -L "module-native-protocol-tcp
auth-ip-acl=127.0.0.1;<a moz-do-not-send="true"
href="http://192.168.1.0/24">192.168.1.0/24</a>
auth-anonymous=1" -L "module-zeroconf-publish" -L
"module-bluetooth-policy" -L "module-bluetooth-discover"
-vvvv<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
The neo pi is not very fast, so it may be difficult to get it
working. Did you check the CPU load<br>
while trying to listen to a2dp? What is the reason for --realtime=no
and --high-priority=no?<br>
I think this can only make things worse.<br>
<br>
In your log I find the line:<br>
<blockquote
cite="mid:CAPQ8kBUeuC-DrwpzGOJggm2PgdD68AjR5r5YOc5EKXOu+Cu3hA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>D: [pulseaudio] module-loopback.c: Loopback overall
latency is 18.79 ms + 0.00 ms + 25.00 ms = 43.79 ms</div>
</div>
</div>
</div>
</div>
</blockquote>
Normally, module-loopback should run at 200ms latency. The small
overall latency<br>
may also be a reason for the choppy sound. Did you wait for a while
to see if it gets<br>
better after a few minutes?<br>
<br>
Did you try recent git? From your log I guess you are using PA 8.0.
That is rather old<br>
and the loopback and bluetooth code have changed a lot since then.<br>
<br>
Regards<br>
Georg<br>
</body>
</html>