From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] ALSA: core: add hooks for audio timestamps read from WALLCLOCK
Date: Fri, 15 Jun 2012 05:07:27 -0500 [thread overview]
Message-ID: <4FDB095F.5030200@linux.intel.com> (raw)
In-Reply-To: <s5hhaueqrob.wl%tiwai@suse.de>
>
> The biggest problem of struct timespec is that it's pretty much
> arch-dependent. But since it's used in all other places, we need to
> live with that...
>
> Usually when we add a new field, we don't use union. Just decrease
> sizeof(struct timespec) from reserved[] size.
>
> No matter whether using union or not, it doesn't mean that the whole
> struct size work is kept. The field might be aligned since we haven't
> added the packed attribute. Maybe better to add a padding to align
> 64bit before audio_tstamp, then cross your finger.
Ok, this is the feedback I needed, I had no idea if I could add a new
field and why exactly the reserved field had to be zeroed out. On the
first try I had an invalid ioctl error and found this workaround.
Will fix this.
>> struct snd_pcm_mmap_status {
>> @@ -430,6 +434,7 @@ struct snd_pcm_mmap_status {
>> int pad1; /* Needed for 64 bit alignment */
>> snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */
>> struct timespec tstamp; /* Timestamp */
>> + struct timespec audio_tstamp; /* audio wall clock timestamp */
>> snd_pcm_state_t suspended_state; /* RO: suspended stream state */
>> };
>
> struct snd_pcm_mmap_status is mmapped to user-space, thus it must be
> backward compatible. Always append the new field.
will do.
> In addition, if you change the ABI, please change the PCM protocol
> version, so that alsa-lib can detect the ABI change
ok
> Also, last not but least, don't forget to convert pcm_compat.c.
will look into it
> Other than these, changes look good to me.
Cool, thanks for the feedback.
-Pierre
next prev parent reply other threads:[~2012-06-15 10:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 20:26 [PATCH 0/2] RFC: support for audio wall clock Pierre-Louis Bossart
2012-06-13 20:26 ` [PATCH 1/2] ALSA: core: add hooks for audio timestamps read from WALLCLOCK Pierre-Louis Bossart
2012-06-14 7:27 ` Takashi Iwai
2012-06-15 10:07 ` Pierre-Louis Bossart [this message]
2012-06-13 20:26 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-06-14 3:32 ` Wang Xingchao
2012-06-14 4:57 ` Pierre-Louis Bossart
2012-06-14 8:15 ` Clemens Ladisch
2012-06-14 17:01 ` Pierre-Louis Bossart
2012-06-14 7:38 ` Takashi Iwai
2012-06-15 10:02 ` Pierre-Louis Bossart
2012-06-15 10:34 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2012-06-28 21:12 [PATCH 0/2] RFC: support for audio wall clock Pierre-Louis Bossart
2012-06-28 21:12 ` [PATCH 1/2] ALSA: core: add hooks for audio timestamps read from WALLCLOCK Pierre-Louis Bossart
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=4FDB095F.5030200@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.