All of lore.kernel.org
 help / color / mirror / Atom feed
* No shutdown code in soc-core.c
@ 2010-04-16  2:29 ANISH KUMAR
  2010-04-16 16:03 ` Liam Girdwood
  2010-04-16 18:47 ` Mark Brown
  0 siblings, 2 replies; 11+ messages in thread
From: ANISH KUMAR @ 2010-04-16  2:29 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org
  Cc: liam.girdwood@wolfsonmicro.com,
	broonie@opensource.wolfsonmicro.com

I have a doubt regarding this soc_driver struct which is defined 
in soc-core.c file.Why not soc_shutdown code is added in this 
struct??

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: No shutdown code in soc-core.c
@ 2010-04-16 16:44 ANISH KUMAR
  2010-04-16 17:21 ` Liam Girdwood
  0 siblings, 1 reply; 11+ messages in thread
From: ANISH KUMAR @ 2010-04-16 16:44 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org,
	broonie@opensource.wolfsonmicro.com


>What are you trying to do ?
 
There was a "TAK" noise because of non-presence of this code.
This soc_shutdown calls the respective shutdown code in codec
for prevention of this kind of strange noise.In my code it is turning
off the Amplifier because of which i no longer get the "TAK" sound.

So i am just wondering why this code is not present in the struct 
i mentioned in my previous mail.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: No shutdown code in soc-core.c
@ 2010-04-17  7:02 ANISH KUMAR
  2010-04-19 12:15 ` Liam Girdwood
  0 siblings, 1 reply; 11+ messages in thread
From: ANISH KUMAR @ 2010-04-17  7:02 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org,
	broonie@opensource.wolfsonmicro.com

Why this shutdown filed is not there in the struct shown below:
static struct platform_driver soc_driver 
{
.shutdown       = soc_shutdown,                  //soc-core.c 
}
This shutdown call this codec_dev->shutdown function 
In my case i am turning off the amplifier using this call.Which
solved my problem of "TAK" sound during reset.

I agree that soc_codec_close() is calling the shutdown function
but in my case there is a call to set the path after this which is
turning on the amplifier and suddenly if we reset the phone it is
causing "TAK" sound.Probably because AMPLIFIER was on.

Anyway why this function call soc_shutdown() is there in 
soc-core.c if no one is calling it???
I know there will be a redundancy if we have shutdown field
in the struct shown above as soc_codec_close call also calls
codec shutdown code.
But in my case it is solving my problem. 

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: No shutdown code in soc-core.c
@ 2010-04-19 13:19 ANISH KUMAR
  2010-04-19 14:10 ` Liam Girdwood
  0 siblings, 1 reply; 11+ messages in thread
From: ANISH KUMAR @ 2010-04-19 13:19 UTC (permalink / raw)
  To: Liam Girdwood
  Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org,
	broonie@opensource.wolfsonmicro.com


>Did you see Mark's reply on dev_pm_ops ? 

>i.e. 

>static const struct dev_pm_ops soc_pm_ops = { 
>   .suspend = soc_suspend, 
>    .resume = soc_resume, 
>   .poweroff = soc_poweroff, 
>};
 
 I missed out Mark reply.However i checked now  this structure is 
 not there in my code base.As i mentioned in my previous mail 
 the flow of events when restart takes place.
 Anyway i thought something is amiss in this struct platform_driver soc_driver 
 that is why i am mailing to the experts here otherwise my
 problem is fixed by having the code as mentioned in my previous 
 mail.
I just wanted to know the reason?Or Am i missing something probably the concept
of turning off the audio driver??
Kerenl version used: 2.6.29

Regards,
anish

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: No shutdown code in soc-core.c
@ 2010-04-22  8:10 ANISH KUMAR
  0 siblings, 0 replies; 11+ messages in thread
From: ANISH KUMAR @ 2010-04-22  8:10 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: liam.girdwood@wolfsonmicro.com, alsa-devel@alsa-project.org


Thanks everyone for the replies but i think for this trivial problem
i don't need to backport the kernel.Anyway now i know the answer
for my posted question.I have kept backporting as an excersie
as my assignment which i will do in due period of time.

 
 

------- Original Message-------
Sender: Mark Brown<broonie@opensource.wolfsonmicro.com>
Date: Apr 20, 2010 01:59 (GMT+09:00)
Title: Re: [alsa-devel] No shutdown code in soc-core.c

On Mon, Apr 19, 2010 at 03:10:55PM +0100, Liam Girdwood wrote: 

> Ah, your kernel is very old. I would just do what you are currently 
> doing with shutdown and use the dev_pm_ops when you upgrade your kernel. 

Actually, IME it's probably as easy to just backport current ASoC to 
2.6.29 if you're doing anything non-trivial - the backport is very 
straightforward for most platforms and the benefits of the enhancements 
in ASoC are well worth the effort. 

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

end of thread, other threads:[~2010-04-22  8:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-16  2:29 No shutdown code in soc-core.c ANISH KUMAR
2010-04-16 16:03 ` Liam Girdwood
2010-04-16 18:47 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2010-04-16 16:44 ANISH KUMAR
2010-04-16 17:21 ` Liam Girdwood
2010-04-17  7:02 ANISH KUMAR
2010-04-19 12:15 ` Liam Girdwood
2010-04-19 13:19 ANISH KUMAR
2010-04-19 14:10 ` Liam Girdwood
2010-04-19 16:59   ` Mark Brown
2010-04-22  8:10 ANISH KUMAR

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.