lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211117093734.17407-9-daniel.baluta@oss.nxp.com>
Date:   Wed, 17 Nov 2021 11:37:21 +0200
From:   Daniel Baluta <daniel.baluta@....nxp.com>
To:     broonie@...nel.org, alsa-devel@...a-project.org
Cc:     pierre-louis.bossart@...ux.intel.com, lgirdwood@...il.com,
        daniel.baluta@....com, daniel.baluta@...il.com,
        AjitKumar.Pandey@....com, Balakishore.pati@....com,
        vsreddy@....com, Julian.Schroeder@....com,
        vishnuvardhanrao.ravulapati@....com, linux-kernel@...r.kernel.org,
        yc.hung@...iatek.com, linux-mediatek@...ts.infradead.org,
        Bard Liao <bard.liao@...el.com>,
        Kai Vehmanen <kai.vehmanen@...ux.intel.com>
Subject: [PATCH 08/21] ASoC: SOF: amd: Add machine driver dsp ops for Renoir platform

From: Ajit Kumar Pandey <AjitKumar.Pandey@....com>

Add dsp ops callback to select and register machine driver.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@....com>
Reviewed-by: Bard Liao <bard.liao@...el.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@...ux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
 sound/soc/sof/amd/renoir.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/sound/soc/sof/amd/renoir.c b/sound/soc/sof/amd/renoir.c
index 0241c5dce156..3cd269bfe75d 100644
--- a/sound/soc/sof/amd/renoir.c
+++ b/sound/soc/sof/amd/renoir.c
@@ -104,6 +104,23 @@ static struct snd_soc_dai_driver renoir_sof_dai[] = {
 	},
 };
 
+static void amd_sof_machine_select(struct snd_sof_dev *sdev)
+{
+	struct snd_sof_pdata *sof_pdata = sdev->pdata;
+	const struct sof_dev_desc *desc = sof_pdata->desc;
+	struct snd_soc_acpi_mach *mach;
+
+	mach = snd_soc_acpi_find_machine(desc->machines);
+	if (!mach) {
+		dev_warn(sdev->dev, "No matching ASoC machine driver found\n");
+		return;
+	}
+
+	sof_pdata->tplg_filename = mach->sof_tplg_filename;
+	sof_pdata->fw_filename = mach->fw_filename;
+	sof_pdata->machine = mach;
+}
+
 /* AMD Renoir DSP ops */
 const struct snd_sof_dsp_ops sof_renoir_ops = {
 	/* probe and remove */
@@ -151,6 +168,11 @@ const struct snd_sof_dsp_ops sof_renoir_ops = {
 				  SNDRV_PCM_INFO_INTERLEAVED |
 				  SNDRV_PCM_INFO_PAUSE |
 				  SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
+
+	/* Machine driver callbacks */
+	.machine_select		= amd_sof_machine_select,
+	.machine_register	= sof_machine_register,
+	.machine_unregister	= sof_machine_unregister,
 };
 EXPORT_SYMBOL(sof_renoir_ops);
 
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ