From: Wang Xingchao <xingchao.wang@linux.intel.com>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org,
Wang Xingchao <xingchao.wang@linux.intel.com>,
xingchao.wang@intel.com
Subject: [PATCH 2/2 V2] ALSA: hda - Add cache connection info
Date: Mon, 24 Jun 2013 09:10:19 -0400 [thread overview]
Message-ID: <1372079419-31903-2-git-send-email-xingchao.wang@linux.intel.com> (raw)
In-Reply-To: <1372079419-31903-1-git-send-email-xingchao.wang@linux.intel.com>
Pin's connection list may change dynamically with hot-plug event
on Intel Haswell chip. Users would see connections be "0" in codec#.
when play audio on this pin, software choose connections from cache.
So add Cache connection info to avoid confuse.
Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com>
---
sound/pci/hda/hda_proc.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 0fee8fa..403589c 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -504,6 +504,8 @@ static void print_conn_list(struct snd_info_buffer *buffer,
int conn_len)
{
int c, curr = -1;
+ const hda_nid_t *list;
+ int cache_len;
if (conn_len > 1 &&
wid_type != AC_WID_AUD_MIX &&
@@ -511,7 +513,7 @@ static void print_conn_list(struct snd_info_buffer *buffer,
wid_type != AC_WID_POWER)
curr = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_CONNECT_SEL, 0);
- snd_iprintf(buffer, " Connection: %d\n", conn_len);
+ snd_iprintf(buffer, " Raw Connection: %d\n", conn_len);
if (conn_len > 0) {
snd_iprintf(buffer, " ");
for (c = 0; c < conn_len; c++) {
@@ -521,6 +523,19 @@ static void print_conn_list(struct snd_info_buffer *buffer,
}
snd_iprintf(buffer, "\n");
}
+
+ /* Get Cache connections info */
+ cache_len = snd_hda_get_conn_list(codec, nid, &list);
+ if (cache_len != conn_len
+ || memcmp(list, conn, conn_len)) {
+ snd_iprintf(buffer, " Cache Connection: %d\n", conn_len);
+ if (cache_len > 0) {
+ snd_iprintf(buffer, " ");
+ for (c = 0; c < conn_len; c++)
+ snd_iprintf(buffer, " 0x%02x", list[c]);
+ snd_iprintf(buffer, "\n");
+ }
+ }
}
static void print_gpio(struct snd_info_buffer *buffer,
--
1.8.1.2
next prev parent reply other threads:[~2013-06-24 11:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 13:10 [PATCH 1/2] ALSA: hda - Remove unused variable Wang Xingchao
2013-06-24 12:16 ` Takashi Iwai
2013-06-24 13:10 ` Wang Xingchao [this message]
2013-06-24 12:07 ` [PATCH 2/2 V2] ALSA: hda - Add cache connection info Takashi Iwai
2013-06-24 12:10 ` Wang, Xingchao
2013-06-25 2:29 ` Wang, Xingchao
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=1372079419-31903-2-git-send-email-xingchao.wang@linux.intel.com \
--to=xingchao.wang@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
--cc=xingchao.wang@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.