From patchwork Fri May 11 12:33:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Thanki X-Patchwork-Id: 10394183 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 1103A601A0 for ; Fri, 11 May 2018 12:33:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D0DA28DE7 for ; Fri, 11 May 2018 12:33:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2128628DFA; Fri, 11 May 2018 12:33:49 +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=-2.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID 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 6C20028DE7 for ; Fri, 11 May 2018 12:33:48 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 923202677CE; Fri, 11 May 2018 14:33:44 +0200 (CEST) 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 3F1EE2677D2; Fri, 11 May 2018 14:33:43 +0200 (CEST) Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by alsa0.perex.cz (Postfix) with ESMTP id 5AD52267281 for ; Fri, 11 May 2018 14:33:40 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id y15-v6so5175579wrg.11 for ; Fri, 11 May 2018 05:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=1PB1/Lhb/tPYK/0tozFvrIyZ/Ze/At1nD9mIFbf924U=; b=C7FrxdUfhsLBJ3tPSlBcSgKu0HLxxXGoYa3MiF3lDBFDe2Leh+1jUSWpjmIO8Q3/i5 pDqRt6cdix9gGd+hRgueqMxR8O4xI7S7lE/WqxjU+gNqX0CLWvGkxe53o+f62rwokpQp T//WBx9fEDetwaUdDi1DjGxX1hpPHWceC6plj1X1XVltW8lwzSDMdSK/Fx6OiTra6xet 3A4XEE/TWlowUm0b+yNwSNyWnU3wdamzUL8sGeaJni3Xur6Ev2/v4A7NMxx9G9wB2+I/ YNKYyjGub3X5LN7X/9zVLnwy/vSMNsgjpORHuDNwp9fSIvfUmC8tMrRfgp4V79QSLpoz KQWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=1PB1/Lhb/tPYK/0tozFvrIyZ/Ze/At1nD9mIFbf924U=; b=hHCijOwliKdAqk5Yet3CBdVuICaWZ2n3YitGutvDw5bDjBrZ/C56fDpWgUGMjX/WXg /YYydhQ3WU8Xjrw94cJ3GlpjIPxIcrrXke991+wNLIDsnEeiPGsqKONT6qx1gCpvFxuQ WJ8N7X7hOHHpW3ivP3VdLGHsk15HvyHMwUi0QrsPNFTUJF7w82Jjmt7UihK1HB6IdnFs YhclIZdCSlTeHNb2ErnjUyEHTeqYRNX8hlZOZ8gJRMWuX+eLxxUFhrg2lxoI5MRHPk11 P/w/01eCu9CQeQ2X46A5Aa4+7stZUz3m9Q+us2IO8bGc692Dg0mLbcPUbmnZVMJjz/29 NWrQ== X-Gm-Message-State: ALKqPwdy5uzxpwnmren3CFva4A81rVs0G3zsfW95lyGa+//AxgmvrMrS wxE/i4S1AHKYzhU/WmgbJOU= X-Google-Smtp-Source: AB8JxZoAKSl7q1ZszMIwhCrM2DqG9Decfy/PE/oUq/WPgtmGsJ0UPeFet2Uk7lWq+9XmLmam2Mzc7g== X-Received: by 2002:adf:c6c1:: with SMTP id c1-v6mr4420932wrh.236.1526042020642; Fri, 11 May 2018 05:33:40 -0700 (PDT) Received: from localhost.localdomain ([79.140.126.226]) by smtp.gmail.com with ESMTPSA id z7-v6sm4436335wrg.56.2018.05.11.05.33.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 May 2018 05:33:39 -0700 (PDT) From: Vishal Thanki To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, peter.ujfalusi@ti.com, alsa-devel@alsa-project.org Date: Fri, 11 May 2018 14:33:37 +0200 Message-Id: <1526042017-27389-1-git-send-email-vishalthanki@gmail.com> X-Mailer: git-send-email 2.7.4 Cc: Vishal Thanki Subject: [alsa-devel] [PATCH] ASoC: davinci-mcasp: Only disable inactive serializer 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 As a side effect of the following commit, the active TX serializer may get disabled which may result in distorted audio output. ASoC: davinci-mcasp: Add support for multichannel playback (2952b27e2e463b28d5c0f04000f96b968137ca42) For example, if a 4 channel I2S playback with two TX serializers is activated. Later on, if a recording of 2 channels, with only 1 RX serializer is started, which will also disable one of the TX serializer because max_active_serializers is only calculated for RX (recording) stream. This patch fixes this issue. Signed-off-by: Vishal Thanki Acked-by: Peter Ujfalusi --- sound/soc/davinci/davinci-mcasp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 79fc4aa..1f96c9d 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -789,7 +789,7 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream, rx_ser < max_active_serializers) { mcasp_clr_bits(mcasp, DAVINCI_MCASP_PDIR_REG, AXR(i)); rx_ser++; - } else { + } else if (mcasp->serial_dir[i] == INACTIVE_MODE) { mcasp_mod_bits(mcasp, DAVINCI_MCASP_XRSRCTL_REG(i), SRMOD_INACTIVE, SRMOD_MASK); }