summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2022-10-30 15:27:33 -0700
committerMichael Forney <mforney@mforney.org>2022-10-30 15:27:33 -0700
commit75ce80bd7e003775855d1343989d6f1ffd1b4bcd (patch)
treef5a95a029783a207f46823c6f4ff7fcc4b5eeada /pkg
parentef092b8e2d5e167be0bfaea44dccf6b91257bd55 (diff)
tinyalsa: Update to latest git
Diffstat (limited to 'pkg')
-rw-r--r--pkg/tinyalsa/patch/0001-fix-remaining_data_size-is-0-when-not-playing-a-wave.patch73
-rw-r--r--pkg/tinyalsa/patch/0001-make-use-of-snd_utils_close_dev_node-conditional-on-.patch (renamed from pkg/tinyalsa/patch/0003-make-use-of-snd_utils_close_dev_node-conditional-on-.patch)8
-rw-r--r--pkg/tinyalsa/patch/0002-expose-pcm_state-in-public-API.patch (renamed from pkg/tinyalsa/patch/0004-expose-pcm_state-in-public-API.patch)8
-rw-r--r--pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch36
m---------pkg/tinyalsa/src0
-rw-r--r--pkg/tinyalsa/ver2
6 files changed, 9 insertions, 118 deletions
diff --git a/pkg/tinyalsa/patch/0001-fix-remaining_data_size-is-0-when-not-playing-a-wave.patch b/pkg/tinyalsa/patch/0001-fix-remaining_data_size-is-0-when-not-playing-a-wave.patch
deleted file mode 100644
index c8f3053a..00000000
--- a/pkg/tinyalsa/patch/0001-fix-remaining_data_size-is-0-when-not-playing-a-wave.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 7ebd3ac08a537207851eb631bdcab01f03ab91b6 Mon Sep 17 00:00:00 2001
-From: dvdli <dvdli@google.com>
-Date: Tue, 29 Jun 2021 21:35:37 +0800
-Subject: [PATCH] fix remaining_data_size is 0 when not playing a wave file
-
----
- utils/tinyplay.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/utils/tinyplay.c b/utils/tinyplay.c
-index 4c7ccf6..b2c60bc 100644
---- a/utils/tinyplay.c
-+++ b/utils/tinyplay.c
-@@ -27,6 +27,7 @@
- */
-
- #include <tinyalsa/asoundlib.h>
-+#include <stdbool.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdint.h>
-@@ -98,6 +99,7 @@ struct ctx {
- struct chunk_fmt chunk_fmt;
-
- FILE *file;
-+ size_t file_size;
- };
-
- int ctx_init(struct ctx* ctx, const struct cmd *cmd)
-@@ -113,6 +115,9 @@ int ctx_init(struct ctx* ctx, const struct cmd *cmd)
- ctx->file = stdin;
- } else {
- ctx->file = fopen(cmd->filename, "rb");
-+ fseek(ctx->file, 0L, SEEK_END);
-+ ctx->file_size = ftell(ctx->file);
-+ fseek(ctx->file, 0L, SEEK_SET);
- }
-
- if (ctx->file == NULL) {
-@@ -162,6 +167,7 @@ int ctx_init(struct ctx* ctx, const struct cmd *cmd)
- config.channels = ctx->chunk_fmt.num_channels;
- config.rate = ctx->chunk_fmt.sample_rate;
- bits = ctx->chunk_fmt.bits_per_sample;
-+ ctx->file_size = (size_t) ctx->chunk_header.sz;
- }
-
- if (bits == 8) {
-@@ -396,9 +402,10 @@ int sample_is_playable(const struct cmd *cmd)
- int play_sample(struct ctx *ctx)
- {
- char *buffer;
-+ bool is_stdin_source = ctx->file == stdin;
- size_t buffer_size = 0;
- size_t num_read = 0;
-- size_t remaining_data_size = ctx->chunk_header.sz;
-+ size_t remaining_data_size = is_stdin_source ? SIZE_MAX : ctx->file_size;
- size_t read_size = 0;
- const struct pcm_config *config = pcm_get_config(ctx->pcm);
-
-@@ -426,7 +433,9 @@ int play_sample(struct ctx *ctx)
- fprintf(stderr, "error playing sample\n");
- break;
- }
-- remaining_data_size -= num_read;
-+ if (!is_stdin_source) {
-+ remaining_data_size -= num_read;
-+ }
- }
- } while (!close && num_read > 0 && remaining_data_size > 0);
-
---
-2.32.0
-
diff --git a/pkg/tinyalsa/patch/0003-make-use-of-snd_utils_close_dev_node-conditional-on-.patch b/pkg/tinyalsa/patch/0001-make-use-of-snd_utils_close_dev_node-conditional-on-.patch
index 13dfa27d..4de0afa1 100644
--- a/pkg/tinyalsa/patch/0003-make-use-of-snd_utils_close_dev_node-conditional-on-.patch
+++ b/pkg/tinyalsa/patch/0001-make-use-of-snd_utils_close_dev_node-conditional-on-.patch
@@ -1,4 +1,4 @@
-From d11a02d9217b7713415be4bb6a4b6ee54df894c7 Mon Sep 17 00:00:00 2001
+From 6dc78a2ca2a3f4e74816a014c73b71201a1290c6 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Mon, 30 Aug 2021 20:11:37 -0700
Subject: [PATCH] make use of snd_utils_close_dev_node conditional on
@@ -9,10 +9,10 @@ Subject: [PATCH] make use of snd_utils_close_dev_node conditional on
1 file changed, 2 insertions(+)
diff --git a/src/pcm.c b/src/pcm.c
-index 10e477b..8a2c6be 100644
+index d681563..287b4a2 100644
--- a/src/pcm.c
+++ b/src/pcm.c
-@@ -975,7 +975,9 @@ int pcm_close(struct pcm *pcm)
+@@ -986,7 +986,9 @@ int pcm_close(struct pcm *pcm)
pcm->ops->munmap(pcm->data, pcm->mmap_buffer, pcm_frames_to_bytes(pcm, pcm->buffer_size));
}
@@ -23,5 +23,5 @@ index 10e477b..8a2c6be 100644
pcm->buffer_size = 0;
pcm->fd = -1;
--
-2.32.0
+2.37.3
diff --git a/pkg/tinyalsa/patch/0004-expose-pcm_state-in-public-API.patch b/pkg/tinyalsa/patch/0002-expose-pcm_state-in-public-API.patch
index bb3cf8be..ce1397d8 100644
--- a/pkg/tinyalsa/patch/0004-expose-pcm_state-in-public-API.patch
+++ b/pkg/tinyalsa/patch/0002-expose-pcm_state-in-public-API.patch
@@ -1,4 +1,4 @@
-From f5a956cbb1ad414b8da0127cf997cfe43d7a6bcb Mon Sep 17 00:00:00 2001
+From a307284f4d4dce9974444f9b304c6bcbbf039780 Mon Sep 17 00:00:00 2001
From: Michael Forney <mforney@mforney.org>
Date: Tue, 31 Aug 2021 14:24:09 -0700
Subject: [PATCH] expose pcm_state in public API
@@ -8,10 +8,10 @@ Subject: [PATCH] expose pcm_state in public API
1 file changed, 2 insertions(+)
diff --git a/include/tinyalsa/pcm.h b/include/tinyalsa/pcm.h
-index b40550c..1d77e53 100644
+index 9fca92d..ddf58f0 100644
--- a/include/tinyalsa/pcm.h
+++ b/include/tinyalsa/pcm.h
-@@ -359,6 +359,8 @@ int pcm_start(struct pcm *pcm);
+@@ -363,6 +363,8 @@ int pcm_start(struct pcm *pcm);
int pcm_stop(struct pcm *pcm);
@@ -21,5 +21,5 @@ index b40550c..1d77e53 100644
long pcm_get_delay(struct pcm *pcm);
--
-2.32.0
+2.37.3
diff --git a/pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch b/pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch
deleted file mode 100644
index f664502d..00000000
--- a/pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 27a6c9e762297ce37f28619166b9dd134ffbdf92 Mon Sep 17 00:00:00 2001
-From: dvdli <dvdli@google.com>
-Date: Tue, 13 Jul 2021 14:47:47 +0800
-Subject: [PATCH] fix the zero fd closing problem
-
-The pcm_hw_close refused to close the zero fd. Add "equal to"
-condition and modify the type of fd to int to close the zero fd.
----
- src/pcm_hw.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/pcm_hw.c b/src/pcm_hw.c
-index 38b2e83..9f01fb0 100644
---- a/src/pcm_hw.c
-+++ b/src/pcm_hw.c
-@@ -50,7 +50,7 @@ struct pcm_hw_data {
- /** Device number for the pcm device */
- unsigned int device;
- /** File descriptor to the pcm device file node */
-- unsigned int fd;
-+ int fd;
- /** Pointer to the pcm node from snd card definiton */
- struct snd_node *node;
- };
-@@ -59,7 +59,7 @@ static void pcm_hw_close(void *data)
- {
- struct pcm_hw_data *hw_data = data;
-
-- if (hw_data->fd > 0)
-+ if (hw_data->fd >= 0)
- close(hw_data->fd);
-
- free(hw_data);
---
-2.32.0
-
diff --git a/pkg/tinyalsa/src b/pkg/tinyalsa/src
-Subproject 1c5fb68ced57d838f2b7ecd0c00bc1fefc9ab60
+Subproject 4fbaeef03cd1cb216e0f356c0433ca70f8b9c46
diff --git a/pkg/tinyalsa/ver b/pkg/tinyalsa/ver
index 4614535e..04b1bf8a 100644
--- a/pkg/tinyalsa/ver
+++ b/pkg/tinyalsa/ver
@@ -1 +1 @@
-2.0.0 r0
+2.0.0-45-g4fbaeef r0