diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-13 14:19:21 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-13 14:19:21 +0000 |
commit | 2620954d64f6f067b785faf03738b637f3473ca7 (patch) | |
tree | 00c5281e4acabc56ac1cd215a63963d956b09879 /sound/soc/soc-core.c | |
parent | 8b3272bffe58682de568e36f9db52495f9b9d0f2 (diff) | |
parent | a32c17b87c17f5e2e68edcf4d163ee42f9490652 (diff) | |
download | linux-2620954d64f6f067b785faf03738b637f3473ca7.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/io' into asoc-next
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 359c2849b364..b322cf294d06 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1137,6 +1137,16 @@ static int soc_probe_codec(struct snd_soc_card *card, codec->dapm.idle_bias_off = driver->idle_bias_off; + if (!codec->write && dev_get_regmap(codec->dev, NULL)) { + /* Set the default I/O up try regmap */ + ret = snd_soc_codec_set_cache_io(codec, NULL); + if (ret < 0) { + dev_err(codec->dev, + "Failed to set cache I/O: %d\n", ret); + goto err_probe; + } + } + if (driver->probe) { ret = driver->probe(codec); if (ret < 0) { @@ -1150,10 +1160,6 @@ static int soc_probe_codec(struct snd_soc_card *card, codec->name); } - /* If the driver didn't set I/O up try regmap */ - if (!codec->write && dev_get_regmap(codec->dev, NULL)) - 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); |