With this change it's not a error to call wl1273_set_audio_route
when the codec is active if the new routing value is the same
as the current active setting.
Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec);
+ if (wl1273->mode == ucontrol->value.integer.value[0])
+ return 0;
+
/* Do not allow changes while stream is running */
if (codec->active)
return -EPERM;