From: Ivan Orlov <ivan.orlov0322@gmail.com>
To: Jaroslav Kysela <perex@perex.cz>,
tiwai@suse.com, corbet@lwn.net, broonie@kernel.org,
shuah@kernel.org
Cc: linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
christophe.jaillet@wanadoo.fr, aholzinger@gmx.de
Subject: Re: [PATCH v3 3/4] ALSA: timer: Introduce virtual userspace-driven timers
Date: Tue, 6 Aug 2024 14:56:50 +0100 [thread overview]
Message-ID: <c5624841-fa50-4bd1-841f-071bef166fd8@gmail.com> (raw)
In-Reply-To: <8bcfd160-8c6a-4a1f-807c-f76e7f069b49@perex.cz>
On 8/6/24 14:11, Jaroslav Kysela wrote:
> On 06. 08. 24 14:52, Ivan Orlov wrote:
>> Implement two ioctl calls in order to support virtual userspace-driven
>> ALSA timers.
>
> ...
>
Hi Jaroslav,
>> +struct snd_utimer_info {
>> + /*
>> + * To pretend being a normal timer, we need to know the frame
>> rate and
>> + * the period size in frames.
>> + */
>> + __u64 frame_rate;
>> + __u64 period_size;
>
> There should be just one timer resolution in ns member (like in struct
> snd_timer_ginfo - not frame/period members here - it's too specific).
> The resolution can be calculated in the user space from the rate and
> period size.
>
Ah, yes, I agree... Also, it should help us to avoid complex
calculations and sanity checks in the kernel space. I'll replace these
two fields with 'resolution' field in V4, thanks!
> Also naming - the timer API uses snd_timer prefix for structures, thus
> snd_timer_uinfo should be more appropriate.
>
Alright, I'll rename the structure.
Thank you so much for the review!
--
Kind regards,
Ivan Orlov
next prev parent reply other threads:[~2024-08-06 13:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 12:52 [PATCH v3 0/4] Introduce userspace-driven ALSA timers Ivan Orlov
2024-08-06 12:52 ` [PATCH v3 1/4] ALSA: aloop: Allow using global timers Ivan Orlov
2024-08-06 12:52 ` [PATCH v3 2/4] Docs/sound: Add documentation for userspace-driven ALSA timers Ivan Orlov
2024-08-06 12:52 ` [PATCH v3 3/4] ALSA: timer: Introduce virtual userspace-driven timers Ivan Orlov
2024-08-06 13:11 ` Jaroslav Kysela
2024-08-06 13:56 ` Ivan Orlov [this message]
2024-08-08 9:22 ` kernel test robot
2024-08-06 12:52 ` [PATCH v3 4/4] selftests: ALSA: Cover userspace-driven timers with test Ivan Orlov
2024-08-06 13:04 ` Mark Brown
2024-08-06 13:53 ` Ivan Orlov
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=c5624841-fa50-4bd1-841f-071bef166fd8@gmail.com \
--to=ivan.orlov0322@gmail.com \
--cc=aholzinger@gmx.de \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shuah@kernel.org \
--cc=tiwai@suse.com \
/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;
as well as URLs for NNTP newsgroup(s).