Commit 2d3155a9 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: meson: 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/87zg319m7m.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e9f51212
......@@ -103,6 +103,8 @@ static int aiu_acodec_ctrl_input_hw_params(struct snd_pcm_substream *substream,
}
static const struct snd_soc_dai_ops aiu_acodec_ctrl_input_ops = {
.probe = meson_codec_glue_input_dai_probe,
.remove = meson_codec_glue_input_dai_remove,
.hw_params = aiu_acodec_ctrl_input_hw_params,
.set_fmt = meson_codec_glue_input_set_fmt,
};
......@@ -130,8 +132,6 @@ static const struct snd_soc_dai_ops aiu_acodec_ctrl_output_ops = {
.name = "ACODEC CTRL " xname, \
.playback = AIU_ACODEC_STREAM(xname, "Playback", 8), \
.ops = &aiu_acodec_ctrl_input_ops, \
.probe = meson_codec_glue_input_dai_probe, \
.remove = meson_codec_glue_input_dai_remove, \
}
#define AIU_ACODEC_OUTPUT(xname) { \
......
......@@ -75,6 +75,8 @@ static const struct snd_soc_dapm_widget aiu_hdmi_ctrl_widgets[] = {
};
static const struct snd_soc_dai_ops aiu_codec_ctrl_input_ops = {
.probe = meson_codec_glue_input_dai_probe,
.remove = meson_codec_glue_input_dai_remove,
.hw_params = meson_codec_glue_input_hw_params,
.set_fmt = meson_codec_glue_input_set_fmt,
};
......@@ -102,8 +104,6 @@ static const struct snd_soc_dai_ops aiu_codec_ctrl_output_ops = {
.name = "CODEC CTRL " xname, \
.playback = AIU_CODEC_CTRL_STREAM(xname, "Playback"), \
.ops = &aiu_codec_ctrl_input_ops, \
.probe = meson_codec_glue_input_dai_probe, \
.remove = meson_codec_glue_input_dai_remove, \
}
#define AIU_CODEC_CTRL_OUTPUT(xname) { \
......
......@@ -140,6 +140,9 @@ static int aiu_fifo_i2s_hw_params(struct snd_pcm_substream *substream,
}
const struct snd_soc_dai_ops aiu_fifo_i2s_dai_ops = {
.pcm_new = aiu_fifo_pcm_new,
.probe = aiu_fifo_i2s_dai_probe,
.remove = aiu_fifo_dai_remove,
.trigger = aiu_fifo_i2s_trigger,
.prepare = aiu_fifo_i2s_prepare,
.hw_params = aiu_fifo_i2s_hw_params,
......
......@@ -155,6 +155,9 @@ static int fifo_spdif_hw_params(struct snd_pcm_substream *substream,
}
const struct snd_soc_dai_ops aiu_fifo_spdif_dai_ops = {
.pcm_new = aiu_fifo_pcm_new,
.probe = aiu_fifo_spdif_dai_probe,
.remove = aiu_fifo_dai_remove,
.trigger = fifo_spdif_trigger,
.prepare = fifo_spdif_prepare,
.hw_params = fifo_spdif_hw_params,
......
......@@ -121,9 +121,6 @@ static struct snd_soc_dai_driver aiu_cpu_dai_drv[] = {
.formats = AIU_FORMATS,
},
.ops = &aiu_fifo_i2s_dai_ops,
.pcm_new = aiu_fifo_pcm_new,
.probe = aiu_fifo_i2s_dai_probe,
.remove = aiu_fifo_dai_remove,
},
[CPU_SPDIF_FIFO] = {
.name = "SPDIF FIFO",
......@@ -137,9 +134,6 @@ static struct snd_soc_dai_driver aiu_cpu_dai_drv[] = {
.formats = AIU_FORMATS,
},
.ops = &aiu_fifo_spdif_dai_ops,
.pcm_new = aiu_fifo_pcm_new,
.probe = aiu_fifo_spdif_dai_probe,
.remove = aiu_fifo_dai_remove,
},
[CPU_I2S_ENCODER] = {
.name = "I2S Encoder",
......
......@@ -100,6 +100,7 @@ static const struct snd_soc_dai_ops axg_frddr_ops = {
.hw_params = axg_frddr_dai_hw_params,
.startup = axg_frddr_dai_startup,
.shutdown = axg_frddr_dai_shutdown,
.pcm_new = axg_frddr_pcm_new,
};
static struct snd_soc_dai_driver axg_frddr_dai_drv = {
......@@ -112,7 +113,6 @@ static struct snd_soc_dai_driver axg_frddr_dai_drv = {
.formats = AXG_FIFO_FORMATS,
},
.ops = &axg_frddr_ops,
.pcm_new = axg_frddr_pcm_new,
};
static const char * const axg_frddr_sel_texts[] = {
......@@ -175,6 +175,7 @@ static const struct snd_soc_dai_ops g12a_frddr_ops = {
.hw_params = axg_frddr_dai_hw_params,
.startup = axg_frddr_dai_startup,
.shutdown = axg_frddr_dai_shutdown,
.pcm_new = axg_frddr_pcm_new,
};
static struct snd_soc_dai_driver g12a_frddr_dai_drv = {
......@@ -187,7 +188,6 @@ static struct snd_soc_dai_driver g12a_frddr_dai_drv = {
.formats = AXG_FIFO_FORMATS,
},
.ops = &g12a_frddr_ops,
.pcm_new = axg_frddr_pcm_new,
};
static SOC_ENUM_SINGLE_DECL(g12a_frddr_sel1_enum, FIFO_CTRL0, CTRL0_SEL_SHIFT,
......
......@@ -294,13 +294,6 @@ static void axg_pdm_shutdown(struct snd_pcm_substream *substream,
clk_disable_unprepare(priv->dclk);
}
static const struct snd_soc_dai_ops axg_pdm_dai_ops = {
.trigger = axg_pdm_trigger,
.hw_params = axg_pdm_hw_params,
.startup = axg_pdm_startup,
.shutdown = axg_pdm_shutdown,
};
static void axg_pdm_set_hcic_ctrl(struct axg_pdm *priv)
{
const struct axg_pdm_hcic *hcic = &priv->cfg->filters->hcic;
......@@ -440,6 +433,15 @@ static int axg_pdm_dai_remove(struct snd_soc_dai *dai)
return 0;
}
static const struct snd_soc_dai_ops axg_pdm_dai_ops = {
.probe = axg_pdm_dai_probe,
.remove = axg_pdm_dai_remove,
.trigger = axg_pdm_trigger,
.hw_params = axg_pdm_hw_params,
.startup = axg_pdm_startup,
.shutdown = axg_pdm_shutdown,
};
static struct snd_soc_dai_driver axg_pdm_dai_drv = {
.name = "PDM",
.capture = {
......@@ -453,8 +455,6 @@ static struct snd_soc_dai_driver axg_pdm_dai_drv = {
SNDRV_PCM_FMTBIT_S32_LE),
},
.ops = &axg_pdm_dai_ops,
.probe = axg_pdm_dai_probe,
.remove = axg_pdm_dai_remove,
};
static const struct snd_soc_component_driver axg_pdm_component_drv = {
......
......@@ -267,6 +267,8 @@ static int axg_spdifin_dai_remove(struct snd_soc_dai *dai)
}
static const struct snd_soc_dai_ops axg_spdifin_ops = {
.probe = axg_spdifin_dai_probe,
.remove = axg_spdifin_dai_remove,
.prepare = axg_spdifin_prepare,
.startup = axg_spdifin_startup,
.shutdown = axg_spdifin_shutdown,
......@@ -429,8 +431,6 @@ axg_spdifin_get_dai_drv(struct device *dev, struct axg_spdifin *priv)
drv->name = "SPDIF Input";
drv->ops = &axg_spdifin_ops;
drv->probe = axg_spdifin_dai_probe;
drv->remove = axg_spdifin_dai_remove;
drv->capture.stream_name = "Capture";
drv->capture.channels_min = 1;
drv->capture.channels_max = 2;
......
......@@ -395,6 +395,8 @@ static int axg_tdm_iface_probe_dai(struct snd_soc_dai *dai)
}
static const struct snd_soc_dai_ops axg_tdm_iface_ops = {
.probe = axg_tdm_iface_probe_dai,
.remove = axg_tdm_iface_remove_dai,
.set_sysclk = axg_tdm_iface_set_sysclk,
.set_fmt = axg_tdm_iface_set_fmt,
.startup = axg_tdm_iface_startup,
......@@ -423,8 +425,6 @@ static const struct snd_soc_dai_driver axg_tdm_iface_dai_drv[] = {
},
.id = TDM_IFACE_PAD,
.ops = &axg_tdm_iface_ops,
.probe = axg_tdm_iface_probe_dai,
.remove = axg_tdm_iface_remove_dai,
},
[TDM_IFACE_LOOPBACK] = {
.name = "TDM Loopback",
......@@ -437,8 +437,6 @@ static const struct snd_soc_dai_driver axg_tdm_iface_dai_drv[] = {
},
.id = TDM_IFACE_LOOPBACK,
.ops = &axg_tdm_iface_ops,
.probe = axg_tdm_iface_probe_dai,
.remove = axg_tdm_iface_remove_dai,
},
};
......
......@@ -122,6 +122,7 @@ static const struct snd_soc_dai_ops axg_toddr_ops = {
.hw_params = axg_toddr_dai_hw_params,
.startup = axg_toddr_dai_startup,
.shutdown = axg_toddr_dai_shutdown,
.pcm_new = axg_toddr_pcm_new,
};
static struct snd_soc_dai_driver axg_toddr_dai_drv = {
......@@ -134,7 +135,6 @@ static struct snd_soc_dai_driver axg_toddr_dai_drv = {
.formats = AXG_FIFO_FORMATS,
},
.ops = &axg_toddr_ops,
.pcm_new = axg_toddr_pcm_new,
};
static const char * const axg_toddr_sel_texts[] = {
......@@ -217,6 +217,7 @@ static const struct snd_soc_dai_ops g12a_toddr_ops = {
.hw_params = axg_toddr_dai_hw_params,
.startup = g12a_toddr_dai_startup,
.shutdown = axg_toddr_dai_shutdown,
.pcm_new = axg_toddr_pcm_new,
};
static struct snd_soc_dai_driver g12a_toddr_dai_drv = {
......@@ -229,7 +230,6 @@ static struct snd_soc_dai_driver g12a_toddr_dai_drv = {
.formats = AXG_FIFO_FORMATS,
},
.ops = &g12a_toddr_ops,
.pcm_new = axg_toddr_pcm_new,
};
static const struct snd_soc_component_driver g12a_toddr_component_drv = {
......
......@@ -162,6 +162,8 @@ static int g12a_toacodec_input_hw_params(struct snd_pcm_substream *substream,
}
static const struct snd_soc_dai_ops g12a_toacodec_input_ops = {
.probe = meson_codec_glue_input_dai_probe,
.remove = meson_codec_glue_input_dai_remove,
.hw_params = g12a_toacodec_input_hw_params,
.set_fmt = meson_codec_glue_input_set_fmt,
};
......@@ -185,8 +187,6 @@ static const struct snd_soc_dai_ops g12a_toacodec_output_ops = {
.id = (xid), \
.playback = TOACODEC_STREAM(xname, "Playback", 8), \
.ops = &g12a_toacodec_input_ops, \
.probe = meson_codec_glue_input_dai_probe, \
.remove = meson_codec_glue_input_dai_remove, \
}
#define TOACODEC_OUTPUT(xname, xid) { \
......
......@@ -140,6 +140,8 @@ static const struct snd_soc_dapm_widget g12a_tohdmitx_widgets[] = {
};
static const struct snd_soc_dai_ops g12a_tohdmitx_input_ops = {
.probe = meson_codec_glue_input_dai_probe,
.remove = meson_codec_glue_input_dai_remove,
.hw_params = meson_codec_glue_input_hw_params,
.set_fmt = meson_codec_glue_input_set_fmt,
};
......@@ -172,8 +174,6 @@ static const struct snd_soc_dai_ops g12a_tohdmitx_output_ops = {
.id = (xid), \
.playback = TOHDMITX_STREAM(xname, "Playback", xfmt, xchmax), \
.ops = &g12a_tohdmitx_input_ops, \
.probe = meson_codec_glue_input_dai_probe, \
.remove = meson_codec_glue_input_dai_remove, \
}
#define TOHDMITX_OUT(xname, xid, xfmt, xchmax) { \
......
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