[alsa-devel] [PATCH RFC 0/1] ASoC: WL1273 FM: Change error handling.
Hi.
This patch changes the error handling in the FM radio codec so that it's always permissible to set the audio routing to the previous value/
B.R.
Matti J. Aaltonen (1): ASoC: WL1273 FM Radio: Eliminate unnecessary error return value.
sound/soc/codecs/wl1273.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
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 --- sound/soc/codecs/wl1273.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index a2323be..1bb0c83 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -50,6 +50,9 @@ static int wl1273_set_audio_route(struct snd_kcontrol *kcontrol, 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;
On Fri, Sep 10, 2010 at 10:41:30AM +0300, Matti J. Aaltonen wrote:
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
On Fri, 2010-09-10 at 12:29 +0100, Mark Brown wrote:
On Fri, Sep 10, 2010 at 10:41:30AM +0300, Matti J. Aaltonen wrote:
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
Applied.
Thanks
Liam
On Fri, Sep 10, 2010 at 10:41:29AM +0300, Matti J. Aaltonen wrote:
This patch changes the error handling in the FM radio codec so that it's always permissible to set the audio routing to the previous value/
If you're just sending a single patch please don't send separate covering mails - if there's useful additional information in them it should probably go in the changelog for the patch so it gets recorded.
participants (3)
-
Liam Girdwood
-
Mark Brown
-
Matti J. Aaltonen