Hello community,
here is the log from the commit of package alsa for openSUSE:Factory
checked in at Fri Apr 23 19:20:20 CEST 2010.
--------
--- alsa/alsa.changes 2010-03-17 14:34:11.000000000 +0100
+++ alsa/alsa.changes 2010-04-19 10:39:18.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Apr 19 10:38:27 CEST 2010 - tiwai@suse.de
+
+- updated to version 1.0.23:
+ * including previous fixes
+ * pcm_share plugin: fix pcm->monotonic setup in open() function
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
alsa-lib-1.0.22.tar.bz2
alsa-lib-dmix-add-s24-le-support.diff
alsa-lib-fix-s24-3le-softvol.diff
alsa-lib-fix-snd_pcm_sw_params_set_period_event.diff
alsa-lib-modem-conf-off-hook.diff
alsa-lib-pcm-close-event-timer.diff
alsa-lib-pcm-direct-drain-enhance.diff
alsa-lib-pcm-fix-read-write_areas.diff
alsa-lib-pcm-show-errno.diff
New:
----
alsa-lib-1.0.23.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ alsa.spec ++++++
--- /var/tmp/diff_new_pack.KBtOyg/_old 2010-04-23 19:19:35.000000000 +0200
+++ /var/tmp/diff_new_pack.KBtOyg/_new 2010-04-23 19:19:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package alsa (Version 1.0.22)
+# spec file for package alsa (Version 1.0.23)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,8 +20,8 @@
Name: alsa
BuildRequires: doxygen
-%define package_version 1.0.22
-License: GPLv2+
+%define package_version 1.0.23
+License: LGPLv2.1+
Group: System/Libraries
Requires: alsa-utils
Recommends: alsa-plugins alsa-oss
@@ -33,8 +33,8 @@
%endif
#
Summary: Advanced Linux Sound Architecture
-Version: 1.0.22
-Release: 3
+Version: 1.0.23
+Release: 1
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
Source2: baselibs.conf
Source8: 40-alsa.rules
@@ -52,14 +52,6 @@
Source33: alsa-info.sh
Source34: alsa-init.sh
# Patch: alsa-lib-git-fixes.diff
-Patch1: alsa-lib-pcm-close-event-timer.diff
-Patch2: alsa-lib-fix-s24-3le-softvol.diff
-Patch3: alsa-lib-modem-conf-off-hook.diff
-Patch4: alsa-lib-pcm-fix-read-write_areas.diff
-Patch5: alsa-lib-fix-snd_pcm_sw_params_set_period_event.diff
-Patch6: alsa-lib-dmix-add-s24-le-support.diff
-Patch7: alsa-lib-pcm-direct-drain-enhance.diff
-Patch8: alsa-lib-pcm-show-errno.diff
Url: http://www.alsa-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -135,14 +127,6 @@
%prep
%setup -q -n alsa-lib-%{package_version}
# %patch -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
# hack to fix build on older distros
%if %suse_version < 1100
%ifarch %ix86
++++++ alsa-lib-1.0.22.tar.bz2 -> alsa-lib-1.0.23.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/configure new/alsa-lib-1.0.23/configure
--- old/alsa-lib-1.0.22/configure 2009-12-16 16:27:29.000000000 +0100
+++ new/alsa-lib-1.0.23/configure 2010-04-16 13:17:49.000000000 +0200
@@ -2449,7 +2449,7 @@
# Define the identity of the package.
PACKAGE=alsa-lib
- VERSION=1.0.22
+ VERSION=1.0.23
cat >>confdefs.h <<_ACEOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/configure.in new/alsa-lib-1.0.23/configure.in
--- old/alsa-lib-1.0.22/configure.in 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/configure.in 2010-04-16 13:11:05.000000000 +0200
@@ -12,7 +12,7 @@
dnl remove API = c+1:0:0
dnl *************************************************
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE(alsa-lib, 1.0.22)
+AM_INIT_AUTOMAKE(alsa-lib, 1.0.23)
eval LIBTOOL_VERSION_INFO="2:0:0"
dnl *************************************************
AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/include/control.h new/alsa-lib-1.0.23/include/control.h
--- old/alsa-lib-1.0.22/include/control.h 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/include/control.h 2010-04-16 13:11:05.000000000 +0200
@@ -423,6 +423,7 @@
void snd_ctl_elem_value_free(snd_ctl_elem_value_t *obj);
void snd_ctl_elem_value_clear(snd_ctl_elem_value_t *obj);
void snd_ctl_elem_value_copy(snd_ctl_elem_value_t *dst, const snd_ctl_elem_value_t *src);
+int snd_ctl_elem_value_compare(snd_ctl_elem_value_t *left, const snd_ctl_elem_value_t *right);
void snd_ctl_elem_value_get_id(const snd_ctl_elem_value_t *obj, snd_ctl_elem_id_t *ptr);
unsigned int snd_ctl_elem_value_get_numid(const snd_ctl_elem_value_t *obj);
snd_ctl_elem_iface_t snd_ctl_elem_value_get_interface(const snd_ctl_elem_value_t *obj);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/include/iatomic.h new/alsa-lib-1.0.23/include/iatomic.h
--- old/alsa-lib-1.0.22/include/iatomic.h 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/include/iatomic.h 2010-04-16 13:11:05.000000000 +0200
@@ -1079,6 +1079,29 @@
#endif /* __sh__ */
+#ifdef __bfin__
+
+#include
+
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) (((v)->counter) = (i))
+#define atomic_add(i,v) bfin_atomic_add32(&(v)->counter, i)
+#define atomic_sub(i,v) bfin_atomic_sub32(&(v)->counter, i)
+#define atomic_inc(v) bfin_atomic_inc32(&(v)->counter);
+#define atomic_dec(v) bfin_atomic_dec32(&(v)->counter);
+
+#define mb() __asm__ __volatile__ ("" : : : "memory")
+#define rmb() mb()
+#define wmb() mb()
+
+#define IATOMIC_DEFINED 1
+
+#endif /* __bfin__ */
+
#ifndef IATOMIC_DEFINED
/*
* non supported architecture.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/include/version.h new/alsa-lib-1.0.23/include/version.h
--- old/alsa-lib-1.0.22/include/version.h 2009-12-16 16:27:39.000000000 +0100
+++ new/alsa-lib-1.0.23/include/version.h 2010-04-16 13:18:02.000000000 +0200
@@ -4,12 +4,12 @@
#define SND_LIB_MAJOR 1 /**< major number of library version */
#define SND_LIB_MINOR 0 /**< minor number of library version */
-#define SND_LIB_SUBMINOR 22 /**< subminor number of library version */
+#define SND_LIB_SUBMINOR 23 /**< subminor number of library version */
#define SND_LIB_EXTRAVER 1000000 /**< extra version number, used mainly for betas */
/** library version */
#define SND_LIB_VERSION ((SND_LIB_MAJOR<<16)|\
(SND_LIB_MINOR<<8)|\
SND_LIB_SUBMINOR)
/** library version (string) */
-#define SND_LIB_VERSION_STR "1.0.22"
+#define SND_LIB_VERSION_STR "1.0.23"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/libtool new/alsa-lib-1.0.23/libtool
--- old/alsa-lib-1.0.22/libtool 2009-12-16 16:27:36.000000000 +0100
+++ new/alsa-lib-1.0.23/libtool 2010-04-16 13:17:57.000000000 +0200
@@ -1,7 +1,7 @@
#! /bin/sh
# libtoolT - Provide generalized library-building support services.
-# Generated automatically by (GNU alsa-lib 1.0.22)
+# Generated automatically by (GNU alsa-lib 1.0.23)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/control/control.c new/alsa-lib-1.0.23/src/control/control.c
--- old/alsa-lib-1.0.22/src/control/control.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/control/control.c 2010-04-16 13:11:05.000000000 +0200
@@ -2249,6 +2249,18 @@
}
/**
+ * \brief compare one #snd_ctl_elem_value_t to another
+ * \param dst pointer to destination
+ * \param src pointer to source
+ * \return 0 on match, less than or greater than otherwise, see memcmp
+ */
+int snd_ctl_elem_value_compare(snd_ctl_elem_value_t *left, const snd_ctl_elem_value_t *right)
+{
+ assert(left && right);
+ return memcmp(left, right, sizeof(*left));
+}
+
+/**
* \brief Get CTL element identifier of a CTL element id/value
* \param obj CTL element id/value
* \param ptr Pointer to returned CTL element identifier
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/control/setup.c new/alsa-lib-1.0.23/src/control/setup.c
--- old/alsa-lib-1.0.22/src/control/setup.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/control/setup.c 2010-04-16 13:11:05.000000000 +0200
@@ -192,7 +192,17 @@
return err;
}
}
- if (elem->preserve) {
+ /* Only restore the old value if it differs from the requested
+ * value, because if it has changed restoring the old value
+ * overrides the change. Take for example, a voice modem with
+ * a .conf that sets preserve off-hook. Start playback (on-hook
+ * to off-hook), start record (off-hook to off-hook), stop
+ * playback (off-hook to restore on-hook), stop record (on-hook
+ * to restore off-hook), Clearly you don't want to leave the
+ * modem "on the phone" now that there isn't any playback or
+ * recording active.
+ */
+ if (elem->preserve && snd_ctl_elem_value_compare(elem->val, elem->old)) {
err = snd_ctl_elem_write(h->ctl, elem->old);
if (err < 0) {
SNDERR("Cannot restore ctl elem");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm.c new/alsa-lib-1.0.23/src/pcm/pcm.c
--- old/alsa-lib-1.0.22/src/pcm/pcm.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm.c 2010-04-16 13:11:05.000000000 +0200
@@ -6528,46 +6528,51 @@
{
snd_pcm_uframes_t xfer = 0;
snd_pcm_sframes_t err = 0;
- snd_pcm_state_t state = snd_pcm_state(pcm);
+ snd_pcm_state_t state;
if (size == 0)
return 0;
- switch (state) {
- case SND_PCM_STATE_PREPARED:
- err = snd_pcm_start(pcm);
- if (err < 0)
- goto _end;
- break;
- case SND_PCM_STATE_DRAINING:
- case SND_PCM_STATE_RUNNING:
- break;
- case SND_PCM_STATE_XRUN:
- return -EPIPE;
- case SND_PCM_STATE_SUSPENDED:
- return -ESTRPIPE;
- case SND_PCM_STATE_DISCONNECTED:
- return -ENODEV;
- default:
- return -EBADFD;
- }
-
while (size > 0) {
snd_pcm_uframes_t frames;
snd_pcm_sframes_t avail;
_again:
- if (state == SND_PCM_STATE_RUNNING) {
+ state = snd_pcm_state(pcm);
+ switch (state) {
+ case SND_PCM_STATE_PREPARED:
+ err = snd_pcm_start(pcm);
+ if (err < 0)
+ goto _end;
+ break;
+ case SND_PCM_STATE_RUNNING:
err = snd_pcm_hwsync(pcm);
if (err < 0)
goto _end;
+ break;
+ case SND_PCM_STATE_DRAINING:
+ case SND_PCM_STATE_PAUSED:
+ break;
+ case SND_PCM_STATE_XRUN:
+ err = -EPIPE;
+ goto _end;
+ case SND_PCM_STATE_SUSPENDED:
+ err = -ESTRPIPE;
+ goto _end;
+ case SND_PCM_STATE_DISCONNECTED:
+ err = -ENODEV;
+ goto _end;
+ default:
+ err = -EBADFD;
+ goto _end;
}
avail = snd_pcm_avail_update(pcm);
if (avail < 0) {
err = avail;
goto _end;
}
- if ((snd_pcm_uframes_t)avail < pcm->avail_min &&
- size > (snd_pcm_uframes_t)avail) {
+ if (avail == 0) {
+ if (state == SND_PCM_STATE_DRAINING)
+ goto _end;
if (pcm->mode & SND_PCM_NONBLOCK) {
err = -EAGAIN;
goto _end;
@@ -6602,33 +6607,37 @@
{
snd_pcm_uframes_t xfer = 0;
snd_pcm_sframes_t err = 0;
- snd_pcm_state_t state = snd_pcm_state(pcm);
+ snd_pcm_state_t state;
if (size == 0)
return 0;
- switch (state) {
- case SND_PCM_STATE_PREPARED:
- case SND_PCM_STATE_RUNNING:
- break;
- case SND_PCM_STATE_XRUN:
- return -EPIPE;
- case SND_PCM_STATE_SUSPENDED:
- return -ESTRPIPE;
- case SND_PCM_STATE_DISCONNECTED:
- return -ENODEV;
- default:
- return -EBADFD;
- }
-
while (size > 0) {
snd_pcm_uframes_t frames;
snd_pcm_sframes_t avail;
_again:
- if (state == SND_PCM_STATE_RUNNING) {
+ state = snd_pcm_state(pcm);
+ switch (state) {
+ case SND_PCM_STATE_PREPARED:
+ case SND_PCM_STATE_PAUSED:
+ break;
+ case SND_PCM_STATE_RUNNING:
err = snd_pcm_hwsync(pcm);
if (err < 0)
goto _end;
+ break;
+ case SND_PCM_STATE_XRUN:
+ err = -EPIPE;
+ goto _end;
+ case SND_PCM_STATE_SUSPENDED:
+ err = -ESTRPIPE;
+ goto _end;
+ case SND_PCM_STATE_DISCONNECTED:
+ err = -ENODEV;
+ goto _end;
+ default:
+ err = -EBADFD;
+ goto _end;
}
avail = snd_pcm_avail_update(pcm);
if (avail < 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_direct.c new/alsa-lib-1.0.23/src/pcm/pcm_direct.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_direct.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_direct.c 2010-04-16 13:11:05.000000000 +0200
@@ -540,7 +540,6 @@
int snd_pcm_direct_timer_stop(snd_pcm_direct_t *dmix)
{
snd_timer_stop(dmix->timer);
- snd_pcm_direct_clear_timer_queue(dmix);
return 0;
}
@@ -567,6 +566,7 @@
switch (snd_pcm_state(dmix->spcm)) {
case SND_PCM_STATE_XRUN:
case SND_PCM_STATE_SUSPENDED:
+ case SND_PCM_STATE_SETUP:
events |= POLLERR;
break;
default:
@@ -577,6 +577,7 @@
switch (snd_pcm_state(pcm)) {
case SND_PCM_STATE_XRUN:
case SND_PCM_STATE_SUSPENDED:
+ case SND_PCM_STATE_SETUP:
events |= POLLERR;
break;
default:
@@ -888,6 +889,7 @@
SND_PCM_FORMAT_S32 ^ SND_PCM_FORMAT_S32_LE ^ SND_PCM_FORMAT_S32_BE,
SND_PCM_FORMAT_S16,
SND_PCM_FORMAT_S16 ^ SND_PCM_FORMAT_S16_LE ^ SND_PCM_FORMAT_S16_BE,
+ SND_PCM_FORMAT_S24_LE,
SND_PCM_FORMAT_S24_3LE,
SND_PCM_FORMAT_U8,
};
@@ -1125,8 +1127,9 @@
snd_timer_poll_descriptors(dmix->timer, &dmix->timer_fd, 1);
dmix->poll_fd = dmix->timer_fd.fd;
- dmix->timer_event_suspend = 1<timer_event_resume = 1<timer_events = (1<timer_event_suspend = 1<timer_event_resume = 1<timer_events &= ~((1<timer_events |= (1<timer_events |= 1<tread) {
filter = (1<timer_event_suspend |
- dmix->timer_event_resume;
+ dmix->timer_events;
snd_timer_params_set_filter(params, filter);
}
ret = snd_timer_params(dmix->timer, params);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_direct.h new/alsa-lib-1.0.23/src/pcm/pcm_direct.h
--- old/alsa-lib-1.0.22/src/pcm/pcm_direct.h 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_direct.h 2010-04-16 13:11:05.000000000 +0200
@@ -142,10 +142,9 @@
int hw_fd; /* hardware file descriptor */
struct pollfd timer_fd;
int poll_fd;
- int tread;
- int timer_need_poll;
- unsigned int timer_event_suspend;
- unsigned int timer_event_resume;
+ int tread: 1;
+ int timer_need_poll: 1;
+ unsigned int timer_events;
int server_fd;
pid_t server_pid;
snd_timer_t *timer; /* timer used as poll_fd */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_dmix.c new/alsa-lib-1.0.23/src/pcm/pcm_dmix.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_dmix.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_dmix.c 2010-04-16 13:11:05.000000000 +0200
@@ -174,6 +174,10 @@
sample_size = 4;
do_mix_areas = (mix_areas_t *)dmix->u.dmix.mix_areas_32;
break;
+ case SND_PCM_FORMAT_S24_LE:
+ sample_size = 4;
+ do_mix_areas = (mix_areas_t *)dmix->u.dmix.mix_areas_24;
+ break;
case SND_PCM_FORMAT_S24_3LE:
sample_size = 3;
do_mix_areas = (mix_areas_t *)dmix->u.dmix.mix_areas_24;
@@ -238,6 +242,10 @@
sample_size = 4;
do_remix_areas = (mix_areas_t *)dmix->u.dmix.remix_areas_32;
break;
+ case SND_PCM_FORMAT_S24_LE:
+ sample_size = 4;
+ do_remix_areas = (mix_areas_t *)dmix->u.dmix.remix_areas_24;
+ break;
case SND_PCM_FORMAT_S24_3LE:
sample_size = 3;
do_remix_areas = (mix_areas_t *)dmix->u.dmix.remix_areas_24;
@@ -597,8 +605,8 @@
snd_pcm_direct_t *dmix = pcm->private_data;
if (dmix->state == SND_PCM_STATE_OPEN)
return -EBADFD;
- snd_pcm_direct_timer_stop(dmix);
dmix->state = SND_PCM_STATE_SETUP;
+ snd_pcm_direct_timer_stop(dmix);
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_dmix_generic.c new/alsa-lib-1.0.23/src/pcm/pcm_dmix_generic.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_dmix_generic.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_dmix_generic.c 2010-04-16 13:11:05.000000000 +0200
@@ -122,7 +122,7 @@
#define generic_dmix_supported_format \
((1ULL << SND_PCM_FORMAT_S16_LE) | (1ULL << SND_PCM_FORMAT_S32_LE) |\
(1ULL << SND_PCM_FORMAT_S16_BE) | (1ULL << SND_PCM_FORMAT_S32_BE) |\
- (1ULL << SND_PCM_FORMAT_S24_3LE) | \
+ (1ULL << SND_PCM_FORMAT_S24_LE) | (1ULL << SND_PCM_FORMAT_S24_3LE) | \
(1ULL << SND_PCM_FORMAT_U8))
#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_dmix_i386.c new/alsa-lib-1.0.23/src/pcm/pcm_dmix_i386.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_dmix_i386.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_dmix_i386.c 2010-04-16 13:11:05.000000000 +0200
@@ -77,6 +77,7 @@
#define i386_dmix_supported_format \
((1ULL << SND_PCM_FORMAT_S16_LE) |\
(1ULL << SND_PCM_FORMAT_S32_LE) |\
+ (1ULL << SND_PCM_FORMAT_S24_LE) |\
(1ULL << SND_PCM_FORMAT_S24_3LE))
#define dmix_supported_format \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_dshare.c new/alsa-lib-1.0.23/src/pcm/pcm_dshare.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_dshare.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_dshare.c 2010-04-16 13:11:05.000000000 +0200
@@ -355,9 +355,9 @@
snd_pcm_direct_t *dshare = pcm->private_data;
if (dshare->state == SND_PCM_STATE_OPEN)
return -EBADFD;
+ dshare->state = SND_PCM_STATE_SETUP;
snd_pcm_direct_timer_stop(dshare);
do_silence(pcm);
- dshare->state = SND_PCM_STATE_SETUP;
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_dsnoop.c new/alsa-lib-1.0.23/src/pcm/pcm_dsnoop.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_dsnoop.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_dsnoop.c 2010-04-16 13:11:05.000000000 +0200
@@ -280,8 +280,8 @@
snd_pcm_direct_t *dsnoop = pcm->private_data;
if (dsnoop->state == SND_PCM_STATE_OPEN)
return -EBADFD;
- snd_timer_stop(dsnoop->timer);
dsnoop->state = SND_PCM_STATE_SETUP;
+ snd_timer_stop(dsnoop->timer);
return 0;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_hw.c new/alsa-lib-1.0.23/src/pcm/pcm_hw.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_hw.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_hw.c 2010-04-16 13:11:05.000000000 +0200
@@ -135,7 +135,7 @@
err = ioctl((hw)->fd, SNDRV_PCM_IOCTL_SYNC_PTR, (hw)->sync_ptr);
if (err < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_SYNC_PTR failed");
+ SYSMSG("SNDRV_PCM_IOCTL_SYNC_PTR failed (%i)", err);
return err;
}
return 0;
@@ -202,7 +202,7 @@
if ((flags = fcntl(fd, F_GETFL)) < 0) {
err = -errno;
- SYSMSG("F_GETFL failed");
+ SYSMSG("F_GETFL failed (%i)", err);
return err;
}
if (nonblock)
@@ -211,7 +211,7 @@
flags &= ~O_NONBLOCK;
if (fcntl(fd, F_SETFL, flags) < 0) {
err = -errno;
- SYSMSG("F_SETFL for O_NONBLOCK failed");
+ SYSMSG("F_SETFL for O_NONBLOCK failed (%i)", err);
return err;
}
return 0;
@@ -225,7 +225,7 @@
if ((flags = fcntl(fd, F_GETFL)) < 0) {
err = -errno;
- SYSMSG("F_GETFL failed");
+ SYSMSG("F_GETFL failed (%i)", err);
return err;
}
if (sig >= 0)
@@ -234,19 +234,19 @@
flags &= ~O_ASYNC;
if (fcntl(fd, F_SETFL, flags) < 0) {
err = -errno;
- SYSMSG("F_SETFL for O_ASYNC failed");
+ SYSMSG("F_SETFL for O_ASYNC failed (%i)", err);
return err;
}
if (sig < 0)
return 0;
if (fcntl(fd, F_SETSIG, (long)sig) < 0) {
err = -errno;
- SYSMSG("F_SETSIG failed");
+ SYSMSG("F_SETSIG failed (%i)", err);
return err;
}
if (fcntl(fd, F_SETOWN, (long)pid) < 0) {
err = -errno;
- SYSMSG("F_SETOWN failed");
+ SYSMSG("F_SETOWN failed (%i)", err);
return err;
}
return 0;
@@ -258,7 +258,7 @@
int fd = hw->fd, err;
if (ioctl(fd, SNDRV_PCM_IOCTL_INFO, info) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_INFO failed");
+ SYSMSG("SNDRV_PCM_IOCTL_INFO failed (%i)", err);
return err;
}
return 0;
@@ -323,7 +323,7 @@
int err;
if (hw_params_call(hw, params) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_HW_PARAMS failed");
+ SYSMSG("SNDRV_PCM_IOCTL_HW_PARAMS failed (%i)", err);
return err;
}
params->info &= ~0xf0000000;
@@ -338,18 +338,6 @@
return 0;
}
-static int snd_pcm_hw_hw_free(snd_pcm_t *pcm)
-{
- snd_pcm_hw_t *hw = pcm->private_data;
- int fd = hw->fd, err;
- if (ioctl(fd, SNDRV_PCM_IOCTL_HW_FREE) < 0) {
- err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_HW_FREE failed");
- return err;
- }
- return 0;
-}
-
static void snd_pcm_hw_close_timer(snd_pcm_hw_t *hw)
{
if (hw->period_timer) {
@@ -367,9 +355,9 @@
if (enable) {
snd_timer_params_alloca(¶ms);
- err = snd_timer_hw_open(&hw->period_timer, "hw-pcm-period-event", SND_TIMER_CLASS_PCM, SND_TIMER_SCLASS_NONE, hw->card, hw->device, hw->subdevice, SND_TIMER_OPEN_NONBLOCK | SND_TIMER_OPEN_TREAD);
+ err = snd_timer_hw_open(&hw->period_timer, "hw-pcm-period-event", SND_TIMER_CLASS_PCM, SND_TIMER_SCLASS_NONE, hw->card, hw->device, (hw->subdevice << 1) | (pcm->stream & 1), SND_TIMER_OPEN_NONBLOCK | SND_TIMER_OPEN_TREAD);
if (err < 0) {
- err = snd_timer_hw_open(&hw->period_timer, "hw-pcm-period-event", SND_TIMER_CLASS_PCM, SND_TIMER_SCLASS_NONE, hw->card, hw->device, hw->subdevice, SND_TIMER_OPEN_NONBLOCK);
+ err = snd_timer_hw_open(&hw->period_timer, "hw-pcm-period-event", SND_TIMER_CLASS_PCM, SND_TIMER_SCLASS_NONE, hw->card, hw->device, (hw->subdevice << 1) | (pcm->stream & 1), SND_TIMER_OPEN_NONBLOCK);
return err;
}
if (snd_timer_poll_descriptors_count(hw->period_timer) != 1) {
@@ -421,6 +409,20 @@
} else {
snd_pcm_hw_close_timer(hw);
pcm->fast_ops = &snd_pcm_hw_fast_ops;
+ hw->period_event = 0;
+ }
+ return 0;
+}
+
+static int snd_pcm_hw_hw_free(snd_pcm_t *pcm)
+{
+ snd_pcm_hw_t *hw = pcm->private_data;
+ int fd = hw->fd, err;
+ snd_pcm_hw_change_timer(pcm, 0);
+ if (ioctl(fd, SNDRV_PCM_IOCTL_HW_FREE) < 0) {
+ err = -errno;
+ SYSMSG("SNDRV_PCM_IOCTL_HW_FREE failed (%i)", err);
+ return err;
}
return 0;
}
@@ -443,7 +445,7 @@
}
if (ioctl(fd, SNDRV_PCM_IOCTL_SW_PARAMS, params) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed");
+ SYSMSG("SNDRV_PCM_IOCTL_SW_PARAMS failed (%i)", err);
return err;
}
params->period_event = old_period_event;
@@ -465,7 +467,7 @@
i.channel = info->channel;
if (ioctl(fd, SNDRV_PCM_IOCTL_CHANNEL_INFO, &i) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_CHANNEL_INFO failed");
+ SYSMSG("SNDRV_PCM_IOCTL_CHANNEL_INFO failed (%i)", err);
return err;
}
info->channel = i.channel;
@@ -484,7 +486,7 @@
int fd = hw->fd, err;
if (ioctl(fd, SNDRV_PCM_IOCTL_STATUS, status) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_STATUS failed");
+ SYSMSG("SNDRV_PCM_IOCTL_STATUS failed (%i)", err);
return err;
}
if (SNDRV_PROTOCOL_VERSION(2, 0, 5) > hw->version) {
@@ -509,7 +511,7 @@
int fd = hw->fd, err;
if (ioctl(fd, SNDRV_PCM_IOCTL_DELAY, delayp) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_DELAY failed");
+ SYSMSG("SNDRV_PCM_IOCTL_DELAY failed (%i)", err);
return err;
}
return 0;
@@ -527,7 +529,7 @@
} else {
if (ioctl(fd, SNDRV_PCM_IOCTL_HWSYNC) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_HWSYNC failed");
+ SYSMSG("SNDRV_PCM_IOCTL_HWSYNC failed (%i)", err);
return err;
}
}
@@ -553,7 +555,7 @@
int fd = hw->fd, err;
if (ioctl(fd, SNDRV_PCM_IOCTL_PREPARE) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_PREPARE failed");
+ SYSMSG("SNDRV_PCM_IOCTL_PREPARE failed (%i)", err);
return err;
}
return sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
@@ -565,7 +567,7 @@
int fd = hw->fd, err;
if (ioctl(fd, SNDRV_PCM_IOCTL_RESET) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_RESET failed");
+ SYSMSG("SNDRV_PCM_IOCTL_RESET failed (%i)", err);
return err;
}
return sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
@@ -582,7 +584,7 @@
sync_ptr(hw, 0);
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_START) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_START failed");
+ SYSMSG("SNDRV_PCM_IOCTL_START failed (%i)", err);
#if 0
if (err == -EBADFD)
SNDERR("PCM state = %s", snd_pcm_state_name(snd_pcm_hw_state(pcm)));
@@ -598,7 +600,7 @@
int err;
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_DROP) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_DROP failed");
+ SYSMSG("SNDRV_PCM_IOCTL_DROP failed (%i)", err);
return err;
} else {
}
@@ -611,7 +613,7 @@
int err;
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_DRAIN) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_DRAIN failed");
+ SYSMSG("SNDRV_PCM_IOCTL_DRAIN failed (%i)", err);
return err;
}
return 0;
@@ -623,7 +625,7 @@
int err;
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_PAUSE, enable) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_PAUSE failed");
+ SYSMSG("SNDRV_PCM_IOCTL_PAUSE failed (%i)", err);
return err;
}
return 0;
@@ -640,7 +642,7 @@
int err;
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_REWIND, &frames) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_REWIND failed");
+ SYSMSG("SNDRV_PCM_IOCTL_REWIND failed (%i)", err);
return err;
}
err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
@@ -661,7 +663,7 @@
if (SNDRV_PROTOCOL_VERSION(2, 0, 4) <= hw->version) {
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_FORWARD, &frames) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_FORWARD failed");
+ SYSMSG("SNDRV_PCM_IOCTL_FORWARD failed (%i)", err);
return err;
}
err = sync_ptr(hw, SNDRV_PCM_SYNC_PTR_APPL);
@@ -704,7 +706,7 @@
int fd = hw->fd, err;
if (ioctl(fd, SNDRV_PCM_IOCTL_RESUME) < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_RESUME failed");
+ SYSMSG("SNDRV_PCM_IOCTL_RESUME failed (%i)", err);
return err;
}
return 0;
@@ -715,7 +717,7 @@
snd_pcm_hw_t *hw1 = pcm1->private_data;
snd_pcm_hw_t *hw2 = pcm2->private_data;
if (ioctl(hw1->fd, SNDRV_PCM_IOCTL_LINK, hw2->fd) < 0) {
- SYSMSG("SNDRV_PCM_IOCTL_LINK failed");
+ SYSMSG("SNDRV_PCM_IOCTL_LINK failed (%i)", -errno);
return -errno;
}
return 0;
@@ -724,7 +726,7 @@
static int snd_pcm_hw_link_slaves(snd_pcm_t *pcm, snd_pcm_t *master)
{
if (master->type != SND_PCM_TYPE_HW) {
- SYSMSG("Invalid type for SNDRV_PCM_IOCTL_LINK");
+ SYSMSG("Invalid type for SNDRV_PCM_IOCTL_LINK (%i)", master->type);
return -EINVAL;
}
return hw_link(master, pcm);
@@ -745,7 +747,7 @@
snd_pcm_hw_t *hw = pcm->private_data;
if (ioctl(hw->fd, SNDRV_PCM_IOCTL_UNLINK) < 0) {
- SYSMSG("SNDRV_PCM_IOCTL_UNLINK failed");
+ SYSMSG("SNDRV_PCM_IOCTL_UNLINK failed (%i)", -errno);
return -errno;
}
return 0;
@@ -845,7 +847,7 @@
err = ioctl(hw->fd, SNDRV_PCM_IOCTL_SYNC_PTR, &sync_ptr);
if (err < 0) {
err = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_SYNC_PTR failed");
+ SYSMSG("SNDRV_PCM_IOCTL_SYNC_PTR failed (%i)", err);
return err;
}
hw->sync_ptr = calloc(1, sizeof(struct sndrv_pcm_sync_ptr));
@@ -872,7 +874,7 @@
hw->fd, SNDRV_PCM_MMAP_OFFSET_CONTROL);
if (ptr == MAP_FAILED || ptr == NULL) {
err = -errno;
- SYSMSG("control mmap failed");
+ SYSMSG("control mmap failed (%i)", err);
return err;
}
hw->mmap_control = ptr;
@@ -893,7 +895,7 @@
} else {
if (munmap((void*)hw->mmap_status, page_align(sizeof(*hw->mmap_status))) < 0) {
err = -errno;
- SYSMSG("status munmap failed");
+ SYSMSG("status munmap failed (%i)", err);
return err;
}
}
@@ -910,7 +912,7 @@
} else {
if (munmap(hw->mmap_control, page_align(sizeof(*hw->mmap_control))) < 0) {
err = -errno;
- SYSMSG("control munmap failed");
+ SYSMSG("control munmap failed (%i)", err);
return err;
}
}
@@ -933,7 +935,7 @@
int err = 0;
if (close(hw->fd)) {
err = -errno;
- SYSMSG("close failed\n");
+ SYSMSG("close failed (%i)\n", err);
}
snd_pcm_hw_munmap_status(pcm);
snd_pcm_hw_munmap_control(pcm);
@@ -1127,7 +1129,7 @@
memset(&info, 0, sizeof(info));
if (ioctl(fd, SNDRV_PCM_IOCTL_INFO, &info) < 0) {
ret = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_INFO failed");
+ SYSMSG("SNDRV_PCM_IOCTL_INFO failed (%i)", ret);
close(fd);
return ret;
@@ -1146,7 +1148,7 @@
if (ioctl(fd, SNDRV_PCM_IOCTL_PVERSION, &ver) < 0) {
ret = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_PVERSION failed");
+ SYSMSG("SNDRV_PCM_IOCTL_PVERSION failed (%i)", ret);
close(fd);
return ret;
}
@@ -1288,14 +1290,14 @@
fd = snd_open_device(filename, fmode);
if (fd < 0) {
ret = -errno;
- SYSMSG("open %s failed", filename);
+ SYSMSG("open '%s' failed (%i)", filename, ret);
goto _err;
}
if (subdevice >= 0) {
memset(&info, 0, sizeof(info));
if (ioctl(fd, SNDRV_PCM_IOCTL_INFO, &info) < 0) {
ret = -errno;
- SYSMSG("SNDRV_PCM_IOCTL_INFO failed");
+ SYSMSG("SNDRV_PCM_IOCTL_INFO failed (%i)", ret);
goto _err;
}
if (info.subdevice != (unsigned int) subdevice) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_share.c new/alsa-lib-1.0.23/src/pcm/pcm_share.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_share.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_share.c 2010-04-16 13:11:05.000000000 +0200
@@ -1529,7 +1529,7 @@
pcm->private_data = share;
pcm->poll_fd = share->client_socket;
pcm->poll_events = stream == SND_PCM_STREAM_PLAYBACK ? POLLOUT : POLLIN;
- pcm->monotonic = pcm->monotonic;
+ pcm->monotonic = slave->pcm->monotonic;
snd_pcm_set_hw_ptr(pcm, &share->hw_ptr, -1, 0);
snd_pcm_set_appl_ptr(pcm, &share->appl_ptr, -1, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/src/pcm/pcm_softvol.c new/alsa-lib-1.0.23/src/pcm/pcm_softvol.c
--- old/alsa-lib-1.0.22/src/pcm/pcm_softvol.c 2009-12-16 16:18:51.000000000 +0100
+++ new/alsa-lib-1.0.23/src/pcm/pcm_softvol.c 2010-04-16 13:11:05.000000000 +0200
@@ -107,7 +107,8 @@
v.i = a;
y.i = 0;
#if __BYTE_ORDER == __LITTLE_ENDIAN
- x.i = (unsigned int)v.s[0] * b;
+ x.i = (unsigned short)v.s[0];
+ x.i *= b;
y.s[0] = x.s[1];
y.i += (int)v.s[1] * b;
#else
@@ -135,6 +136,23 @@
return swap ? (int)bswap_32(fraction) : fraction;
}
+/* always little endian */
+static inline int MULTI_DIV_24(int a, unsigned int b)
+{
+ unsigned int gain = b >> VOL_SCALE_SHIFT;
+ int fraction;
+ fraction = MULTI_DIV_32x16(a, b & VOL_SCALE_MASK);
+ if (gain) {
+ long long amp = (long long)a * gain + fraction;
+ if (amp > (int)0x7fffff)
+ amp = (int)0x7fffff;
+ else if (amp < (int)0x800000)
+ amp = (int)0x800000;
+ return (int)amp;
+ }
+ return fraction;
+}
+
static inline short MULTI_DIV_short(short a, unsigned int b, int swap)
{
unsigned int gain = b >> VOL_SCALE_SHIFT;
@@ -223,7 +241,7 @@
tmp = src[0] | \
(src[1] << 8) | \
(((signed char *) src)[2] << 16); \
- tmp = MULTI_DIV_int(tmp, vol_scale, 0); \
+ tmp = MULTI_DIV_24(tmp, vol_scale); \
dst[0] = tmp; \
dst[1] = tmp >> 8; \
dst[2] = tmp >> 16; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/alsa-lib-1.0.22/version new/alsa-lib-1.0.23/version
--- old/alsa-lib-1.0.22/version 2009-12-16 16:27:36.000000000 +0100
+++ new/alsa-lib-1.0.23/version 2010-04-16 13:17:58.000000000 +0200
@@ -1 +1 @@
-1.0.22
+1.0.23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org