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

2012-09-06 Thread Mark Brown
On Sat, Sep 01, 2012 at 11:09:18AM +0200, Janusz Krzysztofik wrote:

 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.

Like I already said just make it a static variable.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-09-01 Thread Janusz Krzysztofik
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
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-08-31 Thread Mark Brown
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?  All I'm
  suggesting is changing the above to use platform rather than driver
  data.

 The ams-delta asoc driver doesn't use snd_soc_register_card() so far, 
 but relays solely on soc_probe() doing this for it, which in turn 
 expects to find a snc_soc_card structure in drvdata. How is it supposed 
 to find that structure if I pass it over platform data instead? Am I 
 missing something?

s/drvdata/platdata/ in the code.  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.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-08-28 Thread Janusz Krzysztofik
On Mon, 27 Aug 2012 14:38:35 Mark Brown wrote:
 On Mon, Aug 27, 2012 at 11:28:30PM +0200, Janusz Krzysztofik wrote:
 
  -   platform_set_drvdata(ams_delta_audio_platform_device,
  -   ams_delta_audio_card);
  -
  -   ret = platform_device_add(ams_delta_audio_platform_device);
  -   if (ret)
  -   goto err;
 
 The real fix here is that you should be using platform data here, not
 driver data.  Is there some reason not to do that?

Mark,

Do you think the change you propose is suitable for the rc cycle? I'm 
trying to fix a regression in the first place. Converting the ams-delta 
asoc to a platform driver is on my todo list and I'm going to take care 
of this as soon as I have enough spare time.

Thanks,
Janusz

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-08-28 Thread Mark Brown
On Tue, Aug 28, 2012 at 05:13:05PM +0200, Janusz Krzysztofik wrote:
 On Mon, 27 Aug 2012 14:38:35 Mark Brown wrote:
  On Mon, Aug 27, 2012 at 11:28:30PM +0200, Janusz Krzysztofik wrote:

   - platform_set_drvdata(ams_delta_audio_platform_device,
   - ams_delta_audio_card);

  The real fix here is that you should be using platform data here, not
  driver data.  Is there some reason not to do that?

 Do you think the change you propose is suitable for the rc cycle? I'm 
 trying to fix a regression in the first place. Converting the ams-delta 
 asoc to a platform driver is on my todo list and I'm going to take care 
 of this as soon as I have enough spare time.

The above looks like you already have a platform driver?  All I'm
suggesting is changing the above to use platform rather than driver
data.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-08-28 Thread Janusz Krzysztofik
On Tue, 28 Aug 2012 11:13:39 Mark Brown wrote:
 On Tue, Aug 28, 2012 at 05:13:05PM +0200, Janusz Krzysztofik wrote:
  On Mon, 27 Aug 2012 14:38:35 Mark Brown wrote:
   On Mon, Aug 27, 2012 at 11:28:30PM +0200, Janusz Krzysztofik wrote:
 
-   platform_set_drvdata(ams_delta_audio_platform_device,
-   ams_delta_audio_card);
 
   The real fix here is that you should be using platform data here, 
not
   driver data.  Is there some reason not to do that?
 
  Do you think the change you propose is suitable for the rc cycle? 
I'm 
  trying to fix a regression in the first place. Converting the ams-
delta 
  asoc to a platform driver is on my todo list and I'm going to take 
care 
  of this as soon as I have enough spare time.
 
 The above looks like you already have a platform driver?  All I'm
 suggesting is changing the above to use platform rather than driver
 data.

The ams-delta asoc driver doesn't use snd_soc_register_card() so far, 
but relays solely on soc_probe() doing this for it, which in turn 
expects to find a snc_soc_card structure in drvdata. How is it supposed 
to find that structure if I pass it over platform data instead? Am I 
missing something?

Thanks,
Janusz
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html