All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: libin.yang@linux.intel.com
Cc: libin.yang@intel.com, mengdong.lin@intel.com,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/4] ALSA: hda - add DP mst verb support
Date: Mon, 07 Mar 2016 17:45:38 +0100	[thread overview]
Message-ID: <s5h7fhedyod.wl-tiwai@suse.de> (raw)
In-Reply-To: <1457362666-53937-3-git-send-email-libin.yang@linux.intel.com>

On Mon, 07 Mar 2016 15:57:44 +0100,
libin.yang@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

  reply	other threads:[~2016-03-07 16:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 14:57 [RFC PATCH 0/4] MST DP audio support libin.yang
2016-03-07 14:57 ` [RFC PATCH 1/4] ALSA: hda - codec add DP MST support for connection list libin.yang
2016-03-07 16:40   ` Takashi Iwai
2016-03-08  6:47     ` Yang, Libin
2016-03-07 14:57 ` [PATCH 2/4] ALSA: hda - add DP mst verb support libin.yang
2016-03-07 16:45   ` Takashi Iwai [this message]
2016-03-08  6:54     ` Yang, Libin
2016-03-08  7:39       ` Takashi Iwai
2016-03-08  7:49         ` Yang, Libin
2016-03-07 14:57 ` [RFC PATCH 3/4] ALSA - hda: add devid support in acom libin.yang
2016-03-07 14:57 ` [RFC PATCH 4/4] ALSA - hda: add DP MST support libin.yang
2016-03-07 15:19   ` Takashi Iwai
2016-03-08  6:47     ` Yang, Libin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h7fhedyod.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=libin.yang@intel.com \
    --cc=libin.yang@linux.intel.com \
    --cc=mengdong.lin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.