[alsa-devel] ASoC for TI OMAP - Multiformat ASoC DAI link driver?
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.
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.
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.
participants (2)
-
Jarkko Nikula
-
Mark Brown