linux/include
Takashi Sakamoto 407359d44e ALSA: firewire-motu: export meter information to userspace as float value
In command DSP models, one meter information consists of 4 bytes for
IEEE 764 floating point (binary32). In previous patch, it is exported
to userspace as 32 bit storage since the storage is also handled in
ALSA firewire-motu driver as well in kernel space in which floating point
arithmetic is not preferable. On the other hand, ALSA firewire-motu driver
doesn't perform floating point calculation. The driver just gather meter
information from isochronous packets and fill structure fields for
userspace.

In 'header' target of Kbuild, UAPI headers are processed before installed.
In this timing, #ifdef macro with __KERNEL__ is removed. This mechanism
is useful in the case so that the 32 bit storage can be accessible as u32
type in kernel space and float type in user space. We can see the same
usage in ''struct acct_v3' in 'include/uapi/linux/acct.h'.

This commit is for the above idea. Additionally, due to message
protocol, meter information is filled with 0xffffffff in the end of
period but 0xffffffff is invalid as binary32. To avoid confusion in
userspace application, the last two elements are left without any
assignment.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20211027125529.54295-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-10-28 09:10:41 +02:00
..
acpi Merge branches 'pm-cpufreq', 'pm-sleep' and 'pm-em' 2021-09-10 20:26:08 +02:00
asm-generic ARM development updates for 5.15: 2021-09-09 13:25:49 -07:00
clocksource
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-08-30 12:57:10 -07:00
drm
dt-bindings linux-watchdog 5.15-rc1 tag 2021-09-07 13:52:46 -07:00
keys
kunit
kvm
linux Compiler Attributes improvements: 2021-09-12 16:09:26 -07:00
math-emu
media
memory
misc
net flow: fix object-size-mismatch warning in flowi{4,6}_to_flowi_common() 2021-09-02 11:44:19 +01:00
pcmcia
ras
rdma Merge branch 'sg_nents' into rdma.git for-next 2021-08-30 09:49:59 -03:00
scsi scsi: core: Remove scsi_cmnd.tag 2021-08-17 22:28:39 -04:00
soc Merge branches 'clk-nvidia', 'clk-rockchip', 'clk-at91' and 'clk-vc5' into clk-next 2021-09-01 15:26:58 -07:00
sound ALSA: memalloc: Drop superfluous snd_dma_buffer_sync() declaration 2021-10-19 08:07:26 +02:00
target scsi: target: Allows backend drivers to fail with specific sense codes 2021-08-17 22:28:40 -04:00
trace Merge branch 'akpm' (patches from Andrew) 2021-09-08 12:55:35 -07:00
uapi ALSA: firewire-motu: export meter information to userspace as float value 2021-10-28 09:10:41 +02:00
vdso
video
xen