alsa/0010-test-audio_time-Make-use-of-SND_PCM_AUDIO_TSTAMP_TYP.patch
Takashi Iwai 197f321105 Accepting request 860483 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes:
  a PCM plugin regression fix about snd_pcm_status() call, plugin
  directory handling fixes, missing audio timestamp types,
  use-after-free fix for conf parser, PCM plugin delay account fixes,
  etc:
  0001-dlmisc-the-snd_plugin_dir_set-snd_plugin_dir-must-be.patch
  0002-dlmisc-fix-snd_plugin_dir-locking-for-not-DL_ORIGIN_.patch
  0003-pcm-snd_pcm_mmap_readi-fix-typo-in-comment.patch
  0007-pcm-set-the-snd_pcm_ioplug_status-tstamp-field.patch
  0009-pcm-Add-snd_pcm_audio_tstamp_type_t-constants.patch
  0010-test-audio_time-Make-use-of-SND_PCM_AUDIO_TSTAMP_TYP.patch
  0011-pcm-Fix-a-typo-in-SND_PCM_AUDIO_TSTAMP_TYPE_LAST-def.patch
  0012-conf-fix-use-after-free-in-_snd_config_load_with_inc.patch
  0013-ucm-fix-bad-frees-in-get_list0-and-get_list20.patch
  0014-rawmidi-fix-memory-leak-in-snd_rawmidi_virtual_open.patch
  0015-timer-fix-sizeof-operator-mismatch-in-snd_timer_quer.patch
  0016-pcm-remove-dead-assignments-from-snd_pcm_rate_-commi.patch
  0017-pcm_multi-remove-dead-assignment-from-_snd_pcm_multi.patch
  0018-conf-fix-get_hexachar-return-value.patch
  0019-pcm-fix-__snd_pcm_state-return-value.patch
  0020-confmisc-fix-memory-leak-in-snd_func_concat.patch
  0021-conf-fix-return-code-in-_snd_config_load_with_includ.patch
  0022-pcm-plugin-status-fix-the-return-value-regression.patch
  0023-pcm-plugin-status-revert-the-recent-changes.patch
  0024-pcm-plugin-tidy-snd_pcm_plugin_avail_update.patch
  0025-pcm-plugin-optimize-sync-in-snd_pcm_plugin_status.patch
  0026-Revert-pcm_plugin-fix-delay.patch
  0027-pcm-ioplug-fix-the-delay-calculation-in-the-status-c.patch
  0028-pcm-rate-tidy-up-snd_pcm_rate_avail_update.patch
  0029-pcm-ioplug-fix-the-delay-calculation-for-old-plugins.patch

OBS-URL: https://build.opensuse.org/request/show/860483
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=290
2021-01-05 14:46:39 +00:00

79 lines
4.0 KiB
Diff

From dcda999d0000cbdabe61d3d175943b5f23c30057 Mon Sep 17 00:00:00 2001
From: David Henningsson <diwic@ubuntu.com>
Date: Wed, 16 Dec 2020 20:02:52 +0100
Subject: [PATCH 10/33] test/audio_time: Make use of SND_PCM_AUDIO_TSTAMP_TYPE
constants
Also fixup the usage row which seemed wrong to me.
Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
test/audio_time.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/test/audio_time.c b/test/audio_time.c
index 530922d92d43..e4d4a9448c6d 100644
--- a/test/audio_time.c
+++ b/test/audio_time.c
@@ -32,7 +32,7 @@ static void usage(char *command)
"-d, --delay add delay \n"
"-D, --device=NAME select PCM by name \n"
"-p, --playback playback tstamps \n"
- "-t, --ts_type=TYPE Default(0),link(1),link_estimated(2),synchronized(3) \n"
+ "-t, --ts_type=TYPE Compat(0),default(1),link(2),link_absolute(3),link_estimated(4),link_synchronized(5) \n"
"-r, --report show audio timestamp and accuracy validity\n"
, command);
}
@@ -201,17 +201,17 @@ int main(int argc, char *argv[])
goto _exit;
}
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, 0))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, SND_PCM_AUDIO_TSTAMP_TYPE_COMPAT))
printf("Playback supports audio compat timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, 1))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, SND_PCM_AUDIO_TSTAMP_TYPE_DEFAULT))
printf("Playback supports audio default timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, 2))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, SND_PCM_AUDIO_TSTAMP_TYPE_LINK))
printf("Playback supports audio link timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, 3))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE))
printf("Playback supports audio link absolute timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, 4))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED))
printf("Playback supports audio link estimated timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, 5))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_p, SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED))
printf("Playback supports audio link synchronized timestamps\n");
snd_pcm_sw_params_alloca(&swparams_p);
@@ -269,17 +269,17 @@ int main(int argc, char *argv[])
goto _exit;
}
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, 0))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, SND_PCM_AUDIO_TSTAMP_TYPE_COMPAT))
printf("Capture supports audio compat timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, 1))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, SND_PCM_AUDIO_TSTAMP_TYPE_DEFAULT))
printf("Capture supports audio default timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, 2))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, SND_PCM_AUDIO_TSTAMP_TYPE_LINK))
printf("Capture supports audio link timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, 3))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE))
printf("Capture supports audio link absolute timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, 4))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED))
printf("Capture supports audio link estimated timestamps\n");
- if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, 5))
+ if (snd_pcm_hw_params_supports_audio_ts_type(hwparams_c, SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED))
printf("Capture supports audio link synchronized timestamps\n");
snd_pcm_sw_params_alloca(&swparams_c);
--
2.26.2