2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-21 14:50:07 -07:00

alsa-utils: 1.2.11

This commit is contained in:
Owen Rafferty 2024-02-01 23:47:12 -06:00
parent 5ee10c1c6f
commit 7d09d86879
No known key found for this signature in database
5 changed files with 3 additions and 110 deletions

View File

@ -1,7 +1,5 @@
#!/bin/sh -e
patch -p1 < nhlt-use-stdint.h-types.patch
./configure \
--prefix=/usr \
--sbindir=/usr/bin \

View File

@ -1,2 +1 @@
9a57043733809e23d6cc4b3000f5add720f24e20384eed51251c7f0af00318b1e3
11ac8f9c7f9fed3c6e9f8c78b12bbe25fec9680407af645c56e43fe4f6428fefb3
a4567d2cec5e27ec09751dd867251ccef05adbf3047f35ee94e1fb06445b0430c0

View File

@ -1,103 +0,0 @@
https://github.com/alsa-project/alsa-utils/pull/234
From ef33d261ee3085512fd6387dafea46cacc6617a4 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Thu, 7 Sep 2023 21:24:16 +0100
Subject: [PATCH 2/3] nhlt: use stdint.h types
u_int_* aren't standard, but uint* are. Use those instead for musl compat.
Bug: https://bugs.gentoo.org/913758
Signed-off-by: Sam James <sam@gentoo.org>
--- a/nhlt/nhlt-dmic-info.c
+++ b/nhlt/nhlt-dmic-info.c
@@ -45,7 +45,7 @@ int debug = 0;
#define NHLT_EP_HDR_SIZE (4 + 1 + 1 + 2 + 2 + 2 + 4 + 1 + 1 + 1)
#define VENDOR_MIC_CFG_SIZE (1 + 1 + 2 + 2 + 2 + 1 + 1 + 2 + 2 + 2 + 2 + 2 + 2)
-static const char *microphone_type(u_int8_t type)
+static const char *microphone_type(uint8_t type)
{
switch (type) {
case 0: return "omnidirectional";
@@ -59,7 +59,7 @@ static const char *microphone_type(u_int8_t type)
return "unknown";
}
-static const char *microphone_location(u_int8_t location)
+static const char *microphone_location(uint8_t location)
{
switch (location) {
case 0: return "laptop-top-panel";
@@ -73,21 +73,21 @@ static const char *microphone_location(u_int8_t location)
}
-static inline u_int8_t get_u8(u_int8_t *base, u_int32_t off)
+static inline uint8_t get_u8(uint8_t *base, uint32_t off)
{
return *(base + off);
}
-static inline int32_t get_s16le(u_int8_t *base, u_int32_t off)
+static inline int32_t get_s16le(uint8_t *base, uint32_t off)
{
- u_int32_t v = *(base + off + 0) |
+ uint32_t v = *(base + off + 0) |
(*(base + off + 1) << 8);
if (v & 0x8000)
return -((int32_t)0x10000 - (int32_t)v);
return v;
}
-static inline u_int32_t get_u32le(u_int8_t *base, u_int32_t off)
+static inline uint32_t get_u32le(uint8_t *base, uint32_t off)
{
return *(base + off + 0) |
(*(base + off + 1) << 8) |
@@ -137,10 +137,10 @@ static int nhlt_dmic_config(FILE *out, uint8_t *dmic, uint8_t mic)
return 0;
}
-static int nhlt_dmic_ep_to_json(FILE *out, uint8_t *ep, u_int32_t ep_size)
+static int nhlt_dmic_ep_to_json(FILE *out, uint8_t *ep, uint32_t ep_size)
{
- u_int32_t off, specific_cfg_size;
- u_int8_t config_type, array_type, mic, num_mics;
+ uint32_t off, specific_cfg_size;
+ uint8_t config_type, array_type, mic, num_mics;
int res;
off = NHLT_EP_HDR_SIZE;
@@ -181,15 +181,15 @@ oob:
return -EINVAL;
}
-static int nhlt_table_to_json(FILE *out, u_int8_t *nhlt, u_int32_t size)
+static int nhlt_table_to_json(FILE *out, uint8_t *nhlt, uint32_t size)
{
- u_int32_t _size, off, ep_size;
- u_int8_t sum = 0, ep, ep_count, link_type, dmics = 0;
+ uint32_t _size, off, ep_size;
+ uint8_t sum = 0, ep, ep_count, link_type, dmics = 0;
int res;
_size = get_u32le(nhlt, 4);
if (_size != size) {
- fprintf(stderr, "Table size mismatch (%08x != %08x)\n", _size, (u_int32_t)size);
+ fprintf(stderr, "Table size mismatch (%08x != %08x)\n", _size, (uint32_t)size);
return -EINVAL;
}
for (off = 0; off < size; off++)
@@ -231,7 +231,7 @@ oob:
static int nhlt_to_json(FILE *out, const char *nhlt_file)
{
struct stat st;
- u_int8_t *buf;
+ uint8_t *buf;
int _errno, fd, res;
size_t pos, size;
ssize_t ret;
--
2.42.0

View File

@ -1,2 +1 @@
https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.10.tar.bz2
patches/nhlt-use-stdint.h-types.patch
https://www.alsa-project.org/files/pub/utils/alsa-utils-1.2.11.tar.bz2

View File

@ -1 +1 @@
1.2.10 1
1.2.11 1