Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://github.com/tiwai/sound

* 'for-linus' of git://github.com/tiwai/sound:
ALSA: hda - Fix a regression of the position-buffer check

+5 -4
+5 -4
sound/pci/hda/hda_intel.c
··· 1924 1924 } 1925 1925 1926 1926 static 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 1930 unsigned int pos; 1930 1931 int stream = azx_dev->substream->stream; ··· 1941 1940 default: 1942 1941 /* use the position buffer */ 1943 1942 pos = le32_to_cpu(*azx_dev->posbuf); 1944 - if (chip->position_fix[stream] == POS_FIX_AUTO) { 1943 + if (with_check && chip->position_fix[stream] == POS_FIX_AUTO) { 1945 1944 if (!pos || pos == (u32)-1) { 1946 1945 printk(KERN_WARNING 1947 1946 "hda-intel: Invalid position buffer, " ··· 1965 1964 struct azx *chip = apcm->chip; 1966 1965 struct azx_dev *azx_dev = get_azx_dev(substream); 1967 1966 return bytes_to_frames(substream->runtime, 1968 - azx_get_position(chip, azx_dev)); 1967 + azx_get_position(chip, azx_dev, false)); 1969 1968 } 1970 1969 1971 1970 /* ··· 1988 1987 return -1; /* bogus (too early) interrupt */ 1989 1988 1990 1989 stream = azx_dev->substream->stream; 1991 - pos = azx_get_position(chip, azx_dev); 1990 + pos = azx_get_position(chip, azx_dev, true); 1992 1991 1993 1992 if (WARN_ONCE(!azx_dev->period_bytes, 1994 1993 "hda-intel: zero azx_dev->period_bytes"))