summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l73.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: cs42l73: If Internal MCLK is >= 6.4MHz, then set SCLK to 64*Fs.Paul Handrigan2013-03-061-1/+5
| | | | | | Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-nextMark Brown2012-12-151-27/+89
|\
| * ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUTPaul Handrigan2012-12-101-19/+13
| | | | | | | | | | | | | | Since VSP only has one power bit, only provide one DAPM widget. Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: cs42l73: Add DAPM events for power down.Paul Handrigan2012-12-101-8/+72
| | | | | | | | | | | | | | Add power down delays between setting PDN and MCLKDIS for spk amp, spklo amp, and ear amp. Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * ASoC: cs42l73: Add DMIC's as DAPM inputs.Paul Handrigan2012-12-101-0/+4
| | | | | | | | | | Signed-off-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: codecs: remove __dev* attributesBill Pemberton2012-12-101-4/+4
|/ | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Convert to devm_regmap_init_i2c()Brian Austin2012-06-051-15/+5
| | | | | Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'topic/asoc' into for-linusTakashi Iwai2012-05-211-50/+43
|\
| * Merge tag 'v3.4-rc7' into for-3.5Mark Brown2012-05-131-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | Linux 3.4-rc7 Conflicts): drivers/base/regmap/regmap.c (overlap with bug fixes) sound/soc/blackfin/bf5xx-ssm2602.c (overlap with bug fixes)
| * | ASoC: cs42l73: Use DAPM routes to hook AIF widgets to DAI'sBrian Austin2012-05-091-13/+28
| | | | | | | | | | | | | | | Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: cs42l73: Remove Chip ID's from reg_defaultBrian Austin2012-05-091-3/+0
| | | | | | | | | | | | | | | | | | | | | We need to read the real register values Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: cs42l73: Convert to module_i2c_driver()Brian Austin2012-05-091-19/+1
| | | | | | | | | | | | | | | Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: codecs: Remove rtd->codec usage from CODEC driversMark Brown2012-04-041-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to support CODEC<->CODEC links remove the assumption that there is only a single CODEC on a DAI link by removing the use of the CODEC pointer in the rtd from the CODEC drivers. They are already being passed their DAI whenever they are passed an rtd and can get the CODEC from there. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * | ASoC: core: Rework SOC_DOUBLE_R_SX_TLV add SOC_SINGLE_SX_TLVBrian Austin2012-04-031-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some codecs namely Cirrus Logic Codecs have a way of wrapping the dB scale around 0dB without 0dB being in the middle. Rework of SOC_DOUBLE_R_SX_TLV to be more consistent with other asoc tlv macros. Add single register macro : SOC_SINGLE_SX_TLV. Use snd_soc_info_volsw for .info Use snd_soc_get_volsw_sx, snd_soc_put_volsw_sx for single and double. kcontrols for CS42L51 and CS42L73 are adjusted to these new TLV Macros. The max value is determined by: (number of steps) +1 for 0dB +max from codec datasheet. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | | ASoC: cs42l73: Sync digital mixer kcontrols to allow for 0dBBrian Austin2012-05-111-8/+8
| |/ |/| | | | | | | | | | | | | Some of the Digital mixer kcontrol max values were off by 1 not allowing a max of 0dB. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* | ASoC: cs42l73: don't use negative array indexJesper Juhl2012-04-131-0/+2
|/ | | | | | | | | | | | | If cs42l73_get_mclkx_coeff() returns < 0 (which it can) in sound/soc/codecs/cs42l73.c::cs42l73_set_mclk(), then we'll be using the (negative) return value as array index on the very next line of code - that's bad. Catch the negative return value and propagate it to the caller (which checks for it) and things are a bit more sane :-) Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Fix Output [X|A|V]SP_SCLK Sourcing Mode setting for master modeAxel Lin2012-02-011-1/+1
| | | | | | | | For master mode, set Output [X|A|V]SP_SCLK Sourcing Mode to MCLK Mode. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Drop unused state parameter from CODEC suspend callbackLars-Peter Clausen2011-12-021-1/+1
| | | | | | | | | | The existence of this parameter is purely historical. None of the CODEC drivers uses it and we always pass in the same value anyway, so it should be safe to remove it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Fix clear wrong bits in cs42l73_set_dai_fmtAxel Lin2011-11-291-1/+2
| | | | | | | | | What we want is to clear BIT[5:4](PCM_MODE_MASK) and BIT[3](PCM_BIT_ORDER) bits, but current code clears BIT[2:0]. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert CS42L73 to devm_kzalloc()Brian Austin2011-11-281-4/+2
| | | | | Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Cleanup duplicated constLars-Peter Clausen2011-11-231-1/+1
| | | | | | | | Commit 85e7652("ASoC: Constify snd_soc_dai_ops structs") accidentally introduced a few duplicated consts. This patch cleans it up. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2011-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Staticise and constify cs42l73_reg_defaultsMark Brown2011-11-231-1/+1
| | | | | | It's not exported and doesn't need to change. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Make inv and format to be unsigned intAxel Lin2011-11-221-1/+1
| | | | | | | | | | | | | Fix below smatch warning: sound/soc/codecs/cs42l73.c +1030 cs42l73_set_dai_fmt(53) error: inv is never equal to 1024 (wrong type 0 - 255). sound/soc/codecs/cs42l73.c +1032 cs42l73_set_dai_fmt(55) error: inv is never equal to 768 (wrong type 0 - 255). sound/soc/codecs/cs42l73.c +1036 cs42l73_set_dai_fmt(59) error: inv is never equal to 1024 (wrong type 0 - 255). Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Unify the way to define bits of registerAxel Lin2011-11-221-3/+3
| | | | | | | | | | Current code defines some bits with left shift to the proper bit defined in datasheet, but some don't. Unify the definition with proper left shift and adjust the code accordingly. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Remove redundant regcache_sync call in cs42l73_resumeAxel Lin2011-11-211-4/+0
| | | | | | | | It's done in cs42l73_set_bias_level when the dapm.bias_level is switching from SND_SOC_BIAS_OFF to SND_SOC_BIAS_STANDBY. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Show correct revision idAxel Lin2011-11-211-1/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs42l73: Return proper error code if device id mismatchAxel Lin2011-11-211-0/+1
| | | | | | | Return -ENODEV instead of 0 if device id mismatch. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add support for CS42L73 codecBrian Austin2011-11-171-0/+1457
This patch adds support for the Cirrus Logic CS42L73 low power stereo codec. Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Georgi Vlaev <joe@nucleusys.com> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>