diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-05-10 10:56:09 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-16 05:45:28 -0400 |
commit | b75e53f09212f12369156710e84d1cbf115113cd (patch) | |
tree | 4649419d7fb59e5eb1dbb608bee2743a36761aa5 /sound | |
parent | d417045e7deeb37d97793805fe302da7b4f82eec (diff) |
[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')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
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) | |||
707 | direction == HDA_OUTPUT ? | 707 | direction == HDA_OUTPUT ? |
708 | AC_PAR_AMP_OUT_CAP : | 708 | AC_PAR_AMP_OUT_CAP : |
709 | AC_PAR_AMP_IN_CAP); | 709 | AC_PAR_AMP_IN_CAP); |
710 | info->status |= INFO_AMP_CAPS; | 710 | if (info->amp_caps) |
711 | info->status |= INFO_AMP_CAPS; | ||
711 | } | 712 | } |
712 | return info->amp_caps; | 713 | return info->amp_caps; |
713 | } | 714 | } |