[pulseaudio-discuss] Sample format spec with Linear 16bit 16kHz

Georg Chini georg at chini.tk
Fri Feb 16 09:58:31 UTC 2018


On 16.02.2018 10:42, Shinnosuke Suzuki wrote:
> Hi,
>
> I updated pulseaudio  to 11.1.
> However, this problem was not improved.
>
> I tried to check 2 things.
> 1.I collect voice data from bluetooth headset using parec as follows:
>  parec -r --rate=16000 --format=s16le --channels=1 > test.raw
>  parec -r --rate=8000 --format=s16le --channels=1 > test.raw
>  parec -r --rate=8000 --format=u8 --channels=1 > test.raw
>  parec -r --rate=8000 --format=ulaw --channels=1 > test.raw
>
> 2.I tried to listen voice to bluetooth headset with pacat using each 
> raw file.
>  pacat -p --rate=16000 --format=s16le --channels=1 < test.raw
>  pacat -p --rate=8000 --format=s16le --channels=1 < test.raw
>  pacat -p --rate=8000 --format=u8 --channels=1 < test.raw
>  pacat -p --rate=8000 --format=ulaw --channels=1 < test.raw
>
> I could collect voice packet with parec and listen voice with pacat, 
> but CPU load is extremely high.
> 80% for 1. and 40% for 2.
> This means that CPU load exceed 100% when I handle both streams of 
> bluetooth headset.

I believe simply adding the CPU utilization is not correct, as input and 
output are handled
within the same thread.
Did you try to run both commands at the same time on different terminals?
It is a slow board and there is no configuration to reduce the CPU load, 
so I am not
sure if it can handle the load. (I suspect that the high load is due to 
the time smoother
in PA which is called for each BT packet, but I cannot prove it.)

Anyway, if it works with pacat (parec is just a link to pacat), it shows 
that there must
be something wrong with your code. I did not yet have the time to look 
at it, sorry.

One more comment: Please avoid top posting when replying to a mail.


More information about the pulseaudio-discuss mailing list