diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-12-10 23:28:35 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-12-11 01:56:10 -0500 |
commit | 1ffc69a6e86aa9458046d1719957e091c8e95f7a (patch) | |
tree | 345d1f8efea92fd0b02bf86dce909f576feffca7 /sound/pci | |
parent | 728765b30a052317b6cb6111d4c4e66aba5c0099 (diff) |
ALSA: intelhdmi - channel mapping applies to Pin
HDA036-A specifies that the Audio Sample Packet (ASP) Channel Mapping
verbs apply to Digital Display Pin Complex instead of Converter.
With this fix, channel mapping is working as expected for IbexPeak.
Thanks to Marcin for pointing this out!
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_intelhdmi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index 742f15eb3331..0d5dd1ba8205 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c | |||
@@ -436,14 +436,15 @@ static void hdmi_set_channel_count(struct hda_codec *codec, | |||
436 | AC_VERB_SET_CVT_CHAN_COUNT, chs - 1); | 436 | AC_VERB_SET_CVT_CHAN_COUNT, chs - 1); |
437 | } | 437 | } |
438 | 438 | ||
439 | static void hdmi_debug_channel_mapping(struct hda_codec *codec, hda_nid_t nid) | 439 | static void hdmi_debug_channel_mapping(struct hda_codec *codec, |
440 | hda_nid_t pin_nid) | ||
440 | { | 441 | { |
441 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 442 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
442 | int i; | 443 | int i; |
443 | int slot; | 444 | int slot; |
444 | 445 | ||
445 | for (i = 0; i < 8; i++) { | 446 | for (i = 0; i < 8; i++) { |
446 | slot = snd_hda_codec_read(codec, nid, 0, | 447 | slot = snd_hda_codec_read(codec, pin_nid, 0, |
447 | AC_VERB_GET_HDMI_CHAN_SLOT, i); | 448 | AC_VERB_GET_HDMI_CHAN_SLOT, i); |
448 | printk(KERN_DEBUG "HDMI: ASP channel %d => slot %d\n", | 449 | printk(KERN_DEBUG "HDMI: ASP channel %d => slot %d\n", |
449 | slot >> 4, slot & 0xf); | 450 | slot >> 4, slot & 0xf); |
@@ -619,7 +620,8 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec, hda_nid_t nid, | |||
619 | return ai->CA; | 620 | return ai->CA; |
620 | } | 621 | } |
621 | 622 | ||
622 | static void hdmi_setup_channel_mapping(struct hda_codec *codec, hda_nid_t nid, | 623 | static void hdmi_setup_channel_mapping(struct hda_codec *codec, |
624 | hda_nid_t pin_nid, | ||
623 | struct hdmi_audio_infoframe *ai) | 625 | struct hdmi_audio_infoframe *ai) |
624 | { | 626 | { |
625 | int i; | 627 | int i; |
@@ -633,11 +635,11 @@ static void hdmi_setup_channel_mapping(struct hda_codec *codec, hda_nid_t nid, | |||
633 | */ | 635 | */ |
634 | 636 | ||
635 | for (i = 0; i < 8; i++) | 637 | for (i = 0; i < 8; i++) |
636 | snd_hda_codec_write(codec, nid, 0, | 638 | snd_hda_codec_write(codec, pin_nid, 0, |
637 | AC_VERB_SET_HDMI_CHAN_SLOT, | 639 | AC_VERB_SET_HDMI_CHAN_SLOT, |
638 | (i << 4) | i); | 640 | (i << 4) | i); |
639 | 641 | ||
640 | hdmi_debug_channel_mapping(codec, nid); | 642 | hdmi_debug_channel_mapping(codec, pin_nid); |
641 | } | 643 | } |
642 | 644 | ||
643 | static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid, | 645 | static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid, |
@@ -676,7 +678,6 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hda_nid_t nid, | |||
676 | }; | 678 | }; |
677 | 679 | ||
678 | hdmi_setup_channel_allocation(codec, nid, &ai); | 680 | hdmi_setup_channel_allocation(codec, nid, &ai); |
679 | hdmi_setup_channel_mapping(codec, nid, &ai); | ||
680 | 681 | ||
681 | for (i = 0; i < spec->num_pins; i++) { | 682 | for (i = 0; i < spec->num_pins; i++) { |
682 | if (spec->pin_cvt[i] != nid) | 683 | if (spec->pin_cvt[i] != nid) |
@@ -686,6 +687,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hda_nid_t nid, | |||
686 | 687 | ||
687 | pin_nid = spec->pin[i]; | 688 | pin_nid = spec->pin[i]; |
688 | if (!hdmi_infoframe_uptodate(codec, pin_nid, &ai)) { | 689 | if (!hdmi_infoframe_uptodate(codec, pin_nid, &ai)) { |
690 | hdmi_setup_channel_mapping(codec, pin_nid, &ai); | ||
689 | hdmi_stop_infoframe_trans(codec, pin_nid); | 691 | hdmi_stop_infoframe_trans(codec, pin_nid); |
690 | hdmi_fill_audio_infoframe(codec, pin_nid, &ai); | 692 | hdmi_fill_audio_infoframe(codec, pin_nid, &ai); |
691 | hdmi_start_infoframe_trans(codec, pin_nid); | 693 | hdmi_start_infoframe_trans(codec, pin_nid); |