Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chunxu Li <chunxu.li@mediatek.com>
To: <pierre-louis.bossart@linux.intel.com>,
	<peter.ujfalusi@linux.intel.com>,  <lgirdwood@gmail.com>,
	<broonie@kernel.org>, <angelogioacchino.delregno@collabora.com>,
	<daniel.baluta@nxp.com>
Cc: alsa-devel@alsa-project.org, Chunxu Li <chunxu.li@mediatek.com>,
	tinghan.shen@mediatek.com, linux-kernel@vger.kernel.org,
	project_global_chrome_upstream_group@mediatek.com,
	linux-mediatek@lists.infradead.org, yc.hung@mediatek.com,
	matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org,
	sound-open-firmware@alsa-project.org
Subject: [PATCH 2/2] ASoC: SOF: mediatek: Add .of_machine_select field for mt8186
Date: Thu, 4 Aug 2022 17:13:59 +0800	[thread overview]
Message-ID: <20220804091359.31449-3-chunxu.li@mediatek.com> (raw)
In-Reply-To: <20220804091359.31449-1-chunxu.li@mediatek.com>

As the mt8186 do not use ACPI type machine, the of_machine_select
is used to distinguish different machines in sof_machine_check.

Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
---
 sound/soc/sof/mediatek/mt8186/mt8186.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c
 b/sound/soc/sof/mediatek/mt8186/mt8186.c
index e006532caf2f..cb8bed383064 100644
--- a/sound/soc/sof/mediatek/mt8186/mt8186.c
+++ b/sound/soc/sof/mediatek/mt8186/mt8186.c
@@ -497,6 +497,8 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = {
 	/* misc */
 	.get_bar_index	= mt8186_get_bar_index,
 
+	.of_machine_select = sof_of_machine_select,
+
 	/* firmware loading */
 	.load_firmware	= snd_sof_load_firmware_memcpy,
 
@@ -515,7 +517,16 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = {
 			SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
 };
 
+static struct snd_sof_of_mach sof_mt8186_machs[] = {
+	{
+		.board = "mediatek,mt8186",
+		.sof_tplg_filename = "sof-mt8186.tplg",
+	},
+	{}
+};
+
 static const struct sof_dev_desc sof_of_mt8186_desc = {
+	.of_machines = sof_mt8186_machs,
 	.ipc_supported_mask	= BIT(SOF_IPC),
 	.ipc_default		= SOF_IPC,
 	.default_fw_path = {
-- 
2.25.1


  parent reply	other threads:[~2022-08-04  9:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04  9:13 [PATCH 0/2] ASoC: SOF: Introduce of_machine_select Chunxu Li
2022-08-04  9:13 ` [PATCH 1/2] ASoC: SOF: Introduce optional callback of_machine_select Chunxu Li
2022-08-04 13:17   ` Mark Brown
2022-08-04 14:36     ` chunxu.li
2022-08-04 14:59       ` Mark Brown
2022-08-04  9:13 ` Chunxu Li [this message]
2022-08-04 12:41   ` [PATCH 2/2] ASoC: SOF: mediatek: Add .of_machine_select field for mt8186 Mark Brown
2022-08-04 13:21     ` chunxu.li
2022-08-04 13:33       ` Mark Brown
2022-08-04 14:47         ` chunxu.li

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=20220804091359.31449-3-chunxu.li@mediatek.com \
    --to=chunxu.li@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@nxp.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=project_global_chrome_upstream_group@mediatek.com \
    --cc=sound-open-firmware@alsa-project.org \
    --cc=tinghan.shen@mediatek.com \
    --cc=yc.hung@mediatek.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