diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-03-13 19:03:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-03-13 19:03:48 +0100 |
commit | c320106230c78b37c4bdbe6eafc636169e97bad9 (patch) | |
tree | efec8d37b0917ecdc2b5268ea419341a20f11803 /sound/soc/soc-core.c | |
parent | 5fdb83f190ee2218d113a46b190b70aa1c979325 (diff) | |
parent | 56fe48976db38ed3984e0e68b71e503e8179dd89 (diff) |
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.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6b2a02e88ce..b65ca10ca0d 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); |