diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-23 07:34:12 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-23 07:34:12 (GMT) |
commit | 2cf215bfaa01384374291a118c8152ab18a55a63 (patch) | |
tree | f0020c78288344f709596ede3a7e4195cfffdff7 /sound/pci/hda/hda_intel.c | |
parent | e152f18027552eb34006b35347e72bc805783027 (diff) | |
parent | 657e1b931d42882cb0a59b599247bef696c22406 (diff) | |
download | linux-fsl-qoriq-2cf215bfaa01384374291a118c8152ab18a55a63.tar.xz |
Merge branch 'topic/hda-gen-parser' into for-next
This is a merge of really big changes: the generic parser is heavily
enhanced for handling all cases, based on the former Realtek codec
driver code. And all codec drivers except for a few ones (CA0132,
HDMI and modem) have been converted to use the new generic driver.
Conflicts:
sound/pci/hda/patch_realtek.c
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 78e954a..a85b3aa 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -797,7 +797,7 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) { struct azx *chip = bus->private_data; unsigned int addr = azx_command_addr(val); - unsigned int wp; + unsigned int wp, rp; spin_lock_irq(&chip->reg_lock); @@ -806,11 +806,18 @@ static int azx_corb_send_cmd(struct hda_bus *bus, u32 val) if (wp == 0xffff) { /* something wrong, controller likely turned to D3 */ spin_unlock_irq(&chip->reg_lock); - return -1; + return -EIO; } wp++; wp %= ICH6_MAX_CORB_ENTRIES; + rp = azx_readw(chip, CORBRP); + if (wp == rp) { + /* oops, it's full */ + spin_unlock_irq(&chip->reg_lock); + return -EAGAIN; + } + chip->rirb.cmds[addr]++; chip->corb.buf[wp] = cpu_to_le32(val); azx_writel(chip, CORBWP, wp); |