Commit graph

5 commits

Author SHA1 Message Date
Wei Yongjun c8448051a5 ASoC: sirf-audio-codec: Fix return value check in 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-07-31 21:22:17 +01:00
Axel Lin 772bc594da ASoC: sirf-audio-codec: Simplify the new bitmask value in regmap_update_bits
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-05-26 17:00:39 +01:00
Rongjun Ying b87704cef2 ASoC: sirf: Move the tx rx enable from port to codec, that will not need 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-04-14 17:28:17 +01:00
Lars-Peter Clausen bfe723f6ea ASoC: sirf-audio-codec: Remove snd_soc_codec_set_cache_io() call
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-17 16:53:23 +00:00
Rongjun Ying f516e368dc ASoC: sirf: Add SiRF internal audio codec driver
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>
2014-03-06 15:59:19 +08:00