<div dir="ltr">Hello,<div>Sorry to bring this up again. However, I cannot use pulseaudio 8.0 + bluez5.38 to record audio from my Bluetooth's microphone.<br></div><div><br></div><div>- I followed the patch from link below to apply it on top of my embedded's board which is running 3.14 Linux kernel:</div><div><a href="https://lists.freedesktop.org/archives/pulseaudio-discuss/2015-March/023305.html">https://lists.freedesktop.org/archives/pulseaudio-discuss/2015-March/023305.html</a><br></div><div><br></div><div>I can successfully switch to headset_head_unit (HSP) profile. Below is the output of sinks|sources and how I choose Bluetooth's microphone as the default audio source:</div><div><br></div><div><div># <i>pactl list sources short</i></div><div><i>0 alsa_output.0.analog-stereo.monitor module-alsa-sink.c s16le 2ch 44100Hz IDLE</i></div><div><i>1 alsa_input.0.analog-stereo module-alsa-source.c s16le 2ch 44100Hz IDLE</i></div><div><i>2 bluez_sink.00_1F_81_34_08_22.monitor module-bluez5-device.c s16le 1ch 8000Hz IDLE</i></div><div><i>3 bluez_source.00_1F_81_34_08_22 module-bluez5-device.c s16le 1ch 8000Hz IDLE</i></div></div><div><br></div><div><div># <i>pactl list sinks short</i></div><div><i>0 alsa_output.0.analog-stereo module-alsa-sink.c s16le 2ch 44100Hz IDLE</i></div><div><i>1 bluez_sink.00_1F_81_34_08_22 module-bluez5-device.c s16le 1ch 8000Hz IDLE</i></div></div><div><i><br></i></div><div><i># pacmd set-default-source 3<br></i></div><div><br></div><div>Using parecord to capture audio from Bluetooth's microphone:</div><div><div># <i>parecord -v -r --channels=1 --file-format=wav --device=bluez_source.00_1F_81_34_08_22 mm.wav</i></div></div><div><i><br></i></div><div><div><i>Opening a recording stream with sample specification 's16le 1ch 44100Hz' and channel map 'mono'.</i></div><div><i>Connection established.</i></div><div><i>Stream successfully created.</i></div><div><i>Buffer metrics: maxlength=4194304, fragsize=176400</i></div><div><i>Using sample spec 's16le 1ch 44100Hz', channel map 'mono'.</i></div><div><i>Connected to device bluez_source.00_1F_81_34_08_22 (index: 3, suspended: no).</i></div><div><i>Time: 0.026 sec; Latency: 25844 usec.</i></div><div><br></div><div>=> In my case, <span style="color:rgb(0,0,0);white-space:pre-wrap">the result is a mm.wav of zero bytes no matter how long I record.</span></div></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">The output from pulseaudio's log is:</span></div><div><i style="white-space:pre-wrap;color:rgb(0,0,0)">I: [pulseaudio] client.c: Created 10 "Native client (UNIX socket client)"</i><br></div><div><font color="#000000"><span style="white-space:pre-wrap"><i>D: [pulseaudio] protocol-native.c: Protocol version: remote 30, local 30
I: [pulseaudio] protocol-native.c: Got credentials: uid=0 gid=0 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: yes
D: [pulseaudio] srbchannel.c: SHM block is 4056 bytes, ringbuffer capacity is 2 * 2004 bytes
D: [pulseaudio] protocol-native.c: Enabling srbchannel...
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for parecord
D: [pulseaudio] protocol-native.c: Client enabled srbchannel.
D: [pulseaudio] module-stream-restore.c: Not restoring device for stream source-output-by-application-name:parecord, because already set
D: [pulseaudio] module-intended-roles.c: Not setting device for stream mm.wav, because already set.
D: [pulseaudio] source-output.c: Negotiated format: pcm, format.sample_format = "\"s16le\"" format.rate = "44100" format.channels = "1" format.channel_map = "\"mono\""
I: [pulseaudio] source-output.c: Trying to change sample rate
I: [pulseaudio] resampler.c: Speex appears to be compiled with --enable-fixed-point. Switching to a fixed-point resampler because it should be faster.
D: [pulseaudio] resampler.c: Resampler:
D: [pulseaudio] resampler.c: rate 8000 -> 44100 (method speex-fixed-1)
D: [pulseaudio] resampler.c: format s16le -> s16le (intermediate s16le)
D: [pulseaudio] resampler.c: channels 1 -> 1 (resampling 1)
I: [pulseaudio] speex.c: Choosing speex quality setting 1.
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=33554432, tlength=0, base=2, prebuf=0, minreq=1 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=33554432, tlength=33554432, base=2, prebuf=0, minreq=2 maxrewind=0
I: [pulseaudio] source-output.c: Created output 3 "mm.wav" on bluez_source.00_1F_81_34_08_22 with sample spec s16le 1ch 44100Hz and channel map mono
I: [pulseaudio] source-output.c: media.format = "WAV (Microsoft)"
I: [pulseaudio] source-output.c: <a href="http://application.name">application.name</a> = "parecord"
I: [pulseaudio] source-output.c: <a href="http://media.name">media.name</a> = "mm.wav"
I: [pulseaudio] source-output.c: native-protocol.peer = "UNIX socket client"
I: [pulseaudio] source-output.c: native-protocol.version = "30"
I: [pulseaudio] source-output.c: <a href="http://application.process.id">application.process.id</a> = "1930"
I: [pulseaudio] source-output.c: application.process.user = "root"
I: [pulseaudio] source-output.c: application.process.host = "OpenWrt"
I: [pulseaudio] source-output.c: application.process.binary = "parecord"
I: [pulseaudio] source-output.c: application.language = "C"
I: [pulseaudio] source-output.c: application.process.machine_id = "fbf61ebdc6bd1c95cd6a1de257baaee6"
I: [pulseaudio] source-output.c: <a href="http://module-stream-restore.id">module-stream-restore.id</a> = "source-output-by-application-name:parecord"
D: [pulseaudio] memblockq.c: memblockq requested: maxlength=4194304, tlength=0, base=2, prebuf=1, minreq=0 maxrewind=0
D: [pulseaudio] memblockq.c: memblockq sanitized: maxlength=4194304, tlength=4194304, base=2, prebuf=2, minreq=2 maxrewind=0
I: [pulseaudio] protocol-native.c: Final latency 2000.00 ms = 2000.00 ms + 0.00 ms
D: [pulseaudio] core.c: Hmm, no streams around, trying to vacuum.
I: [pulseaudio] source-output.c: Freeing output 3 "mm.wav"
I: [pulseaudio] client.c: Freed 10 "parecord"
I: [pulseaudio] protocol-native.c: Connection died.</i></span></font><span style="color:rgb(0,0,0);white-space:pre-wrap"><i>
</i></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><font color="#000000"><span style="white-space:pre-wrap">It would be great if you can give my any advice or suggestion.</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Regards,</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Hieu Le.</span></font></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 22, 2016 at 10:14 AM, Hieu Le <span dir="ltr"><<a href="mailto:hieu.le@veriksystems.com" target="_blank">hieu.le@veriksystems.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks for your information. Let me try to backport from 3.18.<div><br></div><div>Regards,</div><div>Hieu Le.</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Sat, Aug 20, 2016 at 7:32 PM, Tanu Kaskinen <span dir="ltr"><<a href="mailto:tanuk@iki.fi" target="_blank">tanuk@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Sat, 2016-08-20 at 14:14 +0200, Georg Chini wrote:<br>
> On 20.08.2016 13:40, Tanu Kaskinen wrote:<br>
> ><br>
> > On Fri, 2016-08-19 at 13:57 +0700, Hieu Le wrote:<br>
> > ><br>
> > > I'm trying to get a SPK-ProHT Bluetooth speaker and headset working on an<br>
> > > embedded Linux board but when I failed to use pacmd set-card-profile to<br>
> > > choose headset_head_unit profile. Checking pulseaudio lof file, it seems<br>
> > > backend-native cannot connect to SCO socket. Sorry this is a very long mail<br>
> > > due to debug logs attached<br>
> > The problem seems to be that connect() fails with "Protocol not<br>
> > supported". This problem has been reported a few times, but I don't<br>
> > know how to fix it. It seems like missing functionality in the kernel,<br>
> > so my guess is that you're missing some bluetooth related driver. If<br>
> > you get it working somehow, please report back how you did it.<br>
> ><br>
> > The bluez mailing list might be able to help better.<br>
> ><br>
> Hi,<br>
><br>
> I remember there was a kernel problem which prevented some<br>
> headsets from working. The bug was introduced in 3.12 and was<br>
> fixed in 3.18.<br>
> See also<br>
> <a href="https://lists.freedesktop.org/archives/pulseaudio-discuss/2015-March/023298.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>archives/pulseaudio-discuss/20<wbr>15-March/023298.html</a><br>
<br>
</span>Thanks! I added this bit of information here:<br>
<a href="https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Bluetooth/" rel="noreferrer" target="_blank">https://www.freedesktop.org/wi<wbr>ki/Software/PulseAudio/Documen<wbr>tation/User/Bluetooth/</a><br>
<span><font color="#888888"><br>
--<br>
Tanu<br>
</font></span><div><div>______________________________<wbr>_________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@lists.freedesktop.org" target="_blank">pulseaudio-discuss@lists.freed<wbr>esktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/pulseaudio-di<wbr>scuss</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="">-- <br><div data-smartmail="gmail_signature"><div dir="ltr">---- Hieu Le ---</div></div>
</span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">---- Hieu Le ---</div></div>
</div>