summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs53l30.c
AgeCommit message (Collapse)Author
2016-09-29Merge remote-tracking branches 'asoc/topic/cs35l30', 'asoc/topic/cs42l73', ↵Mark Brown
'asoc/topic/cs53l30' and 'asoc/topic/da7213' into asoc-next
2016-08-08ASoC: codec duplicated callback function goes to component on cs53l30Kuninori Morimoto
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: cs53l30: Do not ignore errors if mclk is specifiedNicolin Chen
When the clock is specified, there could be other errors besides the EPROBE_DEFER so don't ignore them. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: cs53l30: Constify cs53l30_mclk_coeffs and cs53l30_mclkx_coeffs tablesAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: cs53l30: Constify cs53l30_mclk_coeffs and cs53l30_mclkx_coeffs tablesAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-21ASoC: cs53l30: Fix bit shift issue of TDM modeNicolin Chen
The TDM mode using PCM format now has two-bit right shift due to the format configuration in the driver. According to Figure 4-13 in the CS53L30 datasheet, using ASP_SCLK_INV = 0 and SHIFT_LEFT = 1 should be the correct combination to create one-bit right shift for the DSP type A format. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-21ASoC: cs53l30: Fix a bug for TDM slot location validationNicolin Chen
The maximum slot number of CS53L30 is 4 while it should support the situation that's less than 4 channels based on the rx_mask. So when the driver validates the last slot location, it should check the last active slot instead of always the 4th one. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-23ASoC: cs53l30: Add MUTE pin control support via GPIONicolin Chen
The codec chip has a physical MUTE pin to let users control it via GPIO. So this patch add a mute control support to the driver. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-18ASoC: cs53l30: Set idle_bias_off trueNicolin Chen
The driver is using the set_bias_level to control the power on and off so it should get SND_SOC_BIAS_OFF in order to proceed normal powering sequences. This patch enables the idle_bias_off option so the DAPM core will set the bias level to SND_SOC_BIAS_OFF instead of stopping at SND_SOC_BIAS_STANDBY. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-18ASoC: cs53l30: Fix non static symbol warningsWei Yongjun
Fixes the following sparse warnings: sound/soc/codecs/cs53l30.c:182:20: warning: symbol 'input1_sel_values' was not declared. Should it be static? sound/soc/codecs/cs53l30.c:202:20: warning: symbol 'input2_sel_values' was not declared. Should it be static? sound/soc/codecs/cs53l30.c:734:20: warning: symbol 'cs53l30_src_rates' was not declared. Should it be static? Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-13ASoC: cs53l30: Correct clock inversion checkNicolin Chen
SND_SOC_DAIFMT_IB_NF = 0x3 (11b) | SND_SOC_DAIFMT_IB_IF = 0x4 (100b) creates a mask 0x7 (111b) which also includes SND_SOC_DAIFMT_NB_IF = 0x2 (10b). So this patch uses the traditional way to check the clock inversion. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-13ASoC: cs53l30: include gpio/consumer.hArnd Bergmann
When GPIOLIB is disabled, we don't see the declarations from gpio/consumer.h, so we have to include the header explicitly to avoid this build error: sound/soc/codecs/cs53l30.c: In function 'cs53l30_i2c_probe': sound/soc/codecs/cs53l30.c:931:24: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration] cs53l30->reset_gpio = devm_gpiod_get_optional(dev, reset, ^~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/cs53l30.c:932:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function) GPIOD_OUT_LOW); ^~~~~~~~~~~~~ sound/soc/codecs/cs53l30.c:932:13: note: each undeclared identifier is reported only once for each function it appears in sound/soc/codecs/cs53l30.c:939:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(cs53l30->reset_gpio, 1); Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-02ASoC: cs53l30: Check return value of regcache_sync()Nicolin Chen
Regcache_sync() might fail. So this patch adds a return value Check for it. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-02ASoC: cs53l30: Rename the volume controls for preamplifierNicolin Chen
Volume controls should end with 'Volume', so this patch renames them for ADC preamplifier. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30ASoC: cs53l30: Add codec driver support for Cirrus CS53L30Nicolin Chen
CS53L30 is a Quad-Channel ADC from Cirrus Logic with an I2S/TDM DAI. So this patch adds a codec driver for CS53L30 that includes 4-channel 24-bit recording and TDM mode supports. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>