From patchwork Fri Dec 2 20:06:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Anand X-Patchwork-Id: 9458087 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF9B76074E for ; Fri, 2 Dec 2016 09:38:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D61B7284E0 for ; Fri, 2 Dec 2016 09:38:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7FB3284F1; Fri, 2 Dec 2016 09:38:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 00AC5284E0 for ; Fri, 2 Dec 2016 09:38:05 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7389D26778C; Fri, 2 Dec 2016 10:38:03 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id ACEBC267766; Fri, 2 Dec 2016 10:35:42 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 55A8F26774C; Fri, 2 Dec 2016 09:04:26 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by alsa0.perex.cz (Postfix) with ESMTP id 76F5E26770A for ; Fri, 2 Dec 2016 09:04:23 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 02 Dec 2016 00:04:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,285,1477983600"; d="scan'208";a="198195928" Received: from jerome-ubuntu.iind.intel.com ([10.223.84.52]) by fmsmga004.fm.intel.com with ESMTP; 02 Dec 2016 00:04:20 -0800 From: Jerome Anand To: intel-gfx@lists.freedesktop.org, alsa-devel@alsa-project.org Date: Sat, 3 Dec 2016 01:36:01 +0530 Message-Id: <20161202200601.28402-1-jerome.anand@intel.com> X-Mailer: git-send-email 2.9.3 Cc: tiwai@suse.de, pierre-louis.bossart@linux.intel.com, broonie@kernel.org, rakesh.a.ughreja@intel.com, jerome.anand@intel.com, ville.syrjala@linux.intel.com Subject: [alsa-devel] [RFC PATCH v4 6/7] ALSA: x86: hdmi: Fixup some monitor X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP This change was given to Canonical apparently to fix an issue with on some monitor brand. It's not clear what this patch does but it doesn't seem to have side effects. Signed-off-by: David Henningsson Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jerome Anand --- sound/x86/intel_hdmi_audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c index d9ce750..9249521 100644 --- a/sound/x86/intel_hdmi_audio.c +++ b/sound/x86/intel_hdmi_audio.c @@ -337,6 +337,7 @@ static void snd_intelhad_reset_audio_v2(u8 reset) static int had_prog_status_reg(struct snd_pcm_substream *substream, struct snd_intelhad *intelhaddata) { + union aud_cfg cfg_val = {.cfg_regval = 0}; union aud_ch_status_0 ch_stat0 = {.status_0_regval = 0}; union aud_ch_status_1 ch_stat1 = {.status_1_regval = 0}; int format; @@ -347,6 +348,7 @@ static int had_prog_status_reg(struct snd_pcm_substream *substream, IEC958_AES0_NONAUDIO)>>1; ch_stat0.status_0_regx.clk_acc = (intelhaddata->aes_bits & IEC958_AES3_CON_CLOCK)>>4; + cfg_val.cfg_regx.val_bit = ch_stat0.status_0_regx.lpcm_id; switch (substream->runtime->rate) { case AUD_SAMPLE_RATE_32: @@ -426,7 +428,6 @@ int snd_intelhad_prog_audio_ctrl_v2(struct snd_pcm_substream *substream, else cfg_val.cfg_regx_v2.layout = LAYOUT1; - cfg_val.cfg_regx_v2.val_bit = 1; had_write_register(AUD_CONFIG, cfg_val.cfg_regval); return 0; } @@ -482,7 +483,6 @@ int snd_intelhad_prog_audio_ctrl_v1(struct snd_pcm_substream *substream, } - cfg_val.cfg_regx.val_bit = 1; had_write_register(AUD_CONFIG, cfg_val.cfg_regval); return 0; }