[tip:core/locking] ASoC: Convert WM8580 hw_params to use snd_soc_update_bits()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  e231cab0a4b5844ae13a9584433ca3b9b204629e
Gitweb:     http://git.kernel.org/tip/e231cab0a4b5844ae13a9584433ca3b9b204629e
Author:     Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
AuthorDate: Fri, 13 Aug 2010 17:57:28 +0100
Committer:  Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
CommitDate: Sun, 15 Aug 2010 14:51:21 +0100

ASoC: Convert WM8580 hw_params to use snd_soc_update_bits()

All the cool kids are using snd_soc_update_bits() these days.

Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Acked-by: Liam Girdwood <lrg@xxxxxxxxxxxxxxx>
---
 sound/soc/codecs/wm8580.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index b1a80e5..4f41419 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -485,9 +485,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
 {
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
-	u16 paifb = snd_soc_read(codec, WM8580_PAIF3 + dai->driver->id);
+	u16 paifb = 0;
 
-	paifb &= ~WM8580_AIF_LENGTH_MASK;
 	/* bit size */
 	switch (params_format(params)) {
 	case SNDRV_PCM_FORMAT_S16_LE:
@@ -505,7 +504,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 	}
 
-	snd_soc_write(codec, WM8580_PAIF3 + dai->driver->id, paifb);
+	snd_soc_update_bits(codec, WM8580_PAIF3 + dai->driver->id,
+			    WM8580_AIF_LENGTH_MASK, paifb);
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux