diff mbox

omap4-droid4: voice call support was Re: [PATCHv5, 5/5] ARM: dts: omap4-droid4: add soundcard

Message ID 20180330152227.GU5700@atomide.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Lindgren March 30, 2018, 3:22 p.m. UTC
* Merlijn Wajer <merlijn@wizzup.org> [180330 13:09]:
> On 30/03/18 12:37, Pavel Machek wrote:
> > On Thu 2018-03-29 14:56:13, Tony Lindgren wrote:
> >> * Pavel Machek <pavel@ucw.cz> [180329 18:41]:
> >>> Thanks. I got call working including outgoing audio: in capture
> >>> settings, right->mic 1, Mic1 + Mic2 in alsamixer -> 100%. But I had
> >>> the other phone muted, so I don't yet know if such call would be of
> >>> usable quality.
> >>
> >> Great, good to hear that :)
> > 
> > I also got ofonod to work, with rather crazy hacks. But I now have
> > incoming/outgoing calls with GUI :-).
> 
> Would you mind sharing those hacks - I would like to play around with
> ofonod as well. Maybe I can help with a way forward.

Yeah that would be fun to play with :)

Below is a patch that works better at least for ModemManager,
does anybody have ideas what the unused three ports might be?

I wonder if ofono can use /dev/ttyUSB0 CQDM port?

Regards,

Tony

8< -------------------------
From tony Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Sun, 19 Nov 2017 19:55:56 -0800
Subject: [PATCH] USB: qcaux: Add droid 4 mdm6600 modem

We have five USB ports on mdm6600 modem and does not have the same
layout as layout as Gobi 1K/2K/etc devices listed in qcserial.c

So we should not be adding them to qcserial.c but instead use
qcaux.c or option.c as noted by Dan Williams <dcbw@redhat.com>.

The ttyUSB ports detected by ModemManager are:

ttyUSB0 CQDM-capable
ttyUSB1 no response
ttyUSB2 no response
ttyUSB3 no response
ttyUSB4 AT-capable

Note that it takes a while for ModemManager to start while it's
detecting the ports, so we may want to eventually limit the ports.

So far no luck finding out what the unused three ports are, maybe
there is NMEA there if somebody knows how to enable it.

Signed-off-by: Tony Lingren <tony@atomide.com>
---
 drivers/usb/serial/qcaux.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Nazzareno Trimarchi March 30, 2018, 3:25 p.m. UTC | #1
Hi

On Fri., 30 Mar. 2018, 11:22 pm Tony Lindgren, <tony@atomide.com> wrote:

> * Merlijn Wajer <merlijn@wizzup.org> [180330 13:09]:
> > On 30/03/18 12:37, Pavel Machek wrote:
> > > On Thu 2018-03-29 14:56:13, Tony Lindgren wrote:
> > >> * Pavel Machek <pavel@ucw.cz> [180329 18:41]:
> > >>> Thanks. I got call working including outgoing audio: in capture
> > >>> settings, right->mic 1, Mic1 + Mic2 in alsamixer -> 100%. But I had
> > >>> the other phone muted, so I don't yet know if such call would be of
> > >>> usable quality.
> > >>
> > >> Great, good to hear that :)
> > >
> > > I also got ofonod to work, with rather crazy hacks. But I now have
> > > incoming/outgoing calls with GUI :-).
> >
> > Would you mind sharing those hacks - I would like to play around with
> > ofonod as well. Maybe I can help with a way forward.
>
> Yeah that would be fun to play with :)
>
> Below is a patch that works better at least for ModemManager,
> does anybody have ideas what the unused three ports might be?
>
> I wonder if ofono can use /dev/ttyUSB0 CQDM port?
>

One of them can be used proprably to bridge debug for modem certification.
This is usually disable for production device. The other could used for
unsolicited response of GPS function if exists in this modem

Michael

>
> Regards,
>
> Tony
>
> 8< -------------------------
> From tony Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Sun, 19 Nov 2017 19:55:56 -0800
> Subject: [PATCH] USB: qcaux: Add droid 4 mdm6600 modem
>
> We have five USB ports on mdm6600 modem and does not have the same
> layout as layout as Gobi 1K/2K/etc devices listed in qcserial.c
>
> So we should not be adding them to qcserial.c but instead use
> qcaux.c or option.c as noted by Dan Williams <dcbw@redhat.com>.
>
> The ttyUSB ports detected by ModemManager are:
>
> ttyUSB0 CQDM-capable
> ttyUSB1 no response
> ttyUSB2 no response
> ttyUSB3 no response
> ttyUSB4 AT-capable
>
> Note that it takes a while for ModemManager to start while it's
> detecting the ports, so we may want to eventually limit the ports.
>
> So far no luck finding out what the unused three ports are, maybe
> there is NMEA there if somebody knows how to enable it.
>
> Signed-off-by: Tony Lingren <tony@atomide.com>
> ---
>  drivers/usb/serial/qcaux.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c
> --- a/drivers/usb/serial/qcaux.c
> +++ b/drivers/usb/serial/qcaux.c
> @@ -66,6 +66,7 @@ static const struct usb_device_id id_table[] = {
>         { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe,
> 0xff) },  /* WMC */
>         { USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff,
> 0xff) },  /* DIAG */
>         { USB_DEVICE_AND_INTERFACE_INFO(0x1fac, 0x0151, 0xff, 0xff, 0xff)
> },
> +       { USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2a70, 0xff, 0xff, 0xff)
> },
>         { },
>  };
>  MODULE_DEVICE_TABLE(usb, id_table);
> --
> 2.16.3
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
Tony Lindgren March 30, 2018, 3:44 p.m. UTC | #2
* Michael Nazzareno Trimarchi <michael@amarulasolutions.com> [180330 15:27]:
> Hi
> 
> On Fri., 30 Mar. 2018, 11:22 pm Tony Lindgren, <tony@atomide.com> wrote:
> 
> > * Merlijn Wajer <merlijn@wizzup.org> [180330 13:09]:
> > > On 30/03/18 12:37, Pavel Machek wrote:
> > > > On Thu 2018-03-29 14:56:13, Tony Lindgren wrote:
> > > >> * Pavel Machek <pavel@ucw.cz> [180329 18:41]:
> > > >>> Thanks. I got call working including outgoing audio: in capture
> > > >>> settings, right->mic 1, Mic1 + Mic2 in alsamixer -> 100%. But I had
> > > >>> the other phone muted, so I don't yet know if such call would be of
> > > >>> usable quality.
> > > >>
> > > >> Great, good to hear that :)
> > > >
> > > > I also got ofonod to work, with rather crazy hacks. But I now have
> > > > incoming/outgoing calls with GUI :-).
> > >
> > > Would you mind sharing those hacks - I would like to play around with
> > > ofonod as well. Maybe I can help with a way forward.
> >
> > Yeah that would be fun to play with :)
> >
> > Below is a patch that works better at least for ModemManager,
> > does anybody have ideas what the unused three ports might be?
> >
> > I wonder if ofono can use /dev/ttyUSB0 CQDM port?
> >
> 
> One of them can be used proprably to bridge debug for modem certification.
> This is usually disable for production device. The other could used for
> unsolicited response of GPS function if exists in this modem

OK so at least one of the ports is probably permanently disabled then.

GPS is there for sure, it can be accessed with at least mmcli with
ModemManager running assuming modem instance 0:

$ mmcli -m 0 --enable
$ mmcli -m 0 --location-enable-gps-raw
$ sudo chmod a+r /dev/cdc-wdm0

Then configure gpsd to use /dev/cdc-wdm0.

But having a dedicated NMEA port would be nice. Any ideas how the
GPS port might be enabled for ttyUSB, should it start just printing
out data if GPS is enabled?

FYI, selecting the "BP HW Diag & Boot AP" option from bootloader with the
volume buttons routes the whole modem to the OTG USB interface with
the same ports available to PC so that's probably for cert use.
If needed we can do this from Linux too by just by setting one of
the USB PHY pins high with cpcap_usb_gpio_set_mode().

Regards,

Tony
Tony Lindgren March 30, 2018, 5:46 p.m. UTC | #3
* Tony Lindgren <tony@atomide.com> [180330 15:46]:
> * Michael Nazzareno Trimarchi <michael@amarulasolutions.com> [180330 15:27]:
> > Hi
> > 
> > On Fri., 30 Mar. 2018, 11:22 pm Tony Lindgren, <tony@atomide.com> wrote:
> > 
> > > * Merlijn Wajer <merlijn@wizzup.org> [180330 13:09]:
> > > > On 30/03/18 12:37, Pavel Machek wrote:
> > > > > On Thu 2018-03-29 14:56:13, Tony Lindgren wrote:
> > > > >> * Pavel Machek <pavel@ucw.cz> [180329 18:41]:
> > > > >>> Thanks. I got call working including outgoing audio: in capture
> > > > >>> settings, right->mic 1, Mic1 + Mic2 in alsamixer -> 100%. But I had
> > > > >>> the other phone muted, so I don't yet know if such call would be of
> > > > >>> usable quality.
> > > > >>
> > > > >> Great, good to hear that :)
> > > > >
> > > > > I also got ofonod to work, with rather crazy hacks. But I now have
> > > > > incoming/outgoing calls with GUI :-).
> > > >
> > > > Would you mind sharing those hacks - I would like to play around with
> > > > ofonod as well. Maybe I can help with a way forward.
> > >
> > > Yeah that would be fun to play with :)
> > >
> > > Below is a patch that works better at least for ModemManager,
> > > does anybody have ideas what the unused three ports might be?
> > >
> > > I wonder if ofono can use /dev/ttyUSB0 CQDM port?
> > >
> > 
> > One of them can be used proprably to bridge debug for modem certification.
> > This is usually disable for production device. The other could used for
> > unsolicited response of GPS function if exists in this modem
> 
> OK so at least one of the ports is probably permanently disabled then.
> 
> GPS is there for sure, it can be accessed with at least mmcli with
> ModemManager running assuming modem instance 0:
> 
> $ mmcli -m 0 --enable
> $ mmcli -m 0 --location-enable-gps-raw
> $ sudo chmod a+r /dev/cdc-wdm0
> 
> Then configure gpsd to use /dev/cdc-wdm0.
> 
> But having a dedicated NMEA port would be nice. Any ideas how the
> GPS port might be enabled for ttyUSB, should it start just printing
> out data if GPS is enabled?
> 
> FYI, selecting the "BP HW Diag & Boot AP" option from bootloader with the
> volume buttons routes the whole modem to the OTG USB interface with
> the same ports available to PC so that's probably for cert use.
> If needed we can do this from Linux too by just by setting one of
> the USB PHY pins high with cpcap_usb_gpio_set_mode().

And after some searching the the three unknown ports seem to
be NMEA, TCMD and MUX in some unknown order. No idea what the
TCMD and MUX are here.

Looks like /dev/ttyUSB3 pretty much just echoes back the
characters typed in.

Regards,

Tony
diff mbox

Patch

diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c
--- a/drivers/usb/serial/qcaux.c
+++ b/drivers/usb/serial/qcaux.c
@@ -66,6 +66,7 @@  static const struct usb_device_id id_table[] = {
 	{ USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xfe, 0xff) },  /* WMC */
 	{ USB_VENDOR_AND_INTERFACE_INFO(UTSTARCOM_VENDOR_ID, 0xff, 0xff, 0xff) },  /* DIAG */
 	{ USB_DEVICE_AND_INTERFACE_INFO(0x1fac, 0x0151, 0xff, 0xff, 0xff) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(0x22b8, 0x2a70, 0xff, 0xff, 0xff) },
 	{ },
 };
 MODULE_DEVICE_TABLE(usb, id_table);