Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* ASoC for TI OMAP - Multiformat ASoC DAI link driver?
@ 2008-04-02 10:45 Jarkko Nikula
  2008-04-02 11:48 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Nikula @ 2008-04-02 10:45 UTC (permalink / raw)
  To: alsa-devel

Currently in ASoC v1 we have one DAI driver per one format? E.g.
separate drivers for I2S, AC97, etc and type field in cpu_dai
structure is not a bit field or at least not used such way in
soc-core.c and DAI link drivers.

struct snd_soc_cpu_dai pxa_i2s_dai = {
...
	.type = SND_SOC_DAI_I2S,
...

I looked shortly asoc-v2-dev branch and now this type field is gone.
Does it mean that there you can have DAI link driver which supports
multiple formats in set_fmt callback?

I'm asking this since McBSP (Multichannel Buffered Serial Port) found
in OMAP processors can be configured to almost any imaginable format
and IMO it doesn't make a sense to have separate drivers for each of
them if there is a difference only in few configuration bits.

-- 
Jarkko

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASoC for TI OMAP - Multiformat ASoC DAI link driver?
  2008-04-02 10:45 ASoC for TI OMAP - Multiformat ASoC DAI link driver? Jarkko Nikula
@ 2008-04-02 11:48 ` Mark Brown
  2008-04-03  6:13   ` Jarkko Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2008-04-02 11:48 UTC (permalink / raw)
  To: Jarkko Nikula; +Cc: alsa-devel

On Wed, Apr 02, 2008 at 01:45:38PM +0300, Jarkko Nikula wrote:

> Currently in ASoC v1 we have one DAI driver per one format? E.g.
> separate drivers for I2S, AC97, etc and type field in cpu_dai
> structure is not a bit field or at least not used such way in
> soc-core.c and DAI link drivers.

Yes, though it's mostly just used to special case AC97 and for display
purposes so you may find that your use case already works if you fill in
something non-AC97.  I've not looked closely or made any effort to test
this, though.

> I looked shortly asoc-v2-dev branch and now this type field is gone.
> Does it mean that there you can have DAI link driver which supports
> multiple formats in set_fmt callback?

I don't know if anyone has ever actually done that but there should be
nothing in the core which has a problem with doing it - if there is we
should fix it up since this is a perfectly reasonable use case and
affects a number of other modern processors too.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ASoC for TI OMAP - Multiformat ASoC DAI link driver?
  2008-04-02 11:48 ` Mark Brown
@ 2008-04-03  6:13   ` Jarkko Nikula
  0 siblings, 0 replies; 3+ messages in thread
From: Jarkko Nikula @ 2008-04-03  6:13 UTC (permalink / raw)
  To: ext Mark Brown; +Cc: alsa-devel

On Wed, 2 Apr 2008 12:48:20 +0100
"ext Mark Brown" <broonie@opensource.wolfsonmicro.com> wrote:

> > I looked shortly asoc-v2-dev branch and now this type field is gone.
> > Does it mean that there you can have DAI link driver which supports
> > multiple formats in set_fmt callback?
> 
> I don't know if anyone has ever actually done that but there should be
> nothing in the core which has a problem with doing it - if there is we
> should fix it up since this is a perfectly reasonable use case and
> affects a number of other modern processors too.
> 
I think I'll let my first ASoC v1 McBSP DAI link driver to support
only I2S. I don't know do we even have OMAP boards using some another
format with audio codec.

Audio link to bluetooth chip is an another case, like a secondary DAI
link & codec, and requires anyway transition to ASoC v2 as I have
understood.

-- 
Jarkko

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-03  6:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02 10:45 ASoC for TI OMAP - Multiformat ASoC DAI link driver? Jarkko Nikula
2008-04-02 11:48 ` Mark Brown
2008-04-03  6:13   ` Jarkko Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox