mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
ASoC: soc-utils: respawn dummy Platform
commit 64ee5067cf
("ASoC: soc-utils: remove dummy Platform") removed
dummy Platform from ALSA SoC, but it is over-kill.
This patch respawn it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6c10da54f3
commit
aff5089526
1 changed files with 25 additions and 0 deletions
|
@ -262,6 +262,26 @@ static const struct snd_pcm_hardware dummy_dma_hardware = {
|
||||||
.periods_max = 128,
|
.periods_max = 128,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int dummy_dma_open(struct snd_pcm_substream *substream)
|
||||||
|
{
|
||||||
|
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||||
|
|
||||||
|
/* BE's dont need dummy params */
|
||||||
|
if (!rtd->dai_link->no_pcm)
|
||||||
|
snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct snd_pcm_ops snd_dummy_dma_ops = {
|
||||||
|
.open = dummy_dma_open,
|
||||||
|
.ioctl = snd_pcm_lib_ioctl,
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct snd_soc_component_driver dummy_platform = {
|
||||||
|
.ops = &snd_dummy_dma_ops,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct snd_soc_component_driver dummy_codec = {
|
static const struct snd_soc_component_driver dummy_codec = {
|
||||||
.idle_bias_on = 1,
|
.idle_bias_on = 1,
|
||||||
.use_pmdown_time = 1,
|
.use_pmdown_time = 1,
|
||||||
|
@ -319,6 +339,11 @@ static int snd_soc_dummy_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
ret = devm_snd_soc_register_component(&pdev->dev,
|
ret = devm_snd_soc_register_component(&pdev->dev,
|
||||||
&dummy_codec, &dummy_dai, 1);
|
&dummy_codec, &dummy_dai, 1);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
ret = devm_snd_soc_register_component(&pdev->dev, &dummy_platform,
|
||||||
|
NULL, 0);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue