[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhance
From: |
Arnd Bergmann |
Subject: |
Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl |
Date: |
Fri, 17 Jan 2020 22:45:28 +0100 |
On Fri, Jan 17, 2020 at 9:50 PM Aleksandar Markovic
<address@hidden> wrote:
> Alexandre (and Arnd too, or any other person knowledgeable in the area),
>
> I just need to clarify a couple of details with you, please.
>
> Firstly, here is what man page rtc(4) says:
>
> "The /dev/rtc (or /dev/rtc0, /dev/rtc1, etc.) device can be opened
> only once (until it is closed) and it is read-only. On read(2) and
> select(2) the calling process is blocked until the next interrupt from
> that RTC is received. Following the interrupt, the process can read a
> long integer, of which the least significant byte contains a bit mask
> encoding the types of interrupt that occurred, while the remaining 3
> bytes contain the number of interrupts since the last read(2)."
>
> So, it looks read() will always return only 4 bytes of useful info
> (regardless of host being 32-bit/64-bit).
It says "long integer", which is 64-bit on a 64-bit machine.
> My questions are:
>
> - Is the description in man page genuinely accurate?
Starting with linux-2.6.18, there is another possibility: If an
application asks for exactly four bytes on a 64-bit kernel,
it gets the lower four bytes, as it would on a 32-bit kernel.
This is a hack that was introduced for running 32-bit compat
tasks.
For any other size less than sizeof(long), the kernel reports
an EINVAL error, and for anything larger or equal to sizeof(long)
it attempts to output a long word.
> - To me (but I am really an outsider to using RTC in applications),
> this feature (blocking read()/select()) even looks very nice and
> convenient, in all fairness. But I would like to ask you: Is this
> feature used rarely or frequently by other libraries/tools/etc.? In
> other words, is the feature "obscure" or "crucial" part of RTC kernel
> support? Or, something in between?
> - Does MC146818 support this feature?
No idea, I'll leave these for Alexandre or someone else to answer.
Arnd
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, (continued)
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Laurent Vivier, 2020/01/15
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Arnd Bergmann, 2020/01/15
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Filip Bozuta, 2020/01/15
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Arnd Bergmann, 2020/01/15
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Laurent Vivier, 2020/01/15
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Laurent Vivier, 2020/01/15
- [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Aleksandar Markovic, 2020/01/15
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Aleksandar Markovic, 2020/01/16
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Arnd Bergmann, 2020/01/16
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Aleksandar Markovic, 2020/01/17
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl,
Arnd Bergmann <=
- Re: [PATCH 08/12] linux-user: Add support for setting alsa timer enhanced read using ioctl, Alexandre Belloni, 2020/01/17
[PATCH 09/12] linux-user: Add support for getting/setting specified alsa timer parameters using ioctls, Filip Bozuta, 2020/01/15
[PATCH 02/12] linux-user: Add support for getting/setting RTC time and alarm using ioctls, Filip Bozuta, 2020/01/15
[PATCH 01/12] linux-user: Add support for enabling/disabling RTC features using ioctls, Filip Bozuta, 2020/01/15
[PATCH 11/12] linux-user: Add support for getting/setting selected alsa timer parameters using ioctls, Filip Bozuta, 2020/01/15
[PATCH 03/12] linux-user: Add support for getting/setting RTC periodic interrupt and epoch using ioctls, Filip Bozuta, 2020/01/15
[PATCH 06/12] linux-user: Add support for read/clear RTC voltage low detector using ioctls, Filip Bozuta, 2020/01/15
[PATCH 12/12] linux-user: Add support for selected alsa timer instructions using ioctls, Filip Bozuta, 2020/01/15
[PATCH 05/12] linux-user: Add support for getting/setting RTC PLL correction using ioctls, Filip Bozuta, 2020/01/15