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

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.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 2ff8a43d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = {
	.compress_new = snd_soc_new_compress,
	.mute_stream = sst_media_digital_mute,
};

@@ -510,7 +511,6 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
},
{
	.name = "compress-cpu-dai",
	.compress_new = snd_soc_new_compress,
	.ops = &sst_compr_dai_ops,
	.playback = {
		.stream_name = "Compress Playback",
+7 −3
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static int avs_probe_compr_copy(struct snd_soc_component *comp, struct snd_compr
	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,
	.shutdown = avs_probe_compr_free,
	.set_params = avs_probe_compr_set_params,
@@ -257,6 +257,10 @@ static const struct snd_soc_cdai_ops avs_probe_dai_ops = {
	.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 = {
	.copy = avs_probe_compr_copy,
};
@@ -264,8 +268,8 @@ static const struct snd_compress_ops avs_probe_compress_ops = {
static struct snd_soc_dai_driver probe_cpu_dais[] = {
{
	.name = "Probe Extraction CPU DAI",
	.compress_new = snd_soc_new_compress,
	.cops = &avs_probe_dai_ops,
	.cops = &avs_probe_cdai_ops,
	.ops  = &avs_probe_dai_ops,
	.capture = {
		.stream_name = "Probe Extraction",
		.channels_min = 1,
+6 −2
Original line number Diff line number Diff line
@@ -684,6 +684,10 @@ static int catpt_dai_pcm_new(struct snd_soc_pcm_runtime *rtm,
	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[] = {
/* FE DAIs */
{
@@ -764,7 +768,6 @@ static struct snd_soc_dai_driver dai_drivers[] = {
{
	.name = "ssp0-port",
	.id = CATPT_SSP_IFACE_0,
	.pcm_new = catpt_dai_pcm_new,
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
@@ -773,11 +776,11 @@ static struct snd_soc_dai_driver dai_drivers[] = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.ops = &catpt_dai_ops,
},
{
	.name = "ssp1-port",
	.id = CATPT_SSP_IFACE_1,
	.pcm_new = catpt_dai_pcm_new,
	.playback = {
		.channels_min = 1,
		.channels_max = 8,
@@ -786,6 +789,7 @@ static struct snd_soc_dai_driver dai_drivers[] = {
		.channels_min = 1,
		.channels_max = 8,
	},
	.ops = &catpt_dai_ops,
},
};

+1 −3
Original line number Diff line number Diff line
@@ -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 = {
	.probe		= kmb_probe,
	.startup	= kmb_dai_startup,
	.trigger	= kmb_dai_trigger,
	.hw_params	= kmb_dai_hw_params,
@@ -755,7 +756,6 @@ static struct snd_soc_dai_driver intel_kmb_hdmi_dai[] = {
				    SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE),
		},
		.ops = &kmb_dai_ops,
		.probe = kmb_probe,
	},
};

@@ -787,7 +787,6 @@ static struct snd_soc_dai_driver intel_kmb_i2s_dai[] = {
				    SNDRV_PCM_FMTBIT_S16_LE),
		},
		.ops = &kmb_dai_ops,
		.probe = kmb_probe,
	},
};

@@ -807,7 +806,6 @@ static struct snd_soc_dai_driver intel_kmb_tdm_dai[] = {
				    SNDRV_PCM_FMTBIT_S16_LE),
		},
		.ops = &kmb_dai_ops,
		.probe = kmb_probe,
	},
};