diff options
author | Viorel Suman <viorel.suman@nxp.com> | 2019-07-12 12:04:03 +0300 |
---|---|---|
committer | Viorel Suman <viorel.suman@nxp.com> | 2019-07-12 13:18:47 +0300 |
commit | 300f25da57d086642aa6d93ab57aaf4b977bc2ea (patch) | |
tree | 7388f3dfa4f4a3a7590e6e808cb7196f85b78194 /sound | |
parent | 7f17331be8f159457b9675a3b723cb9fa733bb39 (diff) |
MLK-21775-1: ASoC: fsl_micfil: improve error logging messages
Improve hwvad enable/disable related error logging messages.
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
(cherry picked from commit fa548658c50a19bf3417763d36a0022598c97c0b)
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/fsl_micfil.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index ac3bcd11ce7f..5cfbd5162f88 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -1928,7 +1928,7 @@ static irqreturn_t voice_detected_fn(int irq, void *devid) /* disable hwvad */ ret = disable_hwvad(dev, true); if (ret) - dev_err(dev, "Failed to disable HWVAD module\n"); + dev_err(dev, "Failed to disable HWVAD module: %d\n", ret); /* notify userspace that voice was detected */ kobject_uevent_env(&dev->kobj, KOBJ_CHANGE, envp); @@ -2217,14 +2217,16 @@ static ssize_t micfil_hwvad_handler(struct kobject *kobj, if (vad_channel <= 7) { micfil->vad_channel = vad_channel; ret = enable_hwvad(dev, true); - if (ret) - dev_err(dev, "Failed to enable hwvad"); } else { micfil->vad_channel = -1; ret = disable_hwvad(dev, true); } - if (ret) + + if (ret) { + dev_err(dev, "Failed to %s hwvad: %d\n", + vad_channel <= 7 ? "enable" : "disable", ret); return ret; + } return count; } |