Skip to content

Commit

Permalink
ASoC: wm8753: Skip noop reconfiguration of DAI mode
Browse files Browse the repository at this point in the history
This patch makes it possible to set DAI mode to its currently applied
value even if codec is active. This is necessary to allow

aplay -t raw -r 44100 -f S16_LE -c 2 < /dev/urandom &
alsactl store -f backup.state
alsactl restore -f backup.state

to work without returning errors. This patch is based on a patch sent
by Klaus Kurzmann <mok@fluxnetz.de>.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
  • Loading branch information
Timo Juhani Lindfors authored and Mark Brown committed Nov 17, 2011
1 parent 0f768a7 commit 2391a0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ static int wm8753_set_dai(struct snd_kcontrol *kcontrol,
struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec);
u16 ioctl;

if (wm8753->dai_func == ucontrol->value.integer.value[0])
return 0;

if (codec->active)
return -EBUSY;

Expand Down

0 comments on commit 2391a0e

Please sign in to comment.