Faster resume probing

Dylan Van Assche me at dylanvanassche.be
Sat Jan 23 15:41:15 UTC 2021


Hi!

My apologies for the late reply, I had some other things which needed
my attention.

The modem is connected using GPIOs, USB and I2S.
- The GPIOs are used to turn the modem on/off, wake up the host CPU,
etc.
- USB is used for QMI and AT communication
- I2S is used for audio and fully handled in the hardware. Pulseaudio
on the host CPU side uses 2 different profiles: modem + normal audio.
By switching between profiles, the hardware is configured on the fly to
output the right audio to the speakers.

If you still have any questions, feel free to ask!

Kind regards,
Dylan Van Assche

On Mon, 2021-01-04 at 12:24 +0100, Enrico Mioso wrote:
> Hello!!
> 
> Out of curiosity - how do you handle voice / audio? How does the
> modem provide Audio to the OS?
> Thanks!!
> Enrico
> On Sun, Jan 03, 2021 at 03:58:55PM +0100, Dylan Van Assche wrote:
> > Hi everyone,
> > 
> > I have been working on the Quectel EG25-G modem in the Pine64
> > PinePhone. This modem is connected over USB with the host CPU and
> > communicates using AT commands and QMI. ModemManager works fine on
> > the
> > PinePhone when the phone is awake, however, ModemManager's probing
> > approach when resuming is rather slow if we have an incoming call.
> > Most
> > of the time, the modem rings several times already before
> > ModemManager
> > starts to notice this when waking up from sleep (this is not the
> > case
> > when the device is awake when a call is received). Therefore, I
> > already
> > digged into ModemManager and tried to improve this, as discussed in
> > [1].
> > 
> > Thanks to the logs of ModemManager, I could identify several places
> > where we lose some time during the resume sequence of a
> > suspend/resume
> > cycle:
> > 
> > 1. ModemManager waits a fixed amount of time to make sure that all
> > ports of a modem show up using udev, losing ~1.5s
> > 2. The EG25-G modem contains ~20 carrier configs which are read
> > one-by-
> > one by ModemManager during the initialization phase which takes
> > ~1.5s
> > 3. Order of service initialization: the voice interface for
> > handling
> > calls is initialized at the very end, while location, time, etc.
> > are
> > initialized first. ~500ms
> > 4. Many other small things, each saving several 100ms.
> > 
> > In total, it takes ~6.5s from waking up until the incoming call is
> > announced on DBus.
> > 
> > The resume sequence can probably be optimized in other places as
> > well,
> > but my knowledge of the ModemManager code is rather limited.
> > Because of
> > this, I would like to have some input from everyone on this mailing
> > list about this problem. All suggestions are welcome!
> > 
> > Kind regards,
> > Dylan Van Assche
> > 
> > 
> > [1] 
> > https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/194
> > 
> > _______________________________________________
> > ModemManager-devel mailing list
> > ModemManager-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel




More information about the ModemManager-devel mailing list