aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-handheld-4.0/h1940/0015-ASoC-uda1380-Avoid-accessing-i2c-bus-when-codec-is-d.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-handheld-4.0/h1940/0015-ASoC-uda1380-Avoid-accessing-i2c-bus-when-codec-is-d.patch')
-rw-r--r--recipes-kernel/linux/linux-handheld-4.0/h1940/0015-ASoC-uda1380-Avoid-accessing-i2c-bus-when-codec-is-d.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-handheld-4.0/h1940/0015-ASoC-uda1380-Avoid-accessing-i2c-bus-when-codec-is-d.patch b/recipes-kernel/linux/linux-handheld-4.0/h1940/0015-ASoC-uda1380-Avoid-accessing-i2c-bus-when-codec-is-d.patch
new file mode 100644
index 0000000..ce9b401
--- /dev/null
+++ b/recipes-kernel/linux/linux-handheld-4.0/h1940/0015-ASoC-uda1380-Avoid-accessing-i2c-bus-when-codec-is-d.patch
@@ -0,0 +1,31 @@
+From 7c045b05856e68edd5a871960a1bebf522aaf635 Mon Sep 17 00:00:00 2001
+From: Vasily Khoruzhick <anarsoul@gmail.com>
+Date: Wed, 22 Apr 2015 22:56:22 +0300
+Subject: [PATCH 15/15] ASoC: uda1380: Avoid accessing i2c bus when codec is
+ disabled
+
+set_dai_fmt_both() callback is called from snd_soc_runtime_set_dai_fmt()
+which is called from snd_soc_register_card(), but at this time codec
+is not powered on yet. Replace direct i2c write with regcache write.
+
+Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
+---
+ sound/soc/codecs/uda1380.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
+index dc7778b..c3c33bd 100644
+--- a/sound/soc/codecs/uda1380.c
++++ b/sound/soc/codecs/uda1380.c
+@@ -437,7 +437,7 @@ static int uda1380_set_dai_fmt_both(struct snd_soc_dai *codec_dai,
+ if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBS_CFS)
+ return -EINVAL;
+
+- uda1380_write(codec, UDA1380_IFACE, iface);
++ uda1380_write_reg_cache(codec, UDA1380_IFACE, iface);
+
+ return 0;
+ }
+--
+2.3.5
+