- Remove superfluous Loopback.conf from the source, as it was already included in 1.0.28 tarball - Backport upstream fixes: UCM dummy PCM definition, ICE1712 surround definitions, USB-audio secondary PCM definition, PCM rate plugin boundary overwrap fix, MONOTONIC_RAW timestamp support, PCM route plugin 3-byte format fixes, etc: 0001-ucm-Document-PlaybackPCMIsDummy-and-CapturePCMIsDumm.patch 0002-ICE1712-add-surround71-pcm-definition.patch 0003-USB-Audio-Add-second-S-PDIF-device-on-Phiree-U2.patch 0004-pcm-rate-fix-hw_ptr-exceed-the-boundary.patch 0005-pcm-Provide-a-CLOCK_MONOTONIC_RAW-timestamp-type.patch 0006-Add-timestamp-type-to-sw_params-internal-only.patch 0007-pcm-Add-sw_params-API-functions-to-get-set-timestamp.patch 0008-pcm-Implement-timestamp-type-setup-in-hw-plugin.patch 0009-pcm-Implement-timestamp-type-handling-in-all-plugins.patch 0010-test-audio_time-Set-timestamp-type-explicitly.patch 0011-pcm-route-Use-get-put-labels-for-all-3-byte-formats.patch 0012-pcm-Fill-sw_params-proto-field.patch 0013-pcm-route-Use-get32-for-multi-source-route-calculati.patch 0014-pcm-Drop-snd_pcm_linear_-get-put-32_index.patch OBS-URL: https://build.opensuse.org/request/show/241986 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=162
144 lines
6.3 KiB
Diff
144 lines
6.3 KiB
Diff
From 7a5646f58ba2e8154a274a5ae0f8ec963f331f97 Mon Sep 17 00:00:00 2001
|
|
From: Takashi Iwai <tiwai@suse.de>
|
|
Date: Tue, 22 Jul 2014 12:20:50 +0200
|
|
Subject: [PATCH 14/14] pcm: Drop snd_pcm_linear_{get|put}32_index()
|
|
|
|
These are identical with snd_pcm_linear_{get|put}_index().
|
|
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/pcm/pcm_lfloat.c | 4 ++--
|
|
src/pcm/pcm_linear.c | 44 ++++----------------------------------------
|
|
src/pcm/pcm_plugin.h | 4 ----
|
|
src/pcm/pcm_route.c | 4 ++--
|
|
4 files changed, 8 insertions(+), 48 deletions(-)
|
|
|
|
diff --git a/src/pcm/pcm_lfloat.c b/src/pcm/pcm_lfloat.c
|
|
index 324282f0b7fc..2f3e578fc503 100644
|
|
--- a/src/pcm/pcm_lfloat.c
|
|
+++ b/src/pcm/pcm_lfloat.c
|
|
@@ -286,11 +286,11 @@ static int snd_pcm_lfloat_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|
err = INTERNAL(snd_pcm_hw_params_get_format)(params, &dst_format);
|
|
}
|
|
if (snd_pcm_format_linear(src_format)) {
|
|
- lfloat->int32_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32);
|
|
+ lfloat->int32_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S32);
|
|
lfloat->float32_idx = snd_pcm_lfloat_put_s32_index(dst_format);
|
|
lfloat->func = snd_pcm_lfloat_convert_integer_float;
|
|
} else {
|
|
- lfloat->int32_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format);
|
|
+ lfloat->int32_idx = snd_pcm_linear_put_index(SND_PCM_FORMAT_S32, dst_format);
|
|
lfloat->float32_idx = snd_pcm_lfloat_get_s32_index(src_format);
|
|
lfloat->func = snd_pcm_lfloat_convert_float_integer;
|
|
}
|
|
diff --git a/src/pcm/pcm_linear.c b/src/pcm/pcm_linear.c
|
|
index 3d5bbb8a3688..9a92abd04fb8 100644
|
|
--- a/src/pcm/pcm_linear.c
|
|
+++ b/src/pcm/pcm_linear.c
|
|
@@ -107,11 +107,6 @@ int snd_pcm_linear_get_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_f
|
|
}
|
|
}
|
|
|
|
-int snd_pcm_linear_get32_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format)
|
|
-{
|
|
- return snd_pcm_linear_get_index(src_format, dst_format);
|
|
-}
|
|
-
|
|
int snd_pcm_linear_put_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format)
|
|
{
|
|
int sign, width, pwidth, endian;
|
|
@@ -143,37 +138,6 @@ int snd_pcm_linear_put_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_f
|
|
}
|
|
}
|
|
|
|
-int snd_pcm_linear_put32_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format)
|
|
-{
|
|
- int sign, width, pwidth, endian;
|
|
- sign = (snd_pcm_format_signed(src_format) !=
|
|
- snd_pcm_format_signed(dst_format));
|
|
-#ifdef SND_LITTLE_ENDIAN
|
|
- endian = snd_pcm_format_big_endian(dst_format);
|
|
-#else
|
|
- endian = snd_pcm_format_little_endian(dst_format);
|
|
-#endif
|
|
- if (endian < 0)
|
|
- endian = 0;
|
|
- pwidth = snd_pcm_format_physical_width(dst_format);
|
|
- width = snd_pcm_format_width(dst_format);
|
|
- if (pwidth == 24) {
|
|
- switch (width) {
|
|
- case 24:
|
|
- width = 0; break;
|
|
- case 20:
|
|
- width = 1; break;
|
|
- case 18:
|
|
- default:
|
|
- width = 2; break;
|
|
- }
|
|
- return width * 4 + endian * 2 + sign + 16;
|
|
- } else {
|
|
- width = width / 8 - 1;
|
|
- return width * 4 + endian * 2 + sign;
|
|
- }
|
|
-}
|
|
-
|
|
void snd_pcm_linear_convert(const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset,
|
|
const snd_pcm_channel_area_t *src_areas, snd_pcm_uframes_t src_offset,
|
|
unsigned int channels, snd_pcm_uframes_t frames,
|
|
@@ -342,11 +306,11 @@ static int snd_pcm_linear_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|
snd_pcm_format_physical_width(linear->sformat) == 24);
|
|
if (linear->use_getput) {
|
|
if (pcm->stream == SND_PCM_STREAM_PLAYBACK) {
|
|
- linear->get_idx = snd_pcm_linear_get32_index(format, SND_PCM_FORMAT_S32);
|
|
- linear->put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, linear->sformat);
|
|
+ linear->get_idx = snd_pcm_linear_get_index(format, SND_PCM_FORMAT_S32);
|
|
+ linear->put_idx = snd_pcm_linear_put_index(SND_PCM_FORMAT_S32, linear->sformat);
|
|
} else {
|
|
- linear->get_idx = snd_pcm_linear_get32_index(linear->sformat, SND_PCM_FORMAT_S32);
|
|
- linear->put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, format);
|
|
+ linear->get_idx = snd_pcm_linear_get_index(linear->sformat, SND_PCM_FORMAT_S32);
|
|
+ linear->put_idx = snd_pcm_linear_put_index(SND_PCM_FORMAT_S32, format);
|
|
}
|
|
} else {
|
|
if (pcm->stream == SND_PCM_STREAM_PLAYBACK)
|
|
diff --git a/src/pcm/pcm_plugin.h b/src/pcm/pcm_plugin.h
|
|
index 19e82c3e7321..b0a3e1869ea1 100644
|
|
--- a/src/pcm/pcm_plugin.h
|
|
+++ b/src/pcm/pcm_plugin.h
|
|
@@ -86,8 +86,6 @@ snd_pcm_sframes_t snd_pcm_plugin_undo_write_generic
|
|
/* make local functions really local */
|
|
#define snd_pcm_linear_get_index snd1_pcm_linear_get_index
|
|
#define snd_pcm_linear_put_index snd1_pcm_linear_put_index
|
|
-#define snd_pcm_linear_get32_index snd1_pcm_linear_get32_index
|
|
-#define snd_pcm_linear_put32_index snd1_pcm_linear_put32_index
|
|
#define snd_pcm_linear_convert_index snd1_pcm_linear_convert_index
|
|
#define snd_pcm_linear_convert snd1_pcm_linear_convert
|
|
#define snd_pcm_linear_getput snd1_pcm_linear_getput
|
|
@@ -100,8 +98,6 @@ snd_pcm_sframes_t snd_pcm_plugin_undo_write_generic
|
|
|
|
int snd_pcm_linear_get_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format);
|
|
int snd_pcm_linear_put_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format);
|
|
-int snd_pcm_linear_get32_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format);
|
|
-int snd_pcm_linear_put32_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format);
|
|
int snd_pcm_linear_convert_index(snd_pcm_format_t src_format, snd_pcm_format_t dst_format);
|
|
|
|
void snd_pcm_linear_convert(const snd_pcm_channel_area_t *dst_areas, snd_pcm_uframes_t dst_offset,
|
|
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
|
index 5dac7ebcb7df..e7de9b51f1fc 100644
|
|
--- a/src/pcm/pcm_route.c
|
|
+++ b/src/pcm/pcm_route.c
|
|
@@ -569,8 +569,8 @@ static int snd_pcm_route_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
|
route->params.use_getput =
|
|
(snd_pcm_format_physical_width(src_format) + 7) / 3 == 3 ||
|
|
(snd_pcm_format_physical_width(dst_format) + 7) / 3 == 3;
|
|
- route->params.get_idx = snd_pcm_linear_get32_index(src_format, SND_PCM_FORMAT_S32);
|
|
- route->params.put_idx = snd_pcm_linear_put32_index(SND_PCM_FORMAT_S32, dst_format);
|
|
+ route->params.get_idx = snd_pcm_linear_get_index(src_format, SND_PCM_FORMAT_S32);
|
|
+ route->params.put_idx = snd_pcm_linear_put_index(SND_PCM_FORMAT_S32, dst_format);
|
|
route->params.conv_idx = snd_pcm_linear_convert_index(src_format, dst_format);
|
|
route->params.src_size = snd_pcm_format_width(src_format) / 8;
|
|
route->params.dst_sfmt = dst_format;
|
|
--
|
|
2.0.1
|
|
|