Skip to content

Commit

Permalink
ALSA: hda - Fix wrong arguments for path deactivation checks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jan 24, 2013
1 parent 5397145 commit 7dddf2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7dddf2a

Please sign in to comment.