summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-05-10 16:56:09 +0200
committerJaroslav Kysela <perex@suse.cz>2007-05-16 11:45:28 +0200
commitb75e53f09212f12369156710e84d1cbf115113cd (patch)
tree4649419d7fb59e5eb1dbb608bee2743a36761aa5 /sound/pci/hda/hda_codec.c
parentd417045e7deeb37d97793805fe302da7b4f82eec (diff)
downloadblackbird-op-linux-b75e53f09212f12369156710e84d1cbf115113cd.tar.gz
blackbird-op-linux-b75e53f09212f12369156710e84d1cbf115113cd.zip
[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 <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c3
1 files changed, 2 insertions, 1 deletions
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;
}
OpenPOWER on IntegriCloud