Updating link to change in openSUSE:Factory/alsa revision 76.0
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=41b0df2cc26ce5816a9fe350eaf4fdbc
This commit is contained in:
parent
80b1a21915
commit
c0292519f7
@ -2956,9 +2956,18 @@ index 826685f..3a99d55 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/pcm/pcm_ioplug.c b/src/pcm/pcm_ioplug.c
|
diff --git a/src/pcm/pcm_ioplug.c b/src/pcm/pcm_ioplug.c
|
||||||
index e43d354..c582f5a 100644
|
index e43d354..2aa7572 100644
|
||||||
--- a/src/pcm/pcm_ioplug.c
|
--- a/src/pcm/pcm_ioplug.c
|
||||||
+++ b/src/pcm/pcm_ioplug.c
|
+++ b/src/pcm/pcm_ioplug.c
|
||||||
|
@@ -442,7 +442,7 @@ static int snd_pcm_ioplug_start(snd_pcm_t *pcm)
|
||||||
|
int err;
|
||||||
|
|
||||||
|
if (io->data->state != SND_PCM_STATE_PREPARED)
|
||||||
|
- return -EBUSY;
|
||||||
|
+ return -EBADFD;
|
||||||
|
|
||||||
|
err = io->data->callback->start(io->data);
|
||||||
|
if (err < 0)
|
||||||
@@ -877,7 +877,7 @@ callback.
|
@@ -877,7 +877,7 @@ callback.
|
||||||
Finally, the dump callback is used to print the status of the plugin.
|
Finally, the dump callback is used to print the status of the plugin.
|
||||||
|
|
||||||
@ -2991,7 +3000,7 @@ index 0357921..5acc7bc 100644
|
|||||||
scope->ops = val;
|
scope->ops = val;
|
||||||
}
|
}
|
||||||
diff --git a/src/pcm/pcm_mmap_emul.c b/src/pcm/pcm_mmap_emul.c
|
diff --git a/src/pcm/pcm_mmap_emul.c b/src/pcm/pcm_mmap_emul.c
|
||||||
index 0dc1973..e356e0b 100644
|
index 0dc1973..f6e7ae9 100644
|
||||||
--- a/src/pcm/pcm_mmap_emul.c
|
--- a/src/pcm/pcm_mmap_emul.c
|
||||||
+++ b/src/pcm/pcm_mmap_emul.c
|
+++ b/src/pcm/pcm_mmap_emul.c
|
||||||
@@ -34,6 +34,7 @@
|
@@ -34,6 +34,7 @@
|
||||||
@ -3002,14 +3011,73 @@ index 0dc1973..e356e0b 100644
|
|||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -44,6 +45,7 @@ typedef struct {
|
@@ -43,7 +44,9 @@ typedef struct {
|
||||||
|
unsigned int mmap_emul :1;
|
||||||
snd_pcm_uframes_t hw_ptr;
|
snd_pcm_uframes_t hw_ptr;
|
||||||
snd_pcm_uframes_t appl_ptr;
|
snd_pcm_uframes_t appl_ptr;
|
||||||
|
+ snd_pcm_uframes_t start_threshold;
|
||||||
} mmap_emul_t;
|
} mmap_emul_t;
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* here goes a really tricky part; hw_refine falls back to ACCESS_RW_* type
|
* here goes a really tricky part; hw_refine falls back to ACCESS_RW_* type
|
||||||
|
@@ -203,6 +206,24 @@ static int snd_pcm_mmap_emul_hw_params(snd_pcm_t *pcm,
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int snd_pcm_mmap_emul_sw_params(snd_pcm_t *pcm,
|
||||||
|
+ snd_pcm_sw_params_t *params)
|
||||||
|
+{
|
||||||
|
+ mmap_emul_t *map = pcm->private_data;
|
||||||
|
+ int err;
|
||||||
|
+
|
||||||
|
+ map->start_threshold = params->start_threshold;
|
||||||
|
+
|
||||||
|
+ /* HACK: don't auto-start in the slave PCM */
|
||||||
|
+ params->start_threshold = pcm->boundary;
|
||||||
|
+ err = snd_pcm_generic_sw_params(pcm, params);
|
||||||
|
+ if (err < 0)
|
||||||
|
+ return err;
|
||||||
|
+ /* restore the value for this PCM */
|
||||||
|
+ params->start_threshold = map->start_threshold;
|
||||||
|
+ return err;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int snd_pcm_mmap_emul_prepare(snd_pcm_t *pcm)
|
||||||
|
{
|
||||||
|
mmap_emul_t *map = pcm->private_data;
|
||||||
|
@@ -254,13 +275,18 @@ sync_slave_write(snd_pcm_t *pcm)
|
||||||
|
snd_pcm_uframes_t offset;
|
||||||
|
snd_pcm_sframes_t size;
|
||||||
|
|
||||||
|
+ /* HACK: don't start stream automatically at commit in mmap mode */
|
||||||
|
+ pcm->start_threshold = pcm->boundary;
|
||||||
|
+
|
||||||
|
size = map->appl_ptr - *slave->appl.ptr;
|
||||||
|
if (size < 0)
|
||||||
|
size += pcm->boundary;
|
||||||
|
- if (!size)
|
||||||
|
- return 0;
|
||||||
|
- offset = *slave->appl.ptr % pcm->buffer_size;
|
||||||
|
- return snd_pcm_write_mmap(pcm, offset, size);
|
||||||
|
+ if (size) {
|
||||||
|
+ offset = *slave->appl.ptr % pcm->buffer_size;
|
||||||
|
+ size = snd_pcm_write_mmap(pcm, offset, size);
|
||||||
|
+ }
|
||||||
|
+ pcm->start_threshold = map->start_threshold; /* restore */
|
||||||
|
+ return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* read the available chunk on the slave PCM to mmap buffer */
|
||||||
|
@@ -335,7 +361,7 @@ static const snd_pcm_ops_t snd_pcm_mmap_emul_ops = {
|
||||||
|
.hw_refine = snd_pcm_mmap_emul_hw_refine,
|
||||||
|
.hw_params = snd_pcm_mmap_emul_hw_params,
|
||||||
|
.hw_free = snd_pcm_generic_hw_free,
|
||||||
|
- .sw_params = snd_pcm_generic_sw_params,
|
||||||
|
+ .sw_params = snd_pcm_mmap_emul_sw_params,
|
||||||
|
.channel_info = snd_pcm_generic_channel_info,
|
||||||
|
.dump = snd_pcm_mmap_emul_dump,
|
||||||
|
.nonblock = snd_pcm_generic_nonblock,
|
||||||
diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
|
diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
|
||||||
index a97a5de..ecf0022 100644
|
index a97a5de..ecf0022 100644
|
||||||
--- a/src/pcm/pcm_rate.c
|
--- a/src/pcm/pcm_rate.c
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 21 01:26:21 CEST 2009 - tiwai@suse.de
|
||||||
|
|
||||||
|
- pcm: workaround for avoiding automatic start in mmap mode
|
||||||
|
- pcm/ioplug: fix error code in start callback
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 13 08:46:04 CEST 2009 - tiwai@suse.de
|
Thu Aug 13 08:46:04 CEST 2009 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ Obsoletes: alsa-64bit
|
|||||||
#
|
#
|
||||||
Summary: Advanced Linux Sound Architecture
|
Summary: Advanced Linux Sound Architecture
|
||||||
Version: 1.0.20
|
Version: 1.0.20
|
||||||
Release: 9
|
Release: 10
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user