mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
ALSA: hda - Add In-driver connection info
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 driver choose converter from cache connections. So add "In-driver connection" info to avoid confuse when raw connections are different with cache connection. Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
eb33ccf763
commit
8b2c7a5c40
1 changed files with 15 additions and 0 deletions
|
@ -504,6 +504,8 @@ static void print_conn_list(struct snd_info_buffer *buffer,
|
||||||
int conn_len)
|
int conn_len)
|
||||||
{
|
{
|
||||||
int c, curr = -1;
|
int c, curr = -1;
|
||||||
|
const hda_nid_t *list;
|
||||||
|
int cache_len;
|
||||||
|
|
||||||
if (conn_len > 1 &&
|
if (conn_len > 1 &&
|
||||||
wid_type != AC_WID_AUD_MIX &&
|
wid_type != AC_WID_AUD_MIX &&
|
||||||
|
@ -521,6 +523,19 @@ static void print_conn_list(struct snd_info_buffer *buffer,
|
||||||
}
|
}
|
||||||
snd_iprintf(buffer, "\n");
|
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, " In-driver Connection: %d\n", cache_len);
|
||||||
|
if (cache_len > 0) {
|
||||||
|
snd_iprintf(buffer, " ");
|
||||||
|
for (c = 0; c < cache_len; c++)
|
||||||
|
snd_iprintf(buffer, " 0x%02x", list[c]);
|
||||||
|
snd_iprintf(buffer, "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_gpio(struct snd_info_buffer *buffer,
|
static void print_gpio(struct snd_info_buffer *buffer,
|
||||||
|
|
Loading…
Reference in a new issue