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:
committed by
Mark Brown
parent
ce11656ccd
commit
fc95a8a3ea
@@ -1252,9 +1252,12 @@ static int sun4i_codec_dai_probe(struct snd_soc_dai *dai)
|
|||||||
return 0;
|
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 = {
|
static struct snd_soc_dai_driver dummy_cpu_dai = {
|
||||||
.name = "sun4i-codec-cpu-dai",
|
.name = "sun4i-codec-cpu-dai",
|
||||||
.probe = sun4i_codec_dai_probe,
|
|
||||||
.playback = {
|
.playback = {
|
||||||
.stream_name = "Playback",
|
.stream_name = "Playback",
|
||||||
.channels_min = 1,
|
.channels_min = 1,
|
||||||
@@ -1271,6 +1274,7 @@ static struct snd_soc_dai_driver dummy_cpu_dai = {
|
|||||||
.formats = SUN4I_CODEC_FORMATS,
|
.formats = SUN4I_CODEC_FORMATS,
|
||||||
.sig_bits = 24,
|
.sig_bits = 24,
|
||||||
},
|
},
|
||||||
|
.ops = &dummy_dai_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev,
|
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;
|
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)
|
static int sun4i_i2s_dai_probe(struct snd_soc_dai *dai)
|
||||||
{
|
{
|
||||||
struct sun4i_i2s *i2s = snd_soc_dai_get_drvdata(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;
|
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 | \
|
#define SUN4I_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
|
||||||
SNDRV_PCM_FMTBIT_S20_LE | \
|
SNDRV_PCM_FMTBIT_S20_LE | \
|
||||||
SNDRV_PCM_FMTBIT_S24_LE)
|
SNDRV_PCM_FMTBIT_S24_LE)
|
||||||
|
|
||||||
static struct snd_soc_dai_driver sun4i_i2s_dai = {
|
static struct snd_soc_dai_driver sun4i_i2s_dai = {
|
||||||
.probe = sun4i_i2s_dai_probe,
|
|
||||||
.capture = {
|
.capture = {
|
||||||
.stream_name = "Capture",
|
.stream_name = "Capture",
|
||||||
.channels_min = 1,
|
.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 = {
|
static const struct snd_soc_dai_ops sun4i_spdif_dai_ops = {
|
||||||
|
.probe = sun4i_spdif_soc_dai_probe,
|
||||||
.startup = sun4i_spdif_startup,
|
.startup = sun4i_spdif_startup,
|
||||||
.trigger = sun4i_spdif_trigger,
|
.trigger = sun4i_spdif_trigger,
|
||||||
.hw_params = sun4i_spdif_hw_params,
|
.hw_params = sun4i_spdif_hw_params,
|
||||||
@@ -533,7 +534,6 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = {
|
|||||||
.rates = SUN4I_RATES,
|
.rates = SUN4I_RATES,
|
||||||
.formats = SUN4I_FORMATS,
|
.formats = SUN4I_FORMATS,
|
||||||
},
|
},
|
||||||
.probe = sun4i_spdif_soc_dai_probe,
|
|
||||||
.ops = &sun4i_spdif_dai_ops,
|
.ops = &sun4i_spdif_dai_ops,
|
||||||
.name = "spdif",
|
.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 = {
|
static const struct snd_soc_dai_ops sun50i_dmic_dai_ops = {
|
||||||
|
.probe = sun50i_dmic_soc_dai_probe,
|
||||||
.startup = sun50i_dmic_startup,
|
.startup = sun50i_dmic_startup,
|
||||||
.trigger = sun50i_dmic_trigger,
|
.trigger = sun50i_dmic_trigger,
|
||||||
.hw_params = sun50i_dmic_hw_params,
|
.hw_params = sun50i_dmic_hw_params,
|
||||||
@@ -260,7 +261,6 @@ static struct snd_soc_dai_driver sun50i_dmic_dai = {
|
|||||||
.formats = SUN50I_DMIC_FORMATS,
|
.formats = SUN50I_DMIC_FORMATS,
|
||||||
.sig_bits = 21,
|
.sig_bits = 21,
|
||||||
},
|
},
|
||||||
.probe = sun50i_dmic_soc_dai_probe,
|
|
||||||
.ops = &sun50i_dmic_dai_ops,
|
.ops = &sun50i_dmic_dai_ops,
|
||||||
.name = "dmic",
|
.name = "dmic",
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user