It's a bug that writing to the platform data directly, for it should
be constant. So just copy it before writing.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Remove asoc_simple_get_card_info macro and use snd_soc_card_set_drvdata
and snd_soc_card_get_drvdata instead.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
If the dt is used and the cinfo is NULL, the -ENOMEM should be return.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
If the dt is not used, the cinfo will be always NULL before using it.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Even though we might not have rigor rule for the simple card property names,
according to the existing ones, they are all in a same pattern:
[simple-audio-card,]XXX;
Rename simple-audio-routing to simple-audio-card,routing, and make the simple
card's properties has one unified name.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Try to get the device's module clock if the dt has no clocks and
system-clock-frequency properties.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The name of cpu DAI maybe omitted, and then strlen() will lead
kernel panic.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Makes the code slightly shorter.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Support for loading the simple-card module via DeviceTree.
It requests CPU/CODEC information.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Current simple-card returns error if DAI doesn't
support .set_fmt callback.
But the error is -ENOTSUPP (= not supported),
and it is not error.
This patch avoids such case
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Add .owner field and also MODULE_ALIAS(), so that auto module loading can work.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Current simple-card driver calls asoc_simple_card_dai_init()
if platform had a asoc_simple_card_dai_init pointer.
And, this initialization function works only
when platform has an applicable initial value for each dai settings.
And basically, almost all sound card requires certain initialization.
This means that almost all platform has initialization settings,
and driver do nothing if it doesn't have settings.
And additionally, current simple-card supports sysclk settings but it was
only for codec. In order to abolish deviation between cpu and codec,
and in order to simplify processing,
this patch adds asoc_simple_dai, and removed pointless
struct asoc_simple_dai_init_info which was trigger of
calling asoc_simple_card_dai_init().
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Current ASoC requires card.c file to each platforms in order to
specifies its CPU and Codecs pair.
But the differences between these were only value/strings of setting.
In order to reduce duplicate driver, this patch adds generic/simple-card.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>