Re: [alsa-devel] [PATCH 2/2] ASoC: Add headset jack detection for SDP3430 machine driver

2009-03-06 Thread Mark Brown
On Thu, Mar 05, 2009 at 11:32:31AM -0600, Lopez Cruz, Misael wrote: Add headset jack detection for SDP3430 boards using SoC jack reporting interface. Headset detection on SDP3430 board is achieved through TWL4030 GPIO_2 pin. Applied, thanks. One comment: +/* Headset jack detection gpios */

[PATCH 2/2] ASoC: Add headset jack detection for SDP3430 machine driver

2009-03-05 Thread Lopez Cruz, Misael
Add headset jack detection for SDP3430 boards using SoC jack reporting interface. Headset detection on SDP3430 board is achieved through TWL4030 GPIO_2 pin. Signed-off-by: Misael Lopez Cruz x0052...@ti.com --- sound/soc/omap/sdp3430.c | 43 +-- 1 files

[PATCH 2/2] ASoC: Add headset jack detection for SDP3430 machine driver

2009-03-04 Thread Lopez Cruz, Misael
Add headset jack detection for SDP3430 boards using SoC jack reporting interface. Headset detection on SDP3430 board is achieved through TWL4030 GPIO_2 pin. Signed-off-by: Misael Lopez Cruz x0052...@ti.com --- sound/soc/omap/sdp3430.c | 49 - 1 files

Re: [PATCH 2/2] ASoC: Add headset jack detection for SDP3430 machine driver

2009-03-04 Thread Mark Brown
On Wed, Mar 04, 2009 at 11:39:12AM -0600, Lopez Cruz, Misael wrote: +/* Headset jack */ +struct snd_soc_jack *hs_jack; This (and all your other globals) should be declared static. +/* Headset jack DAPM pins */ +struct snd_soc_jack_pin hs_jack_pins[] = { + { + .pin =

RE: [PATCH 2/2] ASoC: Add headset jack detection for SDP3430 machine driver

2009-03-04 Thread Lopez Cruz, Misael
+ ret = snd_soc_jack_new(snd_soc_sdp3430, SDP3430 headset jack, + SND_JACK_HEADSET, hs_jack); + if (ret) + return ret; This leaks the jack. If hs_jack is declared as a direct static variable instead, then no mem leaks, isn't it? Or do you mean to