[pulseaudio-discuss] Sound recording/routing issues on Librem5

Tanu Kaskinen tanuk at iki.fi
Mon Dec 2 16:57:11 UTC 2019


On Mon, 2019-12-02 at 08:49 -0700, Angus Ainslie wrote:
> 
> So this was a weird one. The modem and codec are fixed at a 48K sample 
> rate ( the codec can do other rates but the clocks are currently set for 
> 48k). On the devkit we added an alternate rate of 44.1K to deal with 
> call audio. Pulse audio was using the alternate rate instead of the 
> default rate and it was setting up the codec for 44.1K and one of the 
> rates got set to a sample rate of 47999 Hz
> 
> https://source.puri.sm/Librem5/calls/uploads/c6430c76b6a79aae827291e55305d3ec/after_call.sink-inputs
> 
> In one of the tests I also saw a rate of 43KHz but I don't seem to have 
> captured any debug for that one.
> 
> Dropping the alternate rate caused pulse audio to use 48K which allowed 
> the sound to flow through the loopbacks and the latency disappeared at 
> the same time.
> 
> https://source.puri.sm/angus.ainslie/librem5-base/commit/450976adfacf25da79b71b6dd24a5f8643da0873#dd3464357c7325c6a3167bc6243c1a62926ba401
> 
> Thanks for your help.

Great that you got it behaving! Regarding the weird rates: it's normal
that the loopback sink input has a rate that is slightly different from
the normal rate. It's part of the logic that adapts to clock drift
between the source and sink. If the rate changes a lot, however, that
can be an indication that the hardware isn't working properly (it's
producing or consuming audio too fast or too slow).

-- 
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk



More information about the pulseaudio-discuss mailing list