Re: WIP Droid 4 voice calls, GNSS & PM with a TS 27.010 serdev driver
From: Tony Lindgren
Date: Tue Dec 18 2018 - 16:53:18 EST
* Pavel Machek <pavel@xxxxxx> [181218 20:22]:
> Hi!
>
> > > # commit 0c1bc81ba976bcd480d6e3c3009a28589f8427c0 (patch)
> > > # mfd: motmdm: Add Motorola TS 27.010 serdev driver for devices like droid4
> > >
> > > Oh, that is a lot of fun. Especially state machine for parsing modem
> > > responses. I wonder how well it is going to work when modem is
> > > accessed over USB...
> > >
> > > motmdm_read_state(... size_t len)
> >
> > That's a bit of a layering violation yeah :) But we still need to
> > do that somewhere for notifiers. And the notifications are separate
> > from the commands and start with a ~ character so from that point of
> > view it should not be too bad.
>
> Plus, you seem to assume that data will always come in suitably sized
> chunks. Aha, and as it is not plain serial but packet protocol over
> serial... I guess that is going to work?
Yeah it's just packet data out of the n_gsm.
> > > I did a quick test in my config... and it did not break my old setup
> > > -- voice calls still work when set up over USB and with manual mixer
> > > setup. That was good surprise.
> >
> > OK good to hear. Using the n_gsm port instead of USB during idle
> > has a major PM advantage as the SoC can hit retention during idle
> > while still connected to the modem and getting notifications.
> >
> > So looks like during idle we can keep USB in autosuspend mode with
> > something like the below shell script function.
>
> Yes, I should really start using serials instead of USB. But... I have
> working ofono there, and was using that phone and am little short on
> time at the moment.
Hopefully adding support to ofono and modemmanager to use use
/dev/motmdm1 for calls should be quite trivial now.
Regards,
Tony