On 3 February 2015 at 07:10, Raymond Yau superquad.vortex2@gmail.com wrote:
2015-1-27 上午3:33 於 "sqweek" sqweek@gmail.com 寫道:
Hi guys,
I discovered on my machine that alsa_snd_pcm_status_get_tstamp (and also get_htstamp) stop working when my asoundrc invokes the pulse plugin.
That is, normally they work fine but once the sound is going via pulse the returned time stamp is always zero. I'm trying to understand why that is.
I couldn't really find any discussion of the pulse plugin on the archives so I'm not entirely sure I've found the right list; I was directed here via the pulseaudio bugzilla[1].
http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=65ff6fdafb705b5e2... 448,7 +448,7 @@ static int snd_pcm_ioplug_start(snd_pcm_t *pcm) if (err < 0) return err;
gettimestamp(&io->trigger_tstamp, pcm->monotonic);
gettimestamp(&io->trigger_tstamp, pcm->tstamp_type); io->data->state = SND_PCM_STATE_RUNNING; return 0;
@@ -463,7 +463,7 @@ static int snd_pcm_ioplug_drop(snd_pcm_t *pcm)
io->data->callback->stop(io->data);
gettimestamp(&io->trigger_tstamp, pcm->monotonic);
gettimestamp(&io->trigger_tstamp, pcm->tstamp_type); io->data->state = SND_PCM_STATE_SETUP; return 0;
@@ -1069,7 +1069,10 @@ int snd_pcm_ioplug_reinit_status(snd_pcm_ioplug_t *ioplug) { ioplug->pcm->poll_fd = ioplug->poll_fd; ioplug->pcm->poll_events = ioplug->poll_events;
ioplug->pcm->monotonic = (ioplug->flags &
SND_PCM_IOPLUG_FLAG_MONOTONIC) != 0;
if (ioplug->flags & SND_PCM_IOPLUG_FLAG_MONOTONIC)
ioplug->pcm->tstamp_type = SND_PCM_TSTAMP_TYPE_MONOTONIC;
else
ioplug->pcm->tstamp_type = SND_PCM_TSTAMP_TYPE_GETTIMEOFDAY; ioplug->pcm->mmap_rw = ioplug->mmap_rw; return 0;
}
Although time stamp was enabled in pcm_ioplug.c , it does not implies all those io plugin really support time stamp
Is this a bug ?
Seems to be. Takashi, others -- do have suggestions on how to handle this?
Regards, Arun