aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-10-16 16:52:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-21 09:32:43 -0700
commit5831e4dc072b50a8dc77e69d9247588f8559116c (patch)
tree4e0e0c92ca2502a278a24d79508956553ebf636c /sound
parentb393c7d4d577fa9f55fa7ba84d51bd30352b80da (diff)
ALSA: hda - Stop LPIB delay counting on broken hardware
commit 1f04661fde9deda4a2cd5845258715a22d8af197 upstream. If LPIB reports a pretty bad value, we can't trust such hardware for calculating the PCM delay. Automatically turn off the delay counting when such a problem is encountered. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48911 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_intel.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 3cbfbcb07ff0..a5dc7464e3b4 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2136,9 +2136,12 @@ static unsigned int azx_get_position(struct azx *chip,
if (delay < 0)
delay += azx_dev->bufsize;
if (delay >= azx_dev->period_bytes) {
- snd_printdd("delay %d > period_bytes %d\n",
- delay, azx_dev->period_bytes);
- delay = 0; /* something is wrong */
+ snd_printk(KERN_WARNING SFX
+ "Unstable LPIB (%d >= %d); "
+ "disabling LPIB delay counting\n",
+ delay, azx_dev->period_bytes);
+ delay = 0;
+ chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY;
}
azx_dev->substream->runtime->delay =
bytes_to_frames(azx_dev->substream->runtime, delay);