diff options
| author | Michael Forney <mforney@mforney.org> | 2022-10-31 01:27:13 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2022-10-31 01:27:13 -0700 |
| commit | 0e2d4ca59a0ad34a51f8dcfdf702a63d1164a023 (patch) | |
| tree | d825234a88710c7ad57eca78155996dc900f7f57 | |
| parent | 4d42d8a3eb459fa124dc7090a6dffe1e5d46c491 (diff) | |
tinyalsa: Fix tinyplay format detection
| -rw-r--r-- | pkg/tinyalsa/patch/0003-tinyplay-fix-playback-of-24-bit-and-8-bit-pcm.patch | 29 | ||||
| -rw-r--r-- | pkg/tinyalsa/ver | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/pkg/tinyalsa/patch/0003-tinyplay-fix-playback-of-24-bit-and-8-bit-pcm.patch b/pkg/tinyalsa/patch/0003-tinyplay-fix-playback-of-24-bit-and-8-bit-pcm.patch new file mode 100644 index 00000000..8bdb9c56 --- /dev/null +++ b/pkg/tinyalsa/patch/0003-tinyplay-fix-playback-of-24-bit-and-8-bit-pcm.patch @@ -0,0 +1,29 @@ +From ecc8e52555cfbbbb14269880dea48cf0bf42ab50 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Mon, 31 Oct 2022 00:07:42 -0700 +Subject: [PATCH] tinyplay: fix playback of 24-bit and 8-bit pcm + +The bits-to-format function returned bool, which happened to work +for PCM_FORMAT_S16_LE (0) and PCM_FORMAT_S32_LE (1). However, all +other formats were incorrectly mapped to PCM_FORMAT_S32_LE. Return +enum pcm_format instead. +--- + utils/tinyplay.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/tinyplay.c b/utils/tinyplay.c +index 9f72bbb..d617074 100644 +--- a/utils/tinyplay.c ++++ b/utils/tinyplay.c +@@ -112,7 +112,7 @@ static bool is_wave_file(const char *filetype) + return filetype != NULL && strcmp(filetype, "wav") == 0; + } + +-static bool signed_pcm_bits_to_format(int bits) ++static enum pcm_format signed_pcm_bits_to_format(int bits) + { + switch (bits) { + case 8: +-- +2.37.3 + diff --git a/pkg/tinyalsa/ver b/pkg/tinyalsa/ver index 04b1bf8a..b11fbc7b 100644 --- a/pkg/tinyalsa/ver +++ b/pkg/tinyalsa/ver @@ -1 +1 @@ -2.0.0-45-g4fbaeef r0 +2.0.0-45-g4fbaeef r1 |
