[alsa-devel] [PATCH] davinci-evm: extend it to support DM81xx and derivatives

Vitaly Wool vitalywool at gmail.com
Mon Jul 31 11:18:31 CEST 2017


Hi Mark,

2017-07-17 16:51 GMT+02:00 Mark Brown <broonie at kernel.org>:

> On Thu, Jul 13, 2017 at 07:26:43PM +0200, Vitaly Wool wrote:
> > 2017-07-13 10:01 GMT+02:00 Sekhar Nori <nsekhar at ti.com>:
>
> > > While there are some users of davinci-evm.c, I think a majority are
> > > using simple-audio-card instead. Curious on why you chose not to use
> > > that. It sounds like codec is not the bitclock and frame-sync master in
> > > your case. Did that end up creating issues ?
>
> > Well, one of the problems with simple-audio-card is that you can't
> > snd_soc_dai_set_clkdiv() from it, neither you can set SND_SOC_CLK_OUT
> > for a codec, so for some codecs this just doesn't fit.
>
> That's no excuse, the CODEC drivers *really* shouldn't use _set_clkdiv()
> - fix the drivers to work normally.
>

Well that's not the only problem. CPU driver (davinci-mcasp) doesn't work
well with simple-audio-card either.

There's no good way to set SND_SOC_CLK_OUT for it if the clock is
fixed-rate. asoc_simple_card_init_dai()
initializes clocks to SND_SOCK_CLK_IN, and the only way you can change it
later is by calling asoc_simple_card_hw_params(). But that's not a real
match either, since it won't work with a fixed-rate clock.

So basically I can see 2 ways out here:
* extend davinci-evm driver to handle DM81xx (which is implemented in the
patch I've sent before)
* fix simple-card-utils so that it's possible to set SND_SOC_CLK_OUT in
asoc_simple_card_init_dai().

I would personally go the first way but if you prefer the 2nd, I can pursue
that track too.

Thanks in advance,

Best regards,
   Vitaly


More information about the Alsa-devel mailing list