diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-10-16 10:52:26 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-10-16 12:01:36 -0400 |
commit | 1f04661fde9deda4a2cd5845258715a22d8af197 (patch) | |
tree | e3bcc926854ac32e60f5de4461bab5272bf7a80b /sound/pci | |
parent | 128960a9ad67e2d119738f5211956e0304517551 (diff) |
ALSA: hda - Stop LPIB delay counting on broken hardware
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
Cc: <stable@vger.kernel.org> [v3.6]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index ecf277506ad1..72b085ae7d46 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -2158,9 +2158,12 @@ static unsigned int azx_get_position(struct azx *chip, | |||
2158 | if (delay < 0) | 2158 | if (delay < 0) |
2159 | delay += azx_dev->bufsize; | 2159 | delay += azx_dev->bufsize; |
2160 | if (delay >= azx_dev->period_bytes) { | 2160 | if (delay >= azx_dev->period_bytes) { |
2161 | snd_printdd("delay %d > period_bytes %d\n", | 2161 | snd_printk(KERN_WARNING SFX |
2162 | delay, azx_dev->period_bytes); | 2162 | "Unstable LPIB (%d >= %d); " |
2163 | delay = 0; /* something is wrong */ | 2163 | "disabling LPIB delay counting\n", |
2164 | delay, azx_dev->period_bytes); | ||
2165 | delay = 0; | ||
2166 | chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY; | ||
2164 | } | 2167 | } |
2165 | azx_dev->substream->runtime->delay = | 2168 | azx_dev->substream->runtime->delay = |
2166 | bytes_to_frames(azx_dev->substream->runtime, delay); | 2169 | bytes_to_frames(azx_dev->substream->runtime, delay); |