linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec
@ 2020-11-30  3:57 Shengjiu Wang
  2020-11-30  3:57 ` [PATCH 2/2] ASoC: bindings: fsl-asoc-card: add compatible string " Shengjiu Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shengjiu Wang @ 2020-11-30  3:57 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
	perex, tiwai, alsa-devel, linuxppc-dev, linux-kernel, robh+dt,
	devicetree

The si476x codec is used for FM radio function on i.MX6
auto board, it only supports recording function.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/fsl/fsl-asoc-card.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index a2dd3b6b7fec..f62f81ceab0d 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -131,6 +131,13 @@ static const struct snd_soc_dapm_route audio_map_tx[] = {
 	{"CPU-Playback",  NULL, "ASRC-Playback"},
 };
 
+static const struct snd_soc_dapm_route audio_map_rx[] = {
+	/* 1st half -- Normal DAPM routes */
+	{"CPU-Capture",  NULL, "Capture"},
+	/* 2nd half -- ASRC DAPM routes */
+	{"ASRC-Capture",  NULL, "CPU-Capture"},
+};
+
 /* Add all possible widgets into here without being redundant */
 static const struct snd_soc_dapm_widget fsl_asoc_card_dapm_widgets[] = {
 	SND_SOC_DAPM_LINE("Line Out Jack", NULL),
@@ -653,6 +660,11 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
 		priv->cpu_priv.slot_width = 32;
 		priv->card.dapm_routes = audio_map_tx;
 		priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_tx);
+	} else if (of_device_is_compatible(np, "fsl,imx-audio-si476x")) {
+		codec_dai_name = "si476x-codec";
+		priv->dai_fmt |= SND_SOC_DAIFMT_CBS_CFS;
+		priv->card.dapm_routes = audio_map_rx;
+		priv->card.num_dapm_routes = ARRAY_SIZE(audio_map_rx);
 	} else {
 		dev_err(&pdev->dev, "unknown Device Tree compatible\n");
 		ret = -EINVAL;
@@ -869,6 +881,7 @@ static const struct of_device_id fsl_asoc_card_dt_ids[] = {
 	{ .compatible = "fsl,imx-audio-wm8960", },
 	{ .compatible = "fsl,imx-audio-mqs", },
 	{ .compatible = "fsl,imx-audio-wm8524", },
+	{ .compatible = "fsl,imx-audio-si476x", },
 	{}
 };
 MODULE_DEVICE_TABLE(of, fsl_asoc_card_dt_ids);
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: bindings: fsl-asoc-card: add compatible string for si476x codec
  2020-11-30  3:57 [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec Shengjiu Wang
@ 2020-11-30  3:57 ` Shengjiu Wang
  2020-12-02 19:45 ` [PATCH 1/2] ASoC: fsl-asoc-card: Add support " Nicolin Chen
  2020-12-03 14:18 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Shengjiu Wang @ 2020-11-30  3:57 UTC (permalink / raw)
  To: timur, nicoleotsuka, Xiubo.Lee, festevam, lgirdwood, broonie,
	perex, tiwai, alsa-devel, linuxppc-dev, linux-kernel, robh+dt,
	devicetree

The si476x codec is used for FM radio function on i.MX6
auto board.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl-asoc-card.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
index f339be62e7e4..90d9e9d81624 100644
--- a/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
+++ b/Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
@@ -40,6 +40,8 @@ The compatible list for this generic sound card currently:
 
  "fsl,imx-audio-tlv320aic32x4"
 
+ "fsl,imx-audio-si476x"
+
 Required properties:
 
   - compatible		: Contains one of entries in the compatible list.
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec
  2020-11-30  3:57 [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec Shengjiu Wang
  2020-11-30  3:57 ` [PATCH 2/2] ASoC: bindings: fsl-asoc-card: add compatible string " Shengjiu Wang
@ 2020-12-02 19:45 ` Nicolin Chen
  2020-12-03 14:18 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Nicolin Chen @ 2020-12-02 19:45 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: timur, Xiubo.Lee, festevam, lgirdwood, broonie, perex, tiwai,
	alsa-devel, linuxppc-dev, linux-kernel, robh+dt, devicetree

On Mon, Nov 30, 2020 at 11:57:47AM +0800, Shengjiu Wang wrote:
> The si476x codec is used for FM radio function on i.MX6
> auto board, it only supports recording function.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>

Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec
  2020-11-30  3:57 [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec Shengjiu Wang
  2020-11-30  3:57 ` [PATCH 2/2] ASoC: bindings: fsl-asoc-card: add compatible string " Shengjiu Wang
  2020-12-02 19:45 ` [PATCH 1/2] ASoC: fsl-asoc-card: Add support " Nicolin Chen
@ 2020-12-03 14:18 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-12-03 14:18 UTC (permalink / raw)
  To: devicetree, linux-kernel, perex, Shengjiu Wang, linuxppc-dev,
	timur, Xiubo.Lee, nicoleotsuka, alsa-devel, lgirdwood, robh+dt,
	tiwai, festevam

On Mon, 30 Nov 2020 11:57:47 +0800, Shengjiu Wang wrote:
> The si476x codec is used for FM radio function on i.MX6
> auto board, it only supports recording function.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: fsl-asoc-card: Add support for si476x codec
      commit: 77f1ff751037fcd39c8fc37b3c3796fb139fb388
[2/2] ASoC: bindings: fsl-asoc-card: add compatible string for si476x codec
      commit: 0b3355b070434f9901f641aac9000df93e2c96ad

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-03 14:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30  3:57 [PATCH 1/2] ASoC: fsl-asoc-card: Add support for si476x codec Shengjiu Wang
2020-11-30  3:57 ` [PATCH 2/2] ASoC: bindings: fsl-asoc-card: add compatible string " Shengjiu Wang
2020-12-02 19:45 ` [PATCH 1/2] ASoC: fsl-asoc-card: Add support " Nicolin Chen
2020-12-03 14:18 ` Mark Brown

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).