summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/sirf-audio-codec.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-21ASoC: sirf-audio-codec: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen1-2/+4
The codec field of the snd_soc_widget struct is eventually going to be removed, use snd_soc_dapm_to_codec(w->dapm) instead. While we are at it also replace dev_get_drvdata() with snd_soc_codec_get_drvdata(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-01ASoC: sirf-audio-codec: Fix return value check in ↵Wei Yongjun1-2/+2
sirf_audio_codec_driver_probe() In case of error, the function devm_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: sirf-audio-codec: Simplify the new bitmask value in regmap_update_bitsAxel Lin1-5/+3
Having the binary ones complement operator in the new bitmak value makes the code hard to read. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14ASoC: sirf: Move the tx rx enable from port to codec, that will not need ↵Rongjun Ying1-8/+66
register sharing The port driver only used to register component and dmaengine pcm. Signed-off-by: Rongjun Ying <rongjun.ying@csr.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-17ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() callLars-Peter Clausen1-9/+0
There was a overlap between the snd_soc_codec_set_cache_io() cleanup and the addition of the sirf-audio-codec resulting in the sirf-audio-codec driver still using the old signature of snd_soc_codec_set_cache_io(), which will cause a compile error. Since the core is able to automatically setup IO for this driver we can just remove both the snd_soc_set_cache_io() call and the control_data assignment. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: sirf: Add SiRF internal audio codec driverRongjun Ying1-0/+533
SiRF internal audio codec is integrated in SiRF atlas6 and prima2 SoC. Features include: 1. Stereo DAC and ADC with 16-bit resolution amd 48KHz sample rate 2. Support headphone and/or speaker output 3. Integrate headphone and speaker output amp 4. Support LINE and MIC input 5. Support single ended and differential input mode Signed-off-by: Rongjun Ying <rongjun.ying@csr.com> --v5: 1. Drop all inlines. 2. Reordering the Kconfig and Makefile 3. Remove the sirf_audio_codec_reg_bits struct, use the new controls instead it. 4. Add some SND_SOC_DAPM_OUT_DRV instead of HP and SPK enable driver 5. Add audio codec clock supply instead of adc event callback 6. Fixed playback and capture can't concurrent work bug. -- .../devicetree/bindings/sound/sirf-audio-codec.txt | 17 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 1 + sound/soc/codecs/sirf-audio-codec.c | 533 ++++++++++++++++++++ sound/soc/codecs/sirf-audio-codec.h | 75 +++ 5 files changed, 631 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sirf-audio-codec.txt create mode 100644 sound/soc/codecs/sirf-audio-codec.c create mode 100644 sound/soc/codecs/sirf-audio-codec.h Signed-off-by: Mark Brown <broonie@linaro.org>