Re: [alsa-devel] [PATCH] es1968: fix jitter on some maestro cards
On 30-03-08 00:49, Andreas Mueller wrote:
Added the alsa-devel list (and re-attached the patch). My TerraTec DMX (ESS Canyon3D, ES1970MS-3D) doesn't need this but doesn't seem to suffer from it either. Otherwise no idea about this.
Rene.
--- sound/pci/es1968.c.old 2008-03-29 19:17:16.771116317 +0100 +++ sound/pci/es1968.c 2008-03-30 00:14:35.363057160 +0100 @@ -1816,7 +1816,24 @@
return 0; } +/* + * suppress jitter on some maestros when playing stereo + */ +static void snd_es1968_suppress_jitter(struct es1968 *chip, struct esschan *es) +{ + unsigned int cp1; + unsigned int cp2; + unsigned int diff;
+ cp1 = __apu_get_register(chip, 0, 5); + cp2 = __apu_get_register(chip, 1, 5); + diff = (cp1 > cp2 ? cp1 - cp2 : cp2 - cp1); + + if (diff > 1) { + __maestro_write(chip, IDR0_DATA_PORT, cp1); + } +} + /* * update pointer */ @@ -1937,8 +1954,11 @@ struct esschan *es; spin_lock(&chip->substream_lock); list_for_each_entry(es, &chip->substream_list, list) { - if (es->running) + if (es->running) { snd_es1968_update_pcm(chip, es); + if (es->fmt & ESS_FMT_STEREO) + snd_es1968_suppress_jitter(chip, es); + } } spin_unlock(&chip->substream_lock); if (chip->in_measurement) {
At Tue, 01 Apr 2008 00:24:43 +0200, Rene Herman wrote:
This should depend on the sample rate you use. 48k would work without the patch.
Anyway, I applied it to ALSA tree now. Thanks.
Takashi
participants (2)
-
Rene Herman
-
Takashi Iwai