diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-06-22 14:04:02 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-03 21:11:00 +0200 |
commit | 38cbf9598feba97de9f9b43efa9153fd7c1a2ec9 (patch) | |
tree | 8d5040b8824becf1684a24348d14c96aba9e33f9 /sound/soc/soc-core.c | |
parent | ASoC: wm8962: Log AIF configuration requested by hw_params() (diff) | |
download | linux-38cbf9598feba97de9f9b43efa9153fd7c1a2ec9.tar.xz linux-38cbf9598feba97de9f9b43efa9153fd7c1a2ec9.zip |
ASoC: core: Try to use regmap if the driver doesn't set up any I/O
Since most new drivers are expected to use regmap and since frequently the
only thing we need to do in the CODEC probe function is configure the I/O
try to initialise the register I/O using regmap if the driver hasn't done
so after probe().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index fe16135250f8..64b464ca3bc5 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1095,6 +1095,10 @@ static int soc_probe_codec(struct snd_soc_card *card, } } + /* If the driver didn't set I/O up try regmap */ + if (!codec->control_data) + snd_soc_codec_set_cache_io(codec, 0, 0, SND_SOC_REGMAP); + if (driver->controls) snd_soc_add_codec_controls(codec, driver->controls, driver->num_controls); |