All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Martin Josefsson <gandalf@wlug.westbo.se>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org,
	alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] Fix ALSA resume
Date: Sat, 04 Dec 2004 16:54:02 -0500	[thread overview]
Message-ID: <1102197242.28776.49.camel@krustophenia.net> (raw)
In-Reply-To: <1102195391.1560.65.camel@tux.rsn.bth.se>

Please cc: alsa-devel@lists.sourceforge.net on all ALSA issues.

On Sat, 2004-12-04 at 22:23 +0100, Martin Josefsson wrote:
> Some time ago, a patch was merged that removed pci_save_state() and
> pci_restore_state() from various ALSA drivers. That patch also added
> pci_restore_state() to sound/core/init.c but didn't add pci_save_state()
> anywhere. This is needed since the core pci handling doesn't do this for
> us anymore.
> 
> My laptop doesn't resume (gets what I assume is an ACPI timeout and
> hangs solid) without this small obvious patch.
> 
> Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
> Fixed-by: Takashi Iwai <tiwai@suse.de>
> 
> --- linux/sound/core/init.c	8 Nov 2004 11:37:08 -0000	1.48
> +++ linux/sound/core/init.c	12 Nov 2004 13:56:32 -0000
> @@ -782,12 +782,15 @@<br>
>  int snd_card_pci_suspend(struct pci_dev *dev, u32 state)
>  {
>  	snd_card_t *card = pci_get_drvdata(dev);
> +	int err;
>  	if (! card || ! card->pm_suspend)
>  		return 0;
>  	if (card->power_state == SNDRV_CTL_POWER_D3hot)
>  		return 0;
>  	/* FIXME: correct state value? */
> -	return card->pm_suspend(card, 0);
> +	err = card->pm_suspend(card, 0);
> +	pci_save_state(dev);
> +	return err;
>  }
> 
>  int snd_card_pci_resume(struct pci_dev *dev)
> 
> 
-- 
Lee Revell <rlrevell@joe-job.com>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

WARNING: multiple messages have this Message-ID (diff)
From: Lee Revell <rlrevell@joe-job.com>
To: Martin Josefsson <gandalf@wlug.westbo.se>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	linux-kernel@vger.kernel.org,
	alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: [PATCH] Fix ALSA resume
Date: Sat, 04 Dec 2004 16:54:02 -0500	[thread overview]
Message-ID: <1102197242.28776.49.camel@krustophenia.net> (raw)
In-Reply-To: <1102195391.1560.65.camel@tux.rsn.bth.se>

Please cc: alsa-devel@lists.sourceforge.net on all ALSA issues.

On Sat, 2004-12-04 at 22:23 +0100, Martin Josefsson wrote:
> Some time ago, a patch was merged that removed pci_save_state() and
> pci_restore_state() from various ALSA drivers. That patch also added
> pci_restore_state() to sound/core/init.c but didn't add pci_save_state()
> anywhere. This is needed since the core pci handling doesn't do this for
> us anymore.
> 
> My laptop doesn't resume (gets what I assume is an ACPI timeout and
> hangs solid) without this small obvious patch.
> 
> Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
> Fixed-by: Takashi Iwai <tiwai@suse.de>
> 
> --- linux/sound/core/init.c	8 Nov 2004 11:37:08 -0000	1.48
> +++ linux/sound/core/init.c	12 Nov 2004 13:56:32 -0000
> @@ -782,12 +782,15 @@<br>
>  int snd_card_pci_suspend(struct pci_dev *dev, u32 state)
>  {
>  	snd_card_t *card = pci_get_drvdata(dev);
> +	int err;
>  	if (! card || ! card->pm_suspend)
>  		return 0;
>  	if (card->power_state == SNDRV_CTL_POWER_D3hot)
>  		return 0;
>  	/* FIXME: correct state value? */
> -	return card->pm_suspend(card, 0);
> +	err = card->pm_suspend(card, 0);
> +	pci_save_state(dev);
> +	return err;
>  }
> 
>  int snd_card_pci_resume(struct pci_dev *dev)
> 
> 
-- 
Lee Revell <rlrevell@joe-job.com>


  reply	other threads:[~2004-12-04 21:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-04 21:23 [PATCH] Fix ALSA resume Martin Josefsson
2004-12-04 21:54 ` Lee Revell [this message]
2004-12-04 21:54   ` Lee Revell
2004-12-05  1:28 ` Andrew Morton
2004-12-05  1:28   ` Andrew Morton
2004-12-05  3:39   ` Joshua Kwan
2004-12-05  3:39     ` Joshua Kwan
2004-12-05  7:51     ` Andrew Morton
2004-12-05  7:51       ` Andrew Morton
2004-12-05 10:06       ` Joshua Kwan
2004-12-05 10:06         ` Joshua Kwan
2004-12-05 12:11         ` Martin Josefsson
2004-12-06 14:22   ` Takashi Iwai
2004-12-06 14:22     ` Takashi Iwai

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=1102197242.28776.49.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=akpm@osdl.org \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=gandalf@wlug.westbo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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.