alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Vishal Thanki <vishalthanki@gmail.com>
To: alsa-devel@alsa-project.org, peter.ujfalusi@ti.com,
	christophe.jaillet@wanadoo.fr, elfring@users.sourceforge.net,
	arvind.yadav.cs@gmail.com
Cc: Vishal Thanki <vishalthanki@gmail.com>
Subject: [PATCH 1/1] ASoC: davinci-mcasp: Only disable inactive serializer
Date: Tue, 27 Feb 2018 15:51:04 +0100	[thread overview]
Message-ID: <20180227145104.5868-2-vishalthanki@gmail.com> (raw)
In-Reply-To: <20180227145104.5868-1-vishalthanki@gmail.com>

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 <vishalthanki@gmail.com>
---
 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);
 		}
-- 
2.14.3

  reply	other threads:[~2018-02-27 14:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 14:51 [PATCH 0/1] Handling of serializers Vishal Thanki
2018-02-27 14:51 ` Vishal Thanki [this message]
2018-03-05 12:42   ` [PATCH 1/1] ASoC: davinci-mcasp: Only disable inactive serializer Peter Ujfalusi
2018-03-27 11:34     ` Vishal Thanki
2018-03-27 11:57       ` Mark Brown
2018-03-27 11:58       ` Mark Brown
2018-05-17 16:38   ` Applied "ASoC: davinci-mcasp: Only disable inactive serializer" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180227145104.5868-2-vishalthanki@gmail.com \
    --to=vishalthanki@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=elfring@users.sourceforge.net \
    --cc=peter.ujfalusi@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).