mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-19 11:43:40 +00:00
ASoC: ti: 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/87ttt9b0vw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
624fee4511
commit
dd9d64de8e
@ -601,16 +601,6 @@ static void davinci_i2s_shutdown(struct snd_pcm_substream *substream,
|
||||
#define DAVINCI_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S32_LE)
|
||||
|
||||
static const struct snd_soc_dai_ops davinci_i2s_dai_ops = {
|
||||
.shutdown = davinci_i2s_shutdown,
|
||||
.prepare = davinci_i2s_prepare,
|
||||
.trigger = davinci_i2s_trigger,
|
||||
.hw_params = davinci_i2s_hw_params,
|
||||
.set_fmt = davinci_i2s_set_dai_fmt,
|
||||
.set_clkdiv = davinci_i2s_dai_set_clkdiv,
|
||||
|
||||
};
|
||||
|
||||
static int davinci_i2s_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct davinci_mcbsp_dev *dev = snd_soc_dai_get_drvdata(dai);
|
||||
@ -622,8 +612,18 @@ static int davinci_i2s_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops davinci_i2s_dai_ops = {
|
||||
.probe = davinci_i2s_dai_probe,
|
||||
.shutdown = davinci_i2s_shutdown,
|
||||
.prepare = davinci_i2s_prepare,
|
||||
.trigger = davinci_i2s_trigger,
|
||||
.hw_params = davinci_i2s_hw_params,
|
||||
.set_fmt = davinci_i2s_set_dai_fmt,
|
||||
.set_clkdiv = davinci_i2s_dai_set_clkdiv,
|
||||
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver davinci_i2s_dai = {
|
||||
.probe = davinci_i2s_dai_probe,
|
||||
.playback = {
|
||||
.channels_min = 2,
|
||||
.channels_max = 2,
|
||||
|
@ -1616,18 +1616,6 @@ static void davinci_mcasp_shutdown(struct snd_pcm_substream *substream,
|
||||
}
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = {
|
||||
.startup = davinci_mcasp_startup,
|
||||
.shutdown = davinci_mcasp_shutdown,
|
||||
.trigger = davinci_mcasp_trigger,
|
||||
.delay = davinci_mcasp_delay,
|
||||
.hw_params = davinci_mcasp_hw_params,
|
||||
.set_fmt = davinci_mcasp_set_dai_fmt,
|
||||
.set_clkdiv = davinci_mcasp_set_clkdiv,
|
||||
.set_sysclk = davinci_mcasp_set_sysclk,
|
||||
.set_tdm_slot = davinci_mcasp_set_tdm_slot,
|
||||
};
|
||||
|
||||
static int davinci_mcasp_iec958_info(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_info *uinfo)
|
||||
{
|
||||
@ -1716,6 +1704,19 @@ static int davinci_mcasp_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops davinci_mcasp_dai_ops = {
|
||||
.probe = davinci_mcasp_dai_probe,
|
||||
.startup = davinci_mcasp_startup,
|
||||
.shutdown = davinci_mcasp_shutdown,
|
||||
.trigger = davinci_mcasp_trigger,
|
||||
.delay = davinci_mcasp_delay,
|
||||
.hw_params = davinci_mcasp_hw_params,
|
||||
.set_fmt = davinci_mcasp_set_dai_fmt,
|
||||
.set_clkdiv = davinci_mcasp_set_clkdiv,
|
||||
.set_sysclk = davinci_mcasp_set_sysclk,
|
||||
.set_tdm_slot = davinci_mcasp_set_tdm_slot,
|
||||
};
|
||||
|
||||
#define DAVINCI_MCASP_RATES SNDRV_PCM_RATE_8000_192000
|
||||
|
||||
#define DAVINCI_MCASP_PCM_FMTS (SNDRV_PCM_FMTBIT_S8 | \
|
||||
@ -1732,7 +1733,6 @@ static int davinci_mcasp_dai_probe(struct snd_soc_dai *dai)
|
||||
static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
|
||||
{
|
||||
.name = "davinci-mcasp.0",
|
||||
.probe = davinci_mcasp_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "IIS Playback",
|
||||
.channels_min = 1,
|
||||
@ -1753,7 +1753,6 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
|
||||
},
|
||||
{
|
||||
.name = "davinci-mcasp.1",
|
||||
.probe = davinci_mcasp_dai_probe,
|
||||
.playback = {
|
||||
.stream_name = "DIT Playback",
|
||||
.channels_min = 1,
|
||||
|
@ -401,15 +401,6 @@ static int omap_dmic_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops omap_dmic_dai_ops = {
|
||||
.startup = omap_dmic_dai_startup,
|
||||
.shutdown = omap_dmic_dai_shutdown,
|
||||
.hw_params = omap_dmic_dai_hw_params,
|
||||
.prepare = omap_dmic_dai_prepare,
|
||||
.trigger = omap_dmic_dai_trigger,
|
||||
.set_sysclk = omap_dmic_set_dai_sysclk,
|
||||
};
|
||||
|
||||
static int omap_dmic_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct omap_dmic *dmic = snd_soc_dai_get_drvdata(dai);
|
||||
@ -438,10 +429,19 @@ static int omap_dmic_remove(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops omap_dmic_dai_ops = {
|
||||
.probe = omap_dmic_probe,
|
||||
.remove = omap_dmic_remove,
|
||||
.startup = omap_dmic_dai_startup,
|
||||
.shutdown = omap_dmic_dai_shutdown,
|
||||
.hw_params = omap_dmic_dai_hw_params,
|
||||
.prepare = omap_dmic_dai_prepare,
|
||||
.trigger = omap_dmic_dai_trigger,
|
||||
.set_sysclk = omap_dmic_set_dai_sysclk,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver omap_dmic_dai = {
|
||||
.name = "omap-dmic",
|
||||
.probe = omap_dmic_probe,
|
||||
.remove = omap_dmic_remove,
|
||||
.capture = {
|
||||
.channels_min = 2,
|
||||
.channels_max = 6,
|
||||
|
@ -1254,18 +1254,6 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
|
||||
return err;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops mcbsp_dai_ops = {
|
||||
.startup = omap_mcbsp_dai_startup,
|
||||
.shutdown = omap_mcbsp_dai_shutdown,
|
||||
.prepare = omap_mcbsp_dai_prepare,
|
||||
.trigger = omap_mcbsp_dai_trigger,
|
||||
.delay = omap_mcbsp_dai_delay,
|
||||
.hw_params = omap_mcbsp_dai_hw_params,
|
||||
.set_fmt = omap_mcbsp_dai_set_dai_fmt,
|
||||
.set_clkdiv = omap_mcbsp_dai_set_clkdiv,
|
||||
.set_sysclk = omap_mcbsp_dai_set_dai_sysclk,
|
||||
};
|
||||
|
||||
static int omap_mcbsp_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(dai);
|
||||
@ -1288,9 +1276,21 @@ static int omap_mcbsp_remove(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops mcbsp_dai_ops = {
|
||||
.probe = omap_mcbsp_probe,
|
||||
.remove = omap_mcbsp_remove,
|
||||
.startup = omap_mcbsp_dai_startup,
|
||||
.shutdown = omap_mcbsp_dai_shutdown,
|
||||
.prepare = omap_mcbsp_dai_prepare,
|
||||
.trigger = omap_mcbsp_dai_trigger,
|
||||
.delay = omap_mcbsp_dai_delay,
|
||||
.hw_params = omap_mcbsp_dai_hw_params,
|
||||
.set_fmt = omap_mcbsp_dai_set_dai_fmt,
|
||||
.set_clkdiv = omap_mcbsp_dai_set_clkdiv,
|
||||
.set_sysclk = omap_mcbsp_dai_set_dai_sysclk,
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver omap_mcbsp_dai = {
|
||||
.probe = omap_mcbsp_probe,
|
||||
.remove = omap_mcbsp_remove,
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 16,
|
||||
|
@ -404,13 +404,6 @@ static int omap_mcpdm_prepare(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops omap_mcpdm_dai_ops = {
|
||||
.startup = omap_mcpdm_dai_startup,
|
||||
.shutdown = omap_mcpdm_dai_shutdown,
|
||||
.hw_params = omap_mcpdm_dai_hw_params,
|
||||
.prepare = omap_mcpdm_prepare,
|
||||
};
|
||||
|
||||
static int omap_mcpdm_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct omap_mcpdm *mcpdm = snd_soc_dai_get_drvdata(dai);
|
||||
@ -457,6 +450,17 @@ static int omap_mcpdm_remove(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops omap_mcpdm_dai_ops = {
|
||||
.probe = omap_mcpdm_probe,
|
||||
.remove = omap_mcpdm_remove,
|
||||
.startup = omap_mcpdm_dai_startup,
|
||||
.shutdown = omap_mcpdm_dai_shutdown,
|
||||
.hw_params = omap_mcpdm_dai_hw_params,
|
||||
.prepare = omap_mcpdm_prepare,
|
||||
.probe_order = SND_SOC_COMP_ORDER_LATE,
|
||||
.remove_order = SND_SOC_COMP_ORDER_EARLY,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int omap_mcpdm_suspend(struct snd_soc_component *component)
|
||||
{
|
||||
@ -502,10 +506,6 @@ static int omap_mcpdm_resume(struct snd_soc_component *component)
|
||||
#define OMAP_MCPDM_FORMATS SNDRV_PCM_FMTBIT_S32_LE
|
||||
|
||||
static struct snd_soc_dai_driver omap_mcpdm_dai = {
|
||||
.probe = omap_mcpdm_probe,
|
||||
.remove = omap_mcpdm_remove,
|
||||
.probe_order = SND_SOC_COMP_ORDER_LATE,
|
||||
.remove_order = SND_SOC_COMP_ORDER_EARLY,
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 5,
|
||||
|
Loading…
x
Reference in New Issue
Block a user