Ticket #1493 (assigned defect)

Opened 6 years ago

Last modified 6 years ago

when press power button makes some noise during suspend time.

Reported by: regina_kim Owned by: graeme@…
Priority: high Milestone: Om2008.8
Component: kernel Version:
Severity: major Keywords:
Cc: will@…, wendy_hung@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

kernel : 20080621-asu.stable-uImage.bin
rootfs : 20080623-asu.stable-rootfs.jffs2

summary : when press power button makes some noise during suspend time.
step :
1.set suspend time.
2.when suspend time press power button.

current result : when press power button can hear sound

expected result :it should wake up with any noise

Change History

comment:1 Changed 6 years ago by regina_kim

  • Component changed from Qtopia to System Software

comment:2 Changed 6 years ago by roh

  • Cc will@… added; will@… removed

comment:3 Changed 6 years ago by roh

  • Owner changed from zecke@… to zecke

comment:4 Changed 6 years ago by will

  • Status changed from new to in_testing

last several times i checked, this noise was gone.
please check.

comment:5 Changed 6 years ago by regina_kim

  • Status changed from in_testing to assigned
  • Owner changed from zecke to holger

kernel : 200807017-asu.stable-uImage.bin
rootfs : 200807017-asu.stable-rootfs.jffs2

no still it happens and even press power button for power on.

comment:6 Changed 6 years ago by roh

  • Owner changed from holger to zecke

the user holger does not exist. its zecke

comment:7 Changed 6 years ago by will

  • Status changed from assigned to in_testing

comment:8 Changed 6 years ago by regina_kim

  • Owner changed from zecke to graeme@…
  • Status changed from in_testing to assigned

the noise turns out to be not noise, but the 'clicking' sound generaated from audio.
Ii personally do not like the sound. if someone would be as nice to take it out that would be great

comment:9 Changed 6 years ago by regina_kim

  • Priority changed from normal to high
  • Severity changed from normal to major

comment:10 Changed 6 years ago by ato

Hmm. The click seems to occur actually quite a time after the kernel has finished the resume process. I'm uncertain whether it is the amp being enabled, or the audio codec that is generating it. In normal running state there's no "click" on turning on and off the amp, so that leads me to think it's the codec or something else. You can mask it (see patch below) by delaying 2 seconds to turn the AMO on after ALSA finishes it's resume stuff, but this probably would mean we'd miss the first part of the ringtone on incoming call, which would be IMO even more annoying than the "click".

Maybe it would be better to keep the amp turned off unless something is actually playing a sound stream? That'd probably avoid this problem and might even save some power? Please correct me if this assumption is wrong.

diff --git a/sound/soc/s3c24xx/neo1973_gta02_wm8753.c b/sound/soc/s3c24xx/neo1973_gta02_wm8753.c
index dbc9c18..413970b 100644
--- a/sound/soc/s3c24xx/neo1973_gta02_wm8753.c
+++ b/sound/soc/s3c24xx/neo1973_gta02_wm8753.c
@@ -58,6 +58,7 @@
 #define NEO_STEREO_TO_HANDSET_SPK      9
 
 static struct snd_soc_machine neo1973_gta02;
+static struct timer_list lm4853_wakeup_timer;
 
 static int neo1973_gta02_hifi_hw_params(struct snd_pcm_substream *substream,
        struct snd_pcm_hw_params *params)
@@ -576,9 +577,17 @@ static struct snd_soc_dai_link neo1973_gta02_dai[] = {
 },
 };
 
+void lm4853_wakeup(unsigned long data)
+{
+       if(lm4853_state & LM4853_AMP)
+               s3c2410_gpio_setpin(GTA02_GPIO_AMP_SHUT, 0);
+}
+
 #ifdef CONFIG_PM
 int neo1973_gta02_suspend(struct platform_device *pdev, pm_message_t state)
 {
+       del_singleshot_timer_sync(&lm4853_wakeup_timer);
+
        s3c2410_gpio_setpin(GTA02_GPIO_AMP_SHUT, 1);
 
        return 0;
@@ -586,8 +595,14 @@ int neo1973_gta02_suspend(struct platform_device *pdev, pm_message_t state)
 
 int neo1973_gta02_resume(struct platform_device *pdev)
 {
-       if(lm4853_state & LM4853_AMP)
-               s3c2410_gpio_setpin(GTA02_GPIO_AMP_SHUT, 0);
+       if(lm4853_state & LM4853_AMP) {
+               /*
+                * Lets wait a bit before turning on the amp to prevent the
+                * speaker from making a "pop" noise.
+                */
+               lm4853_wakeup_timer.expires = jiffies + msecs_to_jiffies(2000);
+               add_timer(&lm4853_wakeup_timer);
+       }
 
        return 0;
 }
@@ -639,6 +654,9 @@ static int __init neo1973_gta02_init(void)
        if (ret)
                platform_device_put(neo1973_gta02_snd_device);
 
+       init_timer(&lm4853_wakeup_timer);
+       lm4853_wakeup_timer.function = lm4853_wakeup;
+
        /* Initialise GPIOs used by amp */
        s3c2410_gpio_cfgpin(GTA02_GPIO_HP_IN, S3C2410_GPIO_OUTPUT);
        s3c2410_gpio_cfgpin(GTA02_GPIO_AMP_SHUT, S3C2410_GPIO_OUTPUT);
@@ -654,6 +672,7 @@ static int __init neo1973_gta02_init(void)
 
 static void __exit neo1973_gta02_exit(void)
 {
+       del_singleshot_timer_sync(&lm4853_wakeup_timer);
        platform_device_unregister(neo1973_gta02_snd_device);
 }

comment:11 Changed 6 years ago by ato

Oops. s/AMO/amp/ if that typo wasn't clear. ;-)

comment:12 Changed 6 years ago by john_lee

  • HasPatchForReview unset

is this really an 'high' priority 'major' defect that must be solved? will graeme work on it after he got reassigned to something else? please reply so we can decide what to do with this one.

comment:13 Changed 6 years ago by regina_kim

it is serious compare the my previous experience.because i had experience some customer complain about specific things.and severity standard is different between engineer and us.maybe GTA03 should be improve this problem.

comment:14 Changed 6 years ago by lindi

amixer -q -d sset "Amp Spk" mute
sleep 4
apm -s
sleep 1
amixer -q -d sset "Amp Spk" unmute

works for me. I don't hear a thing on suspend/resume even if I hold
the phone near my ear.

Note: See TracTickets for help on using tickets.