All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: Tomas 'Sleep_Walker' Cech <sleep_walker@suse.cz>
Cc: alsa-devel@alsa-project.org, linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: AC97 reset fail after suspend
Date: Thu, 14 May 2009 03:57:35 +0200	[thread overview]
Message-ID: <200905140357.35682.marek.vasut@gmail.com> (raw)
In-Reply-To: <200905080148.20137.sleep_walker@suse.cz>

[-- 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

  parent reply	other threads:[~2009-05-14  1:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905140357.35682.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=sleep_walker@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.