diff options
| author | Michael Forney <mforney@mforney.org> | 2021-08-30 20:13:14 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2021-08-31 14:46:20 -0700 |
| commit | e4f1e4f50393a005ae1bb9a9ccbf02b8bd3c7670 (patch) | |
| tree | 467f41428cbbc0676d42d05b45168fa612fd3367 /pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch | |
| parent | 80ad9f758b233dc2e806607bbae8338029093cd6 (diff) | |
Add tinyalsa 2.0.0
Diffstat (limited to 'pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch')
| -rw-r--r-- | pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch | 36 |
1 files changed, 36 insertions, 0 deletions
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 new file mode 100644 index 00000000..f664502d --- /dev/null +++ b/pkg/tinyalsa/patch/0002-fix-the-zero-fd-closing-problem.patch @@ -0,0 +1,36 @@ +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 + |
