From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 09/10] intelhdmi - sticky channel count Date: Wed, 18 Nov 2009 12:38:07 +0800 Message-ID: <20091118043935.830850076@intel.com> References: <20091118043758.141785140@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by alsa0.perex.cz (Postfix) with ESMTP id BC3B3103926 for ; Wed, 18 Nov 2009 05:42:49 +0100 (CET) Content-Disposition: inline; filename=hdmi-sticky-channel-count.patch List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Takashi Iwai Cc: alsa-devel@alsa-project.org, Wu Fengguang , Shane W , =?UTF-8?q?David=20H=C3=A4rdeman?= List-Id: alsa-devel@alsa-project.org Don't change channel count if not necessary. Signed-off-by: Wu Fengguang --- sound/pci/hda/patch_intelhdmi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) --- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c 2009-11-05 16:48:43.000000000 +0800 +++ sound-2.6/sound/pci/hda/patch_intelhdmi.c 2009-11-05 16:49:22.000000000 +0800 @@ -422,24 +422,18 @@ static void hdmi_stop_infoframe_trans(st 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)