[alsa-devel] [PATCH 2/4] ALSA: hda - add DP mst verb support
Takashi Iwai
tiwai at suse.de
Mon Mar 7 17:45:38 CET 2016
On Mon, 07 Mar 2016 15:57:44 +0100,
libin.yang at linux.intel.com wrote:
>
> +int snd_hda_set_dev_select(struct hda_codec *codec, hda_nid_t nid, int dev_id)
> +{
> + int ret, dev;
> + unsigned long timeout;
> +
> + /* not support dp_mst will always return 0, using first dev_entry */
> + if (!codec->dp_mst)
> + return 0;
> +
> + /* If Device List Length is 0, the pin is not multi stream capable.
> + */
> + if ((snd_hda_get_num_devices(codec, nid) + 1) == 0)
> + return 0;
I don't understand what this code is for. Why +1?
> +
> + /* Behavior of setting index being equal to or greater than
> + * Device List Length is not predictable
> + */
> + if ((snd_hda_get_num_devices(codec, nid) + 1) <= dev_id)
> + return 0;
Ditto. And, calling the same function twice?
thanks,
Takashi
More information about the Alsa-devel
mailing list