From a7e04535b4452b3c71935916200c11961bc90525 Mon Sep 17 00:00:00 2001 From: perex Date: Sep 12 2008 08:27:01 +0000 Subject: alsa-lib: updated to 1.0.17a --- diff --git a/.cvsignore b/.cvsignore index 8c88133..c880ce7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -19,3 +19,4 @@ alsa-lib-1.0.15rc2.tar.bz2 alsa-lib-1.0.15rc3.tar.bz2 alsa-lib-1.0.16.tar.bz2 alsa-lib-1.0.17rc2.tar.bz2 +alsa-lib-1.0.17a.tar.bz2 diff --git a/alsa-lib-1.0.17-pcm-no-flags.patch b/alsa-lib-1.0.17-pcm-no-flags.patch new file mode 100644 index 0000000..836748d --- /dev/null +++ b/alsa-lib-1.0.17-pcm-no-flags.patch @@ -0,0 +1,53 @@ +From 73d20069e072e2b62bbc3ea12e46ae19d8b6cac9 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Sun, 31 Aug 2008 03:41:48 +0200 +Subject: [PATCH] alsa-lib: Make sure SND_PCM_NO_xxx flags don't get lost when nonblocking mode is enabled + +The plug PCM copies the 'mode' field from the slave PCM. If blocking mode is +enabled for the plug PCM the mode is subsequently overwritten with the original +requested 'mode'. If non-blocking mode is requested this does not happen. + +Because the hw PCM synthesizes the 'mode' from the actual file descriptor flags +no SND_PCM_NO_xxx will ever be set for it. This has the effect that the 'mode' +of the plug PCM will also not include those flags anymore -- unless they are +overwritten as mentioned above. This basically means SND_PCM_NO_xxx is ignored +for plug:hw:4711 style device strings opened in non-blocking mode. + +You can easily test this with "aplay --channels 7 --disable-channels -f S16_LE +-r 44100 -D plug:hw:0" on a device that cannot do 7 channels. Normally this +call should fail, however if you add "-N" to the command line this call will +succeed. + +This patch simply copies the SND_PCM_NO_xxx flags back into the 'mode' field in +case we don't overwrite it with the original anyway. + +Probably closes bug 3571 for good. + +From: Lennart Poettering +Signed-off-by: Jaroslav Kysela +--- + src/pcm/pcm_hw.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/src/pcm/pcm_hw.c b/src/pcm/pcm_hw.c +index 1e1889c..c8d9a62 100644 +--- a/src/pcm/pcm_hw.c ++++ b/src/pcm/pcm_hw.c +@@ -1507,7 +1507,13 @@ int _snd_pcm_hw_open(snd_pcm_t **pcmp, const char *name, + /* revert to blocking mode for read/write access */ + snd_pcm_hw_nonblock(*pcmp, 0); + (*pcmp)->mode = mode; +- } ++ } else ++ /* make sure the SND_PCM_NO_xxx flags don't get lost on the ++ * way */ ++ (*pcmp)->mode |= mode & (SND_PCM_NO_AUTO_RESAMPLE| ++ SND_PCM_NO_AUTO_CHANNELS| ++ SND_PCM_NO_AUTO_FORMAT| ++ SND_PCM_NO_SOFTVOL); + + hw = (*pcmp)->private_data; + if (format != SND_PCM_FORMAT_UNKNOWN) +-- +1.5.5.1 + diff --git a/alsa-lib-1.0.17-pcm-softvol.patch b/alsa-lib-1.0.17-pcm-softvol.patch new file mode 100644 index 0000000..5339b24 --- /dev/null +++ b/alsa-lib-1.0.17-pcm-softvol.patch @@ -0,0 +1,73 @@ +From a13707da6bb0161db855a146c3e4d1d849e4108b Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Tue, 9 Sep 2008 13:07:39 +0200 +Subject: [PATCH] pcm_softvol plugin: remove access type change for refine + +The softvol plugin does in-place sample recalculation. The access type +cannot be changed like in linear plugins. Remove access type change +in refine functions. + +This bug was detected with PulseAudio on Sony PS3 platform. + +Signed-off-by: Jaroslav Kysela +--- + src/pcm/pcm_softvol.c | 14 ++++---------- + 1 files changed, 4 insertions(+), 10 deletions(-) + +diff --git a/src/pcm/pcm_softvol.c b/src/pcm/pcm_softvol.c +index eee6424..8268f1d 100644 +--- a/src/pcm/pcm_softvol.c ++++ b/src/pcm/pcm_softvol.c +@@ -399,7 +399,6 @@ static int snd_pcm_softvol_hw_refine_cprepare(snd_pcm_t *pcm, + { + int err; + snd_pcm_softvol_t *svol = pcm->private_data; +- snd_pcm_access_mask_t access_mask = { SND_PCM_ACCBIT_SHM }; + snd_pcm_format_mask_t format_mask = { + { + (1ULL << SND_PCM_FORMAT_S16_LE) | +@@ -413,10 +412,6 @@ static int snd_pcm_softvol_hw_refine_cprepare(snd_pcm_t *pcm, + snd_pcm_format_mask_none(&format_mask); + snd_pcm_format_mask_set(&format_mask, svol->sformat); + } +- err = _snd_pcm_hw_param_set_mask(params, SND_PCM_HW_PARAM_ACCESS, +- &access_mask); +- if (err < 0) +- return err; + err = _snd_pcm_hw_param_set_mask(params, SND_PCM_HW_PARAM_FORMAT, + &format_mask); + if (err < 0) +@@ -434,10 +429,7 @@ static int snd_pcm_softvol_hw_refine_cprepare(snd_pcm_t *pcm, + static int snd_pcm_softvol_hw_refine_sprepare(snd_pcm_t *pcm, snd_pcm_hw_params_t *sparams) + { + snd_pcm_softvol_t *svol = pcm->private_data; +- snd_pcm_access_mask_t saccess_mask = { SND_PCM_ACCBIT_MMAP }; + _snd_pcm_hw_params_any(sparams); +- _snd_pcm_hw_param_set_mask(sparams, SND_PCM_HW_PARAM_ACCESS, +- &saccess_mask); + if (svol->sformat != SND_PCM_FORMAT_UNKNOWN) { + _snd_pcm_hw_params_set_format(sparams, svol->sformat); + _snd_pcm_hw_params_set_subformat(sparams, SND_PCM_SUBFORMAT_STD); +@@ -451,7 +443,8 @@ static int snd_pcm_softvol_hw_refine_schange(snd_pcm_t *pcm, + { + snd_pcm_softvol_t *svol = pcm->private_data; + int err; +- unsigned int links = (SND_PCM_HW_PARBIT_CHANNELS | ++ unsigned int links = (SND_PCM_HW_PARBIT_ACCESS | ++ SND_PCM_HW_PARBIT_CHANNELS | + SND_PCM_HW_PARBIT_RATE | + SND_PCM_HW_PARBIT_PERIODS | + SND_PCM_HW_PARBIT_PERIOD_SIZE | +@@ -475,7 +468,8 @@ static int snd_pcm_softvol_hw_refine_cchange(snd_pcm_t *pcm, + { + snd_pcm_softvol_t *svol = pcm->private_data; + int err; +- unsigned int links = (SND_PCM_HW_PARBIT_CHANNELS | ++ unsigned int links = (SND_PCM_HW_PARBIT_ACCESS | ++ SND_PCM_HW_PARBIT_CHANNELS | + SND_PCM_HW_PARBIT_RATE | + SND_PCM_HW_PARBIT_PERIODS | + SND_PCM_HW_PARBIT_PERIOD_SIZE | +-- +1.5.5.1 + diff --git a/alsa-lib.spec b/alsa-lib.spec index 0c7c304..661f3b0 100644 --- a/alsa-lib.spec +++ b/alsa-lib.spec @@ -1,10 +1,11 @@ -%define prever rc2 -%define prever_dot .rc2 +#define prever rc2 +#define prever_dot .%{prever} +%define postver a Summary: The Advanced Linux Sound Architecture (ALSA) library Name: alsa-lib Version: 1.0.17 -Release: 1%{?prever_dot}%{?dist} +Release: 2%{?prever_dot}%{?dist} License: LGPLv2+ Group: System Environment/Libraries Source: ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}%{?prever}%{?postver}.tar.bz2 @@ -12,6 +13,8 @@ Patch0: alsa-lib-1.0.14rc1-config.patch Patch2: alsa-lib-1.0.14-glibc-open.patch Patch3: alsa-lib-pulse-default.patch Patch4: alsa-lib-1.0.16-no-dox-date.patch +Patch5: alsa-lib-1.0.17-pcm-no-flags.patch +Patch6: alsa-lib-1.0.17-pcm-softvol.patch URL: http://www.alsa-project.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: doxygen @@ -39,11 +42,13 @@ This package includes the ALSA development libraries for developing against the ALSA libraries and interfaces. %prep -%setup -q -n %{name}-%{version}%{?prever} +%setup -q -n %{name}-%{version}%{?prever}%{?postver} %patch0 -p1 -b .config %patch2 -p1 -b .glibc-open %patch3 -p1 -b .pulse-default %patch4 -p1 -b .no-dox-date +%patch5 -p1 -b .pcm-no-flags +%patch6 -p1 -b .pcm-softvol %build %configure --with-configdir=%{_sysconfdir}/alsa @@ -91,6 +96,9 @@ ln -snf ../../etc/alsa %{_datadir}/alsa %{_datadir}/aclocal/alsa.m4 %changelog +* Fri Sep 12 2008 Jaroslav Kysela 1.0.17-2 +- updated to 1.0.17a + * Thu Jun 19 2008 Jaroslav Kysela 1.0.17-1.rc2 - updated to 1.0.17rc2 diff --git a/sources b/sources index 67ad5c5..60a77c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5177ad39854d2fb7fcc567bf24ba99f4 alsa-lib-1.0.17rc2.tar.bz2 +4284535ff10f5e71152f8f69b325d08d alsa-lib-1.0.17a.tar.bz2