aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-05 07:50:12 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-22 06:08:55 -0500
commit2bbb5d667958f20ef8e7f7b37f9acced6dac0b98 (patch)
treea1079b6fd98dfcd3780b75ba7715ec10b969b718 /sound/soc
parent6d3c26bcb7a129a11a54d78644e264ec872547e1 (diff)
ASoC: Trace Wolfson jack detection IRQs
Add jack detection interrupt trace to Wolfson CODEC drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8350.c5
-rw-r--r--sound/soc/codecs/wm8903.c4
-rw-r--r--sound/soc/codecs/wm8962.c3
-rw-r--r--sound/soc/codecs/wm8994.c5
4 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 3e0362e62f8f..82d877df3fb0 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -26,6 +26,7 @@
26#include <sound/soc.h> 26#include <sound/soc.h>
27#include <sound/initval.h> 27#include <sound/initval.h>
28#include <sound/tlv.h> 28#include <sound/tlv.h>
29#include <trace/events/asoc.h>
29 30
30#include "wm8350.h" 31#include "wm8350.h"
31 32
@@ -1378,10 +1379,12 @@ static irqreturn_t wm8350_hp_jack_handler(int irq, void *data)
1378 1379
1379 switch (irq - wm8350->irq_base) { 1380 switch (irq - wm8350->irq_base) {
1380 case WM8350_IRQ_CODEC_JCK_DET_L: 1381 case WM8350_IRQ_CODEC_JCK_DET_L:
1382 trace_snd_soc_jack_irq("WM8350 HPL");
1381 jack = &priv->hpl; 1383 jack = &priv->hpl;
1382 break; 1384 break;
1383 1385
1384 case WM8350_IRQ_CODEC_JCK_DET_R: 1386 case WM8350_IRQ_CODEC_JCK_DET_R:
1387 trace_snd_soc_jack_irq("WM8350 HPR");
1385 jack = &priv->hpr; 1388 jack = &priv->hpr;
1386 break; 1389 break;
1387 1390
@@ -1456,6 +1459,8 @@ static irqreturn_t wm8350_mic_handler(int irq, void *data)
1456 u16 reg; 1459 u16 reg;
1457 int report = 0; 1460 int report = 0;
1458 1461
1462 trace_snd_soc_jack_irq("WM8350 mic");
1463
1459 reg = wm8350_reg_read(wm8350, WM8350_JACK_PIN_STATUS); 1464 reg = wm8350_reg_read(wm8350, WM8350_JACK_PIN_STATUS);
1460 if (reg & WM8350_JACK_MICSCD_LVL) 1465 if (reg & WM8350_JACK_MICSCD_LVL)
1461 report |= priv->mic.short_report; 1466 report |= priv->mic.short_report;
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index d015745a886b..b32699bc1927 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -31,6 +31,7 @@
31#include <sound/soc.h> 31#include <sound/soc.h>
32#include <sound/initval.h> 32#include <sound/initval.h>
33#include <sound/wm8903.h> 33#include <sound/wm8903.h>
34#include <trace/events/asoc.h>
34 35
35#include "wm8903.h" 36#include "wm8903.h"
36 37
@@ -1533,6 +1534,9 @@ static irqreturn_t wm8903_irq(int irq, void *data)
1533 mic_report = wm8903->mic_last_report; 1534 mic_report = wm8903->mic_last_report;
1534 int_pol = snd_soc_read(codec, WM8903_INTERRUPT_POLARITY_1); 1535 int_pol = snd_soc_read(codec, WM8903_INTERRUPT_POLARITY_1);
1535 1536
1537 if (int_val & (WM8903_MICSHRT_EINT | WM8903_MICDET_EINT))
1538 trace_snd_soc_jack_irq(dev_name(codec->dev));
1539
1536 if (int_val & WM8903_MICSHRT_EINT) { 1540 if (int_val & WM8903_MICSHRT_EINT) {
1537 dev_dbg(codec->dev, "Microphone short (pol=%x)\n", int_pol); 1541 dev_dbg(codec->dev, "Microphone short (pol=%x)\n", int_pol);
1538 1542
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index f0c9d2691842..a24f83d604c9 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -32,6 +32,7 @@
32#include <sound/initval.h> 32#include <sound/initval.h>
33#include <sound/tlv.h> 33#include <sound/tlv.h>
34#include <sound/wm8962.h> 34#include <sound/wm8962.h>
35#include <trace/events/asoc.h>
35 36
36#include "wm8962.h" 37#include "wm8962.h"
37 38
@@ -3353,6 +3354,8 @@ static irqreturn_t wm8962_irq(int irq, void *data)
3353 if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) { 3354 if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) {
3354 dev_dbg(codec->dev, "Microphone event detected\n"); 3355 dev_dbg(codec->dev, "Microphone event detected\n");
3355 3356
3357 trace_snd_soc_jack_irq(dev_name(codec->dev));
3358
3356 pm_wakeup_event(codec->dev, 300); 3359 pm_wakeup_event(codec->dev, 300);
3357 3360
3358 schedule_delayed_work(&wm8962->mic_work, 3361 schedule_delayed_work(&wm8962->mic_work,
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index e1a775bd83fa..067a532bed15 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -28,6 +28,7 @@
28#include <sound/soc.h> 28#include <sound/soc.h>
29#include <sound/initval.h> 29#include <sound/initval.h>
30#include <sound/tlv.h> 30#include <sound/tlv.h>
31#include <trace/events/asoc.h>
31 32
32#include <linux/mfd/wm8994/core.h> 33#include <linux/mfd/wm8994/core.h>
33#include <linux/mfd/wm8994/registers.h> 34#include <linux/mfd/wm8994/registers.h>
@@ -2755,6 +2756,8 @@ static irqreturn_t wm8994_mic_irq(int irq, void *data)
2755 int reg; 2756 int reg;
2756 int report; 2757 int report;
2757 2758
2759 trace_snd_soc_jack_irq(dev_name(codec->dev));
2760
2758 reg = snd_soc_read(codec, WM8994_INTERRUPT_RAW_STATUS_2); 2761 reg = snd_soc_read(codec, WM8994_INTERRUPT_RAW_STATUS_2);
2759 if (reg < 0) { 2762 if (reg < 0) {
2760 dev_err(codec->dev, "Failed to read microphone status: %d\n", 2763 dev_err(codec->dev, "Failed to read microphone status: %d\n",
@@ -2901,6 +2904,8 @@ static irqreturn_t wm8958_mic_irq(int irq, void *data)
2901 goto out; 2904 goto out;
2902 } 2905 }
2903 2906
2907 trace_snd_soc_jack_irq(dev_name(codec->dev));
2908
2904 if (wm8994->jack_cb) 2909 if (wm8994->jack_cb)
2905 wm8994->jack_cb(reg, wm8994->jack_cb_data); 2910 wm8994->jack_cb(reg, wm8994->jack_cb_data);
2906 else 2911 else