summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorBanajit Goswami <bgoswami@codeaurora.org>2015-04-13 18:55:02 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:10:56 -0700
commitc336ae90fae67a284e7907eff63f3a51ebd7fb7d (patch)
tree4ac5bb0724cb3292a3f98a4069620852fef915bc /sound
parenta73f468d5e8e308f6a31da28fefdf4da8469cc8a (diff)
ASoC: core: Remove sound card state check from read/write
Having sound card offline condition checks inside register read/write functions will also avoid Asoc cache writes. However, it is needed to update the Asoc cache whenever user-space sends disable sequence while sound card is in offline state. Remove the offline check condition from ASoC read/writes and let the codec driver take care of not sending bus read/writes if sound card is in offline state. Change-Id: I960b85a277a28dd05eb919c1c6abf7aa32a45265 Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-io.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index a90a1630ab1c..9b3939049cef 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -195,14 +195,9 @@ EXPORT_SYMBOL_GPL(snd_soc_component_test_bits);
unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg)
{
- struct snd_card *snd_card = codec->component.card->snd_card;
unsigned int val;
int ret;
- if (unlikely(!snd_card_is_online_state(snd_card))) {
- dev_err(codec->dev, "read 0x%02x while offline\n", reg);
- return -ENODEV;
- }
ret = snd_soc_component_read(&codec->component, reg, &val);
if (ret < 0)
return -1;
@@ -214,12 +209,6 @@ EXPORT_SYMBOL_GPL(snd_soc_read);
int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int val)
{
- struct snd_card *snd_card = codec->component.card->snd_card;
-
- if (unlikely(!snd_card_is_online_state(snd_card))) {
- dev_err(codec->dev, "write 0x%02x while offline\n", reg);
- return -ENODEV;
- }
return snd_soc_component_write(&codec->component, reg, val);
}
EXPORT_SYMBOL_GPL(snd_soc_write);