Commit Graph

9 Commits

Author SHA1 Message Date
Lars-Peter Clausen 890754a878 ASoC: Cleanup duplicated const
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>
2011-11-23 13:11:50 +00:00
Lars-Peter Clausen 85e7652d89 ASoC: Constify snd_soc_dai_ops structs
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>
2011-11-23 10:40:46 +00:00
Mark Brown 404417e6b4 ASoC: Staticise and constify cs42l73_reg_defaults
It's not exported and doesn't need to change.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 09:52:56 +00:00
Axel Lin dbb1f51637 ASoC: cs42l73: Make inv and format to be unsigned int
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>
2011-11-22 13:02:17 +00:00
Axel Lin 717b8fae38 ASoC: cs42l73: Unify the way to define bits of register
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>
2011-11-22 13:02:09 +00:00
Axel Lin afe713089a ASoC: Remove redundant regcache_sync call in cs42l73_resume
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>
2011-11-21 17:05:53 +00:00
Axel Lin 8421f620da ASoC: cs42l73: Show correct revision id
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-21 17:05:52 +00:00
Axel Lin ea07561581 ASoC: cs42l73: Return proper error code if device id mismatch
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>
2011-11-21 17:05:52 +00:00
Brian Austin 6d10c91493 ASoC: Add support for CS42L73 codec
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>
2011-11-17 16:46:40 +00:00