* + es1968-fix-jitter-on-some-maestro-cards.patch added to -mm tree
@ 2008-04-03 18:54 akpm
2008-04-03 20:37 ` Rene Herman
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-04-03 18:54 UTC (permalink / raw)
To: mm-commits; +Cc: andreas, perex, rene.herman, tiwai
The patch titled
es1968: fix jitter on some maestro cards
has been added to the -mm tree. Its filename is
es1968-fix-jitter-on-some-maestro-cards.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: es1968: fix jitter on some maestro cards
From: Andreas Mueller <andreas@stapelspeicher.org>
This patch suppresses jitter on several Maestro cards in stereo mode (ALSA of
course).
The patch is also incorporated in the *BSD drivers where I "ported" it from.
Without this patch most of the stereo audio gets out of sync and really
distorted (oss-emulation with mplayer at 48000khz worked somehow).
Cc: Rene Herman <rene.herman@keyaccess.nl>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
sound/pci/es1968.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff -puN sound/pci/es1968.c~es1968-fix-jitter-on-some-maestro-cards sound/pci/es1968.c
--- a/sound/pci/es1968.c~es1968-fix-jitter-on-some-maestro-cards
+++ a/sound/pci/es1968.c
@@ -1815,6 +1815,23 @@ snd_es1968_pcm(struct es1968 *chip, int
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
@@ -1936,8 +1953,11 @@ static irqreturn_t snd_es1968_interrupt(
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) {
_
Patches currently in -mm which might be from andreas@stapelspeicher.org are
es1968-fix-jitter-on-some-maestro-cards.patch
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: + es1968-fix-jitter-on-some-maestro-cards.patch added to -mm tree
2008-04-03 18:54 + es1968-fix-jitter-on-some-maestro-cards.patch added to -mm tree akpm
@ 2008-04-03 20:37 ` Rene Herman
0 siblings, 0 replies; 2+ messages in thread
From: Rene Herman @ 2008-04-03 20:37 UTC (permalink / raw)
To: akpm; +Cc: tiwai, andreas, ALSA devel, mm-commits, perex
On 03-04-08 20:54, akpm@linux-foundation.org wrote:
> The patch titled
> es1968: fix jitter on some maestro cards
> has been added to the -mm tree. Its filename is
> es1968-fix-jitter-on-some-maestro-cards.patch
[ ... ]
> Subject: es1968: fix jitter on some maestro cards
> From: Andreas Mueller <andreas@stapelspeicher.org>
>
> This patch suppresses jitter on several Maestro cards in stereo mode (ALSA of
> course).
>
> The patch is also incorporated in the *BSD drivers where I "ported" it from.
>
> Without this patch most of the stereo audio gets out of sync and really
> distorted (oss-emulation with mplayer at 48000khz worked somehow).
>
> Cc: Rene Herman <rene.herman@keyaccess.nl>
> Cc: Jaroslav Kysela <perex@suse.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
Tested-By: Rene Herman <rene.herman@gmail.com>
on a TerraTec DMX (ESS Canyon3D, ES1970MS-3D) which doesn't need this but
doesn't seem to be suffering from it either. No idea about this otherwise.
> sound/pci/es1968.c | 22 +++++++++++++++++++++-
> 1 file changed, 21 insertions(+), 1 deletion(-)
>
> diff -puN sound/pci/es1968.c~es1968-fix-jitter-on-some-maestro-cards sound/pci/es1968.c
> --- a/sound/pci/es1968.c~es1968-fix-jitter-on-some-maestro-cards
> +++ a/sound/pci/es1968.c
> @@ -1815,6 +1815,23 @@ snd_es1968_pcm(struct es1968 *chip, int
>
> 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
> @@ -1936,8 +1953,11 @@ static irqreturn_t snd_es1968_interrupt(
> 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) {
Rene.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-03 20:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-03 18:54 + es1968-fix-jitter-on-some-maestro-cards.patch added to -mm tree akpm
2008-04-03 20:37 ` Rene Herman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.