rpms/alsa-lib/devel alsa-lib-ainit.patch, NONE, 1.1 alsa-lib-mixer.patch, NONE, 1.1 .cvsignore, 1.8, 1.9 alsa-lib-gcc4.patch, 1.4, 1.5 alsa-lib.spec, 1.21, 1.22 sources, 1.9, 1.10
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Apr 27 12:41:27 UTC 2005
- Previous message (by thread): rpms/system-config-bind/devel system-config-bind.spec,1.22,1.23
- Next message (by thread): rpms/alsa-lib/devel alsa-lib-1.0.7-asym-config.patch, 1.1, NONE alsa-lib-assert.patch, 1.1, NONE alsa-lib-macro.patch, 1.2, NONE alsa-lib-stack.patch, 1.1, NONE alsa-lib-stack2.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: stransky
Update of /cvs/dist/rpms/alsa-lib/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv31074
Modified Files:
.cvsignore alsa-lib-gcc4.patch alsa-lib.spec sources
Added Files:
alsa-lib-ainit.patch alsa-lib-mixer.patch
Log Message:
- updated to 1.0.9rc2
- add ainit tool
- dmix is now default pcm device
alsa-lib-ainit.patch:
pcm_direct.c | 20 +++++++++-----
pcm_direct.h | 5 ++-
pcm_dmix.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++----------
pcm_dshare.c | 74 +++++++++++++++++++++++++++++++++++++++++++++--------
pcm_dsnoop.c | 59 ++++++++++++++++++++++++++++++++++++------
5 files changed, 197 insertions(+), 42 deletions(-)
--- NEW FILE alsa-lib-ainit.patch ---
--- alsa-lib-1.0.8/src/pcm/pcm_direct.h.ainit 2004-01-23 14:04:51.000000000 +0100
+++ alsa-lib-1.0.8/src/pcm/pcm_direct.h 2005-04-12 13:29:53.000000000 +0200
@@ -78,7 +78,10 @@
struct snd_pcm_direct {
snd_pcm_type_t type; /* type (dmix, dsnoop, dshare) */
- key_t ipc_key; /* IPC key for semaphore and memory */
+ key_t ipc_mem_direct; /* IPC key for first memory - for pcm_direct.c */
+ key_t ipc_mem_plug; /* IPC key for second memory - for dmix/dsnoop/... */
+ key_t ipc_sem; /* IPC key for semaphore */
+ int share_ipc_key; /* old ipc_key style */
mode_t ipc_perm; /* IPC socket permissions */
int semid; /* IPC global semaphore identification */
int shmid; /* IPC global shared memory identification */
--- alsa-lib-1.0.8/src/pcm/pcm_dmix.c.ainit 2005-04-12 13:29:53.000000000 +0200
+++ alsa-lib-1.0.8/src/pcm/pcm_dmix.c 2005-04-12 13:29:53.000000000 +0200
@@ -69,11 +69,12 @@
dmix->shmptr->s.buffer_size *
sizeof(signed int);
retryshm:
- dmix->u.dmix.shmid_sum = shmget(dmix->ipc_key + 1, size, IPC_CREAT | 0666);
+ dmix->u.dmix.shmid_sum = shmget(dmix->ipc_mem_plug, size,
+ IPC_CREAT | (dmix->share_ipc_key ? 0666 : 0600));
err = -errno;
if (dmix->u.dmix.shmid_sum < 0){
if (errno == EINVAL)
- if ((tmpid = shmget(dmix->ipc_key + 1, 0, 0666)) != -1)
+ if ((tmpid = shmget(dmix->ipc_mem_plug, 0, (dmix->share_ipc_key ? 0666 : 0600))) != -1)
if (!shmctl(tmpid, IPC_STAT, &buf))
if (!buf.shm_nattch)
/* no users so destroy the segment */
@@ -103,8 +104,10 @@
if (shmctl(dmix->u.dmix.shmid_sum, IPC_STAT, &buf) < 0)
return -errno;
if (buf.shm_nattch == 0) { /* we're the last user, destroy the segment */
- if (shmctl(dmix->u.dmix.shmid_sum, IPC_RMID, NULL) < 0)
- return -errno;
+ if (dmix->share_ipc_key) {
+ if (shmctl(dmix->u.dmix.shmid_sum, IPC_RMID, NULL) < 0)
+ return -errno;
+ }
ret = 1;
}
dmix->u.dmix.shmid_sum = -1;
@@ -796,7 +799,11 @@
* changed in future.
*/
int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
- key_t ipc_key, mode_t ipc_perm,
+ key_t ipc_sem,
+ key_t ipc_mem_direct,
+ key_t ipc_mem_plug,
+ int share_ipc_key,
+ mode_t ipc_perm,
struct slave_params *params,
snd_config_t *bindings,
int slowptr,
@@ -825,8 +832,11 @@
if (ret < 0)
goto _err;
- dmix->ipc_key = ipc_key;
+ dmix->ipc_sem = ipc_sem;
+ dmix->ipc_mem_direct = ipc_mem_direct;
+ dmix->ipc_mem_plug = ipc_mem_plug;
dmix->ipc_perm = ipc_perm;
+ dmix->share_ipc_key = share_ipc_key;
dmix->semid = -1;
dmix->shmid = -1;
@@ -1116,7 +1126,10 @@
snd_config_t *slave = NULL, *bindings = NULL, *sconf;
struct slave_params params;
int bsize, psize, ipc_key_add_uid = 0, slowptr = 0;
- key_t ipc_key = 0;
+ key_t ipc_sem = 0;
+ key_t ipc_mem_direct = 0;
+ key_t ipc_mem_plug = 0;
+ int share_ipc_key = 0;
mode_t ipc_perm = 0600;
int err;
snd_config_for_each(i, next, conf) {
@@ -1133,7 +1146,40 @@
SNDERR("The field ipc_key must be an integer type");
return err;
}
- ipc_key = key;
+ ipc_sem = key;
+ ipc_mem_direct = key;
+ ipc_mem_plug = key+1;
+ share_ipc_key = 1;
+ continue;
+ }
+ if (strcmp(id, "ipc_sem") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key_mem must be an integer type");
+ return err;
+ }
+ ipc_sem = key;
+ continue;
+ }
+ if (strcmp(id, "ipc_mem_direct") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key_mem must be an integer type");
+ return err;
+ }
+ ipc_mem_direct = key;
+ continue;
+ }
+ if (strcmp(id, "ipc_mem_plug") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key_mem must be an integer type");
+ return err;
+ }
+ ipc_mem_plug = key;
continue;
}
if (strcmp(id, "ipc_perm") == 0) {
@@ -1198,12 +1244,19 @@
SNDERR("slave is not defined");
return -EINVAL;
}
- if (ipc_key_add_uid)
- ipc_key += getuid();
- if (!ipc_key) {
- SNDERR("Unique IPC key is not defined");
+ if (share_ipc_key && ipc_key_add_uid) {
+ ipc_sem += getuid();
+ ipc_mem_direct += getuid();
+ ipc_mem_plug += getuid();
+ }
+ if (!ipc_sem || !ipc_mem_direct || !ipc_mem_plug) {
+ SNDERR("Unique IPC keys are not defined");
return -EINVAL;
}
+ if(share_ipc_key && ipc_sem != ipc_mem_direct && ipc_sem != ipc_mem_plug) {
+ SNDERR("New and old IPC keys can't be mixed");
+ return -EINVAL;
+ }
/* the default settings, it might be invalid for some hardware */
params.format = SND_PCM_FORMAT_S16;
params.rate = 48000;
@@ -1240,7 +1293,9 @@
params.period_size = psize;
params.buffer_size = bsize;
- err = snd_pcm_dmix_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
+ err = snd_pcm_dmix_open(pcmp, name, ipc_sem, ipc_mem_direct,
+ ipc_mem_plug, share_ipc_key, ipc_perm, ¶ms, bindings,
+ slowptr, root, sconf, stream, mode);
if (err < 0)
snd_config_delete(sconf);
return err;
--- alsa-lib-1.0.8/src/pcm/pcm_dshare.c.ainit 2004-10-29 12:56:22.000000000 +0200
+++ alsa-lib-1.0.8/src/pcm/pcm_dshare.c 2005-04-12 13:29:53.000000000 +0200
@@ -523,7 +523,11 @@
* changed in future.
*/
int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
- key_t ipc_key, mode_t ipc_perm,
+ key_t ipc_sem,
+ key_t ipc_mem_direct,
+ key_t ipc_mem_plug,
+ int share_ipc_key,
+ mode_t ipc_perm,
struct slave_params *params,
snd_config_t *bindings,
int slowptr,
@@ -559,8 +563,11 @@
goto _err;
}
- dshare->ipc_key = ipc_key;
+ dshare->ipc_sem = ipc_sem;
+ dshare->ipc_mem_direct = ipc_mem_direct;
+ dshare->ipc_mem_plug = ipc_mem_plug;
dshare->ipc_perm = ipc_perm;
+ dshare->share_ipc_key = share_ipc_key;
dshare->semid = -1;
dshare->shmid = -1;
@@ -781,9 +788,11 @@
snd_config_t *slave = NULL, *bindings = NULL, *sconf;
struct slave_params params;
int bsize, psize, ipc_key_add_uid = 0, slowptr = 0;
- key_t ipc_key = 0;
+ key_t ipc_sem = 0;
+ key_t ipc_mem_direct = 0;
+ key_t ipc_mem_plug = 0;
mode_t ipc_perm = 0600;
-
+ int share_ipc_key = 0;
int err;
snd_config_for_each(i, next, conf) {
snd_config_t *n = snd_config_iterator_entry(i);
@@ -799,7 +808,40 @@
SNDERR("The field ipc_key must be an integer type");
return err;
}
- ipc_key = key;
+ ipc_sem = key;
+ ipc_mem_direct = key;
+ ipc_mem_plug = key+1;
+ share_ipc_key = 1;
+ continue;
+ }
+ if (strcmp(id, "ipc_sem") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key must be an integer type");
+ return err;
+ }
+ ipc_sem = key;
+ continue;
+ }
+ if (strcmp(id, "ipc_mem_direct") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key must be an integer type");
+ return err;
+ }
+ ipc_mem_direct = key;
+ continue;
+ }
+ if (strcmp(id, "ipc_mem_plug") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key must be an integer type");
+ return err;
+ }
+ ipc_mem_plug = key;
continue;
}
if (strcmp(id, "ipc_perm") == 0) {
@@ -864,12 +906,19 @@
SNDERR("slave is not defined");
return -EINVAL;
}
- if (ipc_key_add_uid)
- ipc_key += getuid();
- if (!ipc_key) {
- SNDERR("Unique IPC key is not defined");
- return -EINVAL;
- }
+ if (ipc_key_add_uid) {
+ ipc_sem += getuid();
+ ipc_mem_direct += getuid();
+ ipc_mem_plug += getuid();
+ }
+ if (!ipc_sem || !ipc_mem_direct || !ipc_mem_plug) {
+ SNDERR("Unique IPC keys are not defined");
+ return -EINVAL;
+ }
+ if(share_ipc_key && ipc_sem != ipc_mem_direct && ipc_sem != ipc_mem_plug) {
+ SNDERR("New and old IPC keys can't be mixed");
+ return -EINVAL;
+ }
/* the default settings, it might be invalid for some hardware */
params.format = SND_PCM_FORMAT_S16;
params.rate = 48000;
@@ -896,7 +945,8 @@
params.period_size = psize;
params.buffer_size = bsize;
- err = snd_pcm_dshare_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
+ err = snd_pcm_dshare_open(pcmp, name, ipc_sem, ipc_mem_direct, ipc_mem_plug, share_ipc_key,
+ ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
if (err < 0)
snd_config_delete(sconf);
return err;
--- alsa-lib-1.0.8/src/pcm/pcm_direct.c.ainit 2004-09-15 20:45:51.000000000 +0200
+++ alsa-lib-1.0.8/src/pcm/pcm_direct.c 2005-04-12 13:29:53.000000000 +0200
@@ -56,7 +56,8 @@
int snd_pcm_direct_semaphore_create_or_connect(snd_pcm_direct_t *dmix)
{
- dmix->semid = semget(dmix->ipc_key, DIRECT_IPC_SEMS, IPC_CREAT | 0666);
+ dmix->semid = semget(dmix->ipc_sem, DIRECT_IPC_SEMS,
+ IPC_CREAT | (dmix->share_ipc_key ? 0666 : 0600));
if (dmix->semid < 0)
return -errno;
return 0;
@@ -66,8 +67,10 @@
{
if (dmix->semid < 0)
return -EINVAL;
- if (semctl(dmix->semid, 0, IPC_RMID, NULL) < 0)
- return -errno;
+ if(dmix->share_ipc_key) {
+ if (semctl(dmix->semid, 0, IPC_RMID, NULL) < 0)
+ return -errno;
+ }
dmix->semid = -1;
return 0;
}
@@ -103,11 +106,12 @@
int tmpid, err;
retryget:
- dmix->shmid = shmget(dmix->ipc_key, sizeof(snd_pcm_direct_share_t), IPC_CREAT | 0666);
+ dmix->shmid = shmget(dmix->ipc_mem_direct, sizeof(snd_pcm_direct_share_t),
+ IPC_CREAT | (dmix->share_ipc_key ? 0666 : 0600));
err = -errno;
if (dmix->shmid < 0){
if (errno == EINVAL)
- if ((tmpid = shmget(dmix->ipc_key, 0, 0666)) != -1)
+ if ((tmpid = shmget(dmix->ipc_mem_direct, 0, (dmix->share_ipc_key ? 0666 : 0600))) != -1)
if (!shmctl(tmpid, IPC_STAT, &buf))
if (!buf.shm_nattch)
/* no users so destroy the segment */
@@ -145,8 +149,10 @@
if (shmctl(dmix->shmid, IPC_STAT, &buf) < 0)
return -errno;
if (buf.shm_nattch == 0) { /* we're the last user, destroy the segment */
- if (shmctl(dmix->shmid, IPC_RMID, NULL) < 0)
- return -errno;
+ if(dmix->share_ipc_key) {
+ if (semctl(dmix->semid, 0, IPC_RMID, NULL) < 0)
+ return -errno;
+ }
ret = 1;
}
dmix->shmid = -1;
--- alsa-lib-1.0.8/src/pcm/pcm_dsnoop.c.ainit 2004-10-29 12:56:22.000000000 +0200
+++ alsa-lib-1.0.8/src/pcm/pcm_dsnoop.c 2005-04-12 13:29:53.000000000 +0200
@@ -491,7 +491,11 @@
* changed in future.
*/
int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
- key_t ipc_key, mode_t ipc_perm,
+ key_t ipc_sem,
+ key_t ipc_mem_direct,
+ key_t ipc_mem_plug,
+ int share_ipc_key,
+ mode_t ipc_perm,
struct slave_params *params,
snd_config_t *bindings,
int slowptr,
@@ -519,8 +523,11 @@
if (ret < 0)
goto _err;
- dsnoop->ipc_key = ipc_key;
+ dsnoop->ipc_sem = ipc_sem;
+ dsnoop->ipc_mem_direct = ipc_mem_direct;
+ dsnoop->ipc_mem_plug = ipc_mem_plug;
dsnoop->ipc_perm = ipc_perm;
+ dsnoop->share_ipc_key = share_ipc_key;
dsnoop->semid = -1;
dsnoop->shmid = -1;
@@ -731,7 +738,10 @@
snd_config_t *slave = NULL, *bindings = NULL, *sconf;
struct slave_params params;
int bsize, psize, ipc_key_add_uid = 0, slowptr = 0;
- key_t ipc_key = 0;
+ key_t ipc_sem = 0;
+ key_t ipc_mem_direct = 0;
+ key_t ipc_mem_plug = 0;
+ int share_ipc_key = 0;
mode_t ipc_perm = 0600;
int err;
@@ -749,9 +759,32 @@
SNDERR("The field ipc_key must be an integer type");
return err;
}
- ipc_key = key;
+ ipc_sem = key;
+ ipc_mem_direct = key;
+ ipc_mem_plug = key+1;
+ share_ipc_key = 1;
+ continue;
+ }
+ if (strcmp(id, "ipc_mem_direct") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key_mem must be an integer type");
+ return err;
+ }
+ ipc_mem_direct = key;
continue;
}
+ if (strcmp(id, "ipc_mem_plug") == 0) {
+ long key;
+ err = snd_config_get_integer(n, &key);
+ if (err < 0) {
+ SNDERR("The field ipc_key_mem must be an integer type");
+ return err;
+ }
+ ipc_mem_plug = key;
+ continue;
+ }
if (strcmp(id, "ipc_perm") == 0) {
char *perm;
char *endp;
@@ -814,12 +847,19 @@
SNDERR("slave is not defined");
return -EINVAL;
}
- if (ipc_key_add_uid)
- ipc_key += getuid();
- if (!ipc_key) {
- SNDERR("Unique IPC key is not defined");
+ if (share_ipc_key && ipc_key_add_uid) {
+ ipc_sem += getuid();
+ ipc_mem_direct += getuid();
+ ipc_mem_plug += getuid();
+ }
+ if (!ipc_sem || !ipc_mem_direct || !ipc_mem_plug) {
+ SNDERR("Unique IPC keys are not defined");
return -EINVAL;
}
+ if(share_ipc_key && ipc_sem != ipc_mem_direct && ipc_sem != ipc_mem_plug) {
+ SNDERR("New and old IPC keys can't be mixed");
+ return -EINVAL;
+ }
/* the default settings, it might be invalid for some hardware */
params.format = SND_PCM_FORMAT_S16;
params.rate = 48000;
@@ -846,7 +886,8 @@
params.period_size = psize;
params.buffer_size = bsize;
- err = snd_pcm_dsnoop_open(pcmp, name, ipc_key, ipc_perm, ¶ms, bindings, slowptr, root, sconf, stream, mode);
+ err = snd_pcm_dsnoop_open(pcmp, name, ipc_sem, ipc_mem_direct, ipc_mem_plug, share_ipc_key, ipc_perm, ¶ms,
+ bindings, slowptr, root, sconf, stream, mode);
if (err < 0)
snd_config_delete(sconf);
return err;
alsa-lib-mixer.patch:
mixer.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
--- NEW FILE alsa-lib-mixer.patch ---
--- alsa-lib-1.0.9rc2/src/mixer/mixer.c.old 2005-04-22 14:15:33.000000000 +0200
+++ alsa-lib-1.0.9rc2/src/mixer/mixer.c 2005-04-22 14:27:40.000000000 +0200
@@ -520,14 +520,22 @@
return c1->class->compare(c1, c2);
}
+static snd_mixer_t *qsort_mixer;
typedef int (*qsort_func)(const void *, const void *);
+
+static int compar(const void *a, const void *b) {
+ return qsort_mixer->compare(*(const snd_mixer_elem_t * const *) a,
+ *(const snd_mixer_elem_t * const *) b);
+}
+
static int snd_mixer_sort(snd_mixer_t *mixer)
{
unsigned int k;
assert(mixer);
assert(mixer->compare);
INIT_LIST_HEAD(&mixer->elems);
- qsort(mixer->pelems, mixer->count, sizeof(snd_mixer_elem_t*), (qsort_func)mixer->compare);
+ qsort_mixer = mixer;
+ qsort(mixer->pelems, mixer->count, sizeof(snd_mixer_elem_t*), compar);
for (k = 0; k < mixer->count; k++)
list_add_tail(&mixer->pelems[k]->list, &mixer->elems);
return 0;
Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/alsa-lib/devel/.cvsignore,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- .cvsignore 26 Jan 2005 13:18:10 -0000 1.8
+++ .cvsignore 27 Apr 2005 12:41:25 -0000 1.9
@@ -1,2 +1,4 @@
alsa-lib-1.0.7.tar.bz2
alsa-lib-1.0.8.tar.bz2
+alsa-lib-1.0.9rc2.tar.bz2
+ainit-0.2.tar.gz
alsa-lib-gcc4.patch:
conf.c | 7 +++++--
control/control.c | 2 +-
hwdep/hwdep.c | 2 +-
pcm/pcm_dmix_generic.c | 12 ++++++------
pcm/pcm_plugin.c | 4 ++--
rawmidi/rawmidi.c | 2 +-
seq/seq.c | 2 +-
timer/timer.c | 2 +-
8 files changed, 18 insertions(+), 15 deletions(-)
Index: alsa-lib-gcc4.patch
===================================================================
RCS file: /cvs/dist/rpms/alsa-lib/devel/alsa-lib-gcc4.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- alsa-lib-gcc4.patch 7 Mar 2005 16:48:29 -0000 1.4
+++ alsa-lib-gcc4.patch 27 Apr 2005 12:41:25 -0000 1.5
@@ -1,5 +1,5 @@
---- alsa-lib-1.0.8/src/control/control.c.old 2005-01-03 12:52:40.000000000 +0100
-+++ alsa-lib-1.0.8/src/control/control.c 2005-03-07 17:44:40.000000000 +0100
+--- alsa-lib-1.0.9rc2/src/control/control.c.gcc4 2005-01-03 12:52:40.000000000 +0100
++++ alsa-lib-1.0.9rc2/src/control/control.c 2005-04-22 14:33:49.000000000 +0200
@@ -560,7 +560,7 @@
int snd_ctl_read(snd_ctl_t *ctl, snd_ctl_event_t *event)
{
@@ -9,9 +9,20 @@
}
/**
---- alsa-lib-1.0.8/src/conf.c.old 2004-10-05 17:33:04.000000000 +0200
-+++ alsa-lib-1.0.8/src/conf.c 2005-03-07 17:44:40.000000000 +0100
-@@ -2494,9 +2494,11 @@
+--- alsa-lib-1.0.9rc2/src/timer/timer.c.gcc4 2004-05-24 16:57:48.000000000 +0200
++++ alsa-lib-1.0.9rc2/src/timer/timer.c 2005-04-22 14:33:49.000000000 +0200
+@@ -876,7 +876,7 @@
+ assert(timer);
+ assert(((timer->mode & O_ACCMODE) == O_RDONLY) || ((timer->mode & O_ACCMODE) == O_RDWR));
+ assert(buffer || size == 0);
+- return timer->ops->read(timer, buffer, size);
++ return (timer->ops->read)(timer, buffer, size);
+ }
+
+ /**
+--- alsa-lib-1.0.9rc2/src/conf.c.gcc4 2005-02-14 16:09:10.000000000 +0100
++++ alsa-lib-1.0.9rc2/src/conf.c 2005-04-22 14:33:49.000000000 +0200
+@@ -2506,9 +2506,11 @@
* specified by \p result.
* \return Zero if successful, otherwise a negative error code.
*/
@@ -24,7 +35,7 @@
SND_CONFIG_SEARCH(config, key, result, \
err = snd_config_hooks(config, NULL); \
if (err < 0) \
-@@ -2514,9 +2516,10 @@
+@@ -2526,9 +2528,10 @@
* specified by \p result.
* \return Zero if successful, otherwise a negative error code.
*/
@@ -36,80 +47,56 @@
SND_CONFIG_SEARCHA(root, config, key, result,
snd_config_searcha_hooks,
err = snd_config_hooks(config, NULL); \
---- alsa-lib-1.0.8/src/timer/timer.c.old 2004-05-24 16:57:48.000000000 +0200
-+++ alsa-lib-1.0.8/src/timer/timer.c 2005-03-07 17:44:40.000000000 +0100
-@@ -876,7 +876,7 @@
- assert(timer);
- assert(((timer->mode & O_ACCMODE) == O_RDONLY) || ((timer->mode & O_ACCMODE) == O_RDWR));
- assert(buffer || size == 0);
-- return timer->ops->read(timer, buffer, size);
-+ return (timer->ops->read)(timer, buffer, size);
- }
-
- /**
---- alsa-lib-1.0.8/src/pcm/pcm_plugin.c.old 2004-12-21 15:11:04.000000000 +0100
-+++ alsa-lib-1.0.8/src/pcm/pcm_plugin.c 2005-03-07 17:44:40.000000000 +0100
-@@ -417,7 +417,7 @@
- snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames);
- if (slave_frames == 0)
- break;
-- frames = plugin->read(pcm, areas, offset, frames,
-+ frames = (plugin->read)(pcm, areas, offset, frames,
- slave_areas, slave_offset, &slave_frames);
- if (CHECK_SANITY(slave_frames > snd_pcm_mmap_capture_avail(slave))) {
- SNDMSG("read overflow %ld > %ld", slave_frames,
-@@ -589,7 +589,7 @@
- return xfer > 0 ? (snd_pcm_sframes_t)xfer : err;
- if (frames > cont)
- frames = cont;
-- frames = plugin->read(pcm, areas, hw_offset, frames,
-+ frames = (plugin->read)(pcm, areas, hw_offset, frames,
- slave_areas, slave_offset, &slave_frames);
- snd_atomic_write_begin(&plugin->watom);
- snd_pcm_mmap_hw_forward(pcm, frames);
---- alsa-lib-1.0.8/src/pcm/pcm_dmix.c.old 2005-01-11 18:42:49.000000000 +0100
-+++ alsa-lib-1.0.8/src/pcm/pcm_dmix.c 2005-03-07 17:48:28.000000000 +0100
-@@ -56,9 +56,11 @@
- /*
- * sum ring buffer shared memory area
- */
-+
-+static int shm_sum_discard(snd_pcm_direct_t *dmix);
-+
- static int shm_sum_create_or_connect(snd_pcm_direct_t *dmix)
- {
-- static int shm_sum_discard(snd_pcm_direct_t *dmix);
- struct shmid_ds buf;
- int tmpid, err;
- size_t size;
-@@ -244,9 +246,9 @@
+--- alsa-lib-1.0.9rc2/src/pcm/pcm_dmix_generic.c.gcc4 2005-02-08 21:28:31.000000000 +0100
++++ alsa-lib-1.0.9rc2/src/pcm/pcm_dmix_generic.c 2005-04-22 14:49:57.000000000 +0200
+@@ -72,9 +72,9 @@
} while (*sum != old_sample);
if (!--size)
return;
-- ((char *)src) += src_step;
-- ((char *)dst) += dst_step;
-- ((char *)sum) += sum_step;
+- src += src_step;
+- dst += dst_step;
+- sum += sum_step;
+ src = (signed short *) ((char *)src + src_step);
+ dst = (signed short *) ((char *)dst + dst_step);
+ sum = (signed int *) ((char *)sum + sum_step);
}
}
-@@ -276,9 +278,9 @@
+@@ -106,9 +106,9 @@
} while (*sum != old_sample);
if (!--size)
return;
-- ((char *)src) += src_step;
-- ((char *)dst) += dst_step;
-- ((char *)sum) += sum_step;
+- src += src_step;
+- dst += dst_step;
+- sum += sum_step;
+ src = (signed int *) ((char *)src + src_step);
+ dst = (signed int *) ((char *)dst + dst_step);
+ sum = (signed int *) ((char *)sum + sum_step);
}
}
---- alsa-lib-1.0.8/src/hwdep/hwdep.c.old 2004-05-24 16:57:47.000000000 +0200
-+++ alsa-lib-1.0.8/src/hwdep/hwdep.c 2005-03-07 17:44:40.000000000 +0100
+--- alsa-lib-1.0.9rc2/src/pcm/pcm_plugin.c.gcc4 2005-01-20 16:07:59.000000000 +0100
++++ alsa-lib-1.0.9rc2/src/pcm/pcm_plugin.c 2005-04-22 14:33:49.000000000 +0200
+@@ -316,7 +316,7 @@
+ snd_pcm_mmap_begin(slave, &slave_areas, &slave_offset, &slave_frames);
+ if (slave_frames == 0)
+ break;
+- frames = plugin->read(pcm, areas, offset, frames,
++ frames = (plugin->read)(pcm, areas, offset, frames,
+ slave_areas, slave_offset, &slave_frames);
+ if (CHECK_SANITY(slave_frames > snd_pcm_mmap_capture_avail(slave))) {
+ SNDMSG("read overflow %ld > %ld", slave_frames,
+@@ -488,7 +488,7 @@
+ return xfer > 0 ? (snd_pcm_sframes_t)xfer : err;
+ if (frames > cont)
+ frames = cont;
+- frames = plugin->read(pcm, areas, hw_offset, frames,
++ frames = (plugin->read)(pcm, areas, hw_offset, frames,
+ slave_areas, slave_offset, &slave_frames);
+ snd_atomic_write_begin(&plugin->watom);
+ snd_pcm_mmap_hw_forward(pcm, frames);
+--- alsa-lib-1.0.9rc2/src/hwdep/hwdep.c.gcc4 2004-05-24 16:57:47.000000000 +0200
++++ alsa-lib-1.0.9rc2/src/hwdep/hwdep.c 2005-04-22 14:33:49.000000000 +0200
@@ -485,7 +485,7 @@
assert(hwdep);
assert(((hwdep->mode & O_ACCMODE) == O_RDONLY) || ((hwdep->mode & O_ACCMODE) == O_RDWR));
@@ -119,8 +106,8 @@
}
/**
---- alsa-lib-1.0.8/src/rawmidi/rawmidi.c.old 2004-09-28 12:45:33.000000000 +0200
-+++ alsa-lib-1.0.8/src/rawmidi/rawmidi.c 2005-03-07 17:44:40.000000000 +0100
+--- alsa-lib-1.0.9rc2/src/rawmidi/rawmidi.c.gcc4 2004-09-28 12:45:33.000000000 +0200
++++ alsa-lib-1.0.9rc2/src/rawmidi/rawmidi.c 2005-04-22 14:33:49.000000000 +0200
@@ -987,5 +987,5 @@
assert(rawmidi);
assert(rawmidi->stream == SND_RAWMIDI_STREAM_INPUT);
@@ -128,8 +115,8 @@
- return rawmidi->ops->read(rawmidi, buffer, size);
+ return (rawmidi->ops->read)(rawmidi, buffer, size);
}
---- alsa-lib-1.0.8/src/seq/seq.c.old 2004-03-23 16:15:21.000000000 +0100
-+++ alsa-lib-1.0.8/src/seq/seq.c 2005-03-07 17:44:40.000000000 +0100
+--- alsa-lib-1.0.9rc2/src/seq/seq.c.gcc4 2004-03-23 16:15:21.000000000 +0100
++++ alsa-lib-1.0.9rc2/src/seq/seq.c 2005-04-22 14:33:49.000000000 +0200
@@ -3914,7 +3914,7 @@
static ssize_t snd_seq_event_read_buffer(snd_seq_t *seq)
{
Index: alsa-lib.spec
===================================================================
RCS file: /cvs/dist/rpms/alsa-lib/devel/alsa-lib.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- alsa-lib.spec 7 Mar 2005 16:48:29 -0000 1.21
+++ alsa-lib.spec 27 Apr 2005 12:41:25 -0000 1.22
@@ -1,15 +1,15 @@
Summary: The Advanced Linux Sound Architecture (ALSA) library.
Name: alsa-lib
-Version: 1.0.8
-Release: 4.devel
+Version: 1.0.9rc2
+Release: 1
License: LGPL
Group: System Environment/Libraries
Source: ftp://ftp.alsa-project.org/pub/lib/%{name}-%{version}%{?prever}.tar.bz2
-Patch2: alsa-lib-macro.patch
-#Patch3: alsa-lib-1.0.7-asym-config.patch
-Patch4: alsa-lib-stack2.patch
-Patch5: alsa-lib-alpha.patch
-Patch6: alsa-lib-gcc4.patch
+Source1: ainit-0.2.tar.gz
+Patch0: alsa-lib-mixer.patch
+Patch1: alsa-lib-alpha.patch
+Patch2: alsa-lib-gcc4.patch
+Patch3: alsa-lib-ainit.patch
URL: http://www.alsa-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: doxygen
@@ -36,12 +36,11 @@
against the ALSA libraries and interfaces.
%prep
-%setup -q -n %{name}-%{version}%{?prever}
-%patch2 -p1 -b .macro
-#%patch3 -p1 -b .load-env
-%patch4 -p1
-%patch5 -p1 -b .alpha
-%patch6 -p1 -b .old
+%setup -q -n %{name}-%{version}%{?prever} -a 1
+%patch0 -p1 -b .mixer
+%patch1 -p1 -b .alpha
+%patch2 -p1 -b .gcc4
+%patch3 -p1 -b .ainit
%build
%configure \
@@ -51,6 +50,10 @@
make %{?_smp_mflags}
make doc
+cd ainit
+./compile
+cd ..
+
%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
@@ -61,9 +64,23 @@
mv %{buildroot}%{_libdir}/libasound.so.* %{buildroot}/%{_lib}
ln -snf ../../%{_lib}/libasound.so.2 %{buildroot}%{_libdir}/libasound.so
-
mv %{buildroot}/etc/aclocal %{buildroot}%{_datadir}
+# install ainit binaries
+install -m 755 ainit/ainit %{buildroot}%{_bindir}
+
+# install ainit config files
+install -m 644 ainit/config/ainit.conf %{buildroot}%{_sysconfdir}/alsa/ainit.conf
+install -m 644 ainit/config/asoundrc.template %{buildroot}%{_sysconfdir}/alsa/asoundrc.template
+
+# install ainit man pages
+mkdir -p %{buildroot}%{_mandir}/man8
+install -m 644 ainit/doc/ainit.8 %{buildroot}%{_mandir}/man8/ainit.8
+
+mkdir -p %{buildroot}%{_mandir}/man5
+install -m 644 ainit/doc/ainit.conf.5 %{buildroot}%{_mandir}/man5/ainit.conf.5
+install -m 644 ainit/doc/asoundrc.template.5 %{buildroot}%{_mandir}/man5/asoundrc.template.5
+
%clean
rm -rf %{buildroot}
@@ -82,6 +99,8 @@
/%{_lib}/libasound.so.*
%{_sysconfdir}/alsa
%config %{_sysconfdir}/alsa/alsa.conf
+%{_bindir}/ainit
+%{_mandir}/man?/*
%files devel
%defattr(-, root, root)
@@ -95,6 +114,11 @@
%{_datadir}/aclocal/alsa.m4
%changelog
+* Fri Apr 22 2005 Martin Stransky <stransky at redhat.com> 1.0.9rc2-1
+- updated to 1.0.9rc2
+- add ainit tool
+- dmix is now default pcm device
+
* Mon Mar 7 2005 Martin Stransky <stransky at redhat.com> 1.0.8-4.devel
- gcc4 patch
Index: sources
===================================================================
RCS file: /cvs/dist/rpms/alsa-lib/devel/sources,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sources 26 Jan 2005 13:52:13 -0000 1.9
+++ sources 27 Apr 2005 12:41:25 -0000 1.10
@@ -1 +1,2 @@
-c677299ed39d069c9a4b6a999e34ffe7 alsa-lib-1.0.8.tar.bz2
+0b606956d9c02e568be36a7f6ca15511 alsa-lib-1.0.9rc2.tar.bz2
+9bdd3c747ee2f95750661c07bc55d9a2 ainit-0.2.tar.gz
- Previous message (by thread): rpms/system-config-bind/devel system-config-bind.spec,1.22,1.23
- Next message (by thread): rpms/alsa-lib/devel alsa-lib-1.0.7-asym-config.patch, 1.1, NONE alsa-lib-assert.patch, 1.1, NONE alsa-lib-macro.patch, 1.2, NONE alsa-lib-stack.patch, 1.1, NONE alsa-lib-stack2.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list