Commit graph

7 commits

Author SHA1 Message Date
Tianyi Liu
edff9652c0 misc: fix incorrect usages of strerror
`strerror` takes the `errno` directly as its argument,
negating it will result in an "Unknown error".

This fixes such usages across multiple modules.

Fixes: https://github.com/alsa-project/alsa-utils/pull/245
Signed-off-by: Tianyi Liu <i.pear@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-12-08 20:01:04 +01:00
Sam James
5ae01fcf27 Revert "nhlt-dmic-info.c: include sys/types.h"
This reverts commit 0925ad7f09.

This isn't necessary now that we use standard types (sys/types.h just
defines some compatibility typedefs).

Closes: https://github.com/alsa-project/alsa-utils/pull/234
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-10-17 13:45:36 +02:00
Sam James
c08d580b28 nhlt: use stdint.h types
u_int_* aren't standard, but uint* are. Use those instead for musl compat.

Closes: https://github.com/alsa-project/alsa-utils/pull/234
Bug: https://bugs.gentoo.org/913758
Signed-off-by: Sam James <sam@gentoo.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-10-17 13:45:26 +02:00
Michael Opdenacker
0925ad7f09 nhlt-dmic-info.c: include sys/types.h
This fixes an issue compiling with the musl libc.

Fixes: https://github.com/alsa-project/alsa-utils/issues/238
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-09-19 14:36:53 +02:00
Jaroslav Kysela
feb9c4cdec reshuffle included files to include config.h as first
config.h may contain defines like _FILE_OFFSET_BITS which influence
the system wide include files (off_t types, open -> open64 function
usage etc.).

Related: https://github.com/alsa-project/alsa-utils/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 18:48:23 +02:00
Jaroslav Kysela
b7d73a4611 nhlt-dmic-info: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:42:24 +02:00
Jaroslav Kysela
ee3965f6fa nhlt: add nhlt-dmic-info utility
The microphone arrays for Intel platforms are described in the
ACPI NHLT table. This table is available in sysfs. Parse this
information and use a more common format (json) for output. This
information is usable for the further DSP processing.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-16 15:54:05 +02:00