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

Sebastian Reichel
2018-03-26T23:10:22Z

[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]

Hi,

On Mon, Mar 26, 2018 at 10:31:54PM +0200, Pavel Machek wrote:
> Hi!
>
> > On Mon, Mar 26, 2018 at 04:16:38PM +0200, Pavel Machek wrote:
> > > Do you have any ideas what needs to be done for voice calls
> > > support?
> >
> > Sure.
>
> :-).
>
> > > I can talk to the modem and start a call.
> >
> > Doing an AT query is the easy part :)
>
> Well, yes. Doing it right (ofono, etc) is not that easy.

I agree. That can be worked on independently.

> > > Then something like this (untested!) is certainly needed.
> > > Probably more...
> >
> > I intentionally left this part out. The CPCAP codec has two DAIs
> > and not 3+. The code you just added is a hack from Motorola. Their
> > driver is full of hacks and it's obvious its author(s) did not
> > fully understand the ASoC APIs.
>
> Ok.
>
> > My understanding is, that we only need to replace the audio-graph-card
> > driver to something more complex. The VOICE DAI needs to be configured
> > differently based on the use case:
> >
> > call:
> > * mode=i2s
> > * freq=26000000
> > * samprate=16000 or samprate=8000
>
> Ok, lets ignore bluetooth for now. There is "normal" mode, and then
> there's "call" mode, right? Where's "normal" mode configured?

mcbsp3_port: port {
cpu_dai3: endpoint {
dai-format = "dsp_a";
frame-master = <&cpcap_audio_codec1>;
bitclock-master = <&cpcap_audio_codec1>;
remote-endpoint = <&cpcap_audio_codec1>;
};
};

> Could we simply always configure the VOICE DAI in the call mode? Yes,
> it would limit samplerates to 8 or 16k, but .. that's not too
> important limitation for voice codec...?

I think we could configure "normal" mode to use the same settings
as call mode. But ASoC will disable CPCAP, since there will be no
active user without ASoC knowing about the modem.

> > "audio-graph-card" is not capable of doing this. I was planning to
> > try "audio-graph-scu-card" in combination with adding codecs for the
> > modem and BT to DT. If that does not work we need a Droid 4 specific
> > soundcard driver.
> >
> > Either way "audio-graph-card" is not the correct driver for D4. I
> > added it nevertheless, since it gets audio working for now and there
> > is no risk of DT breakage. Old *.dtb will continue to work with the
> > "audio-graph-card" even after we switch to something else.
>
> Well, you'll still cause regressions when you change the dts, as
> people will have wrong .config for new dts.

That's correct, the .config needs to change. I think that's
ok, because the only alternative is having no audio support
at all until the soundcard driver is ready. This means, that
you also need to change .config once its ready (in case you
want to use it).

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]