Skip to contentSkip to conversation

ASoC: alc5623: Convert codec->hw_read to snd_soc_read

PATCH Applied Axel Lin 3 participants 9 messages Oct 14, 2011

Subsystems (4)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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.

---
 sound/soc/codecs/alc5623.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/codecs/alc5623.c +3 -1
index 557b3af..984b14b 100644
@@ -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)
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 2/3 ASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read

codec->hw_read is broken now, let's covert to snd_soc_read.

---
 sound/soc/codecs/tlv320aic3x.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
sound/soc/codecs/tlv320aic3x.c +4 -1
index be55b7f..7a49390 100644
@@ -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;
Signature · 1 line
1.7.4.1
Applied
#2 lore raw

Re: [PATCH 2/3] ASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read

Quoted 3 lines · Axel Lin

codec->hw_read is broken now, let's covert to snd_soc_read.

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.

#3 lore raw

Re: [PATCH 2/3] ASoC: tlv320aic3x: Convert codec->hw_read to snd_soc_read

Quoted 11 lines · Mark Brown
Quoted 4 lines · Axel Lin

codec->hw_read is broken now, let's covert to snd_soc_read.

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.

Yes, please, since I have no actual h/w and can't maintain the codec driver anymore. Also the layer specific changes (not h/w related) should be reviewed by ASoC guru and not me.

Regards,
Vladimir

author
#4 lore raw

PATCH 3/3 ASoC: wm8991: Convert codec->hw_read to snd_soc_read

In reply to Axel Lin

codec->hw_read is broken now, let's covert to snd_soc_read.

---
 sound/soc/codecs/wm8961.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8961.c +3 -1
index cdee810..9568c8a 100644
@@ -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)
Signature · 1 line
1.7.4.1
author
#5 lore raw

PATCH 3/3 ASoC: wm8961: Convert codec->hw_read to snd_soc_read

codec->hw_read is broken now, let's covert to snd_soc_read.

---
 sound/soc/codecs/wm8961.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/codecs/wm8961.c +3 -1
index cdee810..9568c8a 100644
@@ -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)
Signature · 1 line
1.7.4.1
Applied
#6 lore raw

Re: [PATCH 3/3] ASoC: wm8961: Convert codec->hw_read to snd_soc_read

Quoted 3 lines · Axel Lin

codec->hw_read is broken now, let's covert to snd_soc_read.

Applied, thanks.

author
#7 lore raw

Re: [PATCH 3/3] ASoC: wm8991: Convert codec->hw_read to snd_soc_read

In reply to Axel Lin

2011/10/14 Axel Lin <[email protected]>:

Quoted 5 lines

codec->hw_read is broken now, let's covert to snd_soc_read.

---
 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