alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Nikhil Mahale <nmahale@nvidia.com>
To: <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org, nmahale@nvidia.com, aplattner@nvidia.com
Subject: [alsa-devel] [PATCH v1 3/5] ALSA: hda - Add DP-MST conn list support
Date: Thu, 14 Nov 2019 09:07:02 +0530	[thread overview]
Message-ID: <20191114033704.18171-4-nmahale@nvidia.com> (raw)
In-Reply-To: <20191114033704.18171-1-nmahale@nvidia.com>

Document change notification HDA040-A for the Intel High Definition
Audio 1.0a specification introduces a Device Select verb for Digital
Display Pin Widgets that are multi-stream capable. This verb selects
a Device Entry that is used by subsequent Pin Widget verbs,
including the Get Connection List Entry verb.

This patch queries the current Device Select value, associates it
with the connection list, and updates the connection list management
code to consider dev_id along with nid.

Signed-off-by: Nikhil Mahale <nmahale@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
---
 sound/pci/hda/hda_codec.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index a2fb19129219..8f32cab8f4a4 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -88,6 +88,7 @@ struct hda_conn_list {
 	struct list_head list;
 	int len;
 	hda_nid_t nid;
+	int dev_id;
 	hda_nid_t conns[0];
 };
 
@@ -96,8 +97,9 @@ static struct hda_conn_list *
 lookup_conn_list(struct hda_codec *codec, hda_nid_t nid)
 {
 	struct hda_conn_list *p;
+	int dev_id = snd_hda_get_dev_select(codec, nid);
 	list_for_each_entry(p, &codec->conn_list, list) {
-		if (p->nid == nid)
+		if (p->nid == nid && p->dev_id == dev_id)
 			return p;
 	}
 	return NULL;
@@ -113,6 +115,7 @@ static int add_conn_list(struct hda_codec *codec, hda_nid_t nid, int len,
 		return -ENOMEM;
 	p->len = len;
 	p->nid = nid;
+	p->dev_id = snd_hda_get_dev_select(codec, nid);
 	memcpy(p->conns, list, len * sizeof(hda_nid_t));
 	list_add(&p->list, &codec->conn_list);
 	return 0;
-- 
2.16.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-11-14  6:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14  3:36 [alsa-devel] [PATCH v1 0/5] ALSA: hda - Add DP-MST support for NVIDIA codecs Nikhil Mahale
2019-11-14  3:37 ` [alsa-devel] [PATCH v1 1/5] ALSA: hda - Rename snd_hda_pin_sense to snd_hda_jack_pin_sense Nikhil Mahale
2019-11-14  3:37 ` [alsa-devel] [PATCH v1 2/5] ALSA: hda - Add DP-MST jack support Nikhil Mahale
2019-11-14 10:46   ` Kai Vehmanen
2019-11-15  9:39     ` Nikhil Mahale
2019-11-14 10:54   ` Takashi Iwai
2019-11-15  9:46     ` Nikhil Mahale
2019-11-14  3:37 ` Nikhil Mahale [this message]
2019-11-14 10:57   ` [alsa-devel] [PATCH v1 3/5] ALSA: hda - Add DP-MST conn list support Takashi Iwai
2019-11-14 11:47     ` Nikhil Mahale
2019-11-14 13:14       ` Takashi Iwai
2019-11-15  9:52         ` Nikhil Mahale
2019-11-15 10:30           ` Takashi Iwai
2019-11-19  8:43             ` Nikhil Mahale
2019-11-14  3:37 ` [alsa-devel] [PATCH v1 4/5] ALSA: hda - Add DP-MST support for non-acomp codecs Nikhil Mahale
2019-11-14  3:37 ` [alsa-devel] [PATCH v1 5/5] ALSA: hda - Add DP-MST support for NVIDIA codecs Nikhil Mahale
2019-11-14 11:02   ` Takashi Iwai
2019-11-14 11:50     ` Nikhil Mahale
2019-11-14 13:15       ` Takashi Iwai
2019-11-14 10:38 ` [alsa-devel] [PATCH v1 0/5] " Takashi Iwai
2019-11-15  9:37   ` Nikhil Mahale

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=20191114033704.18171-4-nmahale@nvidia.com \
    --to=nmahale@nvidia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=aplattner@nvidia.com \
    --cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).