From bugs at docs.openmoko.org Sat Feb 11 22:59:09 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 21:59:09 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.9ad983eaba104d9b18b514fe6d8988f7@docs.openmoko.org> #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 GNUtoo): The fix doesn't work for me: On serial console(with apm -s in the middle): {{{ root at om-gta02:~# speaker-test -t sine speaker-test 1.0.24.2 Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels Sine wave rate is 440.0000Hz Rate set to 48000Hz (requested 48000Hz) Buffer size range from 2048 to 16384 Period size range from 1024 to 1024 Using max buffer size 16384 Periods = 4 was set period_size = 1024 was set buffer_size = 16384 0 - Front Left Time per period = 2.845838 0 - Front Left T[ 96.155000] soc-audio soc-audio: resume work item may be lost Write error: -86,Streams pipe error [ 96.260000] dma2: channel has nothing loaded }}} I applied that patch to meta-smartphone: {{{ diff --git a/meta-openmoko/recipes-kernel/linux/linux-2.6.39/shr.patch b /meta-openmoko/recipes-kernel/linux/linux-2.6.39/shr.patch index 65d087c..efa59e7 100644 --- a/meta-openmoko/recipes-kernel/linux/linux-2.6.39/shr.patch +++ b/meta-openmoko/recipes-kernel/linux/linux-2.6.39/shr.patch @@ -3,6 +3,7 @@ rebased on top of openmoko kernel repository (om-2.6.39-stable) https://gitorious.org/shr/linux/commits/shr-2.6.39-nodrm +31bdfe1: ASOC: samsung: neo1973_wm8753.c: fix openmoko bug #2478 b851f9f: glamo-mci: disable glamo_mci_pre_request & glamo_mci_post_request 6e1d25a: shr-create-patch.sh: utility used to generate shr.patch for meta-smartphone 352f236: wm8753: Workaround toolchain bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783 @@ -2401,7 +2402,7 @@ index 8275a2f..8e3e56e 100644 #endif /* __GLAMO_CORE_H */ diff --git a/shr-create-patch.sh b/shr-create-patch.sh new file mode 100755 -index 0000000..b251946 +index 0000000..a09d4c2 --- /dev/null +++ b/shr-create-patch.sh @@ -0,0 +1,12 @@ @@ -2413,9 +2414,9 @@ index 0000000..b251946 + +https://gitorious.org/shr/linux/commits/shr-2.6.39-nodrm + -+$(git log --pretty=format:"%h: %s" gitorious/om-2.6.39-stable..) ++$(git log --pretty=format:"%h: %s" d09e21824bacd5f9ac0285c14c6ddc2d79b96608..) + -+$(git diff om-2.6.39-stable) ++$(git diff d09e21824bacd5f9ac0285c14c6ddc2d79b96608) +EOF diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c index ffa2ffe..69c499a 100644 @@ -2441,7 +2442,7 @@ index ffa2ffe..69c499a 100644 { u64 Kpart; diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c -index 4f845fe..a3a1cc8 100644 +index 4f845fe..a7095d9 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -19,6 +19,7 @@ @@ -2507,7 +2508,20 @@ index 4f845fe..a3a1cc8 100644 return 0; } -@@ -527,6 +569,7 @@ module_init(neo1973_init); +@@ -358,12 +400,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) + snd_soc_dapm_disable_pin(dapm, "Headset Mic"); + snd_soc_dapm_disable_pin(dapm, "Handset Mic"); + +- /* allow audio paths from the GSM modem to run during suspend */ +- snd_soc_dapm_ignore_suspend(dapm, "GSM Line Out"); +- snd_soc_dapm_ignore_suspend(dapm, "GSM Line In"); +- snd_soc_dapm_ignore_suspend(dapm, "Headset Mic"); +- snd_soc_dapm_ignore_suspend(dapm, "Handset Mic"); +- + if (machine_is_neo1973_gta02()) { + ret = neo1973_gta02_wm8753_init(codec); + if (ret) +@@ -527,6 +563,7 @@ module_init(neo1973_init); static void __exit neo1973_exit(void) { diff --git a/meta-openmoko/recipes-kernel/linux/linux_2.6.39.bb b/meta- openmoko/recipes-kernel/linux/linux_2.6.39.bb index beebcec..0ff4433 100644 --- a/meta-openmoko/recipes-kernel/linux/linux_2.6.39.bb +++ b/meta-openmoko/recipes-kernel/linux/linux_2.6.39.bb @@ -1,6 +1,6 @@ require linux.inc -PR = "r6" +PR = "r7" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" }}} And build fso2-console-image and did the test mentioned above. -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:04:18 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:04:18 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.6a05f968043bfad592d7d9b046434e98@docs.openmoko.org> #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 GNUtoo): with echo mem > /sys/power/state I've: {{{ root at om-gta02:~# speaker-test -t sine speaker-test 1.0.24.2 Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels Sine wave rate is 440.0000Hz Rate set to 48000Hz (requested 48000Hz) Buffer size range from 2048 to 16384 Period size range from 1024 to 1024 Using max buffer size 16384 Periods = 4 was set period_size = 1024 was set buffer_size = 16384 0 - Front Left Time per period = 2.965543 0 - Front Left Time per period = 2.990143 0 - Front Left T[ 70.315000] soc-audio soc-audio: resume work item may be lost Write error: -86,Streams pipe error [ 70.430000] dma2: channel has nothing loaded Write error: -32,Broken pipe }}} doesn't work means that at resume I've no more sound. Denis. -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:13:37 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:13:37 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.cd53f528a8b7cf1f8f77a63d4f8c7b03@docs.openmoko.org> #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): So you start speaker-test, suspend and resume -- you never stop speaker- test at all? -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:20:09 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:20:09 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.5dee3bef59e704a60fc9cd3f5f1099fc@docs.openmoko.org> #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 GNUtoo): indeed that's what I did. use cases: * a call arrives right when you're suspending => you start playing the ringtone and resume(manually for instance) * you forget to disable suspend while playing music. however stopping the sound/music after resuming and retrying to play it doesn't make the play work again. Denis. -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:21:59 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:21:59 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.63882877abfdc6a4f4874def01db9c0a@docs.openmoko.org> #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): Ok, so this is possibly a new and different bug then. I assume it still works if you follow the steps that I listed in the bug report? -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:27:39 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:27:39 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.500ac1522439d9c0e66f9cc7f96b42ed@docs.openmoko.org> #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 GNUtoo): I also tried that: * playback //sound * suspend+resume //no sound * stop playback //no sound * play again and stop again //no sound * suspend+resume again * play again //sound -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:35:55 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:35:55 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.4db87775948c4cd837e1201817045958@docs.openmoko.org> #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): My theory: wm8753_suspend does not get called since the audio path is busy. This means alsa state is not restored on resume either. -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:39:40 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:39:40 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.2b3943935ef44a0d90ae8684c10d03cf@docs.openmoko.org> #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 GNUtoo): with the test procedure at the beginning, speaker test still can't be ear after suspend, and here's the diff between step3 and step6: {{{ root at om-gta02:~# diff -u step3.state step6.state --- step3.state +++ step6.state @@ -1117,4 +1117,16 @@ count 1 } } + control.94 { + iface MIXER + name 'Media Volume' + value.0 255 + value.1 255 + comment { + access 'read write locked user' + type INTEGER + count 2 + range '0 - 255' + } + } } }}} which is something normal under fso2 images(that's because of a software volume in /etc/asound.conf, which only appear after playing something). Denis. -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sat Feb 11 23:41:09 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 22:41:09 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.74ba2f46ab6e043d19dc2d6b60db7e9d@docs.openmoko.org> #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 GNUtoo): Replying to [comment:17 lindi]: > My theory: wm8753_suspend does not get called since the audio path is busy. This means alsa state is not restored on resume either. what should I do? 1)check if it's not called 2)how would I fix it then? still call it? -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sun Feb 12 00:01:36 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 23:01:36 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.c78e7272dd5aef97d15b3b1844ed8e85@docs.openmoko.org> #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 GNUtoo): I did step 1 to 4 in a console and step 5 to 7 in a new console, which is not what the bug reporter intended.... I'll open a new bug... Denis -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sun Feb 12 00:08:28 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 23:08:28 -0000 Subject: Openmoko Bug #2479: playing a sound and suspending at the same time => no sound at resume on 2.6.39 Message-ID: <048.0c5059d237602f4eb9044edfa6e76f19@docs.openmoko.org> #2479: playing a sound and suspending at the same time => no sound at resume on 2.6.39 ----------------------+----------------------------------------------------- Reporter: GNUtoo | Owner: openmoko-kernel Type: defect | Status: new Priority: high | Milestone: Component: kernel | Version: Severity: critical | Keywords: Haspatch: 0 | Blockedby: Estimated: | Patchreview: Blocking: | Reproducible: always ----------------------+----------------------------------------------------- doing the following result in not beeing to play a sound anymore at resume: {{{ aplay 05.wav echo mem > /sys/power/state #in a new console #press the power button #still no sound killall aplay aplay 05.wav #still no sound }}} -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sun Feb 12 00:09:27 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 23:09:27 -0000 Subject: Openmoko Bug #2479: playing a sound and suspending at the same time => no sound at resume on 2.6.39 In-Reply-To: <048.0c5059d237602f4eb9044edfa6e76f19@docs.openmoko.org> References: <048.0c5059d237602f4eb9044edfa6e76f19@docs.openmoko.org> Message-ID: <057.614cf802e820063a75e378acffb070f4@docs.openmoko.org> #2479: playing a sound and suspending at the same time => no sound at resume on 2.6.39 ----------------------+----------------------------------------------------- Reporter: GNUtoo | Owner: openmoko-kernel Type: defect | Status: new Priority: high | Milestone: Component: kernel | Version: Severity: critical | Keywords: Haspatch: 0 | Blockedby: Estimated: | Patchreview: Blocking: | Reproducible: always ----------------------+----------------------------------------------------- Comment(by GNUtoo): The kernel used is this one: https://gitorious.org/shr/linux/commits/shr-2.6.39-nodrm -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sun Feb 12 00:15:32 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sat, 11 Feb 2012 23:15:32 -0000 Subject: Openmoko Bug #2478: linux 2.6.39: alsa state not correctly restored in resume In-Reply-To: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> References: <047.f4869ae8d11cc055845738c16eaf7245@docs.openmoko.org> Message-ID: <056.6ef4bc7de5a473366bab68e733b83a3d@docs.openmoko.org> #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 GNUtoo): I've verified that the original bug reported here is fixed by the fix reported here. Thanks a lot. Denis. -- Ticket URL: docs.openmoko.org openmoko trac From bugs at docs.openmoko.org Sun Feb 12 01:14:47 2012 From: bugs at docs.openmoko.org (Openmoko Public Trac) Date: Sun, 12 Feb 2012 00:14:47 -0000 Subject: Openmoko Bug #2479: playing a sound and suspending at the same time => no sound at resume on 2.6.39 In-Reply-To: <048.0c5059d237602f4eb9044edfa6e76f19@docs.openmoko.org> References: <048.0c5059d237602f4eb9044edfa6e76f19@docs.openmoko.org> Message-ID: <057.eae351f72b032147c26cf9ca1f59e5bf@docs.openmoko.org> #2479: playing a sound and suspending at the same time => no sound at resume on 2.6.39 ----------------------+----------------------------------------------------- Reporter: GNUtoo | Owner: openmoko-kernel Type: defect | Status: new Priority: high | Milestone: Component: kernel | Version: Severity: critical | Keywords: Haspatch: 0 | Blockedby: Estimated: | Patchreview: Blocking: | Reproducible: always ----------------------+----------------------------------------------------- Comment(by GNUtoo): it does it too with speaker-test Also, after resume: {{{ amixer -qc0 cset numid=92,name='Left Mixer Left Playback Switch' off amixer -qc0 cset numid=92,name='Left Mixer Left Playback Switch' on }}} makes it not silent again. -- Ticket URL: docs.openmoko.org openmoko trac