Send buglog mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.openmoko.org/mailman/listinfo/buglog
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of buglog digest..."
Today's Topics:
1. Openmoko Bug #2478: linux 2.6.39: alsa state not correctly
restored in resume (Openmoko Public Trac)
2. Re: Openmoko Bug #2478: linux 2.6.39: alsa state not
correctly restored in resume (Openmoko Public Trac)
3. Re: Openmoko Bug #2478: linux 2.6.39: alsa state not
correctly restored in resume (Openmoko Public Trac)
4. Re: Openmoko Bug #2478: linux 2.6.39: alsa state not
correctly restored in resume (Openmoko Public Trac)
--- Begin Message ---
#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
---------------------+------------------------------------------------------
I am using SHR 2.6.39-nodrm branch at 74c481b35be9bf9b7d74c481b35be9bf9b7d
with config from http://build.shr-project.org/tests/jama/kernel-
nodrm/config-2.6.39.gz
{{{
Steps to reproduce:
1) save the attached statefile as stereoout.state
2) alsactl restore -f stereoout.state
3) alsactl store -f step3.state
4) speaker-test -t sine
5) echo mem > /sys/power/state
6) alsactl store -f step6.state
7) speaker-test -t sine
Expected results:
3 & 6) alsa states look identical
4 & 7) sine wave can be heard
Actual results:
3 & 6) alsa states look identical
4) sine wave can be heard
7) nothing can be heard
More info:
1) After step7 I can fix the situation if I run
amixer -qc0 cset numid=27,name='Capture Filter Switch' off
amixer -qc0 cset numid=27,name='Capture Filter Switch' on
amixer -qc0 cset numid=24,name='Capture Switch' on,on
amixer -qc0 cset numid=24,name='Capture Switch' off,off
amixer -qc0 cset numid=67,name='ALC Mixer Mic2 Capture Switch' on
amixer -qc0 cset numid=67,name='ALC Mixer Mic2 Capture Switch' off
amixer -qc0 cset numid=59,name='Amp Spk Switch' off
amixer -qc0 cset numid=59,name='Amp Spk Switch' on
amixer -qc0 cset numid=92,name='Left Mixer Left Playback Switch' off
amixer -qc0 cset numid=92,name='Left Mixer Left Playback Switch' on
speaker-test -t sine
2) My guess is that kernel is caching some value and does not write it to
hardware since it thinks it already has the right value. Toggling the
controls back and forth thus can fix the issue.
}}}
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2478>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
--- End Message ---
--- Begin Message ---
#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):
{{{
Here are some results from systemtap during suspend/resume:
$ stap -e 'probe module("snd_soc_core").function("snd_soc_resume") {
printf("%s %s\n", probefunc(), $$parms); }'
prints ""snd_soc_resume dev=0xc7af5c08"
$ stap -e 'probe module("snd_soc_wm8753").function("wm8753_resume") {
printf("%s %s\n", probefunc(), $$parms); }'
does not print anything.
dmesg has "soc-audio soc-audio: resume work item may be lost"
Does this mean that the resume handling of wm8753 was completely skipped?
}}}
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2478#comment:1>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
--- End Message ---
--- Begin Message ---
#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):
The
"soc-audio soc-audio: resume work item may be lost"
part is probably fixed upstream in
http://mailman.alsa-project.org/pipermail/alsa-devel/2011-May/040185.html
but I don't think this explains why wm8753_resume never gets called
--
Ticket URL: <https://docs.openmoko.org/trac/ticket/2478#comment:2>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac
--- End Message ---
--- Begin Message ---
#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@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
--- End Message ---
_______________________________________________
buglog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/buglog