All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] SOF IMX fixes
@ 2020-07-20  7:20 ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

This patchseries contains a couple of SOF IMX fixes
found during our first IMX SOF release.

Daniel Baluta (7):
  ASoC: SOF: define INFO_ flags in dsp_ops for imx8
  ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
  ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
  ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
  ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
  ASoC: SOF: topology: Update SAI config bclk/fsync rate
  ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs

 sound/soc/sof/imx/imx8.c  | 24 +++++++++++++++++++++---
 sound/soc/sof/imx/imx8m.c |  4 ++--
 sound/soc/sof/pcm.c       |  8 ++++++++
 sound/soc/sof/topology.c  |  2 ++
 4 files changed, 33 insertions(+), 5 deletions(-)

-- 
2.17.1


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

* [PATCH 0/7] SOF IMX fixes
@ 2020-07-20  7:20 ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

This patchseries contains a couple of SOF IMX fixes
found during our first IMX SOF release.

Daniel Baluta (7):
  ASoC: SOF: define INFO_ flags in dsp_ops for imx8
  ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
  ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
  ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
  ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
  ASoC: SOF: topology: Update SAI config bclk/fsync rate
  ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs

 sound/soc/sof/imx/imx8.c  | 24 +++++++++++++++++++++---
 sound/soc/sof/imx/imx8m.c |  4 ++--
 sound/soc/sof/pcm.c       |  8 ++++++++
 sound/soc/sof/topology.c  |  2 ++
 4 files changed, 33 insertions(+), 5 deletions(-)

-- 
2.17.1


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

* [PATCH 1/7] ASoC: SOF: define INFO_ flags in dsp_ops for imx8
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

In the past, the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP were
defined in the SOF PCM core, but that was changed since
commit 27e322fabd50 ("ASoC: SOF: define INFO_ flags in dsp_ops")

Now these flags must be set in DSP ops.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index a4fa8451d8cb..b558132bb609 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -416,6 +416,13 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
 	/* DAI drivers */
 	.drv = imx8_dai,
 	.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+
+	/* ALSA HW info flags */
+	.hw_info =	SNDRV_PCM_INFO_MMAP |
+			SNDRV_PCM_INFO_MMAP_VALID |
+			SNDRV_PCM_INFO_INTERLEAVED |
+			SNDRV_PCM_INFO_PAUSE |
+			SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
 };
 EXPORT_SYMBOL(sof_imx8_ops);
 
-- 
2.17.1


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

* [PATCH 1/7] ASoC: SOF: define INFO_ flags in dsp_ops for imx8
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

In the past, the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP were
defined in the SOF PCM core, but that was changed since
commit 27e322fabd50 ("ASoC: SOF: define INFO_ flags in dsp_ops")

Now these flags must be set in DSP ops.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index a4fa8451d8cb..b558132bb609 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -416,6 +416,13 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
 	/* DAI drivers */
 	.drv = imx8_dai,
 	.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+
+	/* ALSA HW info flags */
+	.hw_info =	SNDRV_PCM_INFO_MMAP |
+			SNDRV_PCM_INFO_MMAP_VALID |
+			SNDRV_PCM_INFO_INTERLEAVED |
+			SNDRV_PCM_INFO_PAUSE |
+			SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
 };
 EXPORT_SYMBOL(sof_imx8_ops);
 
-- 
2.17.1


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

* [PATCH 2/7] ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

With this change we no longer need to update num_drv when adding
new DAI driver.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c  | 4 ++--
 sound/soc/sof/imx/imx8m.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index b558132bb609..c7aab646cb8e 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -415,7 +415,7 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
 
 	/* DAI drivers */
 	.drv = imx8_dai,
-	.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+	.num_drv = ARRAY_SIZE(imx8_dai),
 
 	/* ALSA HW info flags */
 	.hw_info =	SNDRV_PCM_INFO_MMAP |
@@ -455,7 +455,7 @@ struct snd_sof_dsp_ops sof_imx8x_ops = {
 
 	/* DAI drivers */
 	.drv = imx8_dai,
-	.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+	.num_drv = ARRAY_SIZE(imx8_dai),
 
 	/* ALSA HW info flags */
 	.hw_info =	SNDRV_PCM_INFO_MMAP |
diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index 287114a37688..067d2424c682 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -280,7 +280,7 @@ struct snd_sof_dsp_ops sof_imx8m_ops = {
 
 	/* DAI drivers */
 	.drv = imx8m_dai,
-	.num_drv = 1, /* we have only 1 SAI interface on i.MX8M */
+	.num_drv = ARRAY_SIZE(imx8m_dai),
 
 	.hw_info = SNDRV_PCM_INFO_MMAP |
 		SNDRV_PCM_INFO_MMAP_VALID |
-- 
2.17.1


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

* [PATCH 2/7] ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

With this change we no longer need to update num_drv when adding
new DAI driver.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c  | 4 ++--
 sound/soc/sof/imx/imx8m.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index b558132bb609..c7aab646cb8e 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -415,7 +415,7 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
 
 	/* DAI drivers */
 	.drv = imx8_dai,
-	.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+	.num_drv = ARRAY_SIZE(imx8_dai),
 
 	/* ALSA HW info flags */
 	.hw_info =	SNDRV_PCM_INFO_MMAP |
@@ -455,7 +455,7 @@ struct snd_sof_dsp_ops sof_imx8x_ops = {
 
 	/* DAI drivers */
 	.drv = imx8_dai,
-	.num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+	.num_drv = ARRAY_SIZE(imx8_dai),
 
 	/* ALSA HW info flags */
 	.hw_info =	SNDRV_PCM_INFO_MMAP |
diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index 287114a37688..067d2424c682 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -280,7 +280,7 @@ struct snd_sof_dsp_ops sof_imx8m_ops = {
 
 	/* DAI drivers */
 	.drv = imx8m_dai,
-	.num_drv = 1, /* we have only 1 SAI interface on i.MX8M */
+	.num_drv = ARRAY_SIZE(imx8m_dai),
 
 	.hw_info = SNDRV_PCM_INFO_MMAP |
 		SNDRV_PCM_INFO_MMAP_VALID |
-- 
2.17.1


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

* [PATCH 3/7] ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

This must match DAI name from topology. Also, esai-port is too generic
as they are 2 ESAIs on i.MX8/i.MX8X boards.

SOF integration only uses ESAI0 for now.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index c7aab646cb8e..f1308824e2cd 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -374,7 +374,7 @@ static int imx8_ipc_pcm_params(struct snd_sof_dev *sdev,
 
 static struct snd_soc_dai_driver imx8_dai[] = {
 {
-	.name = "esai-port",
+	.name = "esai0",
 	.playback = {
 		.channels_min = 1,
 		.channels_max = 8,
-- 
2.17.1


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

* [PATCH 3/7] ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

This must match DAI name from topology. Also, esai-port is too generic
as they are 2 ESAIs on i.MX8/i.MX8X boards.

SOF integration only uses ESAI0 for now.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index c7aab646cb8e..f1308824e2cd 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -374,7 +374,7 @@ static int imx8_ipc_pcm_params(struct snd_sof_dev *sdev,
 
 static struct snd_soc_dai_driver imx8_dai[] = {
 {
-	.name = "esai-port",
+	.name = "esai0",
 	.playback = {
 		.channels_min = 1,
 		.channels_max = 8,
-- 
2.17.1


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

* [PATCH 4/7] ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

This must match DAI name from topology. Also, sai-port
is too generic. Physical DAI port on i.MX8MP is labeled SAI3.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index 067d2424c682..3b9c560cd40f 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -239,7 +239,7 @@ static int imx8m_ipc_pcm_params(struct snd_sof_dev *sdev,
 
 static struct snd_soc_dai_driver imx8m_dai[] = {
 {
-	.name = "sai-port",
+	.name = "sai3",
 	.playback = {
 		.channels_min = 1,
 		.channels_max = 32,
-- 
2.17.1


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

* [PATCH 4/7] ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

This must match DAI name from topology. Also, sai-port
is too generic. Physical DAI port on i.MX8MP is labeled SAI3.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8m.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index 067d2424c682..3b9c560cd40f 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -239,7 +239,7 @@ static int imx8m_ipc_pcm_params(struct snd_sof_dev *sdev,
 
 static struct snd_soc_dai_driver imx8m_dai[] = {
 {
-	.name = "sai-port",
+	.name = "sai3",
 	.playback = {
 		.channels_min = 1,
 		.channels_max = 32,
-- 
2.17.1


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

* [PATCH 5/7] ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

With SOF we support 1 ESAI interface and 1 SAI interface.
This patch adds SAI1 interface support existing on i.MX8/i.MX8X
boards.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index f1308824e2cd..bc0628c7b88c 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -384,6 +384,17 @@ static struct snd_soc_dai_driver imx8_dai[] = {
 		.channels_max = 8,
 	},
 },
+{
+	.name = "sai1",
+	.playback = {
+		.channels_min = 1,
+		.channels_max = 32,
+	},
+	.capture = {
+		.channels_min = 1,
+		.channels_max = 32,
+	},
+},
 };
 
 /* i.MX8 ops */
-- 
2.17.1


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

* [PATCH 5/7] ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

With SOF we support 1 ESAI interface and 1 SAI interface.
This patch adds SAI1 interface support existing on i.MX8/i.MX8X
boards.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/soc/sof/imx/imx8.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index f1308824e2cd..bc0628c7b88c 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -384,6 +384,17 @@ static struct snd_soc_dai_driver imx8_dai[] = {
 		.channels_max = 8,
 	},
 },
+{
+	.name = "sai1",
+	.playback = {
+		.channels_min = 1,
+		.channels_max = 32,
+	},
+	.capture = {
+		.channels_min = 1,
+		.channels_max = 32,
+	},
+},
 };
 
 /* i.MX8 ops */
-- 
2.17.1


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

* [PATCH 6/7] ASoC: SOF: topology: Update SAI config bclk/fsync rate
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

These parameters are read from topology file and sent to DSP.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/topology.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 6a9703e5ff60..13e10a0c0b05 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2831,6 +2831,8 @@ static int sof_link_sai_load(struct snd_soc_component *scomp, int index,
 	}
 
 	config->sai.mclk_rate = le32_to_cpu(hw_config->mclk_rate);
+	config->sai.bclk_rate = le32_to_cpu(hw_config->bclk_rate);
+	config->sai.fsync_rate = le32_to_cpu(hw_config->fsync_rate);
 	config->sai.mclk_direction = hw_config->mclk_direction;
 
 	config->sai.tdm_slots = le32_to_cpu(hw_config->tdm_slots);
-- 
2.17.1


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

* [PATCH 6/7] ASoC: SOF: topology: Update SAI config bclk/fsync rate
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

These parameters are read from topology file and sent to DSP.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/topology.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 6a9703e5ff60..13e10a0c0b05 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2831,6 +2831,8 @@ static int sof_link_sai_load(struct snd_soc_component *scomp, int index,
 	}
 
 	config->sai.mclk_rate = le32_to_cpu(hw_config->mclk_rate);
+	config->sai.bclk_rate = le32_to_cpu(hw_config->bclk_rate);
+	config->sai.fsync_rate = le32_to_cpu(hw_config->fsync_rate);
 	config->sai.mclk_direction = hw_config->mclk_direction;
 
 	config->sai.tdm_slots = le32_to_cpu(hw_config->tdm_slots);
-- 
2.17.1


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

* [PATCH 7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-20  7:20   ` Daniel Baluta
  -1 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: linux-imx, linux-kernel, festevam, shengjiu.wang

From: Daniel Baluta <daniel.baluta@nxp.com>

Fixup BE DAI links rate/channels parameters to match any values
from topology.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/pcm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
index 22fe9d5e932b..5cfd2611b252 100644
--- a/sound/soc/sof/pcm.c
+++ b/sound/soc/sof/pcm.c
@@ -718,17 +718,25 @@ static int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
 		/* do nothing for ALH dai_link */
 		break;
 	case SOF_DAI_IMX_ESAI:
+		rate->min = dai->dai_config->esai.fsync_rate;
+		rate->max = dai->dai_config->esai.fsync_rate;
 		channels->min = dai->dai_config->esai.tdm_slots;
 		channels->max = dai->dai_config->esai.tdm_slots;
 
+		dev_dbg(component->dev,
+			"rate_min: %d rate_max: %d\n", rate->min, rate->max);
 		dev_dbg(component->dev,
 			"channels_min: %d channels_max: %d\n",
 			channels->min, channels->max);
 		break;
 	case SOF_DAI_IMX_SAI:
+		rate->min = dai->dai_config->sai.fsync_rate;
+		rate->max = dai->dai_config->sai.fsync_rate;
 		channels->min = dai->dai_config->sai.tdm_slots;
 		channels->max = dai->dai_config->sai.tdm_slots;
 
+		dev_dbg(component->dev,
+			"rate_min: %d rate_max: %d\n", rate->min, rate->max);
 		dev_dbg(component->dev,
 			"channels_min: %d channels_max: %d\n",
 			channels->min, channels->max);
-- 
2.17.1


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

* [PATCH 7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
@ 2020-07-20  7:20   ` Daniel Baluta
  0 siblings, 0 replies; 18+ messages in thread
From: Daniel Baluta @ 2020-07-20  7:20 UTC (permalink / raw)
  To: alsa-devel, broonie; +Cc: shengjiu.wang, festevam, linux-imx, linux-kernel

From: Daniel Baluta <daniel.baluta@nxp.com>

Fixup BE DAI links rate/channels parameters to match any values
from topology.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
 sound/soc/sof/pcm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c
index 22fe9d5e932b..5cfd2611b252 100644
--- a/sound/soc/sof/pcm.c
+++ b/sound/soc/sof/pcm.c
@@ -718,17 +718,25 @@ static int sof_pcm_dai_link_fixup(struct snd_soc_pcm_runtime *rtd,
 		/* do nothing for ALH dai_link */
 		break;
 	case SOF_DAI_IMX_ESAI:
+		rate->min = dai->dai_config->esai.fsync_rate;
+		rate->max = dai->dai_config->esai.fsync_rate;
 		channels->min = dai->dai_config->esai.tdm_slots;
 		channels->max = dai->dai_config->esai.tdm_slots;
 
+		dev_dbg(component->dev,
+			"rate_min: %d rate_max: %d\n", rate->min, rate->max);
 		dev_dbg(component->dev,
 			"channels_min: %d channels_max: %d\n",
 			channels->min, channels->max);
 		break;
 	case SOF_DAI_IMX_SAI:
+		rate->min = dai->dai_config->sai.fsync_rate;
+		rate->max = dai->dai_config->sai.fsync_rate;
 		channels->min = dai->dai_config->sai.tdm_slots;
 		channels->max = dai->dai_config->sai.tdm_slots;
 
+		dev_dbg(component->dev,
+			"rate_min: %d rate_max: %d\n", rate->min, rate->max);
 		dev_dbg(component->dev,
 			"channels_min: %d channels_max: %d\n",
 			channels->min, channels->max);
-- 
2.17.1


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

* Re: [PATCH 0/7] SOF IMX fixes
  2020-07-20  7:20 ` Daniel Baluta
@ 2020-07-22 13:44   ` Mark Brown
  -1 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2020-07-22 13:44 UTC (permalink / raw)
  To: alsa-devel, Daniel Baluta
  Cc: festevam, linux-kernel, linux-imx, shengjiu.wang

On Mon, 20 Jul 2020 10:20:39 +0300, Daniel Baluta wrote:
> This patchseries contains a couple of SOF IMX fixes
> found during our first IMX SOF release.
> 
> Daniel Baluta (7):
>   ASoC: SOF: define INFO_ flags in dsp_ops for imx8
>   ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
>   ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
>   ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
>   ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
>   ASoC: SOF: topology: Update SAI config bclk/fsync rate
>   ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
> 
> [...]

Applied to

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

Thanks!

[1/7] ASoC: SOF: define INFO_ flags in dsp_ops for imx8
      commit: 45b7262174dcc2ca62e23220219eee1462dcada9
[2/7] ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
      commit: beaa7bd10dce348b033aff3f466ab1a78b33fed3
[3/7] ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
      commit: bcba2c9d62f391cd2cd6acb7f658d47bfb10e8b9
[4/7] ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
      commit: f23a8e9402f899e3555ac8aff3d3d050adafe39e
[5/7] ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
      commit: 68f56f618c3fbc4b1af0428f715f952cdada7a54
[6/7] ASoC: SOF: topology: Update SAI config bclk/fsync rate
      commit: 72bb9564fd97cd4f6dec88c8363acc3ab642673f
[7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
      commit: 51b0243aefaa554ca57817562da8eb269280d4ae

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] 18+ messages in thread

* Re: [PATCH 0/7] SOF IMX fixes
@ 2020-07-22 13:44   ` Mark Brown
  0 siblings, 0 replies; 18+ messages in thread
From: Mark Brown @ 2020-07-22 13:44 UTC (permalink / raw)
  To: alsa-devel, Daniel Baluta
  Cc: shengjiu.wang, festevam, linux-kernel, linux-imx

On Mon, 20 Jul 2020 10:20:39 +0300, Daniel Baluta wrote:
> This patchseries contains a couple of SOF IMX fixes
> found during our first IMX SOF release.
> 
> Daniel Baluta (7):
>   ASoC: SOF: define INFO_ flags in dsp_ops for imx8
>   ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
>   ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
>   ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
>   ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
>   ASoC: SOF: topology: Update SAI config bclk/fsync rate
>   ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
> 
> [...]

Applied to

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

Thanks!

[1/7] ASoC: SOF: define INFO_ flags in dsp_ops for imx8
      commit: 45b7262174dcc2ca62e23220219eee1462dcada9
[2/7] ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
      commit: beaa7bd10dce348b033aff3f466ab1a78b33fed3
[3/7] ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X
      commit: bcba2c9d62f391cd2cd6acb7f658d47bfb10e8b9
[4/7] ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M
      commit: f23a8e9402f899e3555ac8aff3d3d050adafe39e
[5/7] ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X
      commit: 68f56f618c3fbc4b1af0428f715f952cdada7a54
[6/7] ASoC: SOF: topology: Update SAI config bclk/fsync rate
      commit: 72bb9564fd97cd4f6dec88c8363acc3ab642673f
[7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs
      commit: 51b0243aefaa554ca57817562da8eb269280d4ae

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] 18+ messages in thread

end of thread, other threads:[~2020-07-22 13:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  7:20 [PATCH 0/7] SOF IMX fixes Daniel Baluta
2020-07-20  7:20 ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 1/7] ASoC: SOF: define INFO_ flags in dsp_ops for imx8 Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 2/7] ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 3/7] ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 4/7] ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 5/7] ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 6/7] ASoC: SOF: topology: Update SAI config bclk/fsync rate Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-20  7:20 ` [PATCH 7/7] ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs Daniel Baluta
2020-07-20  7:20   ` Daniel Baluta
2020-07-22 13:44 ` [PATCH 0/7] SOF IMX fixes Mark Brown
2020-07-22 13:44   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.