All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms
@ 2023-05-25 12:28 Daniel Baluta
  2023-05-25 17:07 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Baluta @ 2023-05-25 12:28 UTC (permalink / raw)
  To: broonie, alsa-devel
  Cc: pierre-louis.bossart, lgirdwood, yung-chuan.liao,
	ranjani.sridharan, daniel.baluta, kai.vehmanen, linux-imx,
	linux-kernel

From: Paul Olaru <paul.olaru@nxp.com>

Covered platforms: i.MX8QXP, i.MX8QM, i.MX8MP, i.MX8ULP.

These descriptors are used to locate the machine driver and topology
filenames.

Note: because the compatible values for the boards do not change between
the cs42888 and the wm8960 cases, I have selected a common topology
filename, which is intended to be a symlink to either the wm8960 or the
cs42888 topology file. For uniformity I did the same for i.MX8ULP.

Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
---
Changes since v1:
 - rebased patch on Mark's tree.

 sound/soc/sof/imx/imx8.c    | 16 ++++++++++++++++
 sound/soc/sof/imx/imx8m.c   | 10 ++++++++++
 sound/soc/sof/imx/imx8ulp.c | 10 ++++++++++
 3 files changed, 36 insertions(+)

diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index 2844d9a8040a..3c9f0cfd8218 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -608,7 +608,22 @@ static struct snd_sof_dsp_ops sof_imx8x_ops = {
 			SNDRV_PCM_INFO_NO_PERIOD_WAKEUP
 };
 
+static struct snd_sof_of_mach sof_imx8_machs[] = {
+	{
+		.compatible = "fsl,imx8qxp",
+		.drv_name = "asoc-simple-card",
+		.sof_tplg_filename = "sof-imx8.tplg",
+	},
+	{
+		.compatible = "fsl,imx8qm",
+		.drv_name = "asoc-simple-card",
+		.sof_tplg_filename = "sof-imx8.tplg",
+	},
+	{}
+};
+
 static struct sof_dev_desc sof_of_imx8qxp_desc = {
+	.of_machines = sof_imx8_machs,
 	.ipc_supported_mask	= BIT(SOF_IPC),
 	.ipc_default		= SOF_IPC,
 	.default_fw_path = {
@@ -625,6 +640,7 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = {
 };
 
 static struct sof_dev_desc sof_of_imx8qm_desc = {
+	.of_machines = sof_imx8_machs,
 	.ipc_supported_mask	= BIT(SOF_IPC),
 	.ipc_default		= SOF_IPC,
 	.default_fw_path = {
diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index 1243f8a6141e..a4050f6ec263 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -470,7 +470,17 @@ static struct snd_sof_dsp_ops sof_imx8m_ops = {
 		SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
 };
 
+static struct snd_sof_of_mach sof_imx8m_machs[] = {
+	{
+		.compatible = "fsl,imx8mp",
+		.drv_name = "asoc-simple-card",
+		.sof_tplg_filename = "sof-imx8m.tplg",
+	},
+	{}
+};
+
 static struct sof_dev_desc sof_of_imx8mp_desc = {
+	.of_machines = sof_imx8m_machs,
 	.ipc_supported_mask	= BIT(SOF_IPC),
 	.ipc_default		= SOF_IPC,
 	.default_fw_path = {
diff --git a/sound/soc/sof/imx/imx8ulp.c b/sound/soc/sof/imx/imx8ulp.c
index 4a562c9856e9..82fcc672bb1c 100644
--- a/sound/soc/sof/imx/imx8ulp.c
+++ b/sound/soc/sof/imx/imx8ulp.c
@@ -477,7 +477,17 @@ static struct snd_sof_dsp_ops sof_imx8ulp_ops = {
 	.set_power_state	= imx8ulp_dsp_set_power_state,
 };
 
+static struct snd_sof_of_mach sof_imx8ulp_machs[] = {
+	{
+		.compatible = "fsl,imx8ulp",
+		.drv_name = "asoc-simple-card",
+		.sof_tplg_filename = "sof-imx8ulp.tplg",
+	},
+	{}
+};
+
 static struct sof_dev_desc sof_of_imx8ulp_desc = {
+	.of_machines = sof_imx8ulp_machs,
 	.ipc_supported_mask     = BIT(SOF_IPC),
 	.ipc_default            = SOF_IPC,
 	.default_fw_path = {
-- 
2.25.1


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

* Re: [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms
  2023-05-25 12:28 [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms Daniel Baluta
@ 2023-05-25 17:07 ` Mark Brown
  2023-05-25 18:35   ` Daniel Baluta
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2023-05-25 17:07 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: alsa-devel, pierre-louis.bossart, lgirdwood, yung-chuan.liao,
	ranjani.sridharan, daniel.baluta, kai.vehmanen, linux-imx,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

On Thu, May 25, 2023 at 03:28:37PM +0300, Daniel Baluta wrote:

> +static struct snd_sof_of_mach sof_imx8_machs[] = {
> +	{
> +		.compatible = "fsl,imx8qxp",
> +		.drv_name = "asoc-simple-card",
> +		.sof_tplg_filename = "sof-imx8.tplg",
> +	},
> +	{
> +		.compatible = "fsl,imx8qm",
> +		.drv_name = "asoc-simple-card",
> +		.sof_tplg_filename = "sof-imx8.tplg",
> +	},
> +	{}

It seems a bit sad to be adding simple-card rather than audio-graph-card
at this point - is there some great reason for this?  

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms
  2023-05-25 17:07 ` Mark Brown
@ 2023-05-25 18:35   ` Daniel Baluta
  2023-05-26 15:32     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Baluta @ 2023-05-25 18:35 UTC (permalink / raw)
  To: Mark Brown
  Cc: Daniel Baluta, alsa-devel, pierre-louis.bossart, lgirdwood,
	yung-chuan.liao, ranjani.sridharan, kai.vehmanen, linux-imx,
	linux-kernel

On Thu, May 25, 2023 at 8:07 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, May 25, 2023 at 03:28:37PM +0300, Daniel Baluta wrote:
>
> > +static struct snd_sof_of_mach sof_imx8_machs[] = {
> > +     {
> > +             .compatible = "fsl,imx8qxp",
> > +             .drv_name = "asoc-simple-card",
> > +             .sof_tplg_filename = "sof-imx8.tplg",
> > +     },
> > +     {
> > +             .compatible = "fsl,imx8qm",
> > +             .drv_name = "asoc-simple-card",
> > +             .sof_tplg_filename = "sof-imx8.tplg",
> > +     },
> > +     {}
>
> It seems a bit sad to be adding simple-card rather than audio-graph-card
> at this point - is there some great reason for this?

This is what we used so far and it works pretty well for us.

Is there a plan to deprecate simple-card? And switch to audio-graph-card?

We could have a look at this if this is the correct direction.

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

* Re: [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms
  2023-05-25 18:35   ` Daniel Baluta
@ 2023-05-26 15:32     ` Mark Brown
  2023-05-29  7:25       ` Daniel Baluta
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2023-05-26 15:32 UTC (permalink / raw)
  To: Daniel Baluta
  Cc: Daniel Baluta, alsa-devel, pierre-louis.bossart, lgirdwood,
	yung-chuan.liao, ranjani.sridharan, kai.vehmanen, linux-imx,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

On Thu, May 25, 2023 at 09:35:40PM +0300, Daniel Baluta wrote:
> On Thu, May 25, 2023 at 8:07 PM Mark Brown <broonie@kernel.org> wrote:

> > > +     {
> > > +             .compatible = "fsl,imx8qm",
> > > +             .drv_name = "asoc-simple-card",
> > > +             .sof_tplg_filename = "sof-imx8.tplg",
> > > +     },

> > It seems a bit sad to be adding simple-card rather than audio-graph-card
> > at this point - is there some great reason for this?

> This is what we used so far and it works pretty well for us.

> Is there a plan to deprecate simple-card? And switch to audio-graph-card?

> We could have a look at this if this is the correct direction.

It's already deprecated, and audio-graph-card (really you want to use
the audio-graph-card2 binding) is much more featureful so will cover
more machines.  If you're doing something new then it's best to use
audio-graph-card for future proofing, simple-card is a bit too simple
and inflexible.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms
  2023-05-26 15:32     ` Mark Brown
@ 2023-05-29  7:25       ` Daniel Baluta
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Baluta @ 2023-05-29  7:25 UTC (permalink / raw)
  To: Mark Brown
  Cc: Daniel Baluta, alsa-devel, pierre-louis.bossart, lgirdwood,
	yung-chuan.liao, ranjani.sridharan, kai.vehmanen, linux-imx,
	linux-kernel

On Fri, May 26, 2023 at 6:32 PM Mark Brown <broonie@kernel.org> wrote:
>
> On Thu, May 25, 2023 at 09:35:40PM +0300, Daniel Baluta wrote:
> > On Thu, May 25, 2023 at 8:07 PM Mark Brown <broonie@kernel.org> wrote:
>
> > > > +     {
> > > > +             .compatible = "fsl,imx8qm",
> > > > +             .drv_name = "asoc-simple-card",
> > > > +             .sof_tplg_filename = "sof-imx8.tplg",
> > > > +     },
>
> > > It seems a bit sad to be adding simple-card rather than audio-graph-card
> > > at this point - is there some great reason for this?
>
> > This is what we used so far and it works pretty well for us.
>
> > Is there a plan to deprecate simple-card? And switch to audio-graph-card?
>
> > We could have a look at this if this is the correct direction.
>
> It's already deprecated, and audio-graph-card (really you want to use
> the audio-graph-card2 binding) is much more featureful so will cover
> more machines.  If you're doing something new then it's best to use
> audio-graph-card for future proofing, simple-card is a bit too simple
> and inflexible.

Ok! Thanks for clarifications! Will use audio-graph-card!

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

end of thread, other threads:[~2023-05-29  7:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 12:28 [PATCH v2] ASoC: SOF: imx: Add OF machine descriptors for i.MX platforms Daniel Baluta
2023-05-25 17:07 ` Mark Brown
2023-05-25 18:35   ` Daniel Baluta
2023-05-26 15:32     ` Mark Brown
2023-05-29  7:25       ` Daniel Baluta

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.