diff options
author | Wang Xingchao <xingchao.wang@linux.intel.com> | 2013-06-24 23:41:23 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-06-25 02:13:56 -0400 |
commit | 8b2c7a5c404d7accb9790e1d5a1a518dd0a77a5e (patch) | |
tree | d5a730827030e60d4da29cacadd94aaf68592a00 /sound/pci | |
parent | eb33ccf7637c34b2c95dbcca8b2e4cab76a52949 (diff) |
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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_proc.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 0fee8fae590a..9760f001916d 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, | |||
504 | int conn_len) | 504 | int conn_len) |
505 | { | 505 | { |
506 | int c, curr = -1; | 506 | int c, curr = -1; |
507 | const hda_nid_t *list; | ||
508 | int cache_len; | ||
507 | 509 | ||
508 | if (conn_len > 1 && | 510 | if (conn_len > 1 && |
509 | wid_type != AC_WID_AUD_MIX && | 511 | wid_type != AC_WID_AUD_MIX && |
@@ -521,6 +523,19 @@ static void print_conn_list(struct snd_info_buffer *buffer, | |||
521 | } | 523 | } |
522 | snd_iprintf(buffer, "\n"); | 524 | snd_iprintf(buffer, "\n"); |
523 | } | 525 | } |
526 | |||
527 | /* Get Cache connections info */ | ||
528 | cache_len = snd_hda_get_conn_list(codec, nid, &list); | ||
529 | if (cache_len != conn_len | ||
530 | || memcmp(list, conn, conn_len)) { | ||
531 | snd_iprintf(buffer, " In-driver Connection: %d\n", cache_len); | ||
532 | if (cache_len > 0) { | ||
533 | snd_iprintf(buffer, " "); | ||
534 | for (c = 0; c < cache_len; c++) | ||
535 | snd_iprintf(buffer, " 0x%02x", list[c]); | ||
536 | snd_iprintf(buffer, "\n"); | ||
537 | } | ||
538 | } | ||
524 | } | 539 | } |
525 | 540 | ||
526 | static void print_gpio(struct snd_info_buffer *buffer, | 541 | static void print_gpio(struct snd_info_buffer *buffer, |