Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175695
b: refs/heads/master
c: 1ffc69a
h: refs/heads/master
i:
  175693: ce2e9a8
  175691: 11be7c4
  175687: b901ebe
  175679: 6dc6558
v: v3
  • Loading branch information
Wu Fengguang authored and Takashi Iwai committed Dec 11, 2009
1 parent 9cb0697 commit be70443
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 728765b30a052317b6cb6111d4c4e66aba5c0099
refs/heads/master: 1ffc69a6e86aa9458046d1719957e091c8e95f7a
14 changes: 8 additions & 6 deletions trunk/sound/pci/hda/patch_intelhdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,15 @@ static void hdmi_set_channel_count(struct hda_codec *codec,
AC_VERB_SET_CVT_CHAN_COUNT, chs - 1);
}

static void hdmi_debug_channel_mapping(struct hda_codec *codec, hda_nid_t nid)
static void hdmi_debug_channel_mapping(struct hda_codec *codec,
hda_nid_t pin_nid)
{
#ifdef CONFIG_SND_DEBUG_VERBOSE
int i;
int slot;

for (i = 0; i < 8; i++) {
slot = snd_hda_codec_read(codec, nid, 0,
slot = snd_hda_codec_read(codec, pin_nid, 0,
AC_VERB_GET_HDMI_CHAN_SLOT, i);
printk(KERN_DEBUG "HDMI: ASP channel %d => slot %d\n",
slot >> 4, slot & 0xf);
Expand Down Expand Up @@ -619,7 +620,8 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec, hda_nid_t nid,
return ai->CA;
}

static void hdmi_setup_channel_mapping(struct hda_codec *codec, hda_nid_t nid,
static void hdmi_setup_channel_mapping(struct hda_codec *codec,
hda_nid_t pin_nid,
struct hdmi_audio_infoframe *ai)
{
int i;
Expand All @@ -633,11 +635,11 @@ static void hdmi_setup_channel_mapping(struct hda_codec *codec, hda_nid_t nid,
*/

for (i = 0; i < 8; i++)
snd_hda_codec_write(codec, nid, 0,
snd_hda_codec_write(codec, pin_nid, 0,
AC_VERB_SET_HDMI_CHAN_SLOT,
(i << 4) | i);

hdmi_debug_channel_mapping(codec, nid);
hdmi_debug_channel_mapping(codec, pin_nid);
}

static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid,
Expand Down Expand Up @@ -676,7 +678,6 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hda_nid_t nid,
};

hdmi_setup_channel_allocation(codec, nid, &ai);
hdmi_setup_channel_mapping(codec, nid, &ai);

for (i = 0; i < spec->num_pins; i++) {
if (spec->pin_cvt[i] != nid)
Expand All @@ -686,6 +687,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, hda_nid_t nid,

pin_nid = spec->pin[i];
if (!hdmi_infoframe_uptodate(codec, pin_nid, &ai)) {
hdmi_setup_channel_mapping(codec, pin_nid, &ai);
hdmi_stop_infoframe_trans(codec, pin_nid);
hdmi_fill_audio_infoframe(codec, pin_nid, &ai);
hdmi_start_infoframe_trans(codec, pin_nid);
Expand Down

0 comments on commit be70443

Please sign in to comment.