mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 00:47:56 -04:00
ASoC: fsl: 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> Link: https://lore.kernel.org/r/87jzu5b0ue.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
59cd0ba842
commit
5e5f68ca83
@@ -780,13 +780,6 @@ static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_asrc_dai_ops = {
|
||||
.startup = fsl_asrc_dai_startup,
|
||||
.hw_params = fsl_asrc_dai_hw_params,
|
||||
.hw_free = fsl_asrc_dai_hw_free,
|
||||
.trigger = fsl_asrc_dai_trigger,
|
||||
};
|
||||
|
||||
static int fsl_asrc_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct fsl_asrc *asrc = snd_soc_dai_get_drvdata(dai);
|
||||
@@ -797,12 +790,19 @@ static int fsl_asrc_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_asrc_dai_ops = {
|
||||
.probe = fsl_asrc_dai_probe,
|
||||
.startup = fsl_asrc_dai_startup,
|
||||
.hw_params = fsl_asrc_dai_hw_params,
|
||||
.hw_free = fsl_asrc_dai_hw_free,
|
||||
.trigger = fsl_asrc_dai_trigger,
|
||||
};
|
||||
|
||||
#define FSL_ASRC_FORMATS (SNDRV_PCM_FMTBIT_S24_LE | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_3LE)
|
||||
|
||||
static struct snd_soc_dai_driver fsl_asrc_dai = {
|
||||
.probe = fsl_asrc_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "ASRC-Playback",
|
||||
.channels_min = 1,
|
||||
|
||||
@@ -49,10 +49,6 @@ static int fsl_aud2htx_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_aud2htx_dai_ops = {
|
||||
.trigger = fsl_aud2htx_trigger,
|
||||
};
|
||||
|
||||
static int fsl_aud2htx_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct fsl_aud2htx *aud2htx = dev_get_drvdata(cpu_dai->dev);
|
||||
@@ -84,8 +80,12 @@ static int fsl_aud2htx_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_aud2htx_dai_ops = {
|
||||
.probe = fsl_aud2htx_dai_probe,
|
||||
.trigger = fsl_aud2htx_trigger,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_aud2htx_dai = {
|
||||
.probe = fsl_aud2htx_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "CPU-Playback",
|
||||
.channels_min = 1,
|
||||
|
||||
@@ -1531,13 +1531,6 @@ static int fsl_easrc_hw_free(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_easrc_dai_ops = {
|
||||
.startup = fsl_easrc_startup,
|
||||
.trigger = fsl_easrc_trigger,
|
||||
.hw_params = fsl_easrc_hw_params,
|
||||
.hw_free = fsl_easrc_hw_free,
|
||||
};
|
||||
|
||||
static int fsl_easrc_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct fsl_asrc *easrc = dev_get_drvdata(cpu_dai->dev);
|
||||
@@ -1548,8 +1541,15 @@ static int fsl_easrc_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_easrc_dai_ops = {
|
||||
.probe = fsl_easrc_dai_probe,
|
||||
.startup = fsl_easrc_startup,
|
||||
.trigger = fsl_easrc_trigger,
|
||||
.hw_params = fsl_easrc_hw_params,
|
||||
.hw_free = fsl_easrc_hw_free,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_easrc_dai = {
|
||||
.probe = fsl_easrc_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "ASRC-Playback",
|
||||
.channels_min = 1,
|
||||
|
||||
@@ -785,15 +785,6 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_esai_dai_ops = {
|
||||
.startup = fsl_esai_startup,
|
||||
.trigger = fsl_esai_trigger,
|
||||
.hw_params = fsl_esai_hw_params,
|
||||
.set_sysclk = fsl_esai_set_dai_sysclk,
|
||||
.set_fmt = fsl_esai_set_dai_fmt,
|
||||
.set_tdm_slot = fsl_esai_set_dai_tdm_slot,
|
||||
};
|
||||
|
||||
static int fsl_esai_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct fsl_esai *esai_priv = snd_soc_dai_get_drvdata(dai);
|
||||
@@ -804,8 +795,17 @@ static int fsl_esai_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_esai_dai_ops = {
|
||||
.probe = fsl_esai_dai_probe,
|
||||
.startup = fsl_esai_startup,
|
||||
.trigger = fsl_esai_trigger,
|
||||
.hw_params = fsl_esai_hw_params,
|
||||
.set_sysclk = fsl_esai_set_dai_sysclk,
|
||||
.set_fmt = fsl_esai_set_dai_fmt,
|
||||
.set_tdm_slot = fsl_esai_set_dai_tdm_slot,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_esai_dai = {
|
||||
.probe = fsl_esai_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "CPU-Playback",
|
||||
.channels_min = 1,
|
||||
|
||||
@@ -764,12 +764,6 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_micfil_dai_ops = {
|
||||
.startup = fsl_micfil_startup,
|
||||
.trigger = fsl_micfil_trigger,
|
||||
.hw_params = fsl_micfil_hw_params,
|
||||
};
|
||||
|
||||
static int fsl_micfil_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct fsl_micfil *micfil = dev_get_drvdata(cpu_dai->dev);
|
||||
@@ -807,8 +801,14 @@ static int fsl_micfil_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_micfil_dai_ops = {
|
||||
.probe = fsl_micfil_dai_probe,
|
||||
.startup = fsl_micfil_startup,
|
||||
.trigger = fsl_micfil_trigger,
|
||||
.hw_params = fsl_micfil_hw_params,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_micfil_dai = {
|
||||
.probe = fsl_micfil_dai_probe,
|
||||
.capture = {
|
||||
.stream_name = "CPU-Capture",
|
||||
.channels_min = 1,
|
||||
|
||||
@@ -849,17 +849,6 @@ static int fsl_sai_startup(struct snd_pcm_substream *substream,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = {
|
||||
.set_bclk_ratio = fsl_sai_set_dai_bclk_ratio,
|
||||
.set_sysclk = fsl_sai_set_dai_sysclk,
|
||||
.set_fmt = fsl_sai_set_dai_fmt,
|
||||
.set_tdm_slot = fsl_sai_set_dai_tdm_slot,
|
||||
.hw_params = fsl_sai_hw_params,
|
||||
.hw_free = fsl_sai_hw_free,
|
||||
.trigger = fsl_sai_trigger,
|
||||
.startup = fsl_sai_startup,
|
||||
};
|
||||
|
||||
static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
{
|
||||
struct fsl_sai *sai = dev_get_drvdata(cpu_dai->dev);
|
||||
@@ -885,6 +874,18 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_sai_pcm_dai_ops = {
|
||||
.probe = fsl_sai_dai_probe,
|
||||
.set_bclk_ratio = fsl_sai_set_dai_bclk_ratio,
|
||||
.set_sysclk = fsl_sai_set_dai_sysclk,
|
||||
.set_fmt = fsl_sai_set_dai_fmt,
|
||||
.set_tdm_slot = fsl_sai_set_dai_tdm_slot,
|
||||
.hw_params = fsl_sai_hw_params,
|
||||
.hw_free = fsl_sai_hw_free,
|
||||
.trigger = fsl_sai_trigger,
|
||||
.startup = fsl_sai_startup,
|
||||
};
|
||||
|
||||
static int fsl_sai_dai_resume(struct snd_soc_component *component)
|
||||
{
|
||||
struct fsl_sai *sai = snd_soc_component_get_drvdata(component);
|
||||
@@ -903,7 +904,6 @@ static int fsl_sai_dai_resume(struct snd_soc_component *component)
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_driver fsl_sai_dai_template = {
|
||||
.probe = fsl_sai_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "CPU-Playback",
|
||||
.channels_min = 1,
|
||||
|
||||
@@ -765,14 +765,6 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_spdif_dai_ops = {
|
||||
.startup = fsl_spdif_startup,
|
||||
.hw_params = fsl_spdif_hw_params,
|
||||
.trigger = fsl_spdif_trigger,
|
||||
.shutdown = fsl_spdif_shutdown,
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* FSL SPDIF IEC958 controller(mixer) functions
|
||||
*
|
||||
@@ -1283,8 +1275,15 @@ static int fsl_spdif_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_spdif_dai_ops = {
|
||||
.probe = fsl_spdif_dai_probe,
|
||||
.startup = fsl_spdif_startup,
|
||||
.hw_params = fsl_spdif_hw_params,
|
||||
.trigger = fsl_spdif_trigger,
|
||||
.shutdown = fsl_spdif_shutdown,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_spdif_dai = {
|
||||
.probe = &fsl_spdif_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "CPU-Playback",
|
||||
.channels_min = 2,
|
||||
|
||||
@@ -1152,6 +1152,7 @@ static int fsl_ssi_dai_probe(struct snd_soc_dai *dai)
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_ssi_dai_ops = {
|
||||
.probe = fsl_ssi_dai_probe,
|
||||
.startup = fsl_ssi_startup,
|
||||
.shutdown = fsl_ssi_shutdown,
|
||||
.hw_params = fsl_ssi_hw_params,
|
||||
@@ -1162,7 +1163,6 @@ static const struct snd_soc_dai_ops fsl_ssi_dai_ops = {
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_ssi_dai_template = {
|
||||
.probe = fsl_ssi_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "CPU-Playback",
|
||||
.channels_min = 1,
|
||||
@@ -1187,7 +1187,6 @@ static const struct snd_soc_component_driver fsl_ssi_component = {
|
||||
|
||||
static struct snd_soc_dai_driver fsl_ssi_ac97_dai = {
|
||||
.symmetric_channels = 1,
|
||||
.probe = fsl_ssi_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "CPU AC97 Playback",
|
||||
.channels_min = 2,
|
||||
|
||||
@@ -888,13 +888,6 @@ static struct snd_kcontrol_new fsl_xcvr_tx_ctls[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_xcvr_dai_ops = {
|
||||
.prepare = fsl_xcvr_prepare,
|
||||
.startup = fsl_xcvr_startup,
|
||||
.shutdown = fsl_xcvr_shutdown,
|
||||
.trigger = fsl_xcvr_trigger,
|
||||
};
|
||||
|
||||
static int fsl_xcvr_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct fsl_xcvr *xcvr = snd_soc_dai_get_drvdata(dai);
|
||||
@@ -915,8 +908,15 @@ static int fsl_xcvr_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops fsl_xcvr_dai_ops = {
|
||||
.probe = fsl_xcvr_dai_probe,
|
||||
.prepare = fsl_xcvr_prepare,
|
||||
.startup = fsl_xcvr_startup,
|
||||
.shutdown = fsl_xcvr_shutdown,
|
||||
.trigger = fsl_xcvr_trigger,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver fsl_xcvr_dai = {
|
||||
.probe = fsl_xcvr_dai_probe,
|
||||
.ops = &fsl_xcvr_dai_ops,
|
||||
.playback = {
|
||||
.stream_name = "CPU-Playback",
|
||||
|
||||
Reference in New Issue
Block a user