Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Julian Wollrath <jwollrath@web.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: Hung task with trace after resume on kernel v3.7-rc6
Date: Mon, 19 Nov 2012 20:25:13 +0100	[thread overview]
Message-ID: <20121119202513.725a7f1f@ilfaris> (raw)
In-Reply-To: <s5hmwydqunm.wl%tiwai@suse.de>

> > Could you clear the patch and check whether power_save_controller=0
> > option also solves the issue?
> 
> If it works, the patch below should help.  Give it a try.
The patch below does help, the spurious responses do not show up
anymore.

Thank you very much for your help and your quick response, with best
regards,
Julian

> ---
> From: Takashi Iwai <tiwai@suse.de>
> Subject: [PATCH] ALSA: hda - Limit runtime PM support only to known
> Intel chips
> 
> We've got a report that the runtime PM may make the codec the
> unresponsive on AMD platforms.  Since the feature has been tested only
> on the recent Intel platforms, it's safer to limit the support to such
> devices for now.
> 
> This patch adds a new DCAPS bit flag indicating the runtime PM
> support, and mark it for Intel controllers.
> 
> Reported-by: Julian Wollrath <jwollrath@web.de>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Julian Wollrath <jwollrath@web.de>
> ---
>  sound/pci/hda/hda_intel.c | 39
> ++++++++++++++++++++------------------- 1 file changed, 20
> insertions(+), 19 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> index cd2dbaf..f9d870e 100644
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@ -556,6 +556,12 @@ enum {
>  #define AZX_DCAPS_ALIGN_BUFSIZE	(1 << 22)	/* buffer
> size alignment */ #define AZX_DCAPS_4K_BDLE_BOUNDARY (1 <<
> 23)	/* BDLE in 4k boundary */ #define
> AZX_DCAPS_COUNT_LPIB_DELAY  (1 << 25)	/* Take LPIB as delay */
> +#define AZX_DCAPS_PM_RUNTIME	(1 << 26)	/* runtime PM
> support */ + +/* quirks for Intel PCH */
> +#define AZX_DCAPS_INTEL_PCH \
> +	(AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
> +	 AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME)
>  
>  /* quirks for ATI SB / AMD Hudson */
>  #define AZX_DCAPS_PRESET_ATI_SB \
> @@ -2433,6 +2439,9 @@ static void azx_power_notify(struct hda_bus
> *bus, bool power_up) {
>  	struct azx *chip = bus->private_data;
>  
> +	if (!(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
> +		return;
> +
>  	if (power_up)
>  		pm_runtime_get_sync(&chip->pci->dev);
>  	else
> @@ -2548,7 +2557,8 @@ static int azx_runtime_suspend(struct device
> *dev) struct snd_card *card = dev_get_drvdata(dev);
>  	struct azx *chip = card->private_data;
>  
> -	if (!power_save_controller)
> +	if (!power_save_controller ||
> +	    !(chip->driver_caps & AZX_DCAPS_PM_RUNTIME))
>  		return -EAGAIN;
>  
>  	azx_stop_chip(chip);
> @@ -3429,39 +3439,30 @@ static void __devexit azx_remove(struct
> pci_dev *pci) static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
>  	/* CPT */
>  	{ PCI_DEVICE(0x8086, 0x1c20),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
>  	/* PBG */
>  	{ PCI_DEVICE(0x8086, 0x1d20),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE},
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
>  	/* Panther Point */
>  	{ PCI_DEVICE(0x8086, 0x1e20),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
>  	/* Lynx Point */
>  	{ PCI_DEVICE(0x8086, 0x8c20),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
>  	/* Lynx Point-LP */
>  	{ PCI_DEVICE(0x8086, 0x9c20),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
>  	/* Lynx Point-LP */
>  	{ PCI_DEVICE(0x8086, 0x9c21),
> -	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
>  	/* Haswell */
>  	{ PCI_DEVICE(0x8086, 0x0c0c),
> -	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
>  	{ PCI_DEVICE(0x8086, 0x0d0c),
> -	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
>  	/* 5 Series/3400 */
>  	{ PCI_DEVICE(0x8086, 0x3b56),
> -	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |
> -	  AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY },
> +	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH },
>  	/* SCH */
>  	{ PCI_DEVICE(0x8086, 0x811b),
>  	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_SCH_SNOOP |

  reply	other threads:[~2012-11-19 19:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-18 15:18 Hung task with trace after resume on kernel v3.7-rc6 Julian Wollrath
2012-11-19  5:54 ` Dylan Reid
2012-11-19  9:38   ` Takashi Iwai
2012-11-19 10:56     ` Julian Wollrath
2012-11-19 11:11       ` Julian Wollrath
2012-11-19 11:22       ` Takashi Iwai
2012-11-19 12:15         ` Julian Wollrath
2012-11-19 12:50           ` Takashi Iwai
2012-11-19 13:56             ` Julian Wollrath
2012-11-19 14:18               ` Julian Wollrath
2012-11-19 14:38                 ` Takashi Iwai
2012-11-19 15:00                   ` Julian Wollrath
2012-11-19 16:09                     ` Julian Wollrath
2012-11-19 16:17                       ` Takashi Iwai
2012-11-19 17:51                         ` Julian Wollrath
2012-11-19 18:08                           ` Takashi Iwai
2012-11-19 19:06                             ` Takashi Iwai
2012-11-19 19:25                               ` Julian Wollrath [this message]
2012-11-19 20:28                                 ` Takashi Iwai
2012-11-19 19:14                             ` Julian Wollrath

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=20121119202513.725a7f1f@ilfaris \
    --to=jwollrath@web.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox