Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume
Openmoko Public Trac
bugs at docs.openmoko.org
Fri Oct 28 01:49:59 CEST 2011
#2478: linux 2.6.39: alsa state not correctly restored in resume
---------------------+------------------------------------------------------
Reporter: lindi | Owner: openmoko-kernel
Type: defect | Status: new
Priority: high | Milestone:
Component: kernel | Version:
Severity: blocker | Keywords: kernel alsa suspend resume linux 2.6.39
Haspatch: 0 | Blockedby:
Estimated: | Patchreview:
Blocking: | Reproducible: always
---------------------+------------------------------------------------------
Comment(by lindi):
{{{
lindi at ginger:~$ stap -v -e 'probe
module("snd_soc_core").statement("snd_soc_suspend@/home/lindi/debian
/debian-
linux-2.6/linux-2.6-2.6.39/debian/build/source_armel_none/sound/soc/soc-
core.c:1126") { printf("%s %d %x %d\n", pp(), $codec->suspended,
$codec->driver->suspend, $codec->dapm->bias_level); }'
Pass 1: parsed user script and 74 library script(s) using
21340virt/12972res/2156shr kb, in 4090usr/290sys/4378real ms.
Pass 2: analyzed script: 1 probe(s), 4 function(s), 3 embed(s), 0
global(s) using 62840virt/14988res/3020shr kb, in 500usr/430sys/1482real
ms.
Pass 3: translated to C into
"/tmp/stapXzhuo1/stap_a0b7707bb6646bdaa8e34301146c98da_4336.c" using
63748virt/16496res/4084shr kb, in 990usr/210sys/1208real ms.
Pass 4: compiled C into "stap_a0b7707bb6646bdaa8e34301146c98da_4336.ko" in
52030usr/6460sys/58859real ms.
Pass 5: starting run.
module("snd_soc_core").statement("snd_soc_suspend@/home/lindi/debian
/debian-
linux-2.6/linux-2.6-2.6.39/debian/build/source_armel_none/sound/soc/soc-
core.c:1127") 0 0 0
module("snd_soc_core").statement("snd_soc_suspend@/home/lindi/debian
/debian-
linux-2.6/linux-2.6-2.6.39/debian/build/source_armel_none/sound/soc/soc-
core.c:1127") 0 bf09088c 3
}}}
shows that we have two codecs.
The first one has no ".suspend".
The second one has ".suspend" but its "dapm.bias_level" is set to 3 which
is SND_SOC_BIAS_ON. This means that the codec->driver->suspend(codec,
PMSG_SUSPEND); line is not executed and I guess same goes also for
codec->driver->resume(codec);.
If I change bias_level to SND_SOC_BIAS_OFF using
{{{
#!/usr/bin/stap
probe module("snd_soc_core").statement("snd_soc_suspend@/home/lindi/debian
/debian-
linux-2.6/linux-2.6-2.6.39/debian/build/source_armel_none/sound/soc/soc-
core.c:1126") {
if ($codec->dapm->bias_level == 3) {
$codec->dapm->bias_level = 0;
}
}
probe module("snd_soc_wm8753").function("wm8753_suspend") {
printf("%s\n", pp());
}
probe module("snd_soc_wm8753").function("wm8753_resume") {
printf("%s\n", pp());
}
}}}
then wm8753_suspend and wm8753_resume are called and speaker-test works!
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2478#comment:3>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
More information about the openmoko-kernel
mailing list