aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/es1968.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 67f03264f871..f8f3bb662d17 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -1827,6 +1827,23 @@ snd_es1968_pcm(struct es1968 *chip, int device)
1827 1827
1828 return 0; 1828 return 0;
1829} 1829}
1830/*
1831 * suppress jitter on some maestros when playing stereo
1832 */
1833static void snd_es1968_suppress_jitter(struct es1968 *chip, struct esschan *es)
1834{
1835 unsigned int cp1;
1836 unsigned int cp2;
1837 unsigned int diff;
1838
1839 cp1 = __apu_get_register(chip, 0, 5);
1840 cp2 = __apu_get_register(chip, 1, 5);
1841 diff = (cp1 > cp2 ? cp1 - cp2 : cp2 - cp1);
1842
1843 if (diff > 1) {
1844 __maestro_write(chip, IDR0_DATA_PORT, cp1);
1845 }
1846}
1830 1847
1831/* 1848/*
1832 * update pointer 1849 * update pointer
@@ -1948,8 +1965,11 @@ static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id)
1948 struct esschan *es; 1965 struct esschan *es;
1949 spin_lock(&chip->substream_lock); 1966 spin_lock(&chip->substream_lock);
1950 list_for_each_entry(es, &chip->substream_list, list) { 1967 list_for_each_entry(es, &chip->substream_list, list) {
1951 if (es->running) 1968 if (es->running) {
1952 snd_es1968_update_pcm(chip, es); 1969 snd_es1968_update_pcm(chip, es);
1970 if (es->fmt & ESS_FMT_STEREO)
1971 snd_es1968_suppress_jitter(chip, es);
1972 }
1953 } 1973 }
1954 spin_unlock(&chip->substream_lock); 1974 spin_unlock(&chip->substream_lock);
1955 if (chip->in_measurement) { 1975 if (chip->in_measurement) {