mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 19:56:18 +00:00
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>
This commit is contained in:
parent
a22d543a95
commit
1ba7a7c650
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue