summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic31xx.c
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', ↵Mark Brown2015-08-301-1/+1
|\ \ | | | | | | | | | 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
| * | ASoC: Constify snd_soc_dai_ops variablesAxel Lin2015-07-151-1/+1
| |/ | | | | | | | | | | | | | | The snd_soc_dai_ops variables are not modified after initialization in these drivers, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski2015-07-151-1/+0
|/ | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aix31xx: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-05-151-5/+5
| | | | | | | | | | The dapm field of the snd_soc_codec struct is eventually going to be removed, in preparation for this replace all manual access to codec->dapm.bias_level with snd_soc_codec_get_bias_level() and replace all other manual access to codec->dapm with snd_soc_codec_get_dapm(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Move bias level update to the coreLars-Peter Clausen2015-04-271-1/+0
| | | | | | | | | All drivers have the same line at the end of the set_bias_level callback to update the bias_level state. Move this update into snd_soc_dapm_force_bias_level() and remove them from the drivers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tlv320aic31xx: Replace w->codec snd_soc_dapm_to_codec(w->dapm)Lars-Peter Clausen2015-01-151-4/+5
| | | | | | | | The codec field of the snd_soc_widget struct is eventually going to be removed, use snd_soc_dapm_to_codec(w->dapm) instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tegra', ↵Mark Brown2014-12-081-16/+2
|\ \ | | | | | | | | | 'asoc/topic/tfa9879', 'asoc/topic/tlv320aic23' and 'asoc/topic/tlv320aic31xx' into asoc-next
| | * ASoC: tlv320aix31xx: Cleanup manual bias level transitionsLars-Peter Clausen2014-11-271-16/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tlv320aic31xx: Fix off by one error in the loop stucture.Jyri Sarha2014-11-241-6/+7
|/ | | | | | | | | Fix off by one read beyond the end of a table. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* ASoC: tlv320aic31xx: Choose PLL p divider automaticallyJyri Sarha2014-09-031-51/+50
| | | | | | | | | This simplifies aic31xx_divs table. There is no more need for p_val or separate lines for 12 and 24 MHz mclks. Signed-off-by: Jyri Sarha <jsarha@ti.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'fix/tlv320aic31xx' of ↵Mark Brown2014-09-031-12/+39
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tlv320aic31xx
| * ASoC: tlv320aic31xx: Fix 24bit samples with I2S format and 12MHz mclkJyri Sarha2014-09-031-12/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I2S format requires bitclock to have an exact amount of cycles in a frame for audio to work cleanly. With dsp formats that is not so important. Updates aic31xx_setup_pll() to look for a line in aic31xx_divs table that produces the best match for the bitclock and adds lines to aic31xx_divs for 12MHz mclk and 24bit samples. Signed-off-by: Jyri Sarha <jsarha@ti.com> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tlv320aic31xx: Correct interface register 2 variable namePeter Ujfalusi2014-09-011-3/+3
|/ | | | | | | | Rename iface_reg3 to iface_reg2 since this variable is actually used for interface register 2. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', ↵Mark Brown2014-08-041-4/+4
|\ \ | | | | | | | | | 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next
| | * ASoC: tlv320aic31xx: Convert to params_width()Mark Brown2014-07-311-4/+4
| |/ | | | | | | | | | | The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'asoc/topic/tlv', 'asoc/topic/tlv320aic23', ↵Mark Brown2014-08-041-11/+12
|\ \ \ \ | | |_|/ | |/| | | | | | 'asoc/topic/tlv320aic31xx' and 'asoc/topic/tlv320aic32x4' into asoc-next
| | | * ASoC: tlv320aic31xx: Fixed Coding Style IssuesShahina Shaik2014-06-221-0/+2
| | |/ | |/| | | | | | | | | | | | | | | | Fixed coding style issues of "Missing Blank line after declaration" Signed-off-by: Shahina Shaik <sharab.shaik@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * ASoC: tlv320aic31xx: Remove duplicate constLars-Peter Clausen2014-06-211-11/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | SOC_ENUM_SINGLE_DECL() already adds the const qualifier, so there is no need to manually specify it. Fixes the following warnings from sparse: sound/soc/codecs/tlv320aic31xx.c:253:1: warning: duplicate const sound/soc/codecs/tlv320aic31xx.c:255:1: warning: duplicate const sound/soc/codecs/tlv320aic31xx.c:257:1: warning: duplicate const sound/soc/codecs/tlv320aic31xx.c:260:1: warning: duplicate const sound/soc/codecs/tlv320aic31xx.c:262:1: warning: duplicate const Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: tlv320aic31xx: Do not ignore errors in aic31xx_device_init()Peter Ujfalusi2014-07-251-3/+6
|/ | | | | | | | | | | | We need to return the error codes from aic31xx_device_init() and return from the i2c_probe with the error code. We will have kernel panic (NULL pointer dereference) in regulator_register_notifier() in case the devm_regulator_bulk_get() fails (with -EPROBE_DEFER for example). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
*-. Merge remote-tracking branches 'asoc/topic/headers', 'asoc/topic/intel', ↵Mark Brown2014-05-221-0/+1
|\ \ | | | | | | | | | 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/mc13783' and 'asoc/topic/multicodec' into asoc-next
| * | ASoC: tlv320aic23: Include of.hSachin Kamat2014-04-141-0/+1
| |/ | | | | | | | | | | | | of_match_ptr is defined in of.h. Include it explicitly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: tlv320aic31xx: Convert /n to \nJoe Perches2014-04-251-1/+1
|/ | | | | | | Use a newline character appropriately. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: codecs: Replace instances of rtd->codec with dai->codecLars-Peter Clausen2014-03-181-3/+2
| | | | | | | | | | | With CODEC to CODEC links rtd->codec does not necessarily point to the driver's CODEC. CODEC drivers should always use dai->codec and never even look at the PCM runtime. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic31xx: Don't call kfree for memory allocated by devm_kzallocAxel Lin2014-03-181-8/+3
| | | | | | | | | The kfree call is not necessary, but we need to call snd_soc_unregister_codec() in remove(). Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic31xx: Turn power off only once.Jyri Sarha2014-03-171-1/+2
| | | | | | | | Regulator code keep count of enables and disables. Double disable causes an ugly warning. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic31xx: Staticise non-exported symbolsMark Brown2014-03-131-5/+5
| | | | Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic31xx: Remove snd_soc_codec_set_cache_io() callJyri Sarha2014-03-131-9/+0
| | | | | | | | | Remove snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_REGMAP) call and codec->control_data = aic31xx->regmap assignment since that already done by core. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic31xx: Fix unused variable warning from aic31xx_clk_offJyri Sarha2014-03-131-1/+0
| | | | | | | Fix "warning: unused variable 'aic31xx'" from function 'aic31xx_clk_off'. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tlv320aic31xx: Add basic codec driver implementationJyri Sarha2014-03-131-0/+1295
This commit adds a bare bones driver support for TLV320AIC31XX family audio codecs. The driver adds basic stereo playback trough headphone and speaker outputs and mono capture trough microphone inputs. The driver is currently missing support at least for mini DSP features and jack detection. I have tested the driver only on TLV320AIC3111, but based on the data sheets TLV320AIC3100, TLV320AIC3110, and TLV320AIC3120 should work Ok too. The base for the implementation was taken from: git@gitorious.org:ti-codecs/ti-codecs.git ajitk/topics/k3.10.1-aic31xx -branch at commit 77504eba0294764e9e63b4a0c696b44db187cd13. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud