Accepting request 144051 from multimedia:libs
- 0040-PCM-Fix-conflict-of-_snd_pcm_hw_params-definitions.patch: fix the segfault due to the symbol conflict of _snd_pcm_hw_params (forwarded request 144050 from tiwai) OBS-URL: https://build.opensuse.org/request/show/144051 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa?expand=0&rev=129
This commit is contained in:
commit
82076be722
139
0040-PCM-Fix-conflict-of-_snd_pcm_hw_params-definitions.patch
Normal file
139
0040-PCM-Fix-conflict-of-_snd_pcm_hw_params-definitions.patch
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
From 03c26d0edeeefb7550ba8cca91167343677022ab Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Tue, 4 Dec 2012 12:17:00 +0100
|
||||||
|
Subject: [PATCH] PCM: Fix conflict of _snd_pcm_hw_params definitions
|
||||||
|
|
||||||
|
Fix the call of _snd_pcm_hw_params() to _snd_pcm_hw_params_internal().
|
||||||
|
The build passed wrongly because of _snd_pcm_hw_params define.
|
||||||
|
Having the same function name as the struct name is is simply
|
||||||
|
confusing...
|
||||||
|
|
||||||
|
Also, to be sure, _snd_pcm_hw_params is undef'ed in pcm_local.h, too.
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/pcm/pcm.c | 2 +-
|
||||||
|
src/pcm/pcm_file.c | 2 +-
|
||||||
|
src/pcm/pcm_generic.c | 2 +-
|
||||||
|
src/pcm/pcm_local.h | 1 +
|
||||||
|
src/pcm/pcm_meter.c | 2 +-
|
||||||
|
src/pcm/pcm_mmap_emul.c | 4 ++--
|
||||||
|
src/pcm/pcm_plug.c | 2 +-
|
||||||
|
src/pcm/pcm_share.c | 2 +-
|
||||||
|
8 files changed, 9 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
|
||||||
|
index d616705..5053a7b 100644
|
||||||
|
--- a/src/pcm/pcm.c
|
||||||
|
+++ b/src/pcm/pcm.c
|
||||||
|
@@ -828,7 +828,7 @@ int snd_pcm_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
assert(pcm && params);
|
||||||
|
- err = _snd_pcm_hw_params(pcm, params);
|
||||||
|
+ err = _snd_pcm_hw_params_internal(pcm, params);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
err = snd_pcm_prepare(pcm);
|
||||||
|
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
|
||||||
|
index c8214b4..5950401 100644
|
||||||
|
--- a/src/pcm/pcm_file.c
|
||||||
|
+++ b/src/pcm/pcm_file.c
|
||||||
|
@@ -602,7 +602,7 @@ static int snd_pcm_file_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
|
||||||
|
snd_pcm_file_t *file = pcm->private_data;
|
||||||
|
unsigned int channel;
|
||||||
|
snd_pcm_t *slave = file->gen.slave;
|
||||||
|
- int err = _snd_pcm_hw_params(slave, params);
|
||||||
|
+ int err = _snd_pcm_hw_params_internal(slave, params);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
file->buffer_bytes = snd_pcm_frames_to_bytes(slave, slave->buffer_size);
|
||||||
|
diff --git a/src/pcm/pcm_generic.c b/src/pcm/pcm_generic.c
|
||||||
|
index 5fc4888..f068ee2 100644
|
||||||
|
--- a/src/pcm/pcm_generic.c
|
||||||
|
+++ b/src/pcm/pcm_generic.c
|
||||||
|
@@ -101,7 +101,7 @@ int snd_pcm_generic_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
int snd_pcm_generic_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
{
|
||||||
|
snd_pcm_generic_t *generic = pcm->private_data;
|
||||||
|
- return _snd_pcm_hw_params(generic->slave, params);
|
||||||
|
+ return _snd_pcm_hw_params_internal(generic->slave, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
int snd_pcm_generic_prepare(snd_pcm_t *pcm)
|
||||||
|
diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
|
||||||
|
index c616e56..63b9036 100644
|
||||||
|
--- a/src/pcm/pcm_local.h
|
||||||
|
+++ b/src/pcm/pcm_local.h
|
||||||
|
@@ -579,6 +579,7 @@ static inline int muldiv_near(int a, int b, int c)
|
||||||
|
|
||||||
|
int snd_pcm_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||||
|
int _snd_pcm_hw_params_internal(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||||
|
+#undef _snd_pcm_hw_params
|
||||||
|
int snd_pcm_hw_refine_soft(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
|
||||||
|
int snd_pcm_hw_refine_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
|
||||||
|
int (*cprepare)(snd_pcm_t *pcm,
|
||||||
|
diff --git a/src/pcm/pcm_meter.c b/src/pcm/pcm_meter.c
|
||||||
|
index e60b92d..573b6fe 100644
|
||||||
|
--- a/src/pcm/pcm_meter.c
|
||||||
|
+++ b/src/pcm/pcm_meter.c
|
||||||
|
@@ -419,7 +419,7 @@ static int snd_pcm_meter_hw_refine_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *pa
|
||||||
|
static int snd_pcm_meter_hw_params_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
{
|
||||||
|
snd_pcm_meter_t *meter = pcm->private_data;
|
||||||
|
- return _snd_pcm_hw_params(meter->gen.slave, params);
|
||||||
|
+ return _snd_pcm_hw_params_internal(meter->gen.slave, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int snd_pcm_meter_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
diff --git a/src/pcm/pcm_mmap_emul.c b/src/pcm/pcm_mmap_emul.c
|
||||||
|
index 67d2e05..63789bc 100644
|
||||||
|
--- a/src/pcm/pcm_mmap_emul.c
|
||||||
|
+++ b/src/pcm/pcm_mmap_emul.c
|
||||||
|
@@ -160,7 +160,7 @@ static int snd_pcm_mmap_emul_hw_params(snd_pcm_t *pcm,
|
||||||
|
snd_pcm_access_mask_t *pmask;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
- err = _snd_pcm_hw_params(map->gen.slave, params);
|
||||||
|
+ err = _snd_pcm_hw_params_internal(map->gen.slave, params);
|
||||||
|
if (err >= 0) {
|
||||||
|
map->mmap_emul = 0;
|
||||||
|
return err;
|
||||||
|
@@ -186,7 +186,7 @@ static int snd_pcm_mmap_emul_hw_params(snd_pcm_t *pcm,
|
||||||
|
default:
|
||||||
|
goto _err;
|
||||||
|
}
|
||||||
|
- err = _snd_pcm_hw_params(map->gen.slave, params);
|
||||||
|
+ err = _snd_pcm_hw_params_internal(map->gen.slave, params);
|
||||||
|
if (err < 0)
|
||||||
|
goto _err;
|
||||||
|
|
||||||
|
diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
|
||||||
|
index 0bd8850..fa84eaa 100644
|
||||||
|
--- a/src/pcm/pcm_plug.c
|
||||||
|
+++ b/src/pcm/pcm_plug.c
|
||||||
|
@@ -1040,7 +1040,7 @@ static int snd_pcm_plug_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
slave = plug->gen.slave;
|
||||||
|
- err = _snd_pcm_hw_params(slave, params);
|
||||||
|
+ err = _snd_pcm_hw_params_internal(slave, params);
|
||||||
|
if (err < 0) {
|
||||||
|
snd_pcm_plug_clear(pcm);
|
||||||
|
return err;
|
||||||
|
diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
|
||||||
|
index 936e2f9..118ab26 100644
|
||||||
|
--- a/src/pcm/pcm_share.c
|
||||||
|
+++ b/src/pcm/pcm_share.c
|
||||||
|
@@ -595,7 +595,7 @@ static int snd_pcm_share_hw_refine_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *pa
|
||||||
|
static int snd_pcm_share_hw_params_slave(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
{
|
||||||
|
snd_pcm_share_t *share = pcm->private_data;
|
||||||
|
- return _snd_pcm_hw_params(share->slave->pcm, params);
|
||||||
|
+ return _snd_pcm_hw_params_internal(share->slave->pcm, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int snd_pcm_share_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||||
|
--
|
||||||
|
1.8.0.1
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 4 12:19:34 CET 2012 - tiwai@suse.de
|
||||||
|
|
||||||
|
- 0040-PCM-Fix-conflict-of-_snd_pcm_hw_params-definitions.patch:
|
||||||
|
fix the segfault due to the symbol conflict of _snd_pcm_hw_params
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Nov 29 18:29:42 CET 2012 - tiwai@suse.de
|
Thu Nov 29 18:29:42 CET 2012 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ Patch36: 0036-Merge-kernel-uapi-sound-asound.h-and-asequencer.h.patch
|
|||||||
Patch37: 0037-PCM-Add-more-chmap-definitions-for-UAC2.patch
|
Patch37: 0037-PCM-Add-more-chmap-definitions-for-UAC2.patch
|
||||||
Patch38: 0038-PCM-shut-up-a-compile-unused-parameter-compile-warni.patch
|
Patch38: 0038-PCM-shut-up-a-compile-unused-parameter-compile-warni.patch
|
||||||
Patch39: 0039-Add-workaround-for-conflicting-snd_seq_event_t-defin.patch
|
Patch39: 0039-Add-workaround-for-conflicting-snd_seq_event_t-defin.patch
|
||||||
|
Patch40: 0040-PCM-Fix-conflict-of-_snd_pcm_hw_params-definitions.patch
|
||||||
#
|
#
|
||||||
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
||||||
Url: http://www.alsa-project.org/
|
Url: http://www.alsa-project.org/
|
||||||
@ -180,6 +181,7 @@ Architecture.
|
|||||||
%patch37 -p1
|
%patch37 -p1
|
||||||
%patch38 -p1
|
%patch38 -p1
|
||||||
%patch39 -p1
|
%patch39 -p1
|
||||||
|
%patch40 -p1
|
||||||
%if %suse_version == 1130
|
%if %suse_version == 1130
|
||||||
%patch99 -p1
|
%patch99 -p1
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user