[alsa-devel] [PATCH] ASoC: ams-delta: fix card initalization failure

Janusz Krzysztofik jkrzyszt at tis.icnet.pl
Sat Sep 1 11:09:18 CEST 2012


Dnia piątek, 31 sierpnia 2012 14:31:04 Mark Brown pisze:
> On Wed, Aug 29, 2012 at 07:04:48AM +0200, Janusz Krzysztofik wrote:
> > On Tue, 28 Aug 2012 11:13:39 Mark Brown wrote:
> 
> > > The above looks like you already have a platform driver? 

Mark,
I should have rather answered: No, ams-delta.c is not a platform driver, 
only a module which registeres a soc-audio device and provides device 
specific data and callbacks to the soc-audio platform driver.

> > > All I'm
> > > suggesting is changing the above to use platform rather than 
driver
> > > data.
> ...
> s/drvdata/platdata/ in the code. 

Taking the above into account, I would have to apply this substitue to 
the soc-core.c, which is actually the platform driver for the ams-delta 
ASoC device, and this would break a lot of other cards.

> If you can't do this then just
> referencing the data directly in the code would be better than this
> bodge, it'd be much less fragile.

I see your point, however for now I can see no better way of referencing 
the data (of type struct snd_soc_card) then passing it to 
snd_soc_register_card(). But for this to work, I would have to register 
successfully an ams-delta specific platform device first, not the soc-
audio. This, even if still done from the sound/soc/omap/ams-delta.c, not 
from an arch board file, would require now not existing ams-delta ASoC 
platform driver probe/remove callbacks at least. I'm still not convinced 
if such modification would be acceptable in the middle of the rc cycle.

If there is a simpler, less intrusive way to do this, then sorry, I 
still can't see it.

Thanks,
Janusz


More information about the Alsa-devel mailing list