Commit 028cb68e authored by Subhransu S. Prusty's avatar Subhransu S. Prusty Committed by Takashi Iwai

ALSA: hda - Fixes double fault in nvhdmi_chmap_cea_alloc_validate_get_type

nvhdmi_chmap_cea_alloc_validate_get_type calls itself recursively
using chmap ops causing the double fault.

Fixed by adding the default validate_get_type handling inside nvdia
validate_get_type handler.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=114311
Fixes: 67b90cb8 ("ALSA: hda - Create common chmap object")
Reported-by: default avatarAndreas Reis <andreas.reis@gmail.com>
Signed-off-by: default avatarSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Tested-by: default avatarAndreas Reis <andreas.reis@gmail.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4061db03
...@@ -2836,8 +2836,12 @@ static int nvhdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap, ...@@ -2836,8 +2836,12 @@ static int nvhdmi_chmap_cea_alloc_validate_get_type(struct hdac_chmap *chmap,
if (cap->ca_index == 0x00 && channels == 2) if (cap->ca_index == 0x00 && channels == 2)
return SNDRV_CTL_TLVT_CHMAP_FIXED; return SNDRV_CTL_TLVT_CHMAP_FIXED;
return chmap->ops.chmap_cea_alloc_validate_get_type( /* If the speaker allocation matches the channel count, it is OK. */
chmap, cap, channels); if (cap->channels != channels)
return -1;
/* all channels are remappable freely */
return SNDRV_CTL_TLVT_CHMAP_VAR;
} }
static int nvhdmi_chmap_validate(struct hdac_chmap *chmap, static int nvhdmi_chmap_validate(struct hdac_chmap *chmap,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment