aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-21 13:07:44 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-22 08:56:47 -0400
commitfbf04076ef9b704ab27dbd1b2f97569227775bb4 (patch)
treeda0e8d77aaab2cd7dccc5d82366efba85d948f3f /sound/soc
parente6ef58700a8afba46f2aa98a0de12c35e4b1f295 (diff)
ASoC: Provide more detail on WM8962 thermal shutdown status
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/wm8962.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index add07fff4495..382c8779e605 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -839,7 +839,7 @@ static const struct wm8962_reg_access {
839 [40] = { 0x00FF, 0x01FF, 0x0000 }, /* R40 - SPKOUTL volume */ 839 [40] = { 0x00FF, 0x01FF, 0x0000 }, /* R40 - SPKOUTL volume */
840 [41] = { 0x00FF, 0x01FF, 0x0000 }, /* R41 - SPKOUTR volume */ 840 [41] = { 0x00FF, 0x01FF, 0x0000 }, /* R41 - SPKOUTR volume */
841 841
842 [47] = { 0x000F, 0x0000, 0x0000 }, /* R47 - Thermal Shutdown Status */ 842 [47] = { 0x000F, 0x0000, 0xFFFF }, /* R47 - Thermal Shutdown Status */
843 [48] = { 0x7EC7, 0x7E07, 0xFFFF }, /* R48 - Additional Control (4) */ 843 [48] = { 0x7EC7, 0x7E07, 0xFFFF }, /* R48 - Additional Control (4) */
844 [49] = { 0x00D3, 0x00D7, 0xFFFF }, /* R49 - Class D Control 1 */ 844 [49] = { 0x00D3, 0x00D7, 0xFFFF }, /* R49 - Class D Control 1 */
845 [51] = { 0x0047, 0x0047, 0x0000 }, /* R51 - Class D Control 2 */ 845 [51] = { 0x0047, 0x0047, 0x0000 }, /* R51 - Class D Control 2 */
@@ -3564,6 +3564,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)
3564 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); 3564 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
3565 int mask; 3565 int mask;
3566 int active; 3566 int active;
3567 int reg;
3567 3568
3568 mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2_MASK); 3569 mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2_MASK);
3569 3570
@@ -3584,9 +3585,21 @@ static irqreturn_t wm8962_irq(int irq, void *data)
3584 if (active & WM8962_FIFOS_ERR_EINT) 3585 if (active & WM8962_FIFOS_ERR_EINT)
3585 dev_err(codec->dev, "FIFO error\n"); 3586 dev_err(codec->dev, "FIFO error\n");
3586 3587
3587 if (active & WM8962_TEMP_SHUT_EINT) 3588 if (active & WM8962_TEMP_SHUT_EINT) {
3588 dev_crit(codec->dev, "Thermal shutdown\n"); 3589 dev_crit(codec->dev, "Thermal shutdown\n");
3589 3590
3591 reg = snd_soc_read(codec, WM8962_THERMAL_SHUTDOWN_STATUS);
3592
3593 if (reg & WM8962_TEMP_ERR_HP)
3594 dev_crit(codec->dev, "Headphone thermal error\n");
3595 if (reg & WM8962_TEMP_WARN_HP)
3596 dev_crit(codec->dev, "Headphone thermal warning\n");
3597 if (reg & WM8962_TEMP_ERR_SPK)
3598 dev_crit(codec->dev, "Speaker thermal error\n");
3599 if (reg & WM8962_TEMP_WARN_SPK)
3600 dev_crit(codec->dev, "Speaker thermal warning\n");
3601 }
3602
3590 if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) { 3603 if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) {
3591 dev_dbg(codec->dev, "Microphone event detected\n"); 3604 dev_dbg(codec->dev, "Microphone event detected\n");
3592 3605