Unverified Commit 586685f1 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: codecs/wm*: merge DAI call back functions into ops



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

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jzu59m5f.wl-kuninori.morimoto.gx@renesas.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4f1ec3da
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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,
+5 −1
Original line number Diff line number Diff line
@@ -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",
+6 −2
Original line number Diff line number Diff line
@@ -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",
+1 −1
Original line number Diff line number Diff line
@@ -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,
	},
	{