Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 120466
b: refs/heads/master
c: 9c8641e
h: refs/heads/master
v: v3
  • Loading branch information
Wu Fengguang authored and Takashi Iwai committed Nov 19, 2008
1 parent c52e2e0 commit 61d172f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 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: 698544de8a31a7cadc26c27cbaa69ae82dd4f86c
refs/heads/master: 9c8641e8ee438273079337c86f4d739fbfdd8b33
29 changes: 18 additions & 11 deletions trunk/sound/pci/hda/patch_intelhdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static void hdmi_set_channel_count(struct hda_codec *codec, int chs)
chs, hdmi_get_channel_count(codec));
}

static void hdmi_debug_slot_mapping(struct hda_codec *codec)
static void hdmi_debug_channel_mapping(struct hda_codec *codec)
{
#ifdef CONFIG_SND_DEBUG_VERBOSE
int i;
Expand All @@ -305,13 +305,6 @@ static void hdmi_debug_slot_mapping(struct hda_codec *codec)
#endif
}

static void hdmi_setup_channel_mapping(struct hda_codec *codec)
{
snd_hda_sequence_write(codec, def_chan_map);
hdmi_debug_slot_mapping(codec);
}


static void hdmi_parse_eld(struct hda_codec *codec)
{
struct intel_hdmi_spec *spec = codec->spec;
Expand Down Expand Up @@ -461,6 +454,22 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec,
return -1;
}

static void hdmi_setup_channel_mapping(struct hda_codec *codec,
struct hdmi_audio_infoframe *ai)
{
if (!ai->CA)
return;

/*
* TODO: adjust channel mapping if necessary
* ALSA sequence is front/surr/clfe/side?
*/

snd_hda_sequence_write(codec, def_chan_map);
hdmi_debug_channel_mapping(codec);
}


static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
struct snd_pcm_substream *substream)
{
Expand All @@ -472,6 +481,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
};

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

hdmi_fill_audio_infoframe(codec, &ai);
}
Expand Down Expand Up @@ -569,9 +579,6 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,

hdmi_set_channel_count(codec, substream->runtime->channels);

/* wfg: channel mapping not supported by DEVCTG */
hdmi_setup_channel_mapping(codec);

hdmi_setup_audio_infoframe(codec, substream);

hdmi_enable_output(codec);
Expand Down

0 comments on commit 61d172f

Please sign in to comment.