From patchwork Tue Feb 27 14:51:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vishal Thanki X-Patchwork-Id: 10245607 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 A108660211 for ; Tue, 27 Feb 2018 14:51:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9392D28998 for ; Tue, 27 Feb 2018 14:51:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91DC72898F; Tue, 27 Feb 2018 14:51:41 +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=-1.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no 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 0B8FB28973 for ; Tue, 27 Feb 2018 14:51:40 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 15846267571; Tue, 27 Feb 2018 15:51:39 +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 36D61267412; Tue, 27 Feb 2018 15:51:36 +0100 (CET) Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by alsa0.perex.cz (Postfix) with ESMTP id 92C622671A9 for ; Tue, 27 Feb 2018 15:51:34 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id s206so22036825wme.0 for ; Tue, 27 Feb 2018 06:51:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=A6gcOg8A73hMHWaXT0Sl4oW5J35T0WNDOHjit6zNPg0=; b=YOHrDA9tJaGFmBRreWT7U4abADobL5MmdVu7wmLMTcOFGn20VJQ+aevfHFbler4b6+ U26JbpGduVE11IU1aEg1vLgHbQ1zfRF4EUAd6G+KaaYk2wJgEMM2fp/9R6J6l90DIDMS zETLHLhlJ5jeMmICKlKcSEuUt+LdG2acOkH+ASDzdjN8j9Y2EvTL24Z15IyMhqQJtFT6 VuzmbHmLWl2m0AJsfBn6f3WHXvqTbWnRKE3J42kNuWRA7aij1CEZH9GvlwDZKJdOdaXk wOkanDk6sNRFwFS1wRuSCbkHaXO085x7j8II9hN6khoiomRa0di1B1Y5RE49F6mcuNCZ v8vQ== 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:in-reply-to :references; bh=A6gcOg8A73hMHWaXT0Sl4oW5J35T0WNDOHjit6zNPg0=; b=lkf3OEOujcoDMbI6UMSUiALsiLMyHg18TYOdwd3lJmZxVbS7Om6wFpSZjmFaVj+T1m gWrjd13AS+djK9CzcXOZjn4mVoTWHwiHSl/ydmLKkOgut6N1FtesxlhB6FHv3ShqbdMB PbstKwei5J+lM7Lm7s6xhgoi7yY0Y5YL4VebCvD47lmXSPq6kSAyosunO8gapXdsnkyw J0O4maq5CUPLpdwn5Q6wCgxdl/bGRjVA17hkI3feYvqfOSfqUEWCqESQoFT+ASXKMDiC reo846n9wSHM15g8MMfDO1vK81KnsFSIztNgC4mr/qMBWKcZTqpOiOgyJR0bAvHft0X8 oWhg== X-Gm-Message-State: APf1xPDrKIY45Wd+p3BV5a+er7DO5+hN+tTQp5RJ68whlaNbb5Qhtgj7 dAjHFlkwMg1Y6Ws/OXwc0sBNtwf4ilQ= X-Google-Smtp-Source: AH8x2262suf9Z0dfNEbv1bDmX6pz8xTJ+5gdusk2UlVHbeoLUjhaMRpWHni1kW7lY0DtVnaDYj248w== X-Received: by 10.80.177.210 with SMTP id n18mr19295028edd.108.1519743093717; Tue, 27 Feb 2018 06:51:33 -0800 (PST) Received: from localhost.localdomain ([212.91.255.186]) by smtp.gmail.com with ESMTPSA id y58sm10146495edd.81.2018.02.27.06.51.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2018 06:51:32 -0800 (PST) From: Vishal Thanki To: alsa-devel@alsa-project.org, peter.ujfalusi@ti.com, christophe.jaillet@wanadoo.fr, elfring@users.sourceforge.net, arvind.yadav.cs@gmail.com Date: Tue, 27 Feb 2018 15:51:04 +0100 Message-Id: <20180227145104.5868-2-vishalthanki@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180227145104.5868-1-vishalthanki@gmail.com> References: <20180227145104.5868-1-vishalthanki@gmail.com> Cc: Vishal Thanki Subject: [alsa-devel] [PATCH 1/1] 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 03ba218160ca..f382dd55cae0 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); }