All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaud de Bossoreille de Ribou <arnaud.debossoreille@via.ecp.fr>
To: Jaroslav Kysela <perex@suse.cz>
Cc: Arnaud de Bossoreille de Ribou <arnaud.debossoreille@via.ecp.fr>,
	"alsa-devel@lists.sourceforge.net"
	<alsa-devel@lists.sourceforge.net>
Subject: Re: emu10k1 bug and patch (0.9.0rc7)
Date: Mon, 17 Feb 2003 09:36:11 +0100	[thread overview]
Message-ID: <20030217083611.GA2181@via.ecp.fr> (raw)
In-Reply-To: <Pine.LNX.4.44.0302132129000.1315-100000@pnote.perex-int.cz>

On Thu, Feb 13, 2003, Jaroslav Kysela wrote:
> On Mon, 10 Feb 2003, Arnaud de Bossoreille de Ribou wrote:
> 
> > So the bug looks like a signedness problem since sw_ready is unsigned
> > and there is a while(sw_ready > 0), which explain the constant delay,
> > next in the "snd_emu10k1_fx8010_playback_transfer" function.
> > 
> > So the emu10k1.patch file attached fixes the problem and seems not to
> > introduce new ones.
> 
> Please, could you try this patch, if it also fixes your problem? Thanks.
> 
> 
> Index: emufx.c
> ===================================================================
> RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
> retrieving revision 1.26
> diff -u -r1.26 emufx.c
> --- emufx.c	31 Jan 2003 15:21:03 -0000	1.26
> +++ emufx.c	13 Feb 2003 20:29:55 -0000
> @@ -532,7 +532,7 @@
>  	if (diff) {
>  		if (diff < -(snd_pcm_sframes_t) (runtime->boundary / 2))
>  			diff += runtime->boundary;
> -		pcm->sw_ready += diff;
> +		frames += diff;
>  	}
>  	pcm->sw_ready += frames;
>  	pcm->appl_ptr = appl_ptr + frames;
> 
> 						Jaroslav

It doesn't. sw_ready is negative (or above 2^31 as you like).

I think it has nothing to do with runtime->boundary since the 2 appl_ptr
are very close. The difference is always one period but I wonder why
runtime->control->appl_ptr is above pcm->appl_ptr. Is this because the
hardware has played one period that it shouldn't ?

On the other hand if the difference is really always of one period the
fix consists in conditioning the diff calculation with a
"if(frames != 0)" so that sw_ready never reaches its lower boundary.

Regards,

-- 
Arnaud


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

  parent reply	other threads:[~2003-02-17  8:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-10 17:21 emu10k1 bug and patch (0.9.0rc7) Arnaud de Bossoreille de Ribou
2003-02-13 12:03 ` Takashi Iwai
2003-02-13 19:57   ` Jaroslav Kysela
2003-02-14  9:09     ` Takashi Iwai
2003-02-14 11:07       ` Abramo Bagnara
2003-02-14 12:49       ` Jaroslav Kysela
2003-02-13 20:30 ` Jaroslav Kysela
2003-02-14  9:21   ` Takashi Iwai
2003-02-14 10:58     ` tomasz motylewski
2003-02-14 11:31       ` Abramo Bagnara
2003-02-14 15:00         ` Takashi Iwai
2003-02-14 12:51     ` Jaroslav Kysela
2003-02-17  8:36   ` Arnaud de Bossoreille de Ribou [this message]
2003-02-17 10:24     ` Jaroslav Kysela
2003-02-18  8:30       ` Arnaud de Bossoreille de Ribou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030217083611.GA2181@via.ecp.fr \
    --to=arnaud.debossoreille@via.ecp.fr \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=perex@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.