Commit 53c577ba authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: stm: 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/87edkdb0tq.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9f625f5e
...@@ -953,6 +953,7 @@ static const struct regmap_config stm32_h7_i2s_regmap_conf = { ...@@ -953,6 +953,7 @@ static const struct regmap_config stm32_h7_i2s_regmap_conf = {
}; };
static const struct snd_soc_dai_ops stm32_i2s_pcm_dai_ops = { static const struct snd_soc_dai_ops stm32_i2s_pcm_dai_ops = {
.probe = stm32_i2s_dai_probe,
.set_sysclk = stm32_i2s_set_sysclk, .set_sysclk = stm32_i2s_set_sysclk,
.set_fmt = stm32_i2s_set_dai_fmt, .set_fmt = stm32_i2s_set_dai_fmt,
.startup = stm32_i2s_startup, .startup = stm32_i2s_startup,
...@@ -1002,7 +1003,6 @@ static int stm32_i2s_dais_init(struct platform_device *pdev, ...@@ -1002,7 +1003,6 @@ static int stm32_i2s_dais_init(struct platform_device *pdev,
if (!dai_ptr) if (!dai_ptr)
return -ENOMEM; return -ENOMEM;
dai_ptr->probe = stm32_i2s_dai_probe;
dai_ptr->ops = &stm32_i2s_pcm_dai_ops; dai_ptr->ops = &stm32_i2s_pcm_dai_ops;
dai_ptr->id = 1; dai_ptr->id = 1;
stm32_i2s_dai_init(&dai_ptr->playback, "playback"); stm32_i2s_dai_init(&dai_ptr->playback, "playback");
......
...@@ -1222,6 +1222,19 @@ static int stm32_sai_dai_probe(struct snd_soc_dai *cpu_dai) ...@@ -1222,6 +1222,19 @@ static int stm32_sai_dai_probe(struct snd_soc_dai *cpu_dai)
} }
static const struct snd_soc_dai_ops stm32_sai_pcm_dai_ops = { static const struct snd_soc_dai_ops stm32_sai_pcm_dai_ops = {
.probe = stm32_sai_dai_probe,
.set_sysclk = stm32_sai_set_sysclk,
.set_fmt = stm32_sai_set_dai_fmt,
.set_tdm_slot = stm32_sai_set_dai_tdm_slot,
.startup = stm32_sai_startup,
.hw_params = stm32_sai_hw_params,
.trigger = stm32_sai_trigger,
.shutdown = stm32_sai_shutdown,
.pcm_new = stm32_sai_pcm_new,
};
static const struct snd_soc_dai_ops stm32_sai_pcm_dai_ops2 = {
.probe = stm32_sai_dai_probe,
.set_sysclk = stm32_sai_set_sysclk, .set_sysclk = stm32_sai_set_sysclk,
.set_fmt = stm32_sai_set_dai_fmt, .set_fmt = stm32_sai_set_dai_fmt,
.set_tdm_slot = stm32_sai_set_dai_tdm_slot, .set_tdm_slot = stm32_sai_set_dai_tdm_slot,
...@@ -1287,8 +1300,6 @@ static const struct snd_pcm_hardware stm32_sai_pcm_hw = { ...@@ -1287,8 +1300,6 @@ static const struct snd_pcm_hardware stm32_sai_pcm_hw = {
}; };
static struct snd_soc_dai_driver stm32_sai_playback_dai = { static struct snd_soc_dai_driver stm32_sai_playback_dai = {
.probe = stm32_sai_dai_probe,
.pcm_new = stm32_sai_pcm_new,
.id = 1, /* avoid call to fmt_single_name() */ .id = 1, /* avoid call to fmt_single_name() */
.playback = { .playback = {
.channels_min = 1, .channels_min = 1,
...@@ -1306,7 +1317,6 @@ static struct snd_soc_dai_driver stm32_sai_playback_dai = { ...@@ -1306,7 +1317,6 @@ static struct snd_soc_dai_driver stm32_sai_playback_dai = {
}; };
static struct snd_soc_dai_driver stm32_sai_capture_dai = { static struct snd_soc_dai_driver stm32_sai_capture_dai = {
.probe = stm32_sai_dai_probe,
.id = 1, /* avoid call to fmt_single_name() */ .id = 1, /* avoid call to fmt_single_name() */
.capture = { .capture = {
.channels_min = 1, .channels_min = 1,
...@@ -1320,7 +1330,7 @@ static struct snd_soc_dai_driver stm32_sai_capture_dai = { ...@@ -1320,7 +1330,7 @@ static struct snd_soc_dai_driver stm32_sai_capture_dai = {
SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_S32_LE, SNDRV_PCM_FMTBIT_S32_LE,
}, },
.ops = &stm32_sai_pcm_dai_ops, .ops = &stm32_sai_pcm_dai_ops2,
}; };
static const struct snd_dmaengine_pcm_config stm32_sai_pcm_config = { static const struct snd_dmaengine_pcm_config stm32_sai_pcm_config = {
......
...@@ -856,6 +856,7 @@ static void stm32_spdifrx_shutdown(struct snd_pcm_substream *substream, ...@@ -856,6 +856,7 @@ static void stm32_spdifrx_shutdown(struct snd_pcm_substream *substream,
} }
static const struct snd_soc_dai_ops stm32_spdifrx_pcm_dai_ops = { static const struct snd_soc_dai_ops stm32_spdifrx_pcm_dai_ops = {
.probe = stm32_spdifrx_dai_probe,
.startup = stm32_spdifrx_startup, .startup = stm32_spdifrx_startup,
.hw_params = stm32_spdifrx_hw_params, .hw_params = stm32_spdifrx_hw_params,
.trigger = stm32_spdifrx_trigger, .trigger = stm32_spdifrx_trigger,
...@@ -864,7 +865,6 @@ static const struct snd_soc_dai_ops stm32_spdifrx_pcm_dai_ops = { ...@@ -864,7 +865,6 @@ static const struct snd_soc_dai_ops stm32_spdifrx_pcm_dai_ops = {
static struct snd_soc_dai_driver stm32_spdifrx_dai[] = { static struct snd_soc_dai_driver stm32_spdifrx_dai[] = {
{ {
.probe = stm32_spdifrx_dai_probe,
.capture = { .capture = {
.stream_name = "CPU-Capture", .stream_name = "CPU-Capture",
.channels_min = 1, .channels_min = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment