From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 2/3] ALSA: core: add hooks for audio timestamps
Date: Tue, 09 Oct 2012 18:50:17 -0500 [thread overview]
Message-ID: <5074B839.9080306@linux.intel.com> (raw)
In-Reply-To: <s5h1uh8gfc2.wl%tiwai@suse.de>
On 10/09/2012 04:33 AM, Takashi Iwai wrote:
>> + struct timespec audio_tstamp;
>
> It must be struct compat_timespec...
ok
>> + put_user(status.suspended_state, &src->suspended_state) ||
>> + put_user(status.audio_tstamp.tv_sec, &src->audio_tstamp.tv_sec) ||
>> + put_user(status.audio_tstamp.tv_nsec, &src->audio_tstamp.tv_nsec))
>
> ... and use compat_put_timespec().
I don't get this. I copy/pasted the code used for regular timestamps.
Why should it be any different for audio timestamps?
>> if (put_user(sstatus.state, &src->s.status.state) ||
>> put_user(sstatus.hw_ptr, &src->s.status.hw_ptr) ||
>> put_user(sstatus.tstamp.tv_sec, &src->s.status.tstamp.tv_sec) ||
>> put_user(sstatus.tstamp.tv_nsec, &src->s.status.tstamp.tv_nsec) ||
>> put_user(sstatus.suspended_state, &src->s.status.suspended_state) ||
>> + put_user(sstatus.audio_tstamp.tv_sec,
>> + &src->s.status.audio_tstamp.tv_sec) ||
>> + put_user(sstatus.audio_tstamp.tv_nsec,
>> + &src->s.status.audio_tstamp.tv_nsec) ||
>
> Ditto.
Again I don't see why I should make a difference between tstamp and
audio_tstamp? It's really the same type, so either my code is correct or
the existing code is wrong as well.
All other comments fixed, thanks for the review.
-Pierre
next prev parent reply other threads:[~2012-10-09 23:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 17:11 [PATCH v2 1/3] ALSA: core: keep track of boundary wrap-around Pierre-Louis Bossart
2012-10-08 17:11 ` [PATCH v2 2/3] ALSA: core: add hooks for audio timestamps Pierre-Louis Bossart
2012-10-09 9:33 ` Takashi Iwai
2012-10-09 23:50 ` Pierre-Louis Bossart [this message]
2012-10-10 5:17 ` Takashi Iwai
2012-10-08 17:11 ` [PATCH v2 3/3] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-10-09 9:40 ` Takashi Iwai
2012-10-09 9:37 ` [PATCH v2 1/3] ALSA: core: keep track of boundary wrap-around 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=5074B839.9080306@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.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 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.