<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:2077119520;
mso-list-type:hybrid;
mso-list-template-ids:-1846772692 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Georg,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks for your reply.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I tried to do what you suggested:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="color:#1F497D">I loaded module-null-sink<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="color:#1F497D">I loaded module-null-source<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="color:#1F497D">Both of them are defined as default.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">4)<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span dir="LTR"></span><span style="color:#1F497D">I try record by ‘parecord -rv --device=null.monitor /pulse/rec’<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">After answering the call, I get the following assert:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">( 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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Larger log and is attached. <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">‘pacmd list’ before answering is also attached. – seems good to me.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Do you have any hint about what could be the cause?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks, Eytan.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> pulseaudio-discuss [mailto:pulseaudio-discuss-bounces@lists.freedesktop.org]
<b>On Behalf Of </b>Georg Chini<br>
<b>Sent:</b> Tuesday, August 25, 2015 10:57 PM<br>
<b>To:</b> General PulseAudio Discussion<br>
<b>Subject:</b> Re: [pulseaudio-discuss] HFP bluetooth profile isn't working<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 25.08.2015 13:58, Eytan Naim wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
What is the source you are recording from?<br>
<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">When executing ‘pacmd stat’ it seems that <o:p></o:p></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow">Memory blocks allocated during the whole lifetime: 192, size: 699.9 KiB.</span><o:p></o:p></p>
<p class="MsoNormal">Is constant while pulseaudio prints to terminal the following message along the call with relatively fixed intervals:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">( 482.106| 0.013) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 128 bytes<o:p></o:p></p>
<p class="MsoNormal">( 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.<o:p></o:p></p>
<p class="MsoNormal">( 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<o:p></o:p></p>
<p class="MsoNormal">( 482.146| 0.014) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 0 bytes<o:p></o:p></p>
<p class="MsoNormal">( 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.<o:p></o:p></p>
<p class="MsoNormal">( 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<o:p></o:p></p>
<p class="MsoNormal">( 492.148| 0.013) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 128 bytes<o:p></o:p></p>
<p class="MsoNormal">( 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.<o:p></o:p></p>
<p class="MsoNormal">( 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<o:p></o:p></p>
<p class="MsoNormal">( 492.189| 0.014) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 0 bytes<o:p></o:p></p>
<p class="MsoNormal">( 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.<o:p></o:p></p>
<p class="MsoNormal">( 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<o:p></o:p></p>
<p class="MsoNormal">( 502.190| 0.013) D: [pulseaudio][modules/module-loopback.c:201 adjust_rates()] Should buffer 96 bytes, buffered at minimum 128 bytes<o:p></o:p></p>
<p class="MsoNormal">( 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.<o:p></o:p></p>
<p class="MsoNormal">( 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<o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
This looks fine, the messages are from two module-loopback which are loaded to play back<br>
the audio coming from the phone and to transmit audio from your computer to the phone.<br>
But this is also where it is getting strange because you have no other sound device.<br>
The only sink available to play back audio to is the phone and the only source to record from<br>
(except the phone source) is the monitor source of the phone sink (See below for explanation<br>
of the monitor source).<br>
<br>
To avoid that situation you should add a null sink and a null source to your system using<br>
module-null-sink and module-null-source and make them the default sink and source.<br>
Then audio coming from the phone will be played back to the null sink (and you can record<br>
from null.monitor) while silence coming from the null-source is sent to the phone.
<br>
<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal">Please note:<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in">I’m now familer with oFono at all – I simply run it as ofonod -d<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:.5in">Pacmd list output is attached while call is still ongoing. – there are 2 sources loaded and one sink.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Also, could someone explain why are there two source available? Nexus 4 and Nexus 4 monitor?<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
The monitor source is created for each sink so that you have a source from where you<br>
can record what is played back to the sink.<br>
<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><br>
In general it looks like your setup is working.<br>
<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Thanks for your help,<o:p></o:p></p>
<p class="MsoNormal">Eytan.<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><o:p> </o:p></span></p>
</div>
</body>
</html>