diff options
author | Wu Fengguang <fengguang.wu@intel.com> | 2009-11-17 23:38:07 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-18 01:46:36 -0500 |
commit | 81bf31e2d0a6a9f5d83da0a757f8ca03db908162 (patch) | |
tree | 62555fb757a1abd72bbe1b82e1327b171d07d2f1 | |
parent | 5779191e0efd851fb0d54698c13cb4f5325caca6 (diff) |
ALSA: intelhdmi - sticky channel count
Don't change channel count if not necessary.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_intelhdmi.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index 8a1cf9d7e5ce..928df59be5d8 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c | |||
@@ -422,24 +422,18 @@ static void hdmi_stop_infoframe_trans(struct hda_codec *codec, | |||
422 | AC_DIPXMIT_DISABLE); | 422 | AC_DIPXMIT_DISABLE); |
423 | } | 423 | } |
424 | 424 | ||
425 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
426 | static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t nid) | 425 | static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t nid) |
427 | { | 426 | { |
428 | return 1 + snd_hda_codec_read(codec, nid, 0, | 427 | return 1 + snd_hda_codec_read(codec, nid, 0, |
429 | AC_VERB_GET_CVT_CHAN_COUNT, 0); | 428 | AC_VERB_GET_CVT_CHAN_COUNT, 0); |
430 | } | 429 | } |
431 | #endif | ||
432 | 430 | ||
433 | static void hdmi_set_channel_count(struct hda_codec *codec, | 431 | static void hdmi_set_channel_count(struct hda_codec *codec, |
434 | hda_nid_t nid, int chs) | 432 | hda_nid_t nid, int chs) |
435 | { | 433 | { |
436 | snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CVT_CHAN_COUNT, chs - 1); | ||
437 | |||
438 | #ifdef CONFIG_SND_DEBUG_VERBOSE | ||
439 | if (chs != hdmi_get_channel_count(codec, nid)) | 434 | if (chs != hdmi_get_channel_count(codec, nid)) |
440 | snd_printd(KERN_INFO "HDMI channel count: expect %d, get %d\n", | 435 | snd_hda_codec_write(codec, nid, 0, |
441 | chs, hdmi_get_channel_count(codec, nid)); | 436 | AC_VERB_SET_CVT_CHAN_COUNT, chs - 1); |
442 | #endif | ||
443 | } | 437 | } |
444 | 438 | ||
445 | 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, hda_nid_t nid) |