linux-stable/include/uapi/sound
Laurentiu Mihalcea 22652022c7
ASoC: SOF: ipc: replace "enum sof_comp_type" field with "uint32_t"
Normally, the type of enums is "unsigned int" or "int". GCC has
the "-fshort-enums" option, which instructs the compiler to
use the smallest data type that can hold all the values in
the enum (i.e: char, short, int or their unsigned variants).

According to the GCC documentation, "-fshort-enums" may be
default on some targets. This seems to be the case for SOF
when built for a certain 32-bit ARM platform.

On Linux, this is not the case (tested with "aarch64-linux-gnu-gcc")
which means enums such as "enum sof_comp_type" will end up having
different sizes on Linux and SOF. Since "enum sof_comp_type" is used in
IPC-related structures such as "struct sof_ipc_comp", this means
the fields of the structures will end up being placed at different
offsets. This, in turn, leads to SOF not being able to properly
interpret data passed from Linux.

With this in mind, replace "enum sof_comp_type" from
"struct sof_ipc_comp" with "uint32_t".

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20240826182442.6191-1-laurentiumihalcea111@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-08-26 19:29:39 +01:00
..
intel/avs ALSA/ASoC: include: clarify Copyright information 2024-05-09 20:26:34 +02:00
sof ASoC: SOF: ipc: replace "enum sof_comp_type" field with "uint32_t" 2024-08-26 19:29:39 +01:00
asequencer.h ALSA: seq: Add tempo base unit for MIDI2 Set Tempo messages 2024-07-06 09:38:27 +02:00
asoc.h ASoC: topology: Remove obsolete ABI v4 structs 2024-04-04 15:50:06 +01:00
asound_fm.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
asound.h ALSA: pcm: reinvent the stream synchronization ID API 2024-07-02 09:53:21 +02:00
compress_offload.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
compress_params.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
emu10k1.h ALSA: emu10k1: enable bit-exact playback, part 1: DSP attenuation 2023-05-15 22:06:21 +02:00
firewire.h ALSA: fireface: add field for the number of messages copied to user space 2023-02-04 09:35:17 +01:00
hdsp.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
hdspm.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
sb16_csp.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
scarlett2.h ALSA: scarlett2: Add support for Solo, 2i2, and 4i4 Gen 4 2023-12-29 15:52:14 +01:00
sfnt_info.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
skl-tplg-interface.h ASoC: Intel: Skylake: Remove soc-topology ABI v4 support 2024-04-04 15:50:03 +01:00
snd_ar_tokens.h ASoC: qdsp6: audioreach: add support for more port connections 2022-10-28 17:19:22 +01:00
snd_sst_tokens.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
tlv.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00
usb_stream.h ALSA: Remove some left-over license text in include/uapi/sound/ 2022-09-27 08:42:50 +02:00