Skip to content

Commit

Permalink
[ALSA] hda-codec - Make the mixer capability check more robust
Browse files Browse the repository at this point in the history
In some cases, mixer elements return -EINVAL because it couldn't
obtain proper amp_cap bits.  The patch improves the robustness,
trying the amp_cap query again in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 16, 2007
1 parent d417045 commit b75e53f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/hda_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ static u32 query_amp_caps(struct hda_codec *codec, hda_nid_t nid, int direction)
direction == HDA_OUTPUT ?
AC_PAR_AMP_OUT_CAP :
AC_PAR_AMP_IN_CAP);
info->status |= INFO_AMP_CAPS;
if (info->amp_caps)
info->status |= INFO_AMP_CAPS;
}
return info->amp_caps;
}
Expand Down

0 comments on commit b75e53f

Please sign in to comment.