drivers: soc: make dummy codec DT compatible
This commit is contained in:
parent
65ee42f8f6
commit
36c3622306
|
@ -0,0 +1,13 @@
|
||||||
|
snd-soc-dummy:
|
||||||
|
|
||||||
|
ALSA SoC dummy codec.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
|
||||||
|
- compatible : "alsa-soc-dummy"
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
sound_dummy {
|
||||||
|
compatible = "alsa-soc-dummy";
|
||||||
|
};
|
|
@ -7,6 +7,8 @@
|
||||||
// Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
// Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
||||||
// Liam Girdwood <lrg@slimlogic.co.uk>
|
// Liam Girdwood <lrg@slimlogic.co.uk>
|
||||||
|
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
#include <sound/core.h>
|
#include <sound/core.h>
|
||||||
|
@ -112,14 +114,12 @@ static const struct snd_soc_component_driver dummy_codec = {
|
||||||
static struct snd_soc_dai_driver dummy_dai = {
|
static struct snd_soc_dai_driver dummy_dai = {
|
||||||
.name = "snd-soc-dummy-dai",
|
.name = "snd-soc-dummy-dai",
|
||||||
.playback = {
|
.playback = {
|
||||||
.stream_name = "Playback",
|
|
||||||
.channels_min = 1,
|
.channels_min = 1,
|
||||||
.channels_max = 384,
|
.channels_max = 384,
|
||||||
.rates = STUB_RATES,
|
.rates = STUB_RATES,
|
||||||
.formats = STUB_FORMATS,
|
.formats = STUB_FORMATS,
|
||||||
},
|
},
|
||||||
.capture = {
|
.capture = {
|
||||||
.stream_name = "Capture",
|
|
||||||
.channels_min = 1,
|
.channels_min = 1,
|
||||||
.channels_max = 384,
|
.channels_max = 384,
|
||||||
.rates = STUB_RATES,
|
.rates = STUB_RATES,
|
||||||
|
@ -149,9 +149,15 @@ static int snd_soc_dummy_probe(struct platform_device *pdev)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct of_device_id soc_dummy_of_match[] = {
|
||||||
|
{ .compatible = "alsa-soc-dummy" },
|
||||||
|
{},
|
||||||
|
};
|
||||||
|
|
||||||
static struct platform_driver soc_dummy_driver = {
|
static struct platform_driver soc_dummy_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "snd-soc-dummy",
|
.name = "snd-soc-dummy",
|
||||||
|
.of_match_table = soc_dummy_of_match,
|
||||||
},
|
},
|
||||||
.probe = snd_soc_dummy_probe,
|
.probe = snd_soc_dummy_probe,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue