All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: zoom2: Remove HS mux GPIO handling to avoid kernel crash due to BUG_ON()
@ 2012-12-03  8:39 Peter Ujfalusi
  2012-12-03  8:41 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2012-12-03  8:39 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: alsa-devel, Misael Lopez Cruz

The machine driver try to use GPIO15 of twl4030 for HS MUX which supposed to
select between TWL's HSOL/R and tlv320aic3254's HPL/R.
The TWL's GPIO allocated dynamically so the (OMAP_MAX_GPIO_LINES + 15) is no
longer valid GPIO number causing a kernel crash due to BUG_ON()
Also the current machine driver supports only TWL audio currently: there is
no need to control the GPIO.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
Hi Liam, Mark,

I just got one zoom2 board and this patch is needed to get the board booting
when audio is enabled.
For 3.9 I will convert the machine driver to platform device/driver, but to get
3.8 kernel booting this patch is needed.

Regards,
Peter

 sound/soc/omap/zoom2.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c
index 1ff6bb9..771bff2 100644
--- a/sound/soc/omap/zoom2.c
+++ b/sound/soc/omap/zoom2.c
@@ -37,8 +37,6 @@
 #include "omap-mcbsp.h"
 #include "omap-pcm.h"
 
-#define ZOOM2_HEADSET_MUX_GPIO		(OMAP_MAX_GPIO_LINES + 15)
-
 static int zoom2_hw_params(struct snd_pcm_substream *substream,
 				struct snd_pcm_hw_params *params)
 {
@@ -187,9 +185,6 @@ static int __init zoom2_soc_init(void)
 	if (ret)
 		goto err1;
 
-	BUG_ON(gpio_request(ZOOM2_HEADSET_MUX_GPIO, "hs_mux") < 0);
-	gpio_direction_output(ZOOM2_HEADSET_MUX_GPIO, 0);
-
 	return 0;
 
 err1:
@@ -202,8 +197,6 @@ module_init(zoom2_soc_init);
 
 static void __exit zoom2_soc_exit(void)
 {
-	gpio_free(ZOOM2_HEADSET_MUX_GPIO);
-
 	platform_device_unregister(zoom2_snd_device);
 }
 module_exit(zoom2_soc_exit);
-- 
1.8.0

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

* Re: [PATCH] ASoC: zoom2: Remove HS mux GPIO handling to avoid kernel crash due to BUG_ON()
  2012-12-03  8:39 [PATCH] ASoC: zoom2: Remove HS mux GPIO handling to avoid kernel crash due to BUG_ON() Peter Ujfalusi
@ 2012-12-03  8:41 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-12-03  8:41 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Liam Girdwood, Misael Lopez Cruz

On Mon, Dec 03, 2012 at 09:39:08AM +0100, Peter Ujfalusi wrote:
> The machine driver try to use GPIO15 of twl4030 for HS MUX which supposed to
> select between TWL's HSOL/R and tlv320aic3254's HPL/R.

Applied, thanks.

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

end of thread, other threads:[~2012-12-03  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-03  8:39 [PATCH] ASoC: zoom2: Remove HS mux GPIO handling to avoid kernel crash due to BUG_ON() Peter Ujfalusi
2012-12-03  8:41 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.