summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorTakashi Iwai2014-03-13 19:03:48 +0100
committerTakashi Iwai2014-03-13 19:03:48 +0100
commitc320106230c78b37c4bdbe6eafc636169e97bad9 (patch)
treeefec8d37b0917ecdc2b5268ea419341a20f11803 /sound/soc/soc-core.c
parentMerge tag 'asoc-v3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/broon... (diff)
parentMerge remote-tracking branch 'asoc/topic/tlv320aic31xx' into asoc-next (diff)
downloadkernel-qcow2-linux-c320106230c78b37c4bdbe6eafc636169e97bad9.tar.gz
kernel-qcow2-linux-c320106230c78b37c4bdbe6eafc636169e97bad9.tar.xz
kernel-qcow2-linux-c320106230c78b37c4bdbe6eafc636169e97bad9.zip
Merge tag 'asoc-v3.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.15 This is mostly a few additional fixes from Lars-Peter, a new driver and cleaning up a git failure with merging the Intel branch (combined with an xargs failure to pay attention to error codes). The history lists a bunch of additional commits for the branch but the content of those commits is actually present already but not recorded in history due to git failing. Unfortunately xargs is used in the merge script and it doesn't do a good job of noticing errors from the commands it invokes.
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 6b2a02e88ce5..b65ca10ca0d4 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);