- Backport upstream fixes: surround41/50 chmap fix, UCM documents, config string fix, PCM timestamp query API, replacement of list.h with LGPL: 0023-surround41-50.conf-Use-chmap-syntax-for-better-flexi.patch 0024-ucm-docs-fix-doxygen-exclude-patch-for-UCM-local-hea.patch 0025-ucm-docs-Fix-doxygen-formatting-for-UCM-main-page.patch 0026-docs-Add-UCM-link-to-main-doxygen-page.patch 0027-Replace-unsafe-characters-with-_-in-card-name.patch 0028-pcm-add-helper-functions-to-query-timestamping-capab.patch 0029-pcm-add-support-for-get-set_audio_htstamp_config.patch 0030-pcm-add-support-for-new-STATUS_EXT-ioctl.patch 0031-test-fix-audio_time-with-new-get-set-audio_tstamp_co.patch 0032-test-audio_time-show-report-validity-and-accuracy.patch 0033-pcm-restore-hw-params-on-set-latency-failed.patch 0034-Replace-list.h-with-its-own-version.patch - Backport topology API addition patches: 0035-topology-uapi-Add-UAPI-headers-for-topology-ABI.patch 0036-topology-Add-topology-core-parser.patch 0037-topology-Add-text-section-parser.patch 0038-topology-Add-PCM-parser.patch 0039-topology-Add-operations-parser.patch 0040-topology-Add-private-data-parser.patch 0041-topology-Add-DAPM-object-parser.patch 0042-topology-Add-CTL-parser.patch 0043-topology-Add-Channel-map-parser.patch 0044-topology-Add-binary-file-builder.patch 0045-topology-autotools-Add-build-support-for-topology-co.patch 0046-topology-doxygen-Add-doxygen-support-for-topology-co.patch 0047-conf-topology-Add-topology-file-for-broadwell-audio-.patch 0048-topology-Fix-missing-inclusion-of-ctype.h.patch OBS-URL: https://build.opensuse.org/request/show/320429 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=186
107 lines
3.7 KiB
Diff
107 lines
3.7 KiB
Diff
From 6849d7dc88e0fe22cddb6b2d06ddc967ad4c3a6c Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Date: Wed, 1 Jul 2015 15:40:58 -0500
|
|
Subject: [PATCH 32/49] test: audio_time: show report validity and accuracy
|
|
|
|
Add checks to show if driver reports valid report and resolution
|
|
information. disabled by default
|
|
|
|
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
test/audio_time.c | 30 +++++++++++++++++++++++++-----
|
|
1 file changed, 25 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/test/audio_time.c b/test/audio_time.c
|
|
index e369e59b4ff2..a54c10dc9ebd 100644
|
|
--- a/test/audio_time.c
|
|
+++ b/test/audio_time.c
|
|
@@ -33,6 +33,7 @@ static void usage(char *command)
|
|
"-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"
|
|
+ "-r, --report show audio timestamp and accuracy validity\n"
|
|
, command);
|
|
}
|
|
|
|
@@ -128,7 +129,7 @@ int main(int argc, char *argv[])
|
|
snd_pcm_audio_tstamp_report_t audio_tstamp_report_c;
|
|
|
|
int option_index;
|
|
- static const char short_options[] = "hcpdD:t:";
|
|
+ static const char short_options[] = "hcpdrD:t:";
|
|
|
|
static const struct option long_options[] = {
|
|
{"capture", 0, 0, 'c'},
|
|
@@ -137,6 +138,7 @@ int main(int argc, char *argv[])
|
|
{"help", no_argument, 0, 'h'},
|
|
{"playback", 0, 0, 'p'},
|
|
{"ts_type", required_argument, 0, 't'},
|
|
+ {"report", 0, 0, 'r'},
|
|
{0, 0, 0, 0}
|
|
};
|
|
|
|
@@ -144,6 +146,7 @@ int main(int argc, char *argv[])
|
|
int do_playback = 0;
|
|
int do_capture = 0;
|
|
int type = 0;
|
|
+ int do_report = 0;
|
|
|
|
while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) {
|
|
switch (c) {
|
|
@@ -165,6 +168,8 @@ int main(int argc, char *argv[])
|
|
case 't':
|
|
type = atoi(optarg);
|
|
break;
|
|
+ case 'r':
|
|
+ do_report = 1;
|
|
}
|
|
}
|
|
|
|
@@ -376,11 +381,19 @@ int main(int argc, char *argv[])
|
|
(long long)curr_count_c * 1000000000LL / SAMPLE_FREQ - timestamp2ns(audio_tstamp_c)
|
|
);
|
|
#endif
|
|
+ if (do_report) {
|
|
+ if (audio_tstamp_report_c.valid == 0)
|
|
+ printf("Audio capture timestamp report invalid - ");
|
|
+ if (audio_tstamp_report_c.accuracy_report == 0)
|
|
+ printf("Audio capture timestamp accuracy report invalid");
|
|
+ printf("\n");
|
|
+ }
|
|
+
|
|
|
|
- printf("\t capture: systime: %lli nsec, audio time %lli nsec, \tsystime delta %lli\n",
|
|
+ printf("\t capture: systime: %lli nsec, audio time %lli nsec, \tsystime delta %lli \t resolution %d ns \n",
|
|
timediff(tstamp_c, trigger_tstamp_c),
|
|
timestamp2ns(audio_tstamp_c),
|
|
- timediff(tstamp_c, trigger_tstamp_c) - timestamp2ns(audio_tstamp_c)
|
|
+ timediff(tstamp_c, trigger_tstamp_c) - timestamp2ns(audio_tstamp_c), audio_tstamp_report_c.accuracy
|
|
);
|
|
#endif
|
|
}
|
|
@@ -411,11 +424,18 @@ int main(int argc, char *argv[])
|
|
(long long)curr_count_p * 1000000000LL / SAMPLE_FREQ - timestamp2ns(audio_tstamp_p)
|
|
);
|
|
#endif
|
|
+ if (do_report) {
|
|
+ if (audio_tstamp_report_p.valid == 0)
|
|
+ printf("Audio playback timestamp report invalid - ");
|
|
+ if (audio_tstamp_report_p.accuracy_report == 0)
|
|
+ printf("Audio playback timestamp accuracy report invalid");
|
|
+ printf("\n");
|
|
+ }
|
|
|
|
- printf("playback: systime: %lli nsec, audio time %lli nsec, \tsystime delta %lli\n",
|
|
+ printf("playback: systime: %lli nsec, audio time %lli nsec, \tsystime delta %lli resolution %d ns\n",
|
|
timediff(tstamp_p, trigger_tstamp_p),
|
|
timestamp2ns(audio_tstamp_p),
|
|
- timediff(tstamp_p, trigger_tstamp_p) - timestamp2ns(audio_tstamp_p)
|
|
+ timediff(tstamp_p, trigger_tstamp_p) - timestamp2ns(audio_tstamp_p), audio_tstamp_report_p.accuracy
|
|
);
|
|
#endif
|
|
}
|
|
--
|
|
2.5.0
|
|
|