HFP bluetooth profile isn't working

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

 



Hi Georg,
Thanks for your reply.
I tried to do what you suggested:

1)      I loaded module-null-sink

2)      I loaded module-null-source

3)      Both of them are defined as default.

4)      I try record by â??parecord -rv --device=null.monitor /pulse/recâ??

After answering the call, I get the following assert:

( 121.424|   0.012) E: [null-source][pulsecore/memblockq.c:286 pa_memblockq_push()] Assertion 'uchunk->index + uchunk->length <= pa_memblock_get_length(uchunk->memblock)' failed at pulsecore/memblockq.c:286, function pa_memblockq_push(). Aborting.

Larger log and is attached.
â??pacmd listâ?? before answering is also attached. â?? seems good to me.

Do you have any hint about what could be the cause?

Thanks, Eytan.


From: pulseaudio-discuss [mailto:pulseaudio-discuss-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Georg Chini
Sent: Tuesday, August 25, 2015 10:57 PM
To: General PulseAudio Discussion
Subject: Re: HFP bluetooth profile isn't working

On 25.08.2015 13:58, Eytan Naim wrote:
Hi,

Iâ??m trying to enable HFP on pulseaudio 6.0 using oFono and bluez 5 on a new embedded platform which doesnâ??t support alsa yet.
In order to confirm that audio is â??playedâ?? I record it using parecord tool. â?? This method worked just fine when enabled a2dp a short time ago.

After executing oFono & pulseaudio, a call is answered on the remote device- It is seemed that the relevant profile is chosen on pulseaudio, and parecord fails to record.

What is the source you are recording from?



When executing â??pacmd statâ?? it seems that
Memory blocks allocated during the whole lifetime: 192, size: 699.9 KiB.
Is constant while pulseaudio prints to terminal the following message along the call with relatively fixed intervals:

( 482.106|   0.013) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 128 bytes
( 482.118|   0.012) D: [pulseaudio][modules/module-loopback.c:226 adjust_rates()] [bluez_sink.98_D6_F7_34_98_E8] Updated sampling rate to 8000 Hz.
( 482.132|   0.013) D: [pulseaudio][modules/module-loopback.c:197 adjust_rates()] Loopback overall latency is 610.13 ms + 0.00 ms + 25.00 ms = 635.13 ms
( 482.146|   0.014) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 0 bytes
( 482.159|   0.012) D: [pulseaudio][modules/module-loopback.c:226 adjust_rates()] [bluez_sink.98_D6_F7_34_98_E8] Updated sampling rate to 8000 Hz.
( 492.134|   9.975) D: [pulseaudio][modules/module-loopback.c:197 adjust_rates()] Loopback overall latency is 610.13 ms + 8.00 ms + 0.00 ms = 618.13 ms
( 492.148|   0.013) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 128 bytes
( 492.161|   0.012) D: [pulseaudio][modules/module-loopback.c:226 adjust_rates()] [bluez_sink.98_D6_F7_34_98_E8] Updated sampling rate to 8000 Hz.
( 492.175|   0.013) D: [pulseaudio][modules/module-loopback.c:197 adjust_rates()] Loopback overall latency is 610.13 ms + 0.00 ms + 25.00 ms = 635.13 ms
( 492.189|   0.014) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 0 bytes
( 492.201|   0.012) D: [pulseaudio][modules/module-loopback.c:226 adjust_rates()] [bluez_sink.98_D6_F7_34_98_E8] Updated sampling rate to 8000 Hz.
( 502.176|   9.975) D: [pulseaudio][modules/module-loopback.c:197 adjust_rates()] Loopback overall latency is 610.13 ms + 8.00 ms + 0.00 ms = 618.13 ms
( 502.190|   0.013) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 128 bytes
( 502.202|   0.012) D: [pulseaudio][modules/module-loopback.c:226 adjust_rates()] [bluez_sink.98_D6_F7_34_98_E8] Updated sampling rate to 8000 Hz.
( 502.216|   0.013) D: [pulseaudio][modules/module-loopback.c:197 adjust_rates()] Loopback overall latency is 610.13 ms + 0.00 ms + 25.00 ms = 635.13 ms



This looks fine, the messages are from two module-loopback which are loaded to play back
the audio coming from the phone and to transmit audio from your computer to the phone.
But this is also where it is getting strange because you have no other sound device.
The only sink available to play back audio to is the phone and the only source to record from
(except the phone source) is the monitor source of the phone sink (See below for explanation
of the monitor source).

To avoid that situation you should add a null sink and a null source to your system using
module-null-sink and module-null-source and make them the default sink and source.
Then audio coming from the phone will be played back to the null sink (and you can record
from null.monitor) while silence coming from the null-source is sent to the phone.


Please note:
Iâ??m now familer with oFono at all â?? I simply run it as ofonod -d
Pacmd list output is attached while call is still ongoing. â?? there are 2 sources loaded and one sink.

Also, could someone explain why are there two source available? Nexus 4 and Nexus 4 monitor?

The monitor source is created for each sink so that you have a source from where you
can record what is played back to the sink.


How can I confirm that the audio arrives at pulseaudio? By the log I would assume that the answer is positive, but according to â??pacmd statâ?? the value it seems not.

In general it looks like your setup is working.



Thanks for your help,
Eytan.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150827/5a84ef06/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pa-assert.txt
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150827/5a84ef06/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pacmd_list.txt
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150827/5a84ef06/attachment-0003.txt>


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux