This commit is contained in:
parent
3d5d0c2213
commit
a8705ee2f6
50
alsa-lib-ioplug-fix.diff
Normal file
50
alsa-lib-ioplug-fix.diff
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User tiwai
|
||||||
|
# Date 1194263206 -3600
|
||||||
|
# Node ID c82755151f76b40eb0f99dec961b073f450763bb
|
||||||
|
# Parent 8069595414f25236461492265786670352ac4d3a
|
||||||
|
ioplug - Fix the refinement of period_* after periods
|
||||||
|
|
||||||
|
When changing only PERIODS after BUFFER_*, ioplug doesn't update
|
||||||
|
the corresponding PERIOD_* parameters properly. This should fix
|
||||||
|
ALSA bug#2601.
|
||||||
|
|
||||||
|
diff -r 8069595414f2 -r c82755151f76 src/pcm/pcm_ioplug.c
|
||||||
|
--- a/src/pcm/pcm_ioplug.c Tue Oct 30 14:28:30 2007 +0100
|
||||||
|
+++ b/src/pcm/pcm_ioplug.c Mon Nov 05 12:46:46 2007 +0100
|
||||||
|
@@ -313,7 +313,7 @@ static int snd_pcm_ioplug_hw_refine(snd_
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
change2 |= err;
|
||||||
|
- /* periods = buffer_bytes / periods */
|
||||||
|
+ /* periods = buffer_bytes / period_bytes */
|
||||||
|
err = rule_div(params, SND_PCM_HW_PARAM_PERIODS,
|
||||||
|
SND_PCM_HW_PARAM_BUFFER_BYTES,
|
||||||
|
SND_PCM_HW_PARAM_PERIOD_BYTES);
|
||||||
|
@@ -340,6 +340,26 @@ static int snd_pcm_ioplug_hw_refine(snd_
|
||||||
|
err = refine_back_time_and_size(params, SND_PCM_HW_PARAM_BUFFER_TIME,
|
||||||
|
SND_PCM_HW_PARAM_BUFFER_SIZE,
|
||||||
|
SND_PCM_HW_PARAM_BUFFER_BYTES);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ return err;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* period_bytes = buffer_bytes / periods */
|
||||||
|
+ err = rule_div(params, SND_PCM_HW_PARAM_PERIOD_BYTES,
|
||||||
|
+ SND_PCM_HW_PARAM_BUFFER_BYTES,
|
||||||
|
+ SND_PCM_HW_PARAM_PERIODS);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ return err;
|
||||||
|
+ if (err) {
|
||||||
|
+ /* update period_size and period_time */
|
||||||
|
+ change |= err;
|
||||||
|
+ err = snd_ext_parm_interval_refine(hw_param_interval(params, SND_PCM_HW_PARAM_PERIOD_BYTES),
|
||||||
|
+ io->params, SND_PCM_IOPLUG_HW_PERIOD_BYTES);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ return err;
|
||||||
|
+ err = refine_back_time_and_size(params, SND_PCM_HW_PARAM_PERIOD_TIME,
|
||||||
|
+ SND_PCM_HW_PARAM_PERIOD_SIZE,
|
||||||
|
+ SND_PCM_HW_PARAM_PERIOD_BYTES);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
}
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 5 17:29:33 CET 2007 - tiwai@suse.de
|
||||||
|
|
||||||
|
- fix ioplug plugin (for pulse or others) to adjust period hw
|
||||||
|
params properly.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Oct 30 14:32:59 CET 2007 - tiwai@suse.de
|
Tue Oct 30 14:32:59 CET 2007 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Summary: Advanced Linux Sound Architecture
|
Summary: Advanced Linux Sound Architecture
|
||||||
Version: 1.0.15
|
Version: 1.0.15
|
||||||
Release: 5
|
Release: 7
|
||||||
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
||||||
Source8: 40-alsa.rules
|
Source8: 40-alsa.rules
|
||||||
Source11: alsasound
|
Source11: alsasound
|
||||||
@ -36,6 +36,7 @@ Source30: all_notes_off
|
|||||||
Source31: all_notes_off.bin
|
Source31: all_notes_off.bin
|
||||||
Source32: all_notes_off.mid
|
Source32: all_notes_off.mid
|
||||||
Patch: alsa-lib-hg-fixes.diff
|
Patch: alsa-lib-hg-fixes.diff
|
||||||
|
Patch1: alsa-lib-ioplug-fix.diff
|
||||||
Url: http://www.alsa-project.org/
|
Url: http://www.alsa-project.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ Authors:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n alsa-lib-%{package_version}
|
%setup -q -n alsa-lib-%{package_version}
|
||||||
%patch -p1
|
%patch -p1
|
||||||
|
%patch1 -p1
|
||||||
%{?suse_update_config:%{suse_update_config -f .}}
|
%{?suse_update_config:%{suse_update_config -f .}}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -248,6 +250,9 @@ exit 0
|
|||||||
%{_libdir}/alsa-lib
|
%{_libdir}/alsa-lib
|
||||||
%{_datadir}/alsa
|
%{_datadir}/alsa
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 05 2007 - tiwai@suse.de
|
||||||
|
- fix ioplug plugin (for pulse or others) to adjust period hw
|
||||||
|
params properly.
|
||||||
* Tue Oct 30 2007 - tiwai@suse.de
|
* Tue Oct 30 2007 - tiwai@suse.de
|
||||||
- re-add assert.h to asoundlib.h since some packages got broken
|
- re-add assert.h to asoundlib.h since some packages got broken
|
||||||
* Mon Oct 29 2007 - tiwai@suse.de
|
* Mon Oct 29 2007 - tiwai@suse.de
|
||||||
|
Loading…
x
Reference in New Issue
Block a user