summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/stac9766.c
diff options
context:
space:
mode:
authorManuel Lauss <manuel.lauss@googlemail.com>2012-07-31 14:42:27 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-07-31 17:42:07 +0200
commitd0e3cce9144eb8bff0852531aadbe221addaa2d5 (patch)
tree759ac5d2dfae9df92bca4e09ea678e0d11b40765 /sound/soc/codecs/stac9766.c
parentASoC: sgtl5000: enable VAG_POWER for LINE_IN (diff)
downloadlinux-d0e3cce9144eb8bff0852531aadbe221addaa2d5.tar.xz
linux-d0e3cce9144eb8bff0852531aadbe221addaa2d5.zip
ASoC: AC97 doesn't use regmap by default
Since commit 38cbf9598feba97de9f9b43efa9153fd7c1a2ec9 ("ASoC: core: Try to use regmap if the driver doesn't set up any I/O") any ASoC codec which doesn't set codec::control_data is assumed to use regmap. That doesn't work with AC97 so this workaround sets the codec::control_data member to a random value to restore proper behaviour. Tested with WM9712. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/stac9766.c')
-rw-r--r--sound/soc/codecs/stac9766.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 982e437799a8..33c0f3d39c87 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -340,6 +340,7 @@ static int stac9766_codec_probe(struct snd_soc_codec *codec)
printk(KERN_INFO "STAC9766 SoC Audio Codec %s\n", STAC9766_VERSION);
+ codec->control_data = codec; /* we don't use regmap! */
ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0);
if (ret < 0)
goto codec_err;