All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: Hui Wang <hui.wang@canonical.com>,
	David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH 1/5] ALSA: hda/generic - Check power state cap at updating the widget power
Date: Thu,  9 Apr 2015 10:40:34 +0200	[thread overview]
Message-ID: <1428568838-21550-2-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1428568838-21550-1-git-send-email-tiwai@suse.de>

The new widget power-saving tries to apply the power change no matter
whether the node has a power cap or not.  It's bad (although most of
codecs chip just ignore it).  Check the capability properly
beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/hda_generic.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 1f2ca7be1468..afc6b1b0898c 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -832,6 +832,8 @@ static hda_nid_t path_power_update(struct hda_codec *codec,
 
 	for (i = 0; i < path->depth; i++) {
 		nid = path->path[i];
+		if (!(get_wcaps(codec, nid) & AC_WCAP_POWER))
+			continue;
 		if (nid == codec->core.afg)
 			continue;
 		if (!allow_powerdown || is_active_nid_for_any(codec, nid))
-- 
2.3.5

  reply	other threads:[~2015-04-09  8:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  8:40 [PATCH 0/5] HD-audio widget power-save fixes Takashi Iwai
2015-04-09  8:40 ` Takashi Iwai [this message]
2015-04-09  8:40 ` [PATCH 2/5] ALSA: hda/generic - Fix wrong initial power state for fixed pins Takashi Iwai
2015-04-10  8:51   ` Raymond Yau
2015-04-10  9:36     ` Takashi Iwai
2015-04-09  8:40 ` [PATCH 3/5] ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicable Takashi Iwai
2015-04-09  8:40 ` [PATCH 4/5] ALSA: hda/generic - Don't override power_filter when power_save_node is set Takashi Iwai
2015-04-09  8:40 ` [PATCH 5/5] ALSA: hda/realtek - Fix the regression by widget power-saving Takashi Iwai
     [not found] ` <55264288.4020807@canonical.com>
2015-04-09 10:45   ` [PATCH 0/5] HD-audio widget power-save fixes 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=1428568838-21550-2-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=hui.wang@canonical.com \
    /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.