alsa/0010-test-audio_time-Set-timestamp-type-explicitly.patch
Ismail Dönmez 5da7a20162 Accepting request 241986 from home:tiwai:branches:multimedia:libs
- Remove superfluous Loopback.conf from the source, as it was
  already included in 1.0.28 tarball
- Backport upstream fixes: UCM dummy PCM definition, ICE1712 surround
  definitions, USB-audio secondary PCM definition, PCM rate plugin
  boundary overwrap fix, MONOTONIC_RAW timestamp support, PCM route
  plugin 3-byte format fixes, etc:
  0001-ucm-Document-PlaybackPCMIsDummy-and-CapturePCMIsDumm.patch
  0002-ICE1712-add-surround71-pcm-definition.patch
  0003-USB-Audio-Add-second-S-PDIF-device-on-Phiree-U2.patch
  0004-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch
  0005-pcm-Provide-a-CLOCK_MONOTONIC_RAW-timestamp-type.patch
  0006-Add-timestamp-type-to-sw_params-internal-only.patch
  0007-pcm-Add-sw_params-API-functions-to-get-set-timestamp.patch
  0008-pcm-Implement-timestamp-type-setup-in-hw-plugin.patch
  0009-pcm-Implement-timestamp-type-handling-in-all-plugins.patch
  0010-test-audio_time-Set-timestamp-type-explicitly.patch
  0011-pcm-route-Use-get-put-labels-for-all-3-byte-formats.patch
  0012-pcm-Fill-sw_params-proto-field.patch
  0013-pcm-route-Use-get32-for-multi-source-route-calculati.patch
  0014-pcm-Drop-snd_pcm_linear_-get-put-32_index.patch

OBS-URL: https://build.opensuse.org/request/show/241986
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=162
2014-07-24 11:12:46 +00:00

52 lines
1.5 KiB
Diff

From 52444bd43afbadb8637f5fac3fe5fd90575ee216 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 14 Jul 2014 18:12:49 +0200
Subject: [PATCH 10/14] test/audio_time: Set timestamp type explicitly
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
test/audio_time.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/test/audio_time.c b/test/audio_time.c
index 03817c7c673b..7435db6a7fd8 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) {
--
2.0.1