diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-07-14 18:12:49 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-07-14 18:12:49 +0200 |
commit | 52444bd43afbadb8637f5fac3fe5fd90575ee216 (patch) | |
tree | 3da42c3cf112df5c69df45a8b1d15483a2301667 | |
parent | 65ff6fdafb705b5e2e6d4b9a94a80e5de89f5de1 (diff) |
test/audio_time: Set timestamp type explicitly
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | test/audio_time.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/audio_time.c b/test/audio_time.c index 03817c7c..7435db6a 100644 --- a/test/audio_time.c +++ b/test/audio_time.c @@ -57,6 +57,7 @@ void gettimestamp(snd_pcm_t *handle, snd_htimestamp_t *timestamp, #define TRACK_PLAYBACK /* dump playback timing info */ #define TRACK_SAMPLE_COUNTS /* show difference between sample counters and audiotimestamps returned by driver */ #define PLAYBACK_BUFFERS 4 +#define TSTAMP_TYPE SND_PCM_TSTAMP_TYPE_MONOTONIC int main(void) @@ -128,6 +129,12 @@ int main(void) goto _exit; } + err = snd_pcm_sw_params_set_tstamp_type(handle_p, swparams_p, TSTAMP_TYPE); + if (err < 0) { + printf("Unable to set tstamp type : %s\n", snd_strerror(err)); + goto _exit; + } + /* write the sw parameters */ err = snd_pcm_sw_params(handle_p, swparams_p); if (err < 0) { @@ -177,6 +184,12 @@ int main(void) goto _exit; } + err = snd_pcm_sw_params_set_tstamp_type(handle_c, swparams_c, TSTAMP_TYPE); + if (err < 0) { + printf("Unable to set tstamp type : %s\n", snd_strerror(err)); + goto _exit; + } + /* write the sw parameters */ err = snd_pcm_sw_params(handle_c, swparams_c); if (err < 0) { |