mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 16:14:13 +08:00
ASoC: img: 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/87il9pb0u8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
ac27ca16a0
commit
ca6b2aac2a
@ -370,12 +370,6 @@ static int img_i2s_in_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_i2s_in_dai_ops = {
|
||||
.trigger = img_i2s_in_trigger,
|
||||
.hw_params = img_i2s_in_hw_params,
|
||||
.set_fmt = img_i2s_in_set_fmt
|
||||
};
|
||||
|
||||
static int img_i2s_in_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct img_i2s_in *i2s = snd_soc_dai_get_drvdata(dai);
|
||||
@ -385,6 +379,13 @@ static int img_i2s_in_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_i2s_in_dai_ops = {
|
||||
.probe = img_i2s_in_dai_probe,
|
||||
.trigger = img_i2s_in_trigger,
|
||||
.hw_params = img_i2s_in_hw_params,
|
||||
.set_fmt = img_i2s_in_set_fmt
|
||||
};
|
||||
|
||||
static const struct snd_soc_component_driver img_i2s_in_component = {
|
||||
.name = "img-i2s-in",
|
||||
.legacy_dai_naming = 1,
|
||||
@ -468,7 +469,6 @@ static int img_i2s_in_probe(struct platform_device *pdev)
|
||||
i2s->dma_data.addr = res->start + IMG_I2S_IN_RX_FIFO;
|
||||
i2s->dma_data.addr_width = 4;
|
||||
|
||||
i2s->dai_driver.probe = img_i2s_in_dai_probe;
|
||||
i2s->dai_driver.capture.channels_min = 2;
|
||||
i2s->dai_driver.capture.channels_max = i2s->max_i2s_chan * 2;
|
||||
i2s->dai_driver.capture.rates = SNDRV_PCM_RATE_8000_192000;
|
||||
|
@ -376,12 +376,6 @@ static int img_i2s_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_i2s_out_dai_ops = {
|
||||
.trigger = img_i2s_out_trigger,
|
||||
.hw_params = img_i2s_out_hw_params,
|
||||
.set_fmt = img_i2s_out_set_fmt
|
||||
};
|
||||
|
||||
static int img_i2s_out_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct img_i2s_out *i2s = snd_soc_dai_get_drvdata(dai);
|
||||
@ -391,6 +385,13 @@ static int img_i2s_out_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_i2s_out_dai_ops = {
|
||||
.probe = img_i2s_out_dai_probe,
|
||||
.trigger = img_i2s_out_trigger,
|
||||
.hw_params = img_i2s_out_hw_params,
|
||||
.set_fmt = img_i2s_out_set_fmt
|
||||
};
|
||||
|
||||
static const struct snd_soc_component_driver img_i2s_out_component = {
|
||||
.name = "img-i2s-out",
|
||||
.legacy_dai_naming = 1,
|
||||
@ -504,7 +505,6 @@ static int img_i2s_out_probe(struct platform_device *pdev)
|
||||
i2s->dma_data.addr_width = 4;
|
||||
i2s->dma_data.maxburst = 4;
|
||||
|
||||
i2s->dai_driver.probe = img_i2s_out_dai_probe;
|
||||
i2s->dai_driver.playback.channels_min = 2;
|
||||
i2s->dai_driver.playback.channels_max = i2s->max_i2s_chan * 2;
|
||||
i2s->dai_driver.playback.rates = SNDRV_PCM_RATE_8000_192000;
|
||||
|
@ -174,12 +174,6 @@ static int img_prl_out_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_prl_out_dai_ops = {
|
||||
.trigger = img_prl_out_trigger,
|
||||
.hw_params = img_prl_out_hw_params,
|
||||
.set_fmt = img_prl_out_set_fmt
|
||||
};
|
||||
|
||||
static int img_prl_out_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct img_prl_out *prl = snd_soc_dai_get_drvdata(dai);
|
||||
@ -189,8 +183,14 @@ static int img_prl_out_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_prl_out_dai_ops = {
|
||||
.probe = img_prl_out_dai_probe,
|
||||
.trigger = img_prl_out_trigger,
|
||||
.hw_params = img_prl_out_hw_params,
|
||||
.set_fmt = img_prl_out_set_fmt
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver img_prl_out_dai = {
|
||||
.probe = img_prl_out_dai_probe,
|
||||
.playback = {
|
||||
.channels_min = 2,
|
||||
.channels_max = 2,
|
||||
|
@ -682,11 +682,6 @@ static int img_spdif_in_hw_params(struct snd_pcm_substream *substream,
|
||||
return img_spdif_in_do_clkgen_single(spdif, rate);
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_spdif_in_dai_ops = {
|
||||
.trigger = img_spdif_in_trigger,
|
||||
.hw_params = img_spdif_in_hw_params
|
||||
};
|
||||
|
||||
static int img_spdif_in_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct img_spdif_in *spdif = snd_soc_dai_get_drvdata(dai);
|
||||
@ -699,8 +694,13 @@ static int img_spdif_in_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_spdif_in_dai_ops = {
|
||||
.probe = img_spdif_in_dai_probe,
|
||||
.trigger = img_spdif_in_trigger,
|
||||
.hw_params = img_spdif_in_hw_params
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver img_spdif_in_dai = {
|
||||
.probe = img_spdif_in_dai_probe,
|
||||
.capture = {
|
||||
.channels_min = 2,
|
||||
.channels_max = 2,
|
||||
|
@ -287,11 +287,6 @@ static int img_spdif_out_hw_params(struct snd_pcm_substream *substream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_spdif_out_dai_ops = {
|
||||
.trigger = img_spdif_out_trigger,
|
||||
.hw_params = img_spdif_out_hw_params
|
||||
};
|
||||
|
||||
static int img_spdif_out_dai_probe(struct snd_soc_dai *dai)
|
||||
{
|
||||
struct img_spdif_out *spdif = snd_soc_dai_get_drvdata(dai);
|
||||
@ -304,8 +299,13 @@ static int img_spdif_out_dai_probe(struct snd_soc_dai *dai)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops img_spdif_out_dai_ops = {
|
||||
.probe = img_spdif_out_dai_probe,
|
||||
.trigger = img_spdif_out_trigger,
|
||||
.hw_params = img_spdif_out_hw_params
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_driver img_spdif_out_dai = {
|
||||
.probe = img_spdif_out_dai_probe,
|
||||
.playback = {
|
||||
.channels_min = 2,
|
||||
.channels_max = 2,
|
||||
|
Loading…
Reference in New Issue
Block a user