summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_spdif.c
AgeCommit message (Collapse)Author
2014-12-30ASoC: fsl_spdif: Use dev_name() for registering the irqFabio Estevam
The 'name' array is currently stored inside the fsl_spdif_priv private structure only for registering the interrupt name. This can be simplified by registering it with dev_name() instead. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20ASoC: fsl: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-06Merge remote-tracking branches 'asoc/topic/simple', 'asoc/topic/sirf', ↵Mark Brown
'asoc/topic/spdif', 'asoc/topic/ssm2602' and 'asoc/topic/ssm4567' into asoc-next
2014-10-03ASoC: fsl_spdif: Remove unused includes of linux/clk-private.hTomeu Vizoso
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-27ASoC: fsl-spdif: Convert to use regmap framework's endianness method.Xiubo Li
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-asrc', ↵Mark Brown
'asoc/topic/fsl-spdif' and 'asoc/topic/imx-audmux' into asoc-next
2014-07-31ASoC: fsl_spdif: Add stream names for DPCM usageNicolin Chen
DPCM needs extra dapm routes in the machine driver to route audio between Front-End and Back-End. In order to differ the stream names in the route map from CODECs, we here add specific stream names to SPDIF driver so that we can implement ASRC via DPCM to it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-17ASoC: fsl_spdif: Add support for output sample rates 96kHz and 192kHzAnssi Hannula
Add support for the output sample rates 96kHz and 192kHz. Tested with a Cubox-i imx6 system and an Onkyo TX-SR607 receiver. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-17ASoC: fsl_spdif: Improve coding styleNicolin Chen
1) Apply better indentations 2) Drop braces for single statement. 3) Use simpler ternary to reduce code. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-09ASoC: fsl_spdif: Fix integer overflow when calculating divisorsAnssi Hannula
The calculation code does u64 = (u32 - u32) * 100000; The 64 bits are of no help here as the type is casted only after the multiplication, and therefore the result may overflow, possibly causing inoptimal or wrong clock setup in an unfortunate case (the maximum result value of the first substraction is currently 47999). Fix the code to cast before multiplication. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-09ASoC: fsl_spdif: Fix incorrect usage of regmap_read()Nicolin Chen
We should not copy the return value into this val since it's supposed to get the value of the register not the success result of regmap_read(). Thus fix it. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22Merge remote-tracking branches 'asoc/topic/devm', 'asoc/topic/fsl', ↵Mark Brown
'asoc/topic/fsl-esai', 'asoc/topic/fsl-sai', 'asoc/topic/fsl-spdif' and 'asoc/topic/fsl-ssi' into asoc-next
2014-05-05ASoc: fsl_spdif: Add descriptions for fsl_spdif_privNicolin Chen
Other people would clearly understand each member and improve if they want. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05ASoC: fsl_spdif: Print actual sample rate for debugNicolin Chen
People would simply know what the driver gets the best for the current sample rate playback. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05ASoC: fsl_spdif: Add sysclk df support to derive txclk from sysclkNicolin Chen
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-05ASoC: fsl_spdif: Rename all _div to _dfNicolin Chen
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-05ASoC: fsl_spdif: Use clk_set_rate() for spdif root clock onlyNicolin Chen
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-04-29ASoC: fsl_spdif: Fix clock source for rxclk rate measurementNicolin Chen
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-24ASoC: fsl_spdif: Add core clock control for DMA accessNicolin Chen
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-14ASoC: spdif: Add VF610+ compatibles support.Xiubo Li
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-04-14ASoC: spdif: Sort the header files alphabetically.Xiubo Li
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-03-12Merge remote-tracking branches 'asoc/topic/da7213', 'asoc/topic/da732x', ↵Mark Brown
'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-02-12ASoC: fsl-spdif: big-endian supportXiubo Li
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-03ASoC: fsl: use snd_soc_dai_init_dma_data()Xiubo Li
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>
2013-12-02ASoC: fsl: Use devm_snd_dmaengine_pcm_register()Lars-Peter Clausen
Makes the code shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-11-08Merge remote-tracking branch 'asoc/topic/fsl' into asoc-nextMark Brown
2013-11-04ASoC: fsl: fsl_spdif: No need to check the return value of ↵Fabio Estevam
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-10-26ASoC: fsl_spdif: fix return value check in fsl_spdif_probe()Wei Yongjun
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-09-19ASoC: fsl_spdif: Use devm_snd_soc_register_componentSachin Kamat
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-17ASoC: fsl_spdif: Remove redundant semicolonSachin Kamat
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-01ASoC: fsl_spdif: Staticse non-exported symbolsMark Brown
Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Nicolin Chen <B42378@freescale.com>
2013-08-30ASoC: fsl: Add wrapping for dev_dbg() in fsl_spdif.cNicolin Chen
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-29ASoC: fsl_spdif: remove redundant dev_err call in fsl_spdif_probe()Wei Yongjun
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-26ASoC: fsl_spdif: Reduce the noise on commentsFabio Estevam
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-26ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()Fabio Estevam
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-22ASoC: fsl: Add S/PDIF CPU DAI driverNicolin Chen
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>