aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index be6982289c0d..e9a2a8795d1b 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1924,7 +1924,8 @@ static unsigned int azx_via_get_position(struct azx *chip,
1924} 1924}
1925 1925
1926static unsigned int azx_get_position(struct azx *chip, 1926static unsigned int azx_get_position(struct azx *chip,
1927 struct azx_dev *azx_dev) 1927 struct azx_dev *azx_dev,
1928 bool with_check)
1928{ 1929{
1929 unsigned int pos; 1930 unsigned int pos;
1930 int stream = azx_dev->substream->stream; 1931 int stream = azx_dev->substream->stream;
@@ -1940,7 +1941,7 @@ static unsigned int azx_get_position(struct azx *chip,
1940 default: 1941 default:
1941 /* use the position buffer */ 1942 /* use the position buffer */
1942 pos = le32_to_cpu(*azx_dev->posbuf); 1943 pos = le32_to_cpu(*azx_dev->posbuf);
1943 if (chip->position_fix[stream] == POS_FIX_AUTO) { 1944 if (with_check && chip->position_fix[stream] == POS_FIX_AUTO) {
1944 if (!pos || pos == (u32)-1) { 1945 if (!pos || pos == (u32)-1) {
1945 printk(KERN_WARNING 1946 printk(KERN_WARNING
1946 "hda-intel: Invalid position buffer, " 1947 "hda-intel: Invalid position buffer, "
@@ -1964,7 +1965,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream)
1964 struct azx *chip = apcm->chip; 1965 struct azx *chip = apcm->chip;
1965 struct azx_dev *azx_dev = get_azx_dev(substream); 1966 struct azx_dev *azx_dev = get_azx_dev(substream);
1966 return bytes_to_frames(substream->runtime, 1967 return bytes_to_frames(substream->runtime,
1967 azx_get_position(chip, azx_dev)); 1968 azx_get_position(chip, azx_dev, false));
1968} 1969}
1969 1970
1970/* 1971/*
@@ -1987,7 +1988,7 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
1987 return -1; /* bogus (too early) interrupt */ 1988 return -1; /* bogus (too early) interrupt */
1988 1989
1989 stream = azx_dev->substream->stream; 1990 stream = azx_dev->substream->stream;
1990 pos = azx_get_position(chip, azx_dev); 1991 pos = azx_get_position(chip, azx_dev, true);
1991 1992
1992 if (WARN_ONCE(!azx_dev->period_bytes, 1993 if (WARN_ONCE(!azx_dev->period_bytes,
1993 "hda-intel: zero azx_dev->period_bytes")) 1994 "hda-intel: zero azx_dev->period_bytes"))