aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-24 16:31:35 +0100
committerTakashi Iwai <tiwai@suse.de>2013-01-24 16:31:35 +0100
commit7dddf2aed8ffc1fa30df92b57981dea146cdfc0f (patch)
tree211262a992b3d10e112c0884eaf46ff963c70baf /sound/pci/hda/hda_generic.c
parentALSA: hda - Add auto-mute support to PB desktop (diff)
downloadlinux-dev-7dddf2aed8ffc1fa30df92b57981dea146cdfc0f.tar.xz
linux-dev-7dddf2aed8ffc1fa30df92b57981dea146cdfc0f.zip
ALSA: hda - Fix wrong arguments for path deactivation checks
The arguments to call is_active_nid() in activate_amp() were swapped, and this resulted in the muted amp on some SPDIF output pins. Also, the index to be passed to is_active_nid() must be idx_to_check. Otherwise it checks the wrong connection in the case of implicit aamix connection paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/pci/hda/hda_generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 921582d4fe05..31ffd663f7d1 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -569,7 +569,7 @@ static bool has_amp_out(struct hda_codec *codec, struct nid_path *path, int idx)
/* check whether the given (nid,dir,idx) is active */
static bool is_active_nid(struct hda_codec *codec, hda_nid_t nid,
- unsigned int idx, unsigned int dir)
+ unsigned int dir, unsigned int idx)
{
struct hda_gen_spec *spec = codec->spec;
int i, n;
@@ -642,7 +642,7 @@ static void activate_amp(struct hda_codec *codec, hda_nid_t nid, int dir,
unsigned int caps;
unsigned int mask, val;
- if (!enable && is_active_nid(codec, nid, dir, idx))
+ if (!enable && is_active_nid(codec, nid, dir, idx_to_check))
return;
caps = query_amp_caps(codec, nid, dir);