aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/sta32x.c
AgeCommit message (Collapse)Author
2011-10-13ASoC: sta32x: Write the register default value to cache for reserved registersAxel Lin
Chip documentation explicitly requires that the reset values of reserved register bits are left untouched. codec->hw_read is broken now. Here we use below trick to avoid writing to reserved registers while resume. Write the register default value to cache for reserved registers, so the write to the these registers are suppressed by the cache restore code when it skips writes of default registers. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-13ASoC: sta32x: Set reg_cache_default to sta32x_regsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-19ASoC: sta32x: Move resource allocation and release to the corresponding ↵Axel Lin
callback functions This patch includes below small fixes: 1. Move sta32x_set_bias_level() from sta32x_i2c_remove() to sta32x_remove(). 2. Remove a redundant regulator_bulk_free() call in sta32x_i2c_remove(), as we will call regulator_bulk_free() in sta32x_remove(). 3. Remove unneeded snd_soc_codec_set_drvdata(codec, NULL) in sta32x_i2c_remove. The i2c core will set the clientdata to NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Johannes Stezenbach <js@sig21.net> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: sta32x: shortcut the for loop to get ir and mcsAxel Lin
There is exactly one match or no match at all during the for loop iteration, thus we can break from the for loop once a match is found. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: sta32x: Fix a memory leak if snd_soc_register_codec failsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: STA32x: Preserve reserved register bitsJohannes Stezenbach
Chip documentation explicitly requires that the reset values of reserved register bits are left untouched. It is possible there are differences between STA326 and STA328 or future chip revisions in these bits, and clobbering them might cause malfunction. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-14ASoC: STA32x: Add mixer controls for biquad coefficientsJohannes Stezenbach
The STA32x has a number of preset EQ settings, but also allows full user control of the biquad filter coeffcients (when "Automode EQ" is set to "User"). Each biquad has five signed, 24bit, fixed-point coefficients representing the range -1...1. The five biquad coefficients can be uploaded in one atomic operation into on-chip coefficient RAM. There are also a few prescale, postscale and mixing coefficients, in the same numeric format and range (a negative coefficient inverts phase). These coefficients are made available as SNDRV_CTL_ELEM_TYPE_BYTES mixer controls. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-22ASoC: add STA32X codec driverJohannes Stezenbach
Signed-off-by: Johannes Stezenbach <js@sig21.net> [zonque@gmail.com: transform to new ASoC structure] Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>