From: Takashi Iwai <tiwai@suse.de>
To: Ryan Gammon <rggammon@helixcommunity.org>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: dmix, pause, and snd_pcm_delay
Date: Tue, 13 Jul 2004 11:39:35 +0200 [thread overview]
Message-ID: <s5hacy4b608.wl@alsa2.suse.de> (raw)
In-Reply-To: <40EA58EA.2080005@helixcommunity.org>
At Tue, 06 Jul 2004 00:46:50 -0700,
Ryan Gammon wrote:
>
> I've tried to implement this in a couple of different ways:
> 1. Using mmaped timestamps, and converting the time interval between now
> and when playback triggered into bytes.
> 2. Using bytes_written - snd_pcm_delay()
> 3. Using bytes_written - (initial snd_pcm_avail_update() value - current
> snd_pcm_avail_update() value
> 4. Using the snd_timer api (still figuring this out)
> 5. Something with snd_pcm_sync_id_t (not sure what this is, or how to
> use it)
(2) should be the proper way to work.
> 2. This works well until I try to pause. dmix claims support for
> hardware pause, but when I pause, the hw.ptr seems to keep marching on,
> and when I unpause, snd_pcm_delay() returns a negative value, as the
> hardware pointer has become greater than the software pointer.
Ok, it's a bug.
A workaround is to disable pause/resume as your patch.
I'll apply it cvs.
A better fix would be the proper implementation, though...
Takashi
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
next prev parent reply other threads:[~2004-07-13 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-06 7:46 dmix, pause, and snd_pcm_delay Ryan Gammon
2004-07-07 6:08 ` [patch] " Ryan Gammon
2004-07-13 9:39 ` Takashi Iwai [this message]
2004-07-13 9:50 ` Takashi Iwai
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=s5hacy4b608.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=rggammon@helixcommunity.org \
/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.