Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 257652
b: refs/heads/master
c: a810364
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jun 7, 2011
1 parent c25b64d commit 50e7148
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: 384a48d71520ca569a63f1e61e51a538bedb16df
refs/heads/master: a810364a0424c297242c6c66071a42f7675a5568
21 changes: 11 additions & 10 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,17 @@ static unsigned int azx_get_position(struct azx *chip,
default:
/* use the position buffer */
pos = le32_to_cpu(*azx_dev->posbuf);
if (chip->position_fix[stream] == POS_FIX_AUTO) {
if (!pos || pos == (u32)-1) {
printk(KERN_WARNING
"hda-intel: Invalid position buffer, "
"using LPIB read method instead.\n");
chip->position_fix[stream] = POS_FIX_LPIB;
pos = azx_sd_readl(azx_dev, SD_LPIB);
} else
chip->position_fix[stream] = POS_FIX_POSBUF;
}
break;
}

if (pos >= azx_dev->bufsize)
Expand Down Expand Up @@ -1967,16 +1978,6 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)

stream = azx_dev->substream->stream;
pos = azx_get_position(chip, azx_dev);
if (chip->position_fix[stream] == POS_FIX_AUTO) {
if (!pos) {
printk(KERN_WARNING
"hda-intel: Invalid position buffer, "
"using LPIB read method instead.\n");
chip->position_fix[stream] = POS_FIX_LPIB;
pos = azx_get_position(chip, azx_dev);
} else
chip->position_fix[stream] = POS_FIX_POSBUF;
}

if (WARN_ONCE(!azx_dev->period_bytes,
"hda-intel: zero azx_dev->period_bytes"))
Expand Down

0 comments on commit 50e7148

Please sign in to comment.