summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl_sai.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ASoC: fsl_sai: Sort local variable in general wayNicolin Chen2013-12-211-7/+7
| | | | | | | | | | | | | | | | | Generally we would write code for local variable like: static new_func() { struct xxx *yyy; ... int ret; } But this driver only follows this pattern for some functions, not all. Thus this patch sorts the local variable in the general way. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl_sai: Make dev_err information neaterNicolin Chen2013-12-211-12/+4
| | | | | | | | | Since using dev_err() there's no need to mention SAI any more, it will print the full name of the driver -- fsl_sai. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl_sai: Drop useless ret in startup()Nicolin Chen2013-12-211-4/+1
| | | | | | | | We can save this ret to make the code neater. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl_sai: Drop useless channels check in hw_params()Nicolin Chen2013-12-211-4/+1
| | | | | | | | | SAi only supports two data channels on hardware level and the driver also does register the min->1 and max->2, so no need to check channels. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl_sai: Use snd_pcm_format_width()Nicolin Chen2013-12-211-15/+2
| | | | | | | | Use common helper function snd_pcm_format_width() to make code neater. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl_sai: Keep symmetry for clk_enable() and clk_disable()Nicolin Chen2013-12-211-6/+8
| | | | | | | | | There are two functions haven't clk_disable_unprepare() if having error. Thus fix them. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl-sai: Use snd_soc_dai_init_dma_data()Xiubo Li2013-12-211-2/+2
| | | | | | | Makes the code slightly shorter Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl-sai: Use devm_snd_dmaengine_pcm_register()Xiubo Li2013-12-211-14/+1
| | | | | | | Makes the code slightly shorter Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: fsl-sai: Remove fsl_sai_remove()Xiubo Li2013-12-211-11/+0
| | | | | | | There is no need of this function and makes the code slightly shorter Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: Add SAI SoC Digital Audio Interface driver.Xiubo Li2013-12-181-0/+492
This adds Freescale SAI ASoC Audio support. This implementation is only compatible with device tree definition. Features: o Supports playback/capture o Supports 16/20/24 bit PCM o Supports 8k - 96k sample rates o Supports master and slave mode. Signed-off-by: Alison Wang <b18965@freescale.com> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>