devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Baluta <daniel.baluta@gmail.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>,
	Marco Felsch <m.felsch@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Aisheng Dong <aisheng.dong@nxp.com>, Peng Fan <peng.fan@nxp.com>,
	Anson Huang <anson.huang@nxp.com>,
	Devicetree List <devicetree@vger.kernel.org>,
	"S.j. Wang" <shengjiu.wang@nxp.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Paul Olaru <paul.olaru@nxp.com>, Rob Herring <robh+dt@kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Leonard Crestez <leonard.crestez@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	sound-open-firmware@alsa-project.org
Subject: Re: [Sound-open-firmware] [PATCH v2 3/5] ASoC: SOF: Add DT DSP device support
Date: Wed, 7 Aug 2019 18:28:25 +0300	[thread overview]
Message-ID: <CAEnQRZCE3mxorYpL_nPXiU4MezGDaqUfuFDx8ci0WdXzDa68JA@mail.gmail.com> (raw)
In-Reply-To: <85b4a2c4-761e-bdcf-f05e-2fb16c06f11e@linux.intel.com>

On Wed, Aug 7, 2019 at 6:22 PM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
>
> >>>> +static int sof_dt_probe(struct platform_device *pdev)
> >>>> +{
> >>>> +     struct device *dev = &pdev->dev;
> >>>> +     const struct sof_dev_desc *desc;
> >>>> +     /*TODO: create a generic snd_soc_xxx_mach */
> >>>> +     struct snd_soc_acpi_mach *mach;
> >>>
> >>> I wonder if you really need to use the same structures. For Intel we get
> >>> absolutely zero info from the firmware so rely on an ACPI codec ID as a
> >>> key to find information on which firmware and topology to use, and which
> >>> machine driver to load. You could have all this information in a DT blob?
> >>
> >> Yes. I see your point. I will still need to make a generic structure for
> >> snd_soc_acpi_mach so that everyone can use sof_nocodec_setup function.
> >>
> >> Maybe something like this:
> >>
> >> struct snd_soc_mach {
> >>    union {
> >>    struct snd_soc_acpi_mach acpi_mach;
> >>    struct snd_soc_of_mach of_mach;
> >>    }
> >> };
> >>
> >> and then change the prototype of sof_nocodec_setup.
> >
> > Hi Pierre,
> >
> > I fixed all the comments except the one above. Replacing snd_soc_acpi_mach
> > with a generic snd_soc_mach is not trivial task.
> >
> > I wonder if it is acceptable to get the initial patches as they are
> > now and later switch to
> > generic ACPI/OF abstraction.
> >
> > Asking this because for the moment on the i.MX side I have only
> > implemented no codec
> > version and we don't probe any of the machine drivers we have.
> >
> > So, there is this only one member of snd_soc_acpi_mach that imx
> > version is making use of:
> >
> >    mach->drv_name = "sof-nocodec";
> >
> > That's all.
> >
> > I think the change as it is now is very clean and non-intrusive. Later
> > we will get options to
> > read firmware name and stuff from DT.
> >
> > Anyhow, I don't think we can get rid of snd_dev_desc structure on
> > i.MX. This will be used
> > to store the information read from DT:
> >
> > static struct sof_dev_desc sof_of_imx8qxp_desc = {
> > »       .default_fw_path = "imx/sof",
> > »       .default_tplg_path = "imx/sof-tplg",
> > »       .nocodec_fw_filename = "sof-imx8.ri",
> > »       .nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
> > »       .ops = &sof_imx8_ops,
> > };
> >
> > For the moment we will only use the default values.
>
> Yes, that's fine for now. If you don't have a real machine driver then
> there's nothing urgent to change.
>
> Is the new version on GitHub?

Not yet, will push it today and ping you.

  reply	other threads:[~2019-08-07 15:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23  8:40 [PATCH v2 0/5] Add DSP node for i.MX8QXP board to be used by DSP SOF driver Daniel Baluta
2019-07-23  8:41 ` [PATCH v2 1/5] ASoC: SOF: imx: Add i.MX8 HW support Daniel Baluta
2019-07-23 15:01   ` [Sound-open-firmware] " Pierre-Louis Bossart
2019-07-24  6:54     ` Daniel Baluta
2019-07-24  8:32       ` Lucas Stach
2019-07-24  8:58         ` Daniel Baluta
2019-07-23  8:41 ` [PATCH v2 2/5] ASoC: SOF: topology: Add dummy support for i.MX8 DAIs Daniel Baluta
2019-07-23  8:41 ` [PATCH v2 3/5] ASoC: SOF: Add DT DSP device support Daniel Baluta
2019-07-23 15:11   ` [Sound-open-firmware] " Pierre-Louis Bossart
2019-07-24  7:04     ` Daniel Baluta
2019-08-07 14:39       ` Daniel Baluta
2019-08-07 15:22         ` Pierre-Louis Bossart
2019-08-07 15:28           ` Daniel Baluta [this message]
2019-08-08  6:27             ` Daniel Baluta
2019-08-07 15:29     ` Daniel Baluta
2019-08-07 16:01       ` Pierre-Louis Bossart
2019-07-23  8:41 ` [PATCH v2 4/5] arm64: dts: imx8qxp: Add DSP DT node Daniel Baluta
2019-07-23  8:41 ` [PATCH v2 5/5] dt-bindings: dsp: fsl: Add DSP core binding support Daniel Baluta
2019-07-23 22:32   ` Rob Herring

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=CAEnQRZCE3mxorYpL_nPXiU4MezGDaqUfuFDx8ci0WdXzDa68JA@mail.gmail.com \
    --to=daniel.baluta@gmail.com \
    --cc=aisheng.dong@nxp.com \
    --cc=anson.huang@nxp.com \
    --cc=daniel.baluta@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=leonard.crestez@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=mark.rutland@arm.com \
    --cc=paul.olaru@nxp.com \
    --cc=peng.fan@nxp.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=shengjiu.wang@nxp.com \
    --cc=sound-open-firmware@alsa-project.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).