From: David Henningsson <coding@diwic.se>
To: alsa-devel@alsa-project.org, tiwai@suse.de
Cc: David Henningsson <coding@diwic.se>, Alex Moon <alex.r.moon@gmail.com>
Subject: [PATCH 1/2] pcm: Add snd_pcm_audio_tstamp_type_t constants
Date: Tue, 22 Dec 2020 15:57:27 +0100 [thread overview]
Message-ID: <20201222145728.9368-2-coding@diwic.se> (raw)
In-Reply-To: <20201222145728.9368-1-coding@diwic.se>
These are mostly a copy-paste from the kernel headers. But since functions
snd_pcm_audio_tstamp_config make use of these they should be added to the
public API as well.
Reported-by: Alex Moon <alex.r.moon@gmail.com>
Signed-off-by: David Henningsson <coding@diwic.se>
---
include/pcm.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/pcm.h b/include/pcm.h
index 5b078231..cf1eea8b 100644
--- a/include/pcm.h
+++ b/include/pcm.h
@@ -350,6 +350,20 @@ typedef enum _snd_pcm_tstamp_type {
SND_PCM_TSTAMP_TYPE_LAST = SND_PCM_TSTAMP_TYPE_MONOTONIC_RAW,
} snd_pcm_tstamp_type_t;
+typedef enum _snd_pcm_audio_tstamp_type {
+ /**
+ * first definition for backwards compatibility only,
+ * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else
+ */
+ SND_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0,
+ SND_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /**< DMA time, reported as per hw_ptr */
+ SND_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /**< link time reported by sample or wallclock counter, reset on startup */
+ SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /**< link time reported by sample or wallclock counter, not reset on startup */
+ SND_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /**< link time estimated indirectly */
+ SND_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /**< link time synchronized with system time */
+ SND_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED
+} snd_pcm_audio_tstamp_type_t;
+
typedef struct _snd_pcm_audio_tstamp_config {
/* 5 of max 16 bits used */
unsigned int type_requested:4;
--
2.25.1
next prev parent reply other threads:[~2020-12-22 14:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 14:57 [PATCH 0/2] Publish snd_pcm_audio_tstamp_type_t constants David Henningsson
2020-12-22 14:57 ` David Henningsson [this message]
2020-12-22 14:57 ` [PATCH 2/2] test/audio_time: Make use of SND_PCM_AUDIO_TSTAMP_TYPE constants David Henningsson
2020-12-22 15:11 ` [PATCH 0/2] Publish snd_pcm_audio_tstamp_type_t constants Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201222145728.9368-2-coding@diwic.se \
--to=coding@diwic.se \
--cc=alex.r.moon@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox