From: Paul Cercueil <paul@crapouillou.net>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, od@zcrc.me,
Zhou Yanjie <zhouyanjie@wanyeetech.com>,
Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH 6/6] ASoC: jz4740-i2s: Add support for the JZ4770
Date: Fri, 6 Mar 2020 23:29:31 +0100 [thread overview]
Message-ID: <20200306222931.39664-6-paul@crapouillou.net> (raw)
In-Reply-To: <20200306222931.39664-1-paul@crapouillou.net>
Before the JZ4770, the playback and capture sampling rates had to match.
The JZ4770 supports independent sampling rates for both.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
sound/soc/jz4740/jz4740-i2s.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 253f8d8ba273..6f6f8dad0356 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -87,6 +87,7 @@
enum jz47xx_i2s_version {
JZ_I2S_JZ4740,
JZ_I2S_JZ4760,
+ JZ_I2S_JZ4770,
JZ_I2S_JZ4780,
};
@@ -286,7 +287,7 @@ static int jz4740_i2s_hw_params(struct snd_pcm_substream *substream,
ctrl &= ~JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_MASK;
ctrl |= sample_size << JZ_AIC_CTRL_INPUT_SAMPLE_SIZE_OFFSET;
- if (i2s->soc_info->version >= JZ_I2S_JZ4780) {
+ if (i2s->soc_info->version >= JZ_I2S_JZ4770) {
div_reg &= ~I2SDIV_IDV_MASK;
div_reg |= (div - 1) << I2SDIV_IDV_SHIFT;
} else {
@@ -469,7 +470,7 @@ static const struct i2s_soc_info jz4760_i2s_soc_info = {
.dai = &jz4740_i2s_dai,
};
-static struct snd_soc_dai_driver jz4780_i2s_dai = {
+static struct snd_soc_dai_driver jz4770_i2s_dai = {
.probe = jz4740_i2s_dai_probe,
.remove = jz4740_i2s_dai_remove,
.playback = {
@@ -487,9 +488,14 @@ static struct snd_soc_dai_driver jz4780_i2s_dai = {
.ops = &jz4740_i2s_dai_ops,
};
+static const struct i2s_soc_info jz4770_i2s_soc_info = {
+ .version = JZ_I2S_JZ4770,
+ .dai = &jz4770_i2s_dai,
+};
+
static const struct i2s_soc_info jz4780_i2s_soc_info = {
.version = JZ_I2S_JZ4780,
- .dai = &jz4780_i2s_dai,
+ .dai = &jz4770_i2s_dai,
};
static const struct snd_soc_component_driver jz4740_i2s_component = {
@@ -502,6 +508,7 @@ static const struct snd_soc_component_driver jz4740_i2s_component = {
static const struct of_device_id jz4740_of_matches[] = {
{ .compatible = "ingenic,jz4740-i2s", .data = &jz4740_i2s_soc_info },
{ .compatible = "ingenic,jz4760-i2s", .data = &jz4760_i2s_soc_info },
+ { .compatible = "ingenic,jz4770-i2s", .data = &jz4770_i2s_soc_info },
{ .compatible = "ingenic,jz4780-i2s", .data = &jz4780_i2s_soc_info },
{ /* sentinel */ }
};
--
2.25.1
next prev parent reply other threads:[~2020-03-06 22:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 22:29 [PATCH 1/6] dt-bindings: sound: Convert jz4740-i2s doc to YAML Paul Cercueil
2020-03-06 22:29 ` [PATCH 2/6] ASoC: jz4740-i2s: Fix divider written at incorrect offset in register Paul Cercueil
2020-03-06 22:29 ` [PATCH 3/6] ASoC: jz4740-i2s: Add local dev variable in probe function Paul Cercueil
2020-03-09 14:25 ` Applied "ASoC: jz4740-i2s: Add local dev variable in probe function" to the asoc tree Mark Brown
2020-03-06 22:29 ` [PATCH 4/6] ASoC: jz4740-i2s: Avoid passing enum as match data Paul Cercueil
2020-03-09 14:25 ` Applied "ASoC: jz4740-i2s: Avoid passing enum as match data" to the asoc tree Mark Brown
2020-03-06 22:29 ` [PATCH 5/6] ASoC: jz4740-i2s: Add support for the JZ4760 Paul Cercueil
2020-03-24 17:16 ` Applied "ASoC: jz4740-i2s: Add support for the JZ4760" to the asoc tree Mark Brown
2020-03-06 22:29 ` Paul Cercueil [this message]
2020-03-24 17:16 ` Applied "ASoC: jz4740-i2s: Add support for the JZ4770" " Mark Brown
2020-03-09 13:26 ` [PATCH 1/6] dt-bindings: sound: Convert jz4740-i2s doc to YAML Mark Brown
2020-03-23 19:44 ` Rob Herring
2020-03-24 17:16 ` Applied "ASoC: Convert jz4740-i2s doc to YAML" 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=20200306222931.39664-6-paul@crapouillou.net \
--to=paul@crapouillou.net \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=od@zcrc.me \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=zhouyanjie@wanyeetech.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).