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 4/5] ALSA: hda/generic - Don't override power_filter when power_save_node is set
Date: Thu,  9 Apr 2015 10:40:37 +0200	[thread overview]
Message-ID: <1428568838-21550-5-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1428568838-21550-1-git-send-email-tiwai@suse.de>

Currently the generic parser sets codec->power_filter when
power_save_node flag is set.  But this overrides the existing filter
that has been already set by the codec driver, thus it looses some
features.  Instead, set the default power_filter only when it's not
set yet.

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

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index f0475a19fad7..3d2597b7037b 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -4918,7 +4918,8 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
 	parse_digital(codec);
 
 	if (spec->power_down_unused || codec->power_save_node)
-		codec->power_filter = snd_hda_gen_path_power_filter;
+		if (!codec->power_filter)
+			codec->power_filter = snd_hda_gen_path_power_filter;
 
 	if (!spec->no_analog && spec->beep_nid) {
 		err = snd_hda_attach_beep_device(codec, spec->beep_nid);
-- 
2.3.5

  parent 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 ` [PATCH 1/5] ALSA: hda/generic - Check power state cap at updating the widget power Takashi Iwai
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 ` Takashi Iwai [this message]
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-5-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.