From: Takashi Iwai Date: Thu, 10 May 2007 14:56:09 +0000 (+0200) Subject: [ALSA] hda-codec - Make the mixer capability check more robust X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b75e53f09212f12369156710e84d1cbf115113cd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [ALSA] hda-codec - Make the mixer capability check more robust 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 Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 14649d54b493..8e89d56b6400 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -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; }