summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-27 12:56:26 +0200
committerTakashi Iwai <tiwai@suse.de>2009-07-27 12:56:26 +0200
commit1ba7a7c650bd8ee567e25d9b68e9081d131c70f6 (patch)
tree4cedf50acdcc64f523943f2a32544b2e0e0d08b5 /sound/pci
parenta22d543a95e82e5ad0ee1a44aad54fd6b6bf52a8 (diff)
ALSA: hda - Add exception for volume-knob in snd_hda_get_connections()
Volume-knob widgets may have connections even if they have no CONN_LIST cap bit. Allow the query exceptionally in snd_hda_get_connections(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b8c656c21feb..3a603cde8cc4 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -301,12 +301,15 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
unsigned int parm;
int i, conn_len, conns;
unsigned int shift, num_elems, mask;
+ unsigned int wcaps;
hda_nid_t prev_nid;
if (snd_BUG_ON(!conn_list || max_conns <= 0))
return -EINVAL;
- if ((get_wcaps(codec, nid) & AC_WCAP_CONN_LIST) == 0) {
+ wcaps = get_wcaps(codec, nid);
+ if (!(wcaps & AC_WCAP_CONN_LIST) &&
+ get_wcaps_type(wcaps) != AC_WID_VOL_KNB) {
snd_printk(KERN_WARNING "hda_codec: "
"connection list not available for 0x%x\n", nid);
return -EINVAL;