1
0
Fork 0
Commit Graph

20 Commits (27c647bff20c6883dd0b4e3fc24c3d414a9e192a)

Author SHA1 Message Date
Nicolin Chen 27c647bff2 ASoC: fsl_spdif: Add sysclk df support to derive txclk from sysclk
The sysclk is one the clock sources that could be selected to derive
tx clock. But the route for sysclk is a bit different that it does
not only contain txclk df divider but also have an extra sysclk df.

So this patch mainly adds syclk df configuration support so as to
let the driver be able to get clock from sysclk.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Nicolin Chen e41a4a79af ASoC: fsl_spdif: Rename all _div to _df
We should have used _df by following the reference manual at the beginning.
So this patch just renames them.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:27:39 -07:00
Nicolin Chen 9c6344b3fa ASoC: fsl_spdif: Use clk_set_rate() for spdif root clock only
The clock mux for the Freescale S/PDIF controller has eight clock sources
while most of them are from other moudles and even system clocks that do
not allow a rate-changing operation.

So we here only allow the clk_set_rate() and clk_round_rate() happened to
spdif root clock, the private clock for S/PDIF controller.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 12:26:05 -07:00
Nicolin Chen 0b8643900a ASoC: fsl_spdif: Fix clock source for rxclk rate measurement
The rxclk rate actually uses sysclk, ipg clock for example, as its
reference clock to calculate it. But the driver currently doesn't
pass a correct clock source. So fix it.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-29 12:07:17 -07:00
Nicolin Chen 08f7336e64 ASoC: fsl_spdif: Add core clock control for DMA access
Regmap is able to enable/disable the core clock automatically each time
it's going to access the registers. But for DMA cases during playback or
recording, it's totally beyong control of regmap. So we have to open the
clock manually.

Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-24 13:11:16 +01:00
Mark Brown 84f6965e2b Merge remote-tracking branches 'asoc/topic/da7213', 'asoc/topic/da732x', 'asoc/topic/da9055', 'asoc/topic/davinci', 'asoc/topic/fsl', 'asoc/topic/fsl-esai', 'asoc/topic/fsl-sai' and 'asoc/topic/fsl-spdif' into asoc-next 2014-03-12 23:04:22 +00:00
Xiubo Li 86f28d7643 ASoC: fsl-spdif: big-endian support
For most platforms, the CPU and SPDIF device is in the same endianess
mode. While for the LS1 platform, the CPU is in LE mode and the SPDIF
is in BE mode.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-12 15:31:45 +00:00
Xiubo Li 05cf482d7e ASoC: fsl: use snd_soc_dai_init_dma_data()
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03 12:38:15 +00:00
Lars-Peter Clausen 7e6d18ac7e ASoC: fsl: Use devm_snd_dmaengine_pcm_register()
Makes the code shorter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-02 11:48:54 +00:00
Mark Brown ec7118e391 Merge remote-tracking branch 'asoc/topic/fsl' into asoc-next 2013-11-08 10:43:29 +00:00
Fabio Estevam 9c1fc20913 ASoC: fsl: fsl_spdif: No need to check the return value of platform_get_resource()
When using devm_ioremap_resource(), we do not need to check the return value of
platform_get_resource(), so just remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-04 08:59:40 -08:00
Wei Yongjun 3d8f7318f9 ASoC: fsl_spdif: fix return value check in fsl_spdif_probe()
In case of error, the function platform_get_resource() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-26 21:32:29 +01:00
Sachin Kamat 256218ae65 ASoC: fsl_spdif: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19 14:57:37 +01:00
Sachin Kamat e19bcb6b95 ASoC: fsl_spdif: Remove redundant semicolon
Redundant semicolon at the end of brace is removed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17 13:35:53 +01:00
Mark Brown 6b4c80f947 ASoC: fsl_spdif: Staticse non-exported symbols
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Nicolin Chen <B42378@freescale.com>
2013-09-01 12:52:25 +01:00
Nicolin Chen 8a309d71ed ASoC: fsl: Add wrapping for dev_dbg() in fsl_spdif.c
Add wrapping '\n' for dev_dbg() in fsl_spdif.c

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-30 23:01:18 +01:00
Wei Yongjun bfd7d1aa3b ASoC: fsl_spdif: remove redundant dev_err call in fsl_spdif_probe()
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29 13:17:52 +01:00
Fabio Estevam 6d22db43cf ASoC: fsl_spdif: Reduce the noise on comments
Remove the "====" pattern to let the comments cleaner and more uniform.

Also, do not use multi-line style for a single line comment.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 12:53:13 +01:00
Fabio Estevam 5af407cd36 ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
Driver core clears the driver data to NULL after device_release or on probe
failure, so just remove it from here.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-26 12:50:42 +01:00
Nicolin Chen a2388a498a ASoC: fsl: Add S/PDIF CPU DAI driver
This patch implements a device-tree-only CPU DAI driver for Freescale
S/PDIF controller that supports stereo playback and record feature.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22 10:45:22 +01:00