ASoC: codecs/wm*: merge DAI call back functions into ops
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 8 Aug 2023 22:58:36 +0000 (22:58 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 14 Aug 2023 12:10:31 +0000 (13:10 +0100)
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jzu59m5f.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm2200.c
sound/soc/codecs/wm5102.c
sound/soc/codecs/wm5110.c
sound/soc/codecs/wm8994.c

index 36cdf97..9679906 100644 (file)
@@ -1770,11 +1770,6 @@ static int wm2200_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
-static const struct snd_soc_dai_ops wm2200_dai_ops = {
-       .set_fmt = wm2200_set_fmt,
-       .hw_params = wm2200_hw_params,
-};
-
 static int wm2200_set_sysclk(struct snd_soc_component *component, int clk_id,
                             int source, unsigned int freq, int dir)
 {
@@ -2068,6 +2063,12 @@ static int wm2200_dai_probe(struct snd_soc_dai *dai)
        return 0;
 }
 
+static const struct snd_soc_dai_ops wm2200_dai_ops = {
+       .probe = wm2200_dai_probe,
+       .set_fmt = wm2200_set_fmt,
+       .hw_params = wm2200_hw_params,
+};
+
 #define WM2200_RATES SNDRV_PCM_RATE_8000_48000
 
 #define WM2200_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
@@ -2075,7 +2076,6 @@ static int wm2200_dai_probe(struct snd_soc_dai *dai)
 
 static struct snd_soc_dai_driver wm2200_dai = {
        .name = "wm2200",
-       .probe = wm2200_dai_probe,
        .playback = {
                .stream_name = "Playback",
                .channels_min = 2,
index 3bdbdf3..4ecf07c 100644 (file)
@@ -1773,6 +1773,10 @@ static int wm5102_set_fll(struct snd_soc_component *component, int fll_id,
 #define WM5102_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
                        SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
+static const struct snd_soc_dai_ops wm5102_dai_ops = {
+       .compress_new = snd_soc_new_compress,
+};
+
 static struct snd_soc_dai_driver wm5102_dai[] = {
        {
                .name = "wm5102-aif1",
@@ -1906,7 +1910,7 @@ static struct snd_soc_dai_driver wm5102_dai[] = {
                        .rates = WM5102_RATES,
                        .formats = WM5102_FORMATS,
                },
-               .compress_new = snd_soc_new_compress,
+               .ops = &wm5102_dai_ops,
        },
        {
                .name = "wm5102-dsp-trace",
index ad67030..ac1f2c8 100644 (file)
@@ -2073,6 +2073,10 @@ static int wm5110_set_fll(struct snd_soc_component *component, int fll_id,
 #define WM5110_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
                        SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
+static const struct snd_soc_dai_ops wm5110_dai_ops = {
+       .compress_new = snd_soc_new_compress,
+};
+
 static struct snd_soc_dai_driver wm5110_dai[] = {
        {
                .name = "wm5110-aif1",
@@ -2206,7 +2210,7 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
                        .rates = WM5110_RATES,
                        .formats = WM5110_FORMATS,
                },
-               .compress_new = snd_soc_new_compress,
+               .ops = &wm5110_dai_ops,
        },
        {
                .name = "wm5110-dsp-voicectrl",
@@ -2227,7 +2231,7 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
                        .rates = WM5110_RATES,
                        .formats = WM5110_FORMATS,
                },
-               .compress_new = snd_soc_new_compress,
+               .ops = &wm5110_dai_ops,
        },
        {
                .name = "wm5110-dsp-trace",
index bca3ebe..a48e904 100644 (file)
@@ -3215,6 +3215,7 @@ static const struct snd_soc_dai_ops wm8994_aif1_dai_ops = {
 };
 
 static const struct snd_soc_dai_ops wm8994_aif2_dai_ops = {
+       .probe          = wm8994_aif2_probe,
        .set_sysclk     = wm8994_set_dai_sysclk,
        .set_fmt        = wm8994_set_dai_fmt,
        .hw_params      = wm8994_hw_params,
@@ -3269,7 +3270,6 @@ static struct snd_soc_dai_driver wm8994_dai[] = {
                        .formats = WM8994_FORMATS,
                        .sig_bits = 24,
                },
-               .probe = wm8994_aif2_probe,
                .ops = &wm8994_aif2_dai_ops,
        },
        {