Commit graph

12 commits

Author SHA1 Message Date
Lars-Peter Clausen 46a35b0d4d ASoC: cs42l56: Replace direct snd_soc_codec dapm field access
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>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-01 16:42:03 +01:00
Lars-Peter Clausen f4bf8d770b ASoC: Move bias level update to the core
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>
2015-04-27 21:34:45 +01:00
Krzysztof Kozlowski cf0efa1c71 ASoC: cs42l56: Constify struct regmap_config and snd_soc_codec_driver
The regmap_config struct may be const because it is not modified by the
driver and regmap_init() accepts pointer to const. Make struct
snd_soc_codec_driver const as well (snd_soc_register_codec() accepts
pointer to const).

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-05 21:17:08 +00:00
Lars-Peter Clausen 2a4bc751fc ASoC: cs42l56: Cleanup manual bias level transitions
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.

The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe()
can also be removed as the core will automatically do this after the CODEC
has been probed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-09 21:08:38 +01:00
Axel Lin a4f87cea72 ASoC: cs42l56: Remove unneeded regulator_bulk_free call in cs42l56_remove
The regulator_bulk_free() call is not required because current code is using
devm_regulator_bulk_get().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:07:15 +01:00
Brian Austin c2b49ae678 ASoC: cs42l56: use true/false returns for bool functions
Return true or false instead of 1 and 0

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-28 19:05:10 +01:00
Mark Brown 01954a7b67 Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8', 'asoc/topic/cx20442' and 'asoc/topic/davinci' into asoc-next 2014-08-04 16:31:33 +01:00
Brian Austin a046558719 ASoC: Fix SOC_DOUBLE_R_SX_TLV volume mixer arguments
Remove unnecessary bit shifts.
Correct min value to match datasheet.
Num steps = number of steps between min and max.

Reported-by: Ryan Harvey <ryan.harvey@cirrus.com>
Signed-off-by: Ryan Harvey <ryan.harvey@cirrus.com>
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-17 19:59:20 +01:00
Brian Austin 95b47f8de7 ASoC: cs42l56: Fix stereo channel register assignment for Headphone and LineOut volume mixers
Stereo Headphone and LineOut volume mixers are now attached to HPA+HPB, LOA+LOB.

Reported-by: Ryan Harvey <ryan.harvey@cirrus.com>
Signed-off-by: Ryan Harvey <ryan.harvey@cirrus.com>
Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-17 19:57:50 +01:00
Brian Austin c4324bfa54 ASoC: cs42l56: Move ADC/PCM Swap to DAPM
The Swap controls for ADC/PCM paths should be in the DAPM domain.

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-08 18:20:53 +02:00
Axel Lin 4641c771b6 ASoC: cs42l56: Fix new value argument in snd_soc_update_bits calls
The new value argument needs proper shift to match the mask bit fields.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01 11:49:25 +01:00
Brian Austin 272b5edd3b ASoC: Add support for CS42L56 CODEC
This patch adds support for the Cirrus Logic Low Power Stereo I2C CODEC

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05 18:20:22 -07:00