All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Disable headset jack detection for SDP3430
@ 2009-11-10 17:54 Romero, Felipe
  2009-11-10 18:08 ` Nishanth Menon
  2009-11-11 14:36 ` Premi, Sanjeev
  0 siblings, 2 replies; 4+ messages in thread
From: Romero, Felipe @ 2009-11-10 17:54 UTC (permalink / raw)
  To: linux-omap

From: Felipe Romero <felipe.romero@ti.com>

This patch Disable headset jack detection for SDP3430 boards,
to avoid CPU kernel utilization.
---
 sound/soc/omap/sdp3430.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
index b719e5d..3ef489e 100644
--- a/sound/soc/omap/sdp3430.c
+++ b/sound/soc/omap/sdp3430.c
@@ -196,8 +196,8 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
 	/* SDP3430 connected pins */
 	snd_soc_dapm_enable_pin(codec, "Ext Mic");
 	snd_soc_dapm_enable_pin(codec, "Ext Spk");
-	snd_soc_dapm_disable_pin(codec, "Headset Mic");
-	snd_soc_dapm_disable_pin(codec, "Headset Stereophone");
+	snd_soc_dapm_enable_pin(codec, "Headset Mic");
+	snd_soc_dapm_enable_pin(codec, "Headset Stereophone");
 
 	/* TWL4030 not connected pins */
 	snd_soc_dapm_nc_pin(codec, "AUXL");
@@ -217,7 +217,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
 	ret = snd_soc_dapm_sync(codec);
 	if (ret)
 		return ret;
-
+#if 0
 	/* Headset jack detection */
 	ret = snd_soc_jack_new(&snd_soc_sdp3430, "Headset Jack",
 				SND_JACK_HEADSET, &hs_jack);
@@ -231,7 +231,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
 
 	ret = snd_soc_jack_add_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
 				hs_jack_gpios);
-
+#endif
 	return ret;
 }
 
@@ -328,9 +328,10 @@ module_init(sdp3430_soc_init);
 
 static void __exit sdp3430_soc_exit(void)
 {
+#if 0
 	snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
 				hs_jack_gpios);
-
+#endif
 	platform_device_unregister(sdp3430_snd_device);
 }
 module_exit(sdp3430_soc_exit);
-- 
1.6.0.4


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

* Re: [PATCH] Disable headset jack detection for SDP3430
  2009-11-10 17:54 [PATCH] Disable headset jack detection for SDP3430 Romero, Felipe
@ 2009-11-10 18:08 ` Nishanth Menon
  2009-11-11 14:36 ` Premi, Sanjeev
  1 sibling, 0 replies; 4+ messages in thread
From: Nishanth Menon @ 2009-11-10 18:08 UTC (permalink / raw)
  To: Romero, Felipe; +Cc: linux-omap

Romero, Felipe had written, on 11/10/2009 11:54 AM, the following:
> From: Felipe Romero <felipe.romero@ti.com>
> 
> This patch Disable headset jack detection for SDP3430 boards,
> to avoid CPU kernel utilization.

please read Documentation/SubmittingPatches
12) Sign your work

> ---
>  sound/soc/omap/sdp3430.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
> index b719e5d..3ef489e 100644
> --- a/sound/soc/omap/sdp3430.c
> +++ b/sound/soc/omap/sdp3430.c
> @@ -196,8 +196,8 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
>  	/* SDP3430 connected pins */
>  	snd_soc_dapm_enable_pin(codec, "Ext Mic");
>  	snd_soc_dapm_enable_pin(codec, "Ext Spk");
> -	snd_soc_dapm_disable_pin(codec, "Headset Mic");
> -	snd_soc_dapm_disable_pin(codec, "Headset Stereophone");
> +	snd_soc_dapm_enable_pin(codec, "Headset Mic");
> +	snd_soc_dapm_enable_pin(codec, "Headset Stereophone");
>  
>  	/* TWL4030 not connected pins */
>  	snd_soc_dapm_nc_pin(codec, "AUXL");
> @@ -217,7 +217,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
>  	ret = snd_soc_dapm_sync(codec);
>  	if (ret)
>  		return ret;
> -
> +#if 0
NAK to #if 0s. if you dont need that code, please remove it
>  	/* Headset jack detection */
>  	ret = snd_soc_jack_new(&snd_soc_sdp3430, "Headset Jack",
>  				SND_JACK_HEADSET, &hs_jack);
> @@ -231,7 +231,7 @@ static int sdp3430_twl4030_init(struct snd_soc_codec *codec)
>  
>  	ret = snd_soc_jack_add_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
>  				hs_jack_gpios);
> -
> +#endif
>  	return ret;
>  }
>  
> @@ -328,9 +328,10 @@ module_init(sdp3430_soc_init);
>  
>  static void __exit sdp3430_soc_exit(void)
>  {
> +#if 0
NAK to #if 0s. if you dont need that code, please remove it
>  	snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
>  				hs_jack_gpios);
> -
> +#endif
>  	platform_device_unregister(sdp3430_snd_device);
>  }
>  module_exit(sdp3430_soc_exit);


-- 
Regards,
Nishanth Menon

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

* RE: [PATCH] Disable headset jack detection for SDP3430
  2009-11-10 17:54 [PATCH] Disable headset jack detection for SDP3430 Romero, Felipe
  2009-11-10 18:08 ` Nishanth Menon
@ 2009-11-11 14:36 ` Premi, Sanjeev
  2009-11-11 15:27   ` Romero, Felipe
  1 sibling, 1 reply; 4+ messages in thread
From: Premi, Sanjeev @ 2009-11-11 14:36 UTC (permalink / raw)
  To: Romero, Felipe, linux-omap

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org 
> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Romero, Felipe
> Sent: Tuesday, November 10, 2009 11:24 PM
> To: linux-omap@vger.kernel.org
> Subject: [PATCH] Disable headset jack detection for SDP3430
> 
> From: Felipe Romero <felipe.romero@ti.com>
> 
> This patch Disable headset jack detection for SDP3430 boards,
> to avoid CPU kernel utilization.

[sp] I was wondering if you have measured savings in the
     cpu utilization.

Best regards,
Sanjeev

> ---
>  sound/soc/omap/sdp3430.c |   11 ++++++-----
>  1 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
> index b719e5d..3ef489e 100644
> --- a/sound/soc/omap/sdp3430.c
> +++ b/sound/soc/omap/sdp3430.c
> @@ -196,8 +196,8 @@ static int sdp3430_twl4030_init(struct 
> snd_soc_codec *codec)
>  	/* SDP3430 connected pins */
>  	snd_soc_dapm_enable_pin(codec, "Ext Mic");
>  	snd_soc_dapm_enable_pin(codec, "Ext Spk");
> -	snd_soc_dapm_disable_pin(codec, "Headset Mic");
> -	snd_soc_dapm_disable_pin(codec, "Headset Stereophone");
> +	snd_soc_dapm_enable_pin(codec, "Headset Mic");
> +	snd_soc_dapm_enable_pin(codec, "Headset Stereophone");
>  
>  	/* TWL4030 not connected pins */
>  	snd_soc_dapm_nc_pin(codec, "AUXL");
> @@ -217,7 +217,7 @@ static int sdp3430_twl4030_init(struct 
> snd_soc_codec *codec)
>  	ret = snd_soc_dapm_sync(codec);
>  	if (ret)
>  		return ret;
> -
> +#if 0
>  	/* Headset jack detection */
>  	ret = snd_soc_jack_new(&snd_soc_sdp3430, "Headset Jack",
>  				SND_JACK_HEADSET, &hs_jack);
> @@ -231,7 +231,7 @@ static int sdp3430_twl4030_init(struct 
> snd_soc_codec *codec)
>  
>  	ret = snd_soc_jack_add_gpios(&hs_jack, 
> ARRAY_SIZE(hs_jack_gpios),
>  				hs_jack_gpios);
> -
> +#endif
>  	return ret;
>  }
>  
> @@ -328,9 +328,10 @@ module_init(sdp3430_soc_init);
>  
>  static void __exit sdp3430_soc_exit(void)
>  {
> +#if 0
>  	snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
>  				hs_jack_gpios);
> -
> +#endif
>  	platform_device_unregister(sdp3430_snd_device);
>  }
>  module_exit(sdp3430_soc_exit);
> -- 
> 1.6.0.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe 
> linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

* RE: [PATCH] Disable headset jack detection for SDP3430
  2009-11-11 14:36 ` Premi, Sanjeev
@ 2009-11-11 15:27   ` Romero, Felipe
  0 siblings, 0 replies; 4+ messages in thread
From: Romero, Felipe @ 2009-11-11 15:27 UTC (permalink / raw)
  To: Premi, Sanjeev, linux-omap



> -----Original Message-----
> From: Premi, Sanjeev 
> Sent: Wednesday, November 11, 2009 8:36 AM
> To: Romero, Felipe; linux-omap@vger.kernel.org
> Subject: RE: [PATCH] Disable headset jack detection for SDP3430
>
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org 
>> [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Romero, Felipe
>> Sent: Tuesday, November 10, 2009 11:24 PM
>> To: linux-omap@vger.kernel.org
>> Subject: [PATCH] Disable headset jack detection for SDP3430
>> 
>> From: Felipe Romero <felipe.romero@ti.com>
>> 
>> This patch Disable headset jack detection for SDP3430 boards,
>> to avoid CPU kernel utilization.
>
>[sp] I was wondering if you have measured savings in the
>     cpu utilization.
>
>Best regards,
>Sanjeev

I just measured with the Top tool but the percentage of cpu is consumed 
By the event[0] for more that 90%, and with the patch this factor is 
Totally reduced. 
   

>> ---
>>  sound/soc/omap/sdp3430.c |   11 ++++++-----
>>  1 files changed, 6 insertions(+), 5 deletions(-)
>> 
>> diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c
>> index b719e5d..3ef489e 100644
>> --- a/sound/soc/omap/sdp3430.c
>> +++ b/sound/soc/omap/sdp3430.c
>> @@ -196,8 +196,8 @@ static int sdp3430_twl4030_init(struct 
>> snd_soc_codec *codec)
>>  	/* SDP3430 connected pins */
>>  	snd_soc_dapm_enable_pin(codec, "Ext Mic");
>>  	snd_soc_dapm_enable_pin(codec, "Ext Spk");
>> -	snd_soc_dapm_disable_pin(codec, "Headset Mic");
>> -	snd_soc_dapm_disable_pin(codec, "Headset Stereophone");
>> +	snd_soc_dapm_enable_pin(codec, "Headset Mic");
>> +	snd_soc_dapm_enable_pin(codec, "Headset Stereophone");
>>  
>>  	/* TWL4030 not connected pins */
>>  	snd_soc_dapm_nc_pin(codec, "AUXL");
>> @@ -217,7 +217,7 @@ static int sdp3430_twl4030_init(struct 
>> snd_soc_codec *codec)
>>  	ret = snd_soc_dapm_sync(codec);
>>  	if (ret)
>>  		return ret;
>> -
>> +#if 0
>>  	/* Headset jack detection */
>>  	ret = snd_soc_jack_new(&snd_soc_sdp3430, "Headset Jack",
>>  				SND_JACK_HEADSET, &hs_jack);
>> @@ -231,7 +231,7 @@ static int sdp3430_twl4030_init(struct 
>> snd_soc_codec *codec)
>>  
>>  	ret = snd_soc_jack_add_gpios(&hs_jack, 
>> ARRAY_SIZE(hs_jack_gpios),
>>  				hs_jack_gpios);
>> -
>> +#endif
>>  	return ret;
>>  }
>>  
>> @@ -328,9 +328,10 @@ module_init(sdp3430_soc_init);
>>  
>>  static void __exit sdp3430_soc_exit(void)
>>  {
>> +#if 0
>>  	snd_soc_jack_free_gpios(&hs_jack, ARRAY_SIZE(hs_jack_gpios),
>>  				hs_jack_gpios);
>> -
>> +#endif
>>  	platform_device_unregister(sdp3430_snd_device);
>>  }
>>  module_exit(sdp3430_soc_exit);
>> -- 
>> 1.6.0.4
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe 
>> linux-omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
>> 

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

end of thread, other threads:[~2009-11-11 15:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 17:54 [PATCH] Disable headset jack detection for SDP3430 Romero, Felipe
2009-11-10 18:08 ` Nishanth Menon
2009-11-11 14:36 ` Premi, Sanjeev
2009-11-11 15:27   ` Romero, Felipe

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.