Commit e9f51212 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: intel: 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/871qgdb0sa.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ff8a43d
...@@ -467,6 +467,7 @@ static const struct snd_soc_dai_ops sst_media_dai_ops = { ...@@ -467,6 +467,7 @@ static const struct snd_soc_dai_ops sst_media_dai_ops = {
}; };
static const struct snd_soc_dai_ops sst_compr_dai_ops = { static const struct snd_soc_dai_ops sst_compr_dai_ops = {
.compress_new = snd_soc_new_compress,
.mute_stream = sst_media_digital_mute, .mute_stream = sst_media_digital_mute,
}; };
...@@ -510,7 +511,6 @@ static struct snd_soc_dai_driver sst_platform_dai[] = { ...@@ -510,7 +511,6 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
}, },
{ {
.name = "compress-cpu-dai", .name = "compress-cpu-dai",
.compress_new = snd_soc_new_compress,
.ops = &sst_compr_dai_ops, .ops = &sst_compr_dai_ops,
.playback = { .playback = {
.stream_name = "Compress Playback", .stream_name = "Compress Playback",
......
...@@ -249,7 +249,7 @@ static int avs_probe_compr_copy(struct snd_soc_component *comp, struct snd_compr ...@@ -249,7 +249,7 @@ static int avs_probe_compr_copy(struct snd_soc_component *comp, struct snd_compr
return count; return count;
} }
static const struct snd_soc_cdai_ops avs_probe_dai_ops = { static const struct snd_soc_cdai_ops avs_probe_cdai_ops = {
.startup = avs_probe_compr_open, .startup = avs_probe_compr_open,
.shutdown = avs_probe_compr_free, .shutdown = avs_probe_compr_free,
.set_params = avs_probe_compr_set_params, .set_params = avs_probe_compr_set_params,
...@@ -257,6 +257,10 @@ static const struct snd_soc_cdai_ops avs_probe_dai_ops = { ...@@ -257,6 +257,10 @@ static const struct snd_soc_cdai_ops avs_probe_dai_ops = {
.pointer = avs_probe_compr_pointer, .pointer = avs_probe_compr_pointer,
}; };
static const struct snd_soc_dai_ops avs_probe_dai_ops = {
.compress_new = snd_soc_new_compress,
};
static const struct snd_compress_ops avs_probe_compress_ops = { static const struct snd_compress_ops avs_probe_compress_ops = {
.copy = avs_probe_compr_copy, .copy = avs_probe_compr_copy,
}; };
...@@ -264,8 +268,8 @@ static const struct snd_compress_ops avs_probe_compress_ops = { ...@@ -264,8 +268,8 @@ static const struct snd_compress_ops avs_probe_compress_ops = {
static struct snd_soc_dai_driver probe_cpu_dais[] = { static struct snd_soc_dai_driver probe_cpu_dais[] = {
{ {
.name = "Probe Extraction CPU DAI", .name = "Probe Extraction CPU DAI",
.compress_new = snd_soc_new_compress, .cops = &avs_probe_cdai_ops,
.cops = &avs_probe_dai_ops, .ops = &avs_probe_dai_ops,
.capture = { .capture = {
.stream_name = "Probe Extraction", .stream_name = "Probe Extraction",
.channels_min = 1, .channels_min = 1,
......
...@@ -684,6 +684,10 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm, ...@@ -684,6 +684,10 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm,
return 0; return 0;
} }
static const struct snd_soc_dai_ops catpt_dai_ops = {
.pcm_new = catpt_dai_pcm_new,
};
static struct snd_soc_dai_driver dai_drivers[] = { static struct snd_soc_dai_driver dai_drivers[] = {
/* FE DAIs */ /* FE DAIs */
{ {
...@@ -764,7 +768,6 @@ static struct snd_soc_dai_driver dai_drivers[] = { ...@@ -764,7 +768,6 @@ static struct snd_soc_dai_driver dai_drivers[] = {
{ {
.name = "ssp0-port", .name = "ssp0-port",
.id = CATPT_SSP_IFACE_0, .id = CATPT_SSP_IFACE_0,
.pcm_new = catpt_dai_pcm_new,
.playback = { .playback = {
.channels_min = 1, .channels_min = 1,
.channels_max = 8, .channels_max = 8,
...@@ -773,11 +776,11 @@ static struct snd_soc_dai_driver dai_drivers[] = { ...@@ -773,11 +776,11 @@ static struct snd_soc_dai_driver dai_drivers[] = {
.channels_min = 1, .channels_min = 1,
.channels_max = 8, .channels_max = 8,
}, },
.ops = &catpt_dai_ops,
}, },
{ {
.name = "ssp1-port", .name = "ssp1-port",
.id = CATPT_SSP_IFACE_1, .id = CATPT_SSP_IFACE_1,
.pcm_new = catpt_dai_pcm_new,
.playback = { .playback = {
.channels_min = 1, .channels_min = 1,
.channels_max = 8, .channels_max = 8,
...@@ -786,6 +789,7 @@ static struct snd_soc_dai_driver dai_drivers[] = { ...@@ -786,6 +789,7 @@ static struct snd_soc_dai_driver dai_drivers[] = {
.channels_min = 1, .channels_min = 1,
.channels_max = 8, .channels_max = 8,
}, },
.ops = &catpt_dai_ops,
}, },
}; };
......
...@@ -733,6 +733,7 @@ static int kmb_dai_hw_free(struct snd_pcm_substream *substream, ...@@ -733,6 +733,7 @@ static int kmb_dai_hw_free(struct snd_pcm_substream *substream,
} }
static const struct snd_soc_dai_ops kmb_dai_ops = { static const struct snd_soc_dai_ops kmb_dai_ops = {
.probe = kmb_probe,
.startup = kmb_dai_startup, .startup = kmb_dai_startup,
.trigger = kmb_dai_trigger, .trigger = kmb_dai_trigger,
.hw_params = kmb_dai_hw_params, .hw_params = kmb_dai_hw_params,
...@@ -755,7 +756,6 @@ static struct snd_soc_dai_driver intel_kmb_hdmi_dai[] = { ...@@ -755,7 +756,6 @@ static struct snd_soc_dai_driver intel_kmb_hdmi_dai[] = {
SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE), SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE),
}, },
.ops = &kmb_dai_ops, .ops = &kmb_dai_ops,
.probe = kmb_probe,
}, },
}; };
...@@ -787,7 +787,6 @@ static struct snd_soc_dai_driver intel_kmb_i2s_dai[] = { ...@@ -787,7 +787,6 @@ static struct snd_soc_dai_driver intel_kmb_i2s_dai[] = {
SNDRV_PCM_FMTBIT_S16_LE), SNDRV_PCM_FMTBIT_S16_LE),
}, },
.ops = &kmb_dai_ops, .ops = &kmb_dai_ops,
.probe = kmb_probe,
}, },
}; };
...@@ -807,7 +806,6 @@ static struct snd_soc_dai_driver intel_kmb_tdm_dai[] = { ...@@ -807,7 +806,6 @@ static struct snd_soc_dai_driver intel_kmb_tdm_dai[] = {
SNDRV_PCM_FMTBIT_S16_LE), SNDRV_PCM_FMTBIT_S16_LE),
}, },
.ops = &kmb_dai_ops, .ops = &kmb_dai_ops,
.probe = kmb_probe,
}, },
}; };
......
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