Takashi Iwai
62cc03c4bc
- Update alsa-info.sh to match dmesg with snd_ - Run spec-cleaner - Add missing Loopback.conf manually - Upstream fixes: minor clean ups, 2.1 PCM channel config support, portability improvements, PCM float format conversion fix, fix for ioplug 32bit hwptr wrap, etc. 0020-minor-malloc-changes.patch 0021-alsa-lib-minor-typo-in-pcm-doc.patch 0022-control_hw-fix-potential-memory-leak.patch 0023-pcm-initialize-pcm_dmix-monotonic-field.patch 0024-pcm-initialize-monotonic-field-for-dshare-and-dsnoop.patch 0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch 0026-alsa-lib-heavy-pcm-atomics-cleanup.patch 0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch 0028-conf-Add-surround-2.1-support-to-all-cards.patch 0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch 0030-autotools-update-style.patch 0031-pcm-Insert-linear-to-float-conversion-when-rate-or-c.patch 0032-pcm-route-Allow-chmap-syntax-for-slave-channels-in-t.patch 0033-pcm-route-Select-slave-chmap-based-on-ttable-informa.patch 0034-conf-Allow-2.1-surround-to-use-different-number-of-c.patch 0035-pcm-Wrap-hw_ptr-to-boundary-in-pcm_ioplug.patch 0036-src-conf-cards-Add-missing-entry-for-Loopback.conf.patch OBS-URL: https://build.opensuse.org/request/show/225572 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=152
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
From 2da7b0c2c194a457de9d9a1a9b93c47e2dad1507 Mon Sep 17 00:00:00 2001
|
|
From: Maarten Baert <maarten-baert@hotmail.com>
|
|
Date: Wed, 26 Feb 2014 14:23:45 +0100
|
|
Subject: [PATCH] pcm: Insert linear-to-float conversion when rate or channel
|
|
count is incorrect
|
|
|
|
This fixes a bug where snd_pcm_plug_insert_plugins fails when both
|
|
client and slave use format float, but the rate or channel count does
|
|
not match. I also removed some redundant code.
|
|
|
|
Signed-off-by: Maarten Baert <maarten-baert@hotmail.com>
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/pcm/pcm_plug.c | 14 ++++++--------
|
|
1 file changed, 6 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
|
|
index fa84eaacaedc..ede9c1525a74 100644
|
|
--- a/src/pcm/pcm_plug.c
|
|
+++ b/src/pcm/pcm_plug.c
|
|
@@ -522,15 +522,13 @@ static int snd_pcm_plug_change_format(snd_pcm_t *pcm, snd_pcm_t **new, snd_pcm_p
|
|
}
|
|
#ifdef BUILD_PCM_PLUGIN_LFLOAT
|
|
} else if (snd_pcm_format_float(slv->format)) {
|
|
- /* Conversion is done in another plugin */
|
|
- if (clt->format == slv->format &&
|
|
- clt->rate == slv->rate &&
|
|
- clt->channels == slv->channels)
|
|
- return 0;
|
|
- cfmt = clt->format;
|
|
- if (snd_pcm_format_linear(clt->format))
|
|
+ if (snd_pcm_format_linear(clt->format)) {
|
|
+ cfmt = clt->format;
|
|
f = snd_pcm_lfloat_open;
|
|
- else
|
|
+ } else if (clt->rate != slv->rate || clt->channels != slv->channels) {
|
|
+ cfmt = SND_PCM_FORMAT_S16;
|
|
+ f = snd_pcm_lfloat_open;
|
|
+ } else
|
|
return -EINVAL;
|
|
#endif
|
|
#ifdef BUILD_PCM_NONLINEAR
|
|
--
|
|
1.9.0
|
|
|