diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-10-06 08:04:30 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-10-06 08:04:30 (GMT) |
commit | 97999e28c74c5908445735ac282e8b20deb67b81 (patch) | |
tree | 0ede4ec09fd0133400df68a1f1509dea726dea36 /sound/pci/hda/hda_intel.c | |
parent | 06503670afc4372186d691ab2b9298a5e86fa29f (diff) | |
parent | 798cb7e897210dbf827f69a302c0967e0380ebac (diff) | |
download | linux-fsl-qoriq-97999e28c74c5908445735ac282e8b20deb67b81.tar.xz |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index fbf5cfc..8a5dc57 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2032,7 +2032,8 @@ static unsigned int azx_via_get_position(struct azx *chip, } static unsigned int azx_get_position(struct azx *chip, - struct azx_dev *azx_dev) + struct azx_dev *azx_dev, + bool with_check) { unsigned int pos; int stream = azx_dev->substream->stream; @@ -2048,7 +2049,7 @@ 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 (with_check && chip->position_fix[stream] == POS_FIX_AUTO) { if (!pos || pos == (u32)-1) { printk(KERN_WARNING "hda-intel: Invalid position buffer, " @@ -2072,7 +2073,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream) struct azx *chip = apcm->chip; struct azx_dev *azx_dev = get_azx_dev(substream); return bytes_to_frames(substream->runtime, - azx_get_position(chip, azx_dev)); + azx_get_position(chip, azx_dev, false)); } /* @@ -2095,7 +2096,7 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev) return -1; /* bogus (too early) interrupt */ stream = azx_dev->substream->stream; - pos = azx_get_position(chip, azx_dev); + pos = azx_get_position(chip, azx_dev, true); if (WARN_ONCE(!azx_dev->period_bytes, "hda-intel: zero azx_dev->period_bytes")) |