[PATCH 5/6] ASoC: ad1980: verify cache at probe time

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

 



Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
 sound/soc/codecs/ad1980.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index 864e65d..a3e78d4 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -288,6 +288,19 @@ static int ad1980_soc_probe(struct platform_device *pdev)
 	snd_soc_add_controls(codec, ad1980_snd_ac97_controls,
 				ARRAY_SIZE(ad1980_snd_ac97_controls));
 
+#if AC97_USE_CACHE
+	pr_debug("%s: cache verify\n", __func__);
+	for (vendor_id2 = 0; vendor_id2 < 0x80; vendor_id2 += 2) {
+
+		u16 *cache = codec->reg_cache;
+		ret = soc_ac97_ops.read(codec->ac97, vendor_id2);
+		if (ret != cache[vendor_id2 >> 1])
+			pr_debug("%s: %02x -> %04x\n",
+					__func__, vendor_id2, ret);
+	}
+	pr_debug("%s: /cache verify\n", __func__);
+#endif
+
 	return 0;
 
 reset_err:
-- 
1.7.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux