From: Laurentiu Mihalcea <laurentiumihalcea111@gmail.com>
To: Bard Liao <yung-chuan.liao@linux.intel.com>,
Daniel Baluta <daniel.baluta@nxp.com>,
Iuliana Prodan <iuliana.prodan@nxp.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org,
imx@lists.linux.dev
Subject: [PATCH 4/9] ASoC: SOF: imx8: shuffle structure and function definitions
Date: Mon, 3 Feb 2025 12:18:03 -0500 [thread overview]
Message-ID: <20250203171808.4108-5-laurentiumihalcea111@gmail.com> (raw)
In-Reply-To: <20250203171808.4108-1-laurentiumihalcea111@gmail.com>
From: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Shuffle the definitions of some structures and functions such that
they are better grouped. This is purely a cosmetic change.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
sound/soc/sof/imx/imx8.c | 85 ++++++++++++++++++++--------------------
1 file changed, 43 insertions(+), 42 deletions(-)
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index 05c4d70cd116..93968f077d52 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -41,6 +41,49 @@
#define MBOX_OFFSET 0x800000
#define MBOX_SIZE 0x1000
+static struct snd_soc_dai_driver imx8_dai[] = {
+ IMX_SOF_DAI_DRV_ENTRY_BIDIR("esai0", 1, 8),
+ IMX_SOF_DAI_DRV_ENTRY_BIDIR("sai1", 1, 32),
+};
+
+static struct snd_sof_dsp_ops sof_imx8_ops;
+
+static int imx8_ops_init(struct snd_sof_dev *sdev)
+{
+ /* first copy from template */
+ memcpy(&sof_imx8_ops, &sof_imx_ops, sizeof(sof_imx_ops));
+
+ /* then set common imx8 ops */
+ sof_imx8_ops.dbg_dump = imx8_dump;
+ sof_imx8_ops.dsp_arch_ops = &sof_xtensa_arch_ops;
+ sof_imx8_ops.debugfs_add_region_item =
+ snd_sof_debugfs_add_region_item_iomem;
+
+ /* ... and finally set DAI driver */
+ sof_imx8_ops.drv = imx8_dai;
+ sof_imx8_ops.num_drv = ARRAY_SIZE(imx8_dai);
+
+ return 0;
+}
+
+static int imx8_probe(struct snd_sof_dev *sdev)
+{
+ struct imx_common_data *common;
+ struct imx_sc_ipc *sc_ipc_handle;
+ int ret;
+
+ common = sdev->pdata->hw_pdata;
+
+ ret = imx_scu_get_handle(&sc_ipc_handle);
+ if (ret < 0)
+ return dev_err_probe(sdev->dev, ret,
+ "failed to fetch SC IPC handle\n");
+
+ common->chip_pdata = sc_ipc_handle;
+
+ return 0;
+}
+
/*
* DSP control.
*/
@@ -100,48 +143,6 @@ static int imx8_run(struct snd_sof_dev *sdev)
return 0;
}
-static int imx8_probe(struct snd_sof_dev *sdev)
-{
- struct imx_common_data *common;
- struct imx_sc_ipc *sc_ipc_handle;
- int ret;
-
- common = sdev->pdata->hw_pdata;
-
- ret = imx_scu_get_handle(&sc_ipc_handle);
- if (ret < 0)
- return dev_err_probe(sdev->dev, ret,
- "failed to fetch SC IPC handle\n");
-
- common->chip_pdata = sc_ipc_handle;
-
- return 0;
-}
-
-static struct snd_soc_dai_driver imx8_dai[] = {
- IMX_SOF_DAI_DRV_ENTRY_BIDIR("esai0", 1, 8),
- IMX_SOF_DAI_DRV_ENTRY_BIDIR("sai1", 1, 32),
-};
-
-static struct snd_sof_dsp_ops sof_imx8_ops;
-
-static int imx8_ops_init(struct snd_sof_dev *sdev)
-{
- /* first copy from template */
- memcpy(&sof_imx8_ops, &sof_imx_ops, sizeof(sof_imx_ops));
-
- /* then set common imx8 ops */
- sof_imx8_ops.dbg_dump = imx8_dump;
- sof_imx8_ops.dsp_arch_ops = &sof_xtensa_arch_ops;
- sof_imx8_ops.debugfs_add_region_item =
- snd_sof_debugfs_add_region_item_iomem;
-
- /* ... and finally set DAI driver */
- sof_imx8_ops.drv = imx8_dai;
- sof_imx8_ops.num_drv = ARRAY_SIZE(imx8_dai);
-
- return 0;
-}
static const struct imx_chip_ops imx8_chip_ops = {
.probe = imx8_probe,
--
2.34.1
next prev parent reply other threads:[~2025-02-03 17:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-03 17:17 [PATCH 0/9] Refactor imx drivers and introduce support for imx95 Laurentiu Mihalcea
2025-02-03 17:18 ` [PATCH 1/9] ASoC: SOF: imx: introduce more common structures and functions Laurentiu Mihalcea
2025-02-03 19:52 ` Frank Li
2025-02-04 16:59 ` Laurentiu Mihalcea
2025-02-04 17:15 ` Mark Brown
2025-02-05 16:10 ` Frank Li
2025-02-05 18:58 ` Laurentiu Mihalcea
2025-02-03 17:18 ` [PATCH 2/9] ASoC: SOF: imx8: use common imx chip interface Laurentiu Mihalcea
2025-02-03 17:18 ` [PATCH 3/9] ASoC: SOF: imx8: use IMX_SOF_* macros Laurentiu Mihalcea
2025-02-03 17:18 ` Laurentiu Mihalcea [this message]
2025-02-03 17:18 ` [PATCH 5/9] ASoC: SOF: imx8: drop unneeded/unused macros/header includes Laurentiu Mihalcea
2025-02-03 17:18 ` [PATCH 6/9] ASoC: SOF: imx8: make imx8_ops_init() an util function Laurentiu Mihalcea
2025-02-03 17:18 ` [PATCH 7/9] ASoC: SOF: imx: merge imx8 and imx8m drivers Laurentiu Mihalcea
2025-02-03 17:18 ` [PATCH 8/9] ASoC: SOF: imx: merge imx8 and imx8ulp drivers Laurentiu Mihalcea
2025-02-03 20:06 ` Frank Li
2025-02-04 16:46 ` Laurentiu Mihalcea
2025-02-05 16:12 ` Frank Li
2025-02-03 17:18 ` [PATCH 9/9] ASoC: SOF: imx: add driver for the imx95 chip Laurentiu Mihalcea
2025-02-10 16:29 ` [PATCH 0/9] Refactor imx drivers and introduce support for imx95 Mark Brown
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=20250203171808.4108-5-laurentiumihalcea111@gmail.com \
--to=laurentiumihalcea111@gmail.com \
--cc=broonie@kernel.org \
--cc=daniel.baluta@nxp.com \
--cc=imx@lists.linux.dev \
--cc=iuliana.prodan@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.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