pcm: Implement timestamp type handling in all plugins

Now all PCM plugins do support the proper timestamp type or pass it
over slaves.  The internal monotonic flag is dropped and replaced with
tstamp_type in all places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2014-07-10 14:37:49 +02:00
parent 9b716075de
commit 65ff6fdafb
28 changed files with 73 additions and 58 deletions

View file

@ -971,7 +971,7 @@ static int snd_pcm_share_start(snd_pcm_t *pcm)
}
slave->running_count++;
_snd_pcm_share_update(pcm);
gettimestamp(&share->trigger_tstamp, pcm->monotonic);
gettimestamp(&share->trigger_tstamp, pcm->tstamp_type);
_end:
Pthread_mutex_unlock(&slave->mutex);
return err;
@ -1126,7 +1126,7 @@ static void _snd_pcm_share_stop(snd_pcm_t *pcm, snd_pcm_state_t state)
return;
}
#endif
gettimestamp(&share->trigger_tstamp, pcm->monotonic);
gettimestamp(&share->trigger_tstamp, pcm->tstamp_type);
if (pcm->stream == SND_PCM_STREAM_CAPTURE) {
snd_pcm_areas_copy(pcm->stopped_areas, 0,
pcm->running_areas, 0,
@ -1526,7 +1526,7 @@ int snd_pcm_share_open(snd_pcm_t **pcmp, const char *name, const char *sname,
pcm->private_data = share;
pcm->poll_fd = share->client_socket;
pcm->poll_events = stream == SND_PCM_STREAM_PLAYBACK ? POLLOUT : POLLIN;
pcm->monotonic = slave->pcm->monotonic;
pcm->tstamp_type = slave->pcm->tstamp_type;
snd_pcm_set_hw_ptr(pcm, &share->hw_ptr, -1, 0);
snd_pcm_set_appl_ptr(pcm, &share->appl_ptr, -1, 0);