alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH v2 38/39] ASoC: codecs/hdmi-codec: merge DAI call back functions into ops
Date: Tue, 8 Aug 2023 22:58:58 +0000	[thread overview]
Message-ID: <87edkd9m4t.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87wmy5b0wt.wl-kuninori.morimoto.gx@renesas.com>

ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/codecs/hdmi-codec.c | 44 +++++++++++++++++------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index d21f69f05342..13689e718d36 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -723,24 +723,6 @@ static u64 hdmi_codec_formats =
 	SND_SOC_POSSIBLE_DAIFMT_LEFT_J	|
 	SND_SOC_POSSIBLE_DAIFMT_AC97;
 
-static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
-	.startup	= hdmi_codec_startup,
-	.shutdown	= hdmi_codec_shutdown,
-	.hw_params	= hdmi_codec_hw_params,
-	.prepare	= hdmi_codec_prepare,
-	.set_fmt	= hdmi_codec_i2s_set_fmt,
-	.mute_stream	= hdmi_codec_mute,
-	.auto_selectable_formats	= &hdmi_codec_formats,
-	.num_auto_selectable_formats	= 1,
-};
-
-static const struct snd_soc_dai_ops hdmi_codec_spdif_dai_ops = {
-	.startup	= hdmi_codec_startup,
-	.shutdown	= hdmi_codec_shutdown,
-	.hw_params	= hdmi_codec_hw_params,
-	.mute_stream	= hdmi_codec_mute,
-};
-
 #define HDMI_RATES	(SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
 			 SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |\
 			 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |\
@@ -921,10 +903,31 @@ static int hdmi_dai_spdif_probe(struct snd_soc_dai *dai)
 	return 0;
 }
 
+static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
+	.probe				= hdmi_dai_probe,
+	.startup			= hdmi_codec_startup,
+	.shutdown			= hdmi_codec_shutdown,
+	.hw_params			= hdmi_codec_hw_params,
+	.prepare			= hdmi_codec_prepare,
+	.set_fmt			= hdmi_codec_i2s_set_fmt,
+	.mute_stream			= hdmi_codec_mute,
+	.pcm_new			= hdmi_codec_pcm_new,
+	.auto_selectable_formats	= &hdmi_codec_formats,
+	.num_auto_selectable_formats	= 1,
+};
+
+static const struct snd_soc_dai_ops hdmi_codec_spdif_dai_ops = {
+	.probe		= hdmi_dai_spdif_probe,
+	.startup	= hdmi_codec_startup,
+	.shutdown	= hdmi_codec_shutdown,
+	.hw_params	= hdmi_codec_hw_params,
+	.mute_stream	= hdmi_codec_mute,
+	.pcm_new	= hdmi_codec_pcm_new,
+};
+
 static const struct snd_soc_dai_driver hdmi_i2s_dai = {
 	.name = "i2s-hifi",
 	.id = DAI_ID_I2S,
-	.probe = hdmi_dai_probe,
 	.playback = {
 		.stream_name = "I2S Playback",
 		.channels_min = 2,
@@ -942,13 +945,11 @@ static const struct snd_soc_dai_driver hdmi_i2s_dai = {
 		.sig_bits = 24,
 	},
 	.ops = &hdmi_codec_i2s_dai_ops,
-	.pcm_new = hdmi_codec_pcm_new,
 };
 
 static const struct snd_soc_dai_driver hdmi_spdif_dai = {
 	.name = "spdif-hifi",
 	.id = DAI_ID_SPDIF,
-	.probe = hdmi_dai_spdif_probe,
 	.playback = {
 		.stream_name = "SPDIF Playback",
 		.channels_min = 2,
@@ -964,7 +965,6 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = {
 		.formats = SPDIF_FORMATS,
 	},
 	.ops = &hdmi_codec_spdif_dai_ops,
-	.pcm_new = hdmi_codec_pcm_new,
 };
 
 static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
-- 
2.25.1


  parent reply	other threads:[~2023-08-08 23:06 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08 22:54 [PATCH v2 00/39] ASoC: merge DAI call back functions into ops Kuninori Morimoto
2023-08-08 22:54 ` [PATCH v2 01/39] ASoC: soc-dai.h: " Kuninori Morimoto
2023-08-14 22:05   ` Mark Brown
2023-08-08 22:54 ` [PATCH v2 02/39] ASoC: ti: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 03/39] ASoC: adi: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 04/39] " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 05/39] ASoC: amd: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 06/39] ASoC: dwc: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 07/39] ASoC: pxa: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 08/39] ASoC: bcm: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 09/39] ASoC: fsl: " Kuninori Morimoto
2023-08-08 22:55 ` [PATCH v2 10/39] ASoC: img: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 11/39] ASoC: sof: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 12/39] ASoC: sti: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 13/39] ASoC: stm: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 14/39] ASoC: pxa: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 15/39] ASoC: rsnd: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 16/39] ASoC: qcom: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 17/39] ASoC: au1x: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 18/39] ASoC: ux500: " Kuninori Morimoto
2023-08-09  8:05   ` Linus Walleij
2023-08-08 22:56 ` [PATCH v2 19/39] ASoC: sunxi: " Kuninori Morimoto
2023-08-08 22:56 ` [PATCH v2 20/39] ASoC: tegra: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 21/39] ASoC: atmel: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 22/39] ASoC: intel: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 23/39] ASoC: meson: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 24/39] ASoC: jz4740: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 25/39] ASoC: cirrus: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 26/39] ASoC: drm/vc4: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 27/39] ASoC: samsung: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 28/39] ASoC: mediatek: " Kuninori Morimoto
2023-08-08 22:57 ` [PATCH v2 29/39] ASoC: rockchip: " Kuninori Morimoto
2023-08-09 13:20   ` Heiko Stuebner
2023-08-08 22:58 ` [PATCH v2 30/39] ASoC: uniphier: " Kuninori Morimoto
2023-08-08 22:58 ` [PATCH v2 31/39] ASoC: loongson: " Kuninori Morimoto
2023-08-08 22:58 ` [PATCH v2 32/39] ASoC: starfive: " Kuninori Morimoto
2023-08-08 22:58 ` [PATCH v2 33/39] ASoC: hisilicon: " Kuninori Morimoto
2023-08-08 22:58 ` [PATCH v2 34/39] ASoC: codecs/wm*: " Kuninori Morimoto
2023-08-08 22:58 ` [PATCH v2 35/39] ASoC: soc-topology: " Kuninori Morimoto
2023-08-08 22:58 ` [PATCH v2 36/39] ASoC: codecs/cs47lxx: " Kuninori Morimoto
2023-08-09  9:33   ` Charles Keepax
2023-08-08 22:58 ` [PATCH v2 37/39] ASoC: codecs/cx2072x: " Kuninori Morimoto
2023-08-08 22:58 ` Kuninori Morimoto [this message]
2023-08-08 22:59 ` [PATCH v2 39/39] ASoC: soc-dai.h: remove unused call back functions Kuninori Morimoto
2023-08-14 22:06 ` [PATCH v2 00/39] ASoC: merge DAI call back functions into ops 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=87edkd9m4t.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).