This commit is contained in:
parent
874c78db7d
commit
f240a0bb90
@ -1,3 +1,57 @@
|
||||
diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c
|
||||
index c73a02b..c4f5b4a 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;
|
||||
@@ -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)
|
||||
@@ -234,9 +234,9 @@ 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)
|
||||
+ if ((snd_pcm_uframes_t)n < frames)
|
||||
frames = n;
|
||||
if (frames == 0)
|
||||
return 0;
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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,
|
||||
diff --git a/src/pcm/pcm_softvol.c b/src/pcm/pcm_softvol.c
|
||||
index 7af7f40..eee6424 100644
|
||||
--- a/src/pcm/pcm_softvol.c
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 28 18:16:43 CEST 2008 - tiwai@suse.de
|
||||
|
||||
- fix snd_pcm_rewind() and snd_pcm_forward() for plugins,
|
||||
mainly for pulseaudio
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 16 12:36:55 CEST 2008 - tiwai@suse.de
|
||||
|
||||
|
@ -22,7 +22,7 @@ PreReq: %insserv_prereq %fillup_prereq
|
||||
AutoReqProv: on
|
||||
Summary: Advanced Linux Sound Architecture
|
||||
Version: 1.0.17
|
||||
Release: 1
|
||||
Release: 6
|
||||
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
||||
Source8: 40-alsa.rules
|
||||
Source11: alsasound
|
||||
@ -252,6 +252,9 @@ exit 0
|
||||
%{_datadir}/alsa
|
||||
|
||||
%changelog
|
||||
* Mon Jul 28 2008 tiwai@suse.de
|
||||
- fix snd_pcm_rewind() and snd_pcm_forward() for plugins,
|
||||
mainly for pulseaudio
|
||||
* Wed Jul 16 2008 tiwai@suse.de
|
||||
- fix baselibs.conf (remove alsa.rpm)
|
||||
- add a mute-switch function to softvol
|
||||
|
Loading…
x
Reference in New Issue
Block a user