* [gentoo-commits] gentoo-x86 commit in media-libs/alsa-lib/files: alsa-lib-1.0.17-pcm-rewind-forward-return.patch alsa-lib-1.0.17-sframe-type.patch alsa-lib-1.0.17-pcm-rewind-forward.patch
@ 2008-08-03 17:12 Patrick McLean (chutzpah)
0 siblings, 0 replies; only message in thread
From: Patrick McLean (chutzpah) @ 2008-08-03 17:12 UTC (permalink / raw
To: gentoo-commits
chutzpah 08/08/03 17:12:34
Added: alsa-lib-1.0.17-pcm-rewind-forward-return.patch
alsa-lib-1.0.17-sframe-type.patch
alsa-lib-1.0.17-pcm-rewind-forward.patch
Log:
Add three patches from upstream ALSA git for pulseaudio (bug #233789). Betelgeuse confirmed this bump with Chainsaw.
(Portage version: 2.2_rc6/cvs/Linux 2.6.26-gentoo x86_64)
Revision Changes Path
1.1 media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch?rev=1.1&content-type=text/plain
Index: alsa-lib-1.0.17-pcm-rewind-forward-return.patch
===================================================================
From: Lennart Poettering <mznyfn@0pointer.de>
Date: Fri, 18 Jul 2008 19:24:38 +0000 (+0200)
Subject: fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually ...
X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=8d3fb3102f672a7b09be92811e89d49f89c1742b
fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually has been rewound, instead of what actually could have rewound
Make snd_pcm_plugin_rewind()/_forward() actually return how much has
been rewound/forwarded instead of how much could have been
rewounded/forwarded. This makes the code actually do what the
documentation of snd_pcm_rewind() suggests.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index b377cb2..c4f5b4a 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -222,7 +222,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
frames = plugin->client_frames(pcm, sframes);
snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) frames);
snd_atomic_write_end(&plugin->watom);
- return n;
+ return (snd_pcm_sframes_t) frames;
}
static snd_pcm_sframes_t snd_pcm_plugin_forwardable(snd_pcm_t *pcm)
@@ -255,7 +255,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
frames = plugin->client_frames(pcm, sframes);
snd_pcm_mmap_appl_forward(pcm, (snd_pcm_uframes_t) frames);
snd_atomic_write_end(&plugin->watom);
- return n;
+ return (snd_pcm_sframes_t) frames;
}
static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm,
1.1 media-libs/alsa-lib/files/alsa-lib-1.0.17-sframe-type.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.17-sframe-type.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.17-sframe-type.patch?rev=1.1&content-type=text/plain
Index: alsa-lib-1.0.17-sframe-type.patch
===================================================================
From: Lennart Poettering <mznyfn@0pointer.de>
Date: Fri, 18 Jul 2008 19:22:50 +0000 (+0200)
Subject: fix type of internally used sframes variable, to avoid unnecessary casts
X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=15769ead725b7c215dedd4ea5196955086d2044a
fix type of internally used sframes variable, to avoid unnecessary casts
This minor patch fixes the type of the sframes variable in
snd_pcm_plugin_forward(). With this fix we need to cast less and the
code is less confusing.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index c199d8d..b377cb2 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -234,7 +234,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
{
snd_pcm_plugin_t *plugin = pcm->private_data;
snd_pcm_sframes_t n = snd_pcm_mmap_avail(pcm);
- snd_pcm_uframes_t sframes;
+ snd_pcm_sframes_t sframes;
if ((snd_pcm_uframes_t)n < frames)
frames = n;
@@ -246,8 +246,8 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
else
sframes = frames;
snd_atomic_write_begin(&plugin->watom);
- sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, (snd_pcm_uframes_t) sframes);
- if ((snd_pcm_sframes_t) sframes < 0) {
+ sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, sframes);
+ if (sframes < 0) {
snd_atomic_write_end(&plugin->watom);
return sframes;
}
1.1 media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward.patch?rev=1.1&content-type=text/plain
Index: alsa-lib-1.0.17-pcm-rewind-forward.patch
===================================================================
From: Lennart Poettering <mznyfn@0pointer.de>
Date: Fri, 18 Jul 2008 19:21:23 +0000 (+0200)
Subject: clamp snd_pcm_rewind()/snd_pcm_forward() into the right direction
X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=0fbfe2d8d6aac06e6615b7109ffc1fea8c62dee6
clamp snd_pcm_rewind()/snd_pcm_forward() into the right direction
The clamping of the input parameter in snd_pcm_rewind()/_forward() is
in the wrong direction.
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
index c73a02b..c199d8d 100644
--- a/src/pcm/pcm_plugin.c
+++ b/src/pcm/pcm_plugin.c
@@ -203,7 +203,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
snd_pcm_sframes_t n = snd_pcm_mmap_hw_avail(pcm);
snd_pcm_sframes_t sframes;
- if ((snd_pcm_uframes_t)n > frames)
+ if ((snd_pcm_uframes_t)n < frames)
frames = n;
if (frames == 0)
return 0;
@@ -236,7 +236,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_
snd_pcm_sframes_t n = snd_pcm_mmap_avail(pcm);
snd_pcm_uframes_t sframes;
- if ((snd_pcm_uframes_t)n > frames)
+ if ((snd_pcm_uframes_t)n < frames)
frames = n;
if (frames == 0)
return 0;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-03 17:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-03 17:12 [gentoo-commits] gentoo-x86 commit in media-libs/alsa-lib/files: alsa-lib-1.0.17-pcm-rewind-forward-return.patch alsa-lib-1.0.17-sframe-type.patch alsa-lib-1.0.17-pcm-rewind-forward.patch Patrick McLean (chutzpah)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox