[alsa-devel] [PATCH 1/3] ASoC: alc5623: Convert codec->hw_read to snd_soc_read
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com --- sound/soc/codecs/alc5623.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c index 557b3af..984b14b 100644 --- a/sound/soc/codecs/alc5623.c +++ b/sound/soc/codecs/alc5623.c @@ -53,8 +53,10 @@ static void alc5623_fill_cache(struct snd_soc_codec *codec) u16 *cache = codec->reg_cache;
/* not really efficient ... */ + codec->cache_bypass = 1; for (i = 0 ; i < codec->driver->reg_cache_size ; i += step) - cache[i] = codec->hw_read(codec, i); + cache[i] = snd_soc_read(codec, i); + codec->cache_bypass = 0; }
static inline int alc5623_reset(struct snd_soc_codec *codec)
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com --- sound/soc/codecs/tlv320aic3x.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c index be55b7f..7a49390 100644 --- a/sound/soc/codecs/tlv320aic3x.c +++ b/sound/soc/codecs/tlv320aic3x.c @@ -137,7 +137,10 @@ static int aic3x_read(struct snd_soc_codec *codec, unsigned int reg, if (reg >= AIC3X_CACHEREGNUM) return -1;
- *value = codec->hw_read(codec, reg); + codec->cache_bypass = 1; + *value = snd_soc_read(codec, reg); + codec->cache_bypass = 0; + cache[reg] = *value;
return 0;
On Fri, Oct 14, 2011 at 09:37:00AM +0800, Axel Lin wrote:
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com
Applied, thanks. You really should CC the TI guys on this driver, especially Jarkko, as they have been doing most of the work on it. Vladimir hasn't been very active since the initial contribution.
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com --- sound/soc/codecs/wm8961.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index cdee810..9568c8a 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -974,7 +974,9 @@ static int wm8961_probe(struct snd_soc_codec *codec) }
/* This isn't volatile - readback doesn't correspond to write */ - reg = codec->hw_read(codec, WM8961_RIGHT_INPUT_VOLUME); + codec->cache_bypass = 1; + reg = snd_soc_read(codec, WM8961_RIGHT_INPUT_VOLUME); + codec->cache_bypass = 0; dev_info(codec->dev, "WM8961 family %d revision %c\n", (reg & WM8961_DEVICE_ID_MASK) >> WM8961_DEVICE_ID_SHIFT, ((reg & WM8961_CHIP_REV_MASK) >> WM8961_CHIP_REV_SHIFT)
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com --- sound/soc/codecs/wm8961.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index cdee810..9568c8a 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c @@ -974,7 +974,9 @@ static int wm8961_probe(struct snd_soc_codec *codec) }
/* This isn't volatile - readback doesn't correspond to write */ - reg = codec->hw_read(codec, WM8961_RIGHT_INPUT_VOLUME); + codec->cache_bypass = 1; + reg = snd_soc_read(codec, WM8961_RIGHT_INPUT_VOLUME); + codec->cache_bypass = 0; dev_info(codec->dev, "WM8961 family %d revision %c\n", (reg & WM8961_DEVICE_ID_MASK) >> WM8961_DEVICE_ID_SHIFT, ((reg & WM8961_CHIP_REV_MASK) >> WM8961_CHIP_REV_SHIFT)
On Fri, Oct 14, 2011 at 09:39:14AM +0800, Axel Lin wrote:
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com
Applied, thanks.
2011/10/14 Axel Lin axel.lin@gmail.com:
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com
sound/soc/codecs/wm8961.c | 4 +++-
Please ignore this one. the subject line is wrong. The correct subject line is " [PATCH 3/3] ASoC: wm8961: Convert codec->hw_read to snd_soc_read"
Axel
On Fri, Oct 14, 2011 at 09:35:20AM +0800, Axel Lin wrote:
codec->hw_read is broken now, let's covert to snd_soc_read.
Signed-off-by: Axel Lin axel.lin@gmail.com
Applied, thanks.
participants (2)
-
Axel Lin
-
Mark Brown