diff options
| -rw-r--r-- | sound/pci/hda/hda_intel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index b6e6314d0069..df6d9820efad 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
| @@ -588,15 +588,17 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) | |||
| 588 | unsigned int addr = azx_command_addr(val); | 588 | unsigned int addr = azx_command_addr(val); |
| 589 | unsigned int wp; | 589 | unsigned int wp; |
| 590 | 590 | ||
| 591 | spin_lock_irq(&chip->reg_lock); | ||
| 592 | |||
| 591 | /* add command to corb */ | 593 | /* add command to corb */ |
| 592 | wp = azx_readb(chip, CORBWP); | 594 | wp = azx_readb(chip, CORBWP); |
| 593 | wp++; | 595 | wp++; |
| 594 | wp %= ICH6_MAX_CORB_ENTRIES; | 596 | wp %= ICH6_MAX_CORB_ENTRIES; |
| 595 | 597 | ||
| 596 | spin_lock_irq(&chip->reg_lock); | ||
| 597 | chip->rirb.cmds[addr]++; | 598 | chip->rirb.cmds[addr]++; |
| 598 | chip->corb.buf[wp] = cpu_to_le32(val); | 599 | chip->corb.buf[wp] = cpu_to_le32(val); |
| 599 | azx_writel(chip, CORBWP, wp); | 600 | azx_writel(chip, CORBWP, wp); |
| 601 | |||
| 600 | spin_unlock_irq(&chip->reg_lock); | 602 | spin_unlock_irq(&chip->reg_lock); |
| 601 | 603 | ||
| 602 | return 0; | 604 | return 0; |
