alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Amstrad Delta: fix const related build error
@ 2011-02-01  9:38 Janusz Krzysztofik
  2011-02-01 10:11 ` [Resend] " Janusz Krzysztofik
  0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2011-02-01  9:38 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

The Amstrad Delta ASoC driver used to override the digital_mute() 
callback, expected to be not provided by the on-board CX20442 CODEC 
driver, with its own implementation. While this is still posssible when 
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442 
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct 
after the snd_soc_dai_driver.ops member has been constified, and results 
in build error.

Drop this actually not used code path in hope the CX20442 driver never 
provides its own snd_soc_dai_ops structure.

Created and tested against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
Please consider queuing this patch for the current rc cycle.

 sound/soc/omap/ams-delta.c |    2 --
 1 file changed, 2 deletions(-)

--- git/sound/soc/omap/ams-delta.c.orig	2011-01-31 19:49:29.000000000 
+0100
+++ git/sound/soc/omap/ams-delta.c	2011-01-31 23:24:45.000000000 +0100
@@ -507,8 +507,6 @@ static int ams_delta_cx20442_init(struct
 	/* Set up digital mute if not provided by the codec */
 	if (!codec_dai->driver->ops) {
 		codec_dai->driver->ops = &ams_delta_dai_ops;
-	} else if (!codec_dai->driver->ops->digital_mute) {
-		codec_dai->driver->ops->digital_mute = ams_delta_digital_mute;
 	} else {
 		ams_delta_ops.startup = ams_delta_startup;
 		ams_delta_ops.shutdown = ams_delta_shutdown;

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

* [Resend] [PATCH] ASoC: Amstrad Delta: fix const related build error
  2011-02-01  9:38 [PATCH] ASoC: Amstrad Delta: fix const related build error Janusz Krzysztofik
@ 2011-02-01 10:11 ` Janusz Krzysztofik
  2011-02-01 14:02   ` Liam Girdwood
  2011-02-01 14:16   ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Janusz Krzysztofik @ 2011-02-01 10:11 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

The Amstrad Delta ASoC driver used to override the digital_mute() 
callback, expected to be not provided by the on-board CX20442 CODEC 
driver, with its own implementation. While this is still posssible when 
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442 
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct 
after the snd_soc_dai_driver.ops member has been constified, and results 
in build error.

Drop this actually not used code path in hope the CX20442 driver never 
provides its own snd_soc_dai_ops structure.

Created and tested against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
Resending because of line wrap, sorry.
Please consider queuing this patch for the current rc cycle.

 sound/soc/omap/ams-delta.c |    2 --
 1 file changed, 2 deletions(-)

--- git/sound/soc/omap/ams-delta.c.orig	2011-01-31 19:49:29.000000000 +0100
+++ git/sound/soc/omap/ams-delta.c	2011-01-31 23:24:45.000000000 +0100
@@ -507,8 +507,6 @@ static int ams_delta_cx20442_init(struct
 	/* Set up digital mute if not provided by the codec */
 	if (!codec_dai->driver->ops) {
 		codec_dai->driver->ops = &ams_delta_dai_ops;
-	} else if (!codec_dai->driver->ops->digital_mute) {
-		codec_dai->driver->ops->digital_mute = ams_delta_digital_mute;
 	} else {
 		ams_delta_ops.startup = ams_delta_startup;
 		ams_delta_ops.shutdown = ams_delta_shutdown;

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

* Re: [Resend] [PATCH] ASoC: Amstrad Delta: fix const related build error
  2011-02-01 10:11 ` [Resend] " Janusz Krzysztofik
@ 2011-02-01 14:02   ` Liam Girdwood
  2011-02-01 14:16   ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2011-02-01 14:02 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: alsa-devel, Mark Brown

On Tue, 2011-02-01 at 11:11 +0100, Janusz Krzysztofik wrote:
> The Amstrad Delta ASoC driver used to override the digital_mute() 
> callback, expected to be not provided by the on-board CX20442 CODEC 
> driver, with its own implementation. While this is still posssible when 
> substituting the whole empty snd_soc_dai_driver.ops member (the CX20442 
> case), replacing snd_soc_dai_ops.digital_mute only is no longer correct 
> after the snd_soc_dai_driver.ops member has been constified, and results 
> in build error.
> 
> Drop this actually not used code path in hope the CX20442 driver never 
> provides its own snd_soc_dai_ops structure.
> 
> Created and tested against linux-2.6.38-rc2
> 
> Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
> ---
> Resending because of line wrap, sorry.
> Please consider queuing this patch for the current rc cycle.
> 

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

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

* Re: [Resend] [PATCH] ASoC: Amstrad Delta: fix const related build error
  2011-02-01 10:11 ` [Resend] " Janusz Krzysztofik
  2011-02-01 14:02   ` Liam Girdwood
@ 2011-02-01 14:16   ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2011-02-01 14:16 UTC (permalink / raw)
  To: Janusz Krzysztofik; +Cc: alsa-devel, Liam Girdwood

On Tue, Feb 01, 2011 at 11:11:55AM +0100, Janusz Krzysztofik wrote:
> The Amstrad Delta ASoC driver used to override the digital_mute() 
> callback, expected to be not provided by the on-board CX20442 CODEC 
> driver, with its own implementation. While this is still posssible when 

Applied, thanks.

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

end of thread, other threads:[~2011-02-01 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01  9:38 [PATCH] ASoC: Amstrad Delta: fix const related build error Janusz Krzysztofik
2011-02-01 10:11 ` [Resend] " Janusz Krzysztofik
2011-02-01 14:02   ` Liam Girdwood
2011-02-01 14:16   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).