Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270535
b: refs/heads/master
c: fbf0407
h: refs/heads/master
i:
  270533: 56d59d2
  270531: fdc3ccc
  270527: e556bc5
v: v3
  • Loading branch information
Mark Brown committed Aug 22, 2011
1 parent 9fd6d96 commit c22fc40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6ef58700a8afba46f2aa98a0de12c35e4b1f295
refs/heads/master: fbf04076ef9b704ab27dbd1b2f97569227775bb4
17 changes: 15 additions & 2 deletions trunk/sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ static const struct wm8962_reg_access {
[40] = { 0x00FF, 0x01FF, 0x0000 }, /* R40 - SPKOUTL volume */
[41] = { 0x00FF, 0x01FF, 0x0000 }, /* R41 - SPKOUTR volume */

[47] = { 0x000F, 0x0000, 0x0000 }, /* R47 - Thermal Shutdown Status */
[47] = { 0x000F, 0x0000, 0xFFFF }, /* R47 - Thermal Shutdown Status */
[48] = { 0x7EC7, 0x7E07, 0xFFFF }, /* R48 - Additional Control (4) */
[49] = { 0x00D3, 0x00D7, 0xFFFF }, /* R49 - Class D Control 1 */
[51] = { 0x0047, 0x0047, 0x0000 }, /* R51 - Class D Control 2 */
Expand Down Expand Up @@ -3564,6 +3564,7 @@ static irqreturn_t wm8962_irq(int irq, void *data)
struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
int mask;
int active;
int reg;

mask = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2_MASK);

Expand All @@ -3584,9 +3585,21 @@ static irqreturn_t wm8962_irq(int irq, void *data)
if (active & WM8962_FIFOS_ERR_EINT)
dev_err(codec->dev, "FIFO error\n");

if (active & WM8962_TEMP_SHUT_EINT)
if (active & WM8962_TEMP_SHUT_EINT) {
dev_crit(codec->dev, "Thermal shutdown\n");

reg = snd_soc_read(codec, WM8962_THERMAL_SHUTDOWN_STATUS);

if (reg & WM8962_TEMP_ERR_HP)
dev_crit(codec->dev, "Headphone thermal error\n");
if (reg & WM8962_TEMP_WARN_HP)
dev_crit(codec->dev, "Headphone thermal warning\n");
if (reg & WM8962_TEMP_ERR_SPK)
dev_crit(codec->dev, "Speaker thermal error\n");
if (reg & WM8962_TEMP_WARN_SPK)
dev_crit(codec->dev, "Speaker thermal warning\n");
}

if (active & (WM8962_MICSCD_EINT | WM8962_MICD_EINT)) {
dev_dbg(codec->dev, "Microphone event detected\n");

Expand Down

0 comments on commit c22fc40

Please sign in to comment.