linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: codekipper@gmail.com
To: mripard@kernel.org, wens@csie.org, linux-sunxi@googlegroups.com
Cc: alsa-devel@alsa-project.org, Marcus Cooper <codekipper@gmail.com>,
	lgirdwood@gmail.com, linux-kernel@vger.kernel.org,
	be17068@iperbole.bo.it, broonie@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 3/3] ASoC: sun4i-i2s: Adjust LRCLK width
Date: Mon, 26 Aug 2019 20:07:34 +0200	[thread overview]
Message-ID: <20190826180734.15801-4-codekipper@gmail.com> (raw)
In-Reply-To: <20190826180734.15801-1-codekipper@gmail.com>

From: Marcus Cooper <codekipper@gmail.com>

Some codecs such as i2s based HDMI audio and the Pine64 DAC require
a different amount of bit clocks per frame than what is calculated
by the sample width. Use the values obtained by the tdm slot bindings
to adjust the LRCLK width accordingly.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
---
 sound/soc/sunxi/sun4i-i2s.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index 056a299c03fb..0965a97c96e5 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -455,7 +455,10 @@ static int sun8i_i2s_set_chan_cfg(const struct sun4i_i2s *i2s,
 		break;
 
 	case SND_SOC_DAIFMT_I2S:
-		lrck_period = params_physical_width(params);
+		if (i2s->slot_width)
+			lrck_period = i2s->slot_width;
+		else
+			lrck_period = params_physical_width(params);
 		break;
 
 	default:
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-08-26 18:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-26 18:07 [PATCH v6 0/3] ASoC: sun4i-i2s: Updates to the driver codekipper
2019-08-26 18:07 ` [PATCH v6 1/3] ASoC: sun4i-i2s: incorrect regmap for A83T codekipper
2019-08-27  4:13   ` [linux-sunxi] " Chen-Yu Tsai
2019-08-27  5:54     ` Code Kipper
2019-08-27  8:01       ` Chen-Yu Tsai
2019-08-27  8:35         ` Code Kipper
2019-08-27 10:28           ` Chen-Yu Tsai
2019-08-26 18:07 ` [PATCH v6 2/3] ASoC: sun4i-i2s: Add regmap field to sign extend sample codekipper
2019-08-27  9:34   ` Maxime Ripard
2019-08-27 10:55     ` Code Kipper
2019-08-26 18:07 ` codekipper [this message]
2019-08-27  7:01   ` [PATCH v6 3/3] ASoC: sun4i-i2s: Adjust LRCLK width Maxime Ripard
2019-08-27  8:36     ` Code Kipper

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=20190826180734.15801-4-codekipper@gmail.com \
    --to=codekipper@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=be17068@iperbole.bo.it \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=mripard@kernel.org \
    --cc=wens@csie.org \
    /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).