mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00:00
ASoC: sunxi: merge DAI call back functions into ops
ALSA SoC merges DAI call backs into .ops. This patch merge these into one. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/875y5pb0sr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ce11656ccd
commit
fc95a8a3ea
@ -1252,9 +1252,12 @@ static int sun4i_codec_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops dummy_dai_ops = {
|
||||
.probe = sun4i_codec_dai_probe,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver dummy_cpu_dai = {
|
||||
.name = "sun4i-codec-cpu-dai",
|
||||
.probe = sun4i_codec_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "Playback",
|
||||
.channels_min = 1,
|
||||
@ -1271,6 +1274,7 @@ static struct snd_soc_dai_driver dummy_cpu_dai = {
|
||||
.formats = SUN4I_CODEC_FORMATS,
|
||||
.sig_bits = 24,
|
||||
},
|
||||
.ops = &dummy_dai_ops,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev,
|
||||
|
@ -1081,14 +1081,6 @@ static int sun4i_i2s_set_tdm_slot(struct snd_soc_dai *dai,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops sun4i_i2s_dai_ops = {
|
||||
.hw_params = sun4i_i2s_hw_params,
|
||||
.set_fmt = sun4i_i2s_set_fmt,
|
||||
.set_sysclk = sun4i_i2s_set_sysclk,
|
||||
.set_tdm_slot = sun4i_i2s_set_tdm_slot,
|
||||
.trigger = sun4i_i2s_trigger,
|
||||
};
|
||||
|
||||
static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(dai);
|
||||
@ -1100,12 +1092,20 @@ static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops sun4i_i2s_dai_ops = {
|
||||
.probe = sun4i_i2s_dai_probe,
|
||||
.hw_params = sun4i_i2s_hw_params,
|
||||
.set_fmt = sun4i_i2s_set_fmt,
|
||||
.set_sysclk = sun4i_i2s_set_sysclk,
|
||||
.set_tdm_slot = sun4i_i2s_set_tdm_slot,
|
||||
.trigger = sun4i_i2s_trigger,
|
||||
};
|
||||
|
||||
#define SUN4I_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S20_LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_LE)
|
||||
|
||||
static struct snd_soc_dai_driver sun4i_i2s_dai = {
|
||||
.probe = sun4i_i2s_dai_probe,
|
||||
.capture = {
|
||||
.stream_name = "Capture",
|
||||
.channels_min = 1,
|
||||
|
@ -508,6 +508,7 @@ static int sun4i_spdif_soc_dai_probe(struct snd_soc_dai *dai)
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops sun4i_spdif_dai_ops = {
|
||||
.probe = sun4i_spdif_soc_dai_probe,
|
||||
.startup = sun4i_spdif_startup,
|
||||
.trigger = sun4i_spdif_trigger,
|
||||
.hw_params = sun4i_spdif_hw_params,
|
||||
@ -533,7 +534,6 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = {
|
||||
.rates = SUN4I_RATES,
|
||||
.formats = SUN4I_FORMATS,
|
||||
},
|
||||
.probe = sun4i_spdif_soc_dai_probe,
|
||||
.ops = &sun4i_spdif_dai_ops,
|
||||
.name = "spdif",
|
||||
};
|
||||
|
@ -236,6 +236,7 @@ static int sun50i_dmic_soc_dai_probe(struct snd_soc_dai *dai)
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops sun50i_dmic_dai_ops = {
|
||||
.probe = sun50i_dmic_soc_dai_probe,
|
||||
.startup = sun50i_dmic_startup,
|
||||
.trigger = sun50i_dmic_trigger,
|
||||
.hw_params = sun50i_dmic_hw_params,
|
||||
@ -260,7 +261,6 @@ static struct snd_soc_dai_driver sun50i_dmic_dai = {
|
||||
.formats = SUN50I_DMIC_FORMATS,
|
||||
.sig_bits = 21,
|
||||
},
|
||||
.probe = sun50i_dmic_soc_dai_probe,
|
||||
.ops = &sun50i_dmic_dai_ops,
|
||||
.name = "dmic",
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user