All of lore.kernel.org
 help / color / mirror / Atom feed
* AC97 reset fail after suspend
@ 2009-05-07 23:48 Tomas 'Sleep_Walker' Cech
  2009-05-08 13:52 ` Marek Vasut
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Tomas 'Sleep_Walker' Cech @ 2009-05-07 23:48 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: alsa-devel, Marek Vasut

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

Hi,

I've got following error on Palm LifeDrive and PalmTX after suspend & resume:

pxa2xx_ac97_try_warm_reset: warm reset timeout (GSR=0x0)
pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x0)
pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x44)
WM9712 AC97 reset failed
could not reset AC97 codec

That completely disable whole AC97 communication, so touchscreen, sound and 
battery doesn't work any longer.

I also tried this with Treo680 (code will be sent soon). HW is very similar, 
only codec is different - LD/T5/TX use WM9712, Treo680 use WM9713. On Treo680 
there is no problem with that.

Thanks for any hint about that.

Tomas 'Sleep_Walker' Cech

Attaching config for LD/TX and dmesg output.



[-- Attachment #2: dmesg --]
[-- Type: text/plain, Size: 10326 bytes --]

Linux version 2.6.30-rc3-TX.sw3 (tcech@daredevil) (gcc version 4.2.4) #246 Thu May 7 19:50:35 CEST 2009
CPU: XScale-PXA270 [69054117] revision 7 (ARMv5TE), cr=0000397f
CPU: VIVT data cache, VIVT instruction cache
Machine: Palm LifeDrive
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 8192
free_area_init_node: node 0, pgdat c0321ff4, node_mem_map c033f000
  Normal zone: 64 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 8128 pages, LIFO batch:0
Run Mode clock: 208.00MHz (*16)
Turbo Mode clock: 416.00MHz (*2.0, active)
Memory clock: 208.00MHz (/2)
System bus clock: 208.00MHz 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: init=/sbin/init root=/dev/mmcblk0p2 psplash=false rootwait
NR_IRQS:192
PID hash table entries: 128 (order: 7, 512 bytes)
Console: colour dummy device 80x30
console [tty0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 32MB = 32MB total
Memory: 29156KB available (2808K code, 252K data, 132K init, 0K highmem)
Calibrating delay loop... 415.33 BogoMIPS (lpj=2076672)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 716 bytes
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
	(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
	(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
	(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
	(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
	(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
	(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
	(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
PXA CPU 27x max frequency not defined (pxa27x_maxfreq), assuming pxa271 with 416000kHz maxfreq
PXA CPU frequency change support initialized
NetWinder Floating Point Emulator V0.97 (double precision)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 56
alg: No test for stdrng (krng)
io scheduler noop registered (default)
Console: switching to colour frame buffer device 53x43
pxa2xx-uart.0: ttyS0 at MMIO 0x40100000 (irq = 22) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x40200000 (irq = 21) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x40700000 (irq = 20) is a STUART
brd: module loaded
loop: module loaded
pxa2xx-pcmcia: use which platform_data?
pxa27x_udc: version 2008-04-18
g_ether gadget: using random self ethernet address
g_ether gadget: using random host ethernet address
usb0: MAC 3e:63:7e:d0:61:36
usb0: HOST MAC ba:45:a4:a0:15:95
g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
g_ether gadget: g_ether ready
mice: PS/2 mouse device common for all mice
input: pxa27x-keypad as /class/input/input0
input: gpio-keys as /class/input/input1
cpuidle: using governor ladder
palmld_mci_init: irq registered
Advanced Linux Sound Architecture Driver Version 1.0.19.
WM9711/WM9712 SoC Audio Codec 0.4
asoc: AC97 HiFi <-> pxa2xx-ac97 mapping ok
asoc: AC97 Aux <-> pxa2xx-ac97-aux mapping ok
wm97xx-ts 0-0:WM9712: detected a wm9712 codec
input: wm97xx touchscreen as /class/input/input2
ALSA device list:
  #0: Palm/PXA27x (WM9712)
TCP cubic registered
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
lib80211_crypt: registered algorithm 'NULL'
XScale iWMMXt coprocessor detected.
Waiting for root device /dev/mmcblk0p2...
mmc0: new SD card at address 1147
mmcblk0: mmc0:1147 SK01G 945 MiB 
 mmcblk0: p1 p2 p3
VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
Freeing init memory: 132K
pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
pcmcia 0.0: pcmcia: registering new device pcmcia0.0
Adding 94744k swap on /dev/mmcblk0p3.  Priority:-1 extents:1 across:94744k SS
ADDRCONF(NETDEV_UP): usb0: link is not ready
wm97xx-ts 0-0:WM9712: No IRQ specified
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.05 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
Suspending console(s) (use no_console_suspend to debug)
pxa2xx_ac97_try_warm_reset: warm reset timeout (GSR=0x0)
pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x0)
pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x44)
WM9712 AC97 reset failed
could not reset AC97 codec
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=120 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=76 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=78 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=80 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=82 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=84 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=86 GSR=0x44)
Restarting tasks ... done.
pxa2xx_ac97_write: write error (ac97_reg=120 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=122 GSR=0x44)
wm97xx-ts 0-0:WM9712: No IRQ specified
pxa2xx_ac97_read: read error (ac97_reg=122 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_write: write error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)
pxa2xx_ac97_read: read error (ac97_reg=118 GSR=0x44)

[-- Attachment #3: config-TX.zip --]
[-- Type: application/zip, Size: 7794 bytes --]

[-- Attachment #4: Type: text/plain, Size: 271 bytes --]

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

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

* Re: AC97 reset fail after suspend
  2009-05-07 23:48 AC97 reset fail after suspend Tomas 'Sleep_Walker' Cech
@ 2009-05-08 13:52 ` Marek Vasut
  2009-05-08 18:04 ` Mark Brown
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Marek Vasut @ 2009-05-08 13:52 UTC (permalink / raw)
  To: Tomas 'Sleep_Walker' Cech
  Cc: Eric Miao, alsa-devel, Russell King - ARM Linux, linux-arm-kernel

On Friday 08 of May 2009 01:48:19 Tomas 'Sleep_Walker' Cech wrote:
> Hi,
>
> I've got following error on Palm LifeDrive and PalmTX after suspend &
> resume:
>
> pxa2xx_ac97_try_warm_reset: warm reset timeout (GSR=0x0)
> pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x0)
> pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
> pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x44)
> WM9712 AC97 reset failed
> could not reset AC97 codec
>
> That completely disable whole AC97 communication, so touchscreen, sound and
> battery doesn't work any longer.
>
> I also tried this with Treo680 (code will be sent soon). HW is very
> similar, only codec is different - LD/T5/TX use WM9712, Treo680 use WM9713.
> On Treo680 there is no problem with that.
>
> Thanks for any hint about that.
>
> Tomas 'Sleep_Walker' Cech
>
> Attaching config for LD/TX and dmesg output.

added LAK in CC

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

* Re: AC97 reset fail after suspend
  2009-05-07 23:48 AC97 reset fail after suspend Tomas 'Sleep_Walker' Cech
  2009-05-08 13:52 ` Marek Vasut
@ 2009-05-08 18:04 ` Mark Brown
  2009-05-08 20:57   ` [alsa-devel] " Tomas 'Sleep_Walker' Cech
  2009-05-14  1:57 ` Marek Vasut
  2009-05-17 22:14 ` Dmitry Eremin-Solenikov
  3 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2009-05-08 18:04 UTC (permalink / raw)
  To: Tomas 'Sleep_Walker' Cech
  Cc: Marek Vasut, alsa-devel, linux-arm-kernel

On Fri, May 08, 2009 at 01:48:19AM +0200, Tomas 'Sleep_Walker' Cech wrote:

> I also tried this with Treo680 (code will be sent soon). HW is very similar, 
> only codec is different - LD/T5/TX use WM9712, Treo680 use WM9713. On Treo680 
> there is no problem with that.

Do you mean that suspend and resume work on the Treo680?

Have you tried the non-ASoC AC97 driver?

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

* Re: [alsa-devel] AC97 reset fail after suspend
  2009-05-08 18:04 ` Mark Brown
@ 2009-05-08 20:57   ` Tomas 'Sleep_Walker' Cech
  2009-05-08 21:13     ` Mark Brown
  0 siblings, 1 reply; 13+ messages in thread
From: Tomas 'Sleep_Walker' Cech @ 2009-05-08 20:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-arm-kernel, Marek Vasut, alsa-devel

Dne pátek 08 Květen 2009 20:04:58 Mark Brown napsal(a):
> On Fri, May 08, 2009 at 01:48:19AM +0200, Tomas 'Sleep_Walker' Cech wrote:
> > I also tried this with Treo680 (code will be sent soon). HW is very
> > similar, only codec is different - LD/T5/TX use WM9712, Treo680 use
> > WM9713. On Treo680 there is no problem with that.
>
> Do you mean that suspend and resume work on the Treo680?
Yes.
>
> Have you tried the non-ASoC AC97 driver?
Yes. Same problem.

Tomas Cech


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

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

* Re: AC97 reset fail after suspend
  2009-05-08 20:57   ` [alsa-devel] " Tomas 'Sleep_Walker' Cech
@ 2009-05-08 21:13     ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2009-05-08 21:13 UTC (permalink / raw)
  To: Tomas 'Sleep_Walker' Cech
  Cc: Marek Vasut, alsa-devel, linux-arm-kernel

On Fri, May 08, 2009 at 10:57:37PM +0200, Tomas 'Sleep_Walker' Cech wrote:
> Dne pátek 08 Květen 2009 20:04:58 Mark Brown napsal(a):

> > Have you tried the non-ASoC AC97 driver?
> Yes. Same problem.

OK.  If this worked in the past would it be possible for you to try
running a git bisect to identify where things broke?  I can't see
anything relevant that jumps out as being relevant in the AC97 driver
logs.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: AC97 reset fail after suspend
  2009-05-07 23:48 AC97 reset fail after suspend Tomas 'Sleep_Walker' Cech
  2009-05-08 13:52 ` Marek Vasut
  2009-05-08 18:04 ` Mark Brown
@ 2009-05-14  1:57 ` Marek Vasut
  2009-05-14 11:30   ` Tomas 'Sleep_Walker' Cech
  2009-05-14 12:32   ` Mark Brown
  2009-05-17 22:14 ` Dmitry Eremin-Solenikov
  3 siblings, 2 replies; 13+ messages in thread
From: Marek Vasut @ 2009-05-14  1:57 UTC (permalink / raw)
  To: Tomas 'Sleep_Walker' Cech; +Cc: alsa-devel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1015 bytes --]

On Friday 08 of May 2009 01:48:19 Tomas 'Sleep_Walker' Cech wrote:
> Hi,
>
> I've got following error on Palm LifeDrive and PalmTX after suspend &
> resume:
>
> pxa2xx_ac97_try_warm_reset: warm reset timeout (GSR=0x0)
> pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x0)
> pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
> pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x44)
> WM9712 AC97 reset failed
> could not reset AC97 codec
>
> That completely disable whole AC97 communication, so touchscreen, sound and
> battery doesn't work any longer.
>
> I also tried this with Treo680 (code will be sent soon). HW is very
> similar, only codec is different - LD/T5/TX use WM9712, Treo680 use WM9713.
> On Treo680 there is no problem with that.
>
> Thanks for any hint about that.
>
> Tomas 'Sleep_Walker' Cech
>
> Attaching config for LD/TX and dmesg output.

The following patch fixes the issue and should be correct. It's indeed a 
regression that's not in wm9713, but is in wm9712. Please consider applying.

[-- Attachment #2: 0001-WM9712-coldreset-on-resume-bugfix.patch --]
[-- Type: text/x-diff, Size: 1117 bytes --]

From 06dce145990fb342d66c8fc77704a3dff3c66313 Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Thu, 14 May 2009 03:48:27 +0200
Subject: [PATCH] WM9712 coldreset on resume bugfix

The following patch fixes problem with wm9712 codec being unable to resume from
sleep because it doesn't respond after AC97 port was coldreseted (which is done
in case the warmreset wasn't successful). The solution uses similar approach as
wm9713, that is, do one more warmreset after coldreset.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 sound/soc/codecs/wm9712.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 765cf1e..166ebac 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -585,6 +585,8 @@ static int wm9712_reset(struct snd_soc_codec *codec, int try_warm)
 	}
 
 	soc_ac97_ops.reset(codec->ac97);
+	if (soc_ac97_ops.warm_reset)
+		soc_ac97_ops.warm_reset(codec->ac97);
 	if (ac97_read(codec, 0) != wm9712_reg[0])
 		goto err;
 	return 0;
-- 
1.6.2.1


[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: AC97 reset fail after suspend
  2009-05-14  1:57 ` Marek Vasut
@ 2009-05-14 11:30   ` Tomas 'Sleep_Walker' Cech
  2009-05-14 12:32   ` Mark Brown
  1 sibling, 0 replies; 13+ messages in thread
From: Tomas 'Sleep_Walker' Cech @ 2009-05-14 11:30 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-arm-kernel, alsa-devel

Hi,

> The following patch fixes the issue and should be correct. It's indeed a 
> regression that's not in wm9713, but is in wm9712. Please consider applying.

I already tried to add these lines, but it didn't help. I can't confirm that problem is gone.
But I agree that this patch should be applied.

Tomas Cech

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

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

* Re: AC97 reset fail after suspend
  2009-05-14  1:57 ` Marek Vasut
  2009-05-14 11:30   ` Tomas 'Sleep_Walker' Cech
@ 2009-05-14 12:32   ` Mark Brown
  2009-05-14 13:51     ` Marek Vasut
  1 sibling, 1 reply; 13+ messages in thread
From: Mark Brown @ 2009-05-14 12:32 UTC (permalink / raw)
  To: Marek Vasut
  Cc: alsa-devel, Tomas 'Sleep_Walker' Cech, linux-arm-kernel

On Thu, May 14, 2009 at 03:57:35AM +0200, Marek Vasut wrote:

> The following patch fixes the issue and should be correct. It's indeed a 
> regression that's not in wm9713, but is in wm9712. Please consider applying.

Please CC maintainers on patches!

> The following patch fixes problem with wm9712 codec being unable to resume from
> sleep because it doesn't respond after AC97 port was coldreseted (which is done
> in case the warmreset wasn't successful). The solution uses similar approach as
> wm9713, that is, do one more warmreset after coldreset.

Are you sure this is required?  The WM9713 needs this because the
default state on reset is not to clock the AC97 link, a warm reset is
needed to start the link.  I'll need to check but IIRC the WM9712 runs
the link by default and I can't see any changes to this behaviour in the
driver changelog.

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

* Re: AC97 reset fail after suspend
  2009-05-14 12:32   ` Mark Brown
@ 2009-05-14 13:51     ` Marek Vasut
  2009-05-14 14:25       ` Mark Brown
  0 siblings, 1 reply; 13+ messages in thread
From: Marek Vasut @ 2009-05-14 13:51 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, Tomas 'Sleep_Walker' Cech, linux-arm-kernel

On Thursday 14 of May 2009 14:32:41 Mark Brown wrote:
> On Thu, May 14, 2009 at 03:57:35AM +0200, Marek Vasut wrote:
> > The following patch fixes the issue and should be correct. It's indeed a
> > regression that's not in wm9713, but is in wm9712. Please consider
> > applying.
>
> Please CC maintainers on patches!

Sorry, it was 4am when I sent this patch, I was a little tired.
>
> > The following patch fixes problem with wm9712 codec being unable to
> > resume from sleep because it doesn't respond after AC97 port was
> > coldreseted (which is done in case the warmreset wasn't successful). The
> > solution uses similar approach as wm9713, that is, do one more warmreset
> > after coldreset.
>
> Are you sure this is required?  The WM9713 needs this because the
> default state on reset is not to clock the AC97 link, a warm reset is
> needed to start the link.  I'll need to check but IIRC the WM9712 runs
> the link by default and I can't see any changes to this behaviour in the
> driver changelog.

Well without this, the codec doesn't kick in (reading the registers returns 
all zeros) so I assume that's the same issue as on wm9713.

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

* Re: AC97 reset fail after suspend
  2009-05-14 13:51     ` Marek Vasut
@ 2009-05-14 14:25       ` Mark Brown
  2009-05-14 14:26         ` Mark Brown
  0 siblings, 1 reply; 13+ messages in thread
From: Mark Brown @ 2009-05-14 14:25 UTC (permalink / raw)
  To: Marek Vasut
  Cc: alsa-devel, Tomas 'Sleep_Walker' Cech, linux-arm-kernel

On Thu, May 14, 2009 at 03:51:37PM +0200, Marek Vasut wrote:
> On Thursday 14 of May 2009 14:32:41 Mark Brown wrote:

> > needed to start the link.  I'll need to check but IIRC the WM9712 runs
> > the link by default and I can't see any changes to this behaviour in the
> > driver changelog.

> Well without this, the codec doesn't kick in (reading the registers returns 
> all zeros) so I assume that's the same issue as on wm9713.

OK, I've checked - there is actually a resistor strap option on the
CODEC to control if the device powers on with the AC97 link enabled or
disabled by default.  This must be the first Linux device that chooses
the second option, I guess.  A version of your patch would be good, but
it should check for warm reset support in the AC97 controller before it
tries to use it since the chip won't always need the warm reset.

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

* Re: AC97 reset fail after suspend
  2009-05-14 14:25       ` Mark Brown
@ 2009-05-14 14:26         ` Mark Brown
  0 siblings, 0 replies; 13+ messages in thread
From: Mark Brown @ 2009-05-14 14:26 UTC (permalink / raw)
  To: Marek Vasut
  Cc: alsa-devel, Tomas 'Sleep_Walker' Cech, linux-arm-kernel

On Thu, May 14, 2009 at 03:25:10PM +0100, Mark Brown wrote:

> the second option, I guess.  A version of your patch would be good, but
> it should check for warm reset support in the AC97 controller before it
> tries to use it since the chip won't always need the warm reset.

Oops, it does already - I'll apply it with an updated changelgo
explaining what's going on.

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

* Re: AC97 reset fail after suspend
  2009-05-07 23:48 AC97 reset fail after suspend Tomas 'Sleep_Walker' Cech
                   ` (2 preceding siblings ...)
  2009-05-14  1:57 ` Marek Vasut
@ 2009-05-17 22:14 ` Dmitry Eremin-Solenikov
  2009-05-17 22:32   ` Marek Vasut
  3 siblings, 1 reply; 13+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-05-17 22:14 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: alsa-devel

Tomas 'Sleep_Walker' Cech wrote:

> Hi,
> 
> I've got following error on Palm LifeDrive and PalmTX after suspend &
> resume:
> 
> pxa2xx_ac97_try_warm_reset: warm reset timeout (GSR=0x0)
> pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x0)
> pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
> pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x44) WM9712 AC97 reset
> failed
> could not reset AC97 codec

Could you please check if changing reset_gpio to 113 inside
palmXX_ac97_pdata declarations in palmld and palmtx board files helps.

-- 
With best wishes
Dmitry



-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

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

* Re: AC97 reset fail after suspend
  2009-05-17 22:14 ` Dmitry Eremin-Solenikov
@ 2009-05-17 22:32   ` Marek Vasut
  0 siblings, 0 replies; 13+ messages in thread
From: Marek Vasut @ 2009-05-17 22:32 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Dmitry Eremin-Solenikov, alsa-devel

On Monday 18 of May 2009 00:14:01 Dmitry Eremin-Solenikov wrote:
> Tomas 'Sleep_Walker' Cech wrote:
> > Hi,
> >
> > I've got following error on Palm LifeDrive and PalmTX after suspend &
> > resume:
> >
> > pxa2xx_ac97_try_warm_reset: warm reset timeout (GSR=0x0)
> > pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x0)
> > pxa2xx_ac97_try_cold_reset: cold reset timeout (GSR=0x44)
> > pxa2xx_ac97_read: read error (ac97_reg=0 GSR=0x44) WM9712 AC97 reset
> > failed
> > could not reset AC97 codec
>
> Could you please check if changing reset_gpio to 113 inside
> palmXX_ac97_pdata declarations in palmld and palmtx board files helps.

No it doesn't, nRESET is on GPIO95, it's verified by hardware probing. See 
previous mails in this thread for the reason of these problems.

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

end of thread, other threads:[~2009-05-17 22:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-07 23:48 AC97 reset fail after suspend Tomas 'Sleep_Walker' Cech
2009-05-08 13:52 ` Marek Vasut
2009-05-08 18:04 ` Mark Brown
2009-05-08 20:57   ` [alsa-devel] " Tomas 'Sleep_Walker' Cech
2009-05-08 21:13     ` Mark Brown
2009-05-14  1:57 ` Marek Vasut
2009-05-14 11:30   ` Tomas 'Sleep_Walker' Cech
2009-05-14 12:32   ` Mark Brown
2009-05-14 13:51     ` Marek Vasut
2009-05-14 14:25       ` Mark Brown
2009-05-14 14:26         ` Mark Brown
2009-05-17 22:14 ` Dmitry Eremin-Solenikov
2009-05-17 22:32   ` Marek Vasut

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.