From: Wu Fengguang Date: Wed, 18 Nov 2009 04:38:07 +0000 (+0800) Subject: ALSA: intelhdmi - sticky channel count X-Git-Tag: v2.6.33-rc1~390^2^2~19 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=81bf31e2d0a6a9f5d83da0a757f8ca03db908162;p=karo-tx-linux.git ALSA: intelhdmi - sticky channel count Don't change channel count if not necessary. Signed-off-by: Wu Fengguang Signed-off-by: Takashi Iwai --- 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, AC_DIPXMIT_DISABLE); } -#ifdef CONFIG_SND_DEBUG_VERBOSE static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t nid) { return 1 + snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CVT_CHAN_COUNT, 0); } -#endif static void hdmi_set_channel_count(struct hda_codec *codec, hda_nid_t nid, int chs) { - snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CVT_CHAN_COUNT, chs - 1); - -#ifdef CONFIG_SND_DEBUG_VERBOSE if (chs != hdmi_get_channel_count(codec, nid)) - snd_printd(KERN_INFO "HDMI channel count: expect %d, get %d\n", - chs, hdmi_get_channel_count(codec, nid)); -#endif + snd_hda_codec_write(codec, nid, 0, + AC_VERB_SET_CVT_CHAN_COUNT, chs - 1); } static void hdmi_debug_channel_mapping(struct hda_codec *codec, hda_nid_t nid)