linux/include/uapi/sound
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
..
sof ASoC: SOF: Add memory_info file to debugfs 2020-11-25 11:07:17 +00:00
asequencer.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
asoc.h ASoC: topology: use inclusive language for bclk and fsync 2020-11-13 14:22:05 +00:00
asound_fm.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
asound.h ALSA: uapi: Fix a C++ style comment in asound.h 2021-10-18 14:58:28 +02:00
compress_offload.h ALSA: fix kernel-doc markups 2020-10-26 15:26:31 +01:00
compress_params.h ALSA: compress: add alac & ape decoder params 2020-03-16 17:52:09 +00:00
emu10k1.h ALSA: uapi: Add linux/types.h include back (but carefully) 2019-12-30 22:28:59 +01:00
firewire.h ALSA: firewire-motu: export meter information to userspace as float value 2021-10-28 09:10:41 +02:00
hdsp.h ALSA: uapi: Add linux/types.h include back (but carefully) 2019-12-30 22:28:59 +01:00
hdspm.h ALSA: uapi: Add linux/types.h include back (but carefully) 2019-12-30 22:28:59 +01:00
sb16_csp.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
sfnt_info.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
skl-tplg-interface.h ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT 2020-04-27 16:02:26 +01:00
snd_sst_tokens.h ASoC: Intel: Skylake: Support multiple format configs 2021-08-23 16:40:02 +01:00
tlv.h ALSA: control: complement TLV macro for db-minmax and db-linear types 2018-05-14 17:47:37 +02:00
usb_stream.h License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00