summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sta350.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: sta350: replace codec to componentKuninori Morimoto2018-02-121-59/+58
| | | | | | | | | | | | | | Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: codec duplicated callback function goes to component on sta350Kuninori Morimoto2016-08-081-6/+8
| | | | | | | | | | 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>
* 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>
*---. Merge remote-tracking branches 'asoc/topic/sta350', 'asoc/topic/tas2552', ↵Mark Brown2015-06-051-2/+2
|\ \ \ | | | | | | | | | | | | 'asoc/topic/tas3a227e' and 'asoc/topic/tas571x' into asoc-next
| * | | ASoC: sta350: Use devm_gpiod_get_optional at appropriate placeAxel Lin2015-05-121-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_gpiod_get_optional is equivalent to devm_gpiod_get(), except that when no GPIO was assigned to the requested function it will return NULL. This is convenient for drivers that need to handle optional GPIOs. I just checked the code in commit 34d7c3905adb9a9 ("ASoC: improve usage of gpiod API") and found that it should use devm_gpiod_get_optional rather than devm_gpiod_get here. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | / ASoC: sta350: Replace direct snd_soc_codec dapm field accessLars-Peter Clausen2015-05-181-1/+1
| |/ |/| | | | | | | | | | | | | | | 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(). 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: Route all bias level updates through the coreLars-Peter Clausen2015-04-271-1/+1
|/ | | | | | | | | | | Use the new snd_soc_codec_force_bias_level() helper function to invoke the bias_level callback of a driver instead of calling the callback by hand. Currently the effect of this is the same, but having all bias level updates go through a central place will allow us to move more of the bias level management into the DAPM core. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: improve usage of gpiod APIUwe Kleine-König2015-02-241-21/+9
| | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Simplify drivers accordingly. Also there is an *_optional variant that serves well here. The sematics is slightly changed here by using it as error checking is more strict now: If GPIOLIB is not enabled an error is returned instead of just ignoring the gpio. On one hand this is bad for devices that don't "have" the respective gpio as the driver is failing now. On the other hand there is no means to assert that this gpio is really not needed or if only the driver to control it is not available. The latter is a real reason to fail and so it's defensive to fail here, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sta350: Cleanup manual bias level transitionsLars-Peter Clausen2014-10-221-20/+1
| | | | | | | | | | | | | 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> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: sta350: add support for bits in miscellaneous registersDaniel Mack2014-05-051-0/+45
| | | | | | | | Add support for RPDNEN, NSHHPEN, BRIDGOFF, CPWMEN and PNDLSL, and add DT bindings to access them. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sta350: Use snd_soc_kcontrol_codec()Lars-Peter Clausen2014-04-211-2/+2
| | | | | | | | In preparation for componentisation of the kcontrol helpers use snd_soc_kcontrol_codec() instead of snd_kcontrol_chip(). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: sta350: Add codec driverSven Brandau2014-04-141-0/+1266
The TI STA350 is an integrated 2.1-channel power amplifier that is controllable over I2C. This patch adds an ASoC driver for it. At a glance, this chip is very similar to the STA320 for which a driver already exists. In details, however, the register maps contain subtle differences which made a whole new driver easier to write and maintain. [daniel@zonque.org: cleanups, DT property rework, rebased on asoc-next] Signed-off-by: Sven Brandau <brandau@gmx.de> Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>