Takashi Iwai [Fri, 14 Mar 2008 13:03:54 +0000 (14:03 +0100)]
Use slave PCM as a timing-source for file ifile
When ifile option is used for the file plugin, it ignores the slave PCM
and just feeds the input data.
This patch changes the behavior a bit - it uses the slave PCM as the
timing source (just read and throw data away) so that the input data
can be read in the right sample rate.
Takashi Iwai [Wed, 12 Mar 2008 15:30:26 +0000 (16:30 +0100)]
Add truncate option to PCM file plugin
Addeed a new option "truncate" to indicate the behavior of creating
the output file. When it's true (the default), the file is overwritten
and truncated at creation. When false, the plugin tries to open a
unique file with a number suffix.
The global behavior of "file" and "tee" PCMs is defined via
defaults.pcm.file_truncate option. You can overwrite it in ~/.asoundrc.
Takashi Iwai [Mon, 10 Mar 2008 11:02:26 +0000 (12:02 +0100)]
dmix skipping first set of samples
There was a change in alsa-lib 1.0.16 which looks like it was designed to
make dmix skip samples in the case of underruns, but it causes the first
sample to be skipped since dmix->slave_hw_ptr == dmix->slave_appl_ptr.
The following patch fixes this and fixes a small typo in the comment.
Pawel MOLL [Fri, 7 Mar 2008 16:18:16 +0000 (17:18 +0100)]
Fix for alsa-lib cross-compilation problems with ALSA_CONFIG_DIR and ALSA_PLUGIN_DIR
"./configure" options for selecting ALSA configuration (default
/usr/share/alsa) and plugin (/usr/lib/alsa-lib) directories introduced
by alsa-hg/alsa-lib changeset 2284 cause problems with cross-compilation
and packaging - there is no way to redefine them in runtime, during
installation phase.
This patch adds a level of indirection between constants and their
usage - alsaconfigdir for ALSA_CONFIG_DIR and alsaplugindir for
ALSA_PLUGIN_DIR - which can be redefined during "make install" stage.
Takashi Iwai [Mon, 25 Feb 2008 14:11:46 +0000 (15:11 +0100)]
Fix the state in snd_pcm_ioplug_pause()
The states[] in snd_pcm_ioplug_pause() has wrong values. They should be
swapped. ALSA bug#3796:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3796
Takashi Iwai [Mon, 25 Feb 2008 13:56:51 +0000 (14:56 +0100)]
Create doxgen.cfg dynamically
The patch from bug#3799
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3799
The "doc" target in doc/Makefile.am assumes the build directory and
the source directory are the same and fails if they differ ... this is
because the doxygen.cfg contains relative paths (such as ../) that
only work when building in the source tree
The attached patch against hg replaces all relative paths with
@top_srcdir@ and changes doxygen.cfg to a generated file so that
configure replaces @top_srcdir@ with the appropriate configure-time
path.
Assuming people like being able to do `make -f Makefile.am doc` on
an unconfigured and having it work, i added a small `test&&sed`
that'll generate an appropriate default doxygen.cfg for them.
Takashi Iwai [Mon, 11 Feb 2008 13:19:32 +0000 (14:19 +0100)]
Fix conflict of obsoleted snd_pcm_hw_* definitions
When only SND_PCM_OLD_HW_PARAMS_API is defined but no
SND_PCM_OLD_SW_PARAMS_API, the declerations of some obsoleted functions
conflict. Although the apps should define both at the same time, it's
not good to break. Fixed the ifdef now.
Takashi Iwai [Fri, 18 Jan 2008 12:42:51 +0000 (13:42 +0100)]
dmix - Enable auto format detection as default
The direct plugins have the automatic format-detection feature but it
wasn't enabled properly in the interface. Now you can pass the format
"unchanged" to make the plugin detect a proper format.
This will change the default format of some drivers, such as, HD-audio.
Clemens Ladisch [Mon, 14 Jan 2008 07:52:16 +0000 (08:52 +0100)]
pcm dmix plugin: fix generic direct remixing
In the case of the sum buffer being uninitialized, the source sample
must be negated not only when writing to the sum but also when writing
to the destination.
Takashi Iwai [Wed, 9 Jan 2008 16:17:14 +0000 (17:17 +0100)]
Fix exported symbols for hooks and functions
The functions dynamically loaded via plugin aren't fully listed
in the exported functions in Versions file. This caused errors at
opening devices with such plugins.
The rounding done when converting to smaller sample widths fails for
saturated positive samples; in this case, the sample value overflows and
becomes negative. We are better off without rounding, even if we then
have quantization noise (of at most half the resolution of the least
significant bit).
Takashi Iwai [Fri, 30 Nov 2007 17:29:01 +0000 (18:29 +0100)]
Clean up Versions file
The entries in the current Versions file don't work as expected.
Since the first ALSA_0.9 has already snd_* global definitions, all
the rest are simply ignored. Some symbols (e.g. snd_hw_params_*)
indeed work because they have explicit symver definitions, but
ALSA_0.9.6 and later are all superfluous.
This patch clean up these useless entries. Also, the patch restricts
the matching patterns for _snd_* and __snd_* entries to reduce the
unneeded export symbols.
Takashi Iwai [Wed, 28 Nov 2007 13:24:26 +0000 (14:24 +0100)]
softvol - add missing name
softvol can be also a pass-thru when the given control already exists
as a hardware control, and the name isn't set properly because of
slave creation. This patch fixes it.
Takashi Iwai [Mon, 26 Nov 2007 11:29:37 +0000 (12:29 +0100)]
Set PCM name properly in empty and asym plugins
The PCM name isn't set properly on empty and asym plugins due to its call
of snd_pcm_open_slave(). Now a new function snd_pcm_open_named_slave()
is created and make snd_pcm_open_slave() an inline function calling the
new one with name=NULL.
Takashi Iwai [Fri, 23 Nov 2007 14:46:48 +0000 (15:46 +0100)]
Fix mmap with multi plugin
The mmap of multi plugin seems broken (for a long time!) due to its
creation of local buffer via snd_pcm_mmap(). Since the multi plugin
just needs to shadow the mmap buffer of each slave, it now has
mmap_shadow=1 and its own mmap/unmap method to do shadowing.
Takashi Iwai [Wed, 21 Nov 2007 11:10:35 +0000 (12:10 +0100)]
Fix timestamp in status in PCM direct plugins
PCM direct plugins didn't update the timestamp properly.
Now it always starts the slave PCM with MMAP tstamp_mode so that the
timestamp will be being updated. When a client is set up as MMAP
tstamp_mode as well, simply copy this slave timestamp. Otherwise
status callback calculates the current timestamp as usual.
Stas Sergeev [Mon, 12 Nov 2007 11:01:16 +0000 (12:01 +0100)]
Remove ugly hack in rate plugin poll_descriptors callback
The rate plugin has ugly hacks in poll_descriptors callback to adjust
avail_min when partial read/write occurs. This causes often unexpected
problems like XRUNs, especially with two-period cases.
Let's remove that beast, it's rather harmful than useful.
Clemens Ladisch [Mon, 12 Nov 2007 07:50:08 +0000 (08:50 +0100)]
simple mixer: fix calculation of control range
When calculating the value range of a control, the variables cannot be
initialized with zero because this would prevent the minimum from having
a value above zero or the maximum from having a value below zero.
Takashi Iwai [Tue, 30 Oct 2007 11:31:55 +0000 (12:31 +0100)]
Remove sequencer instrument layer
Remove obsoleted sequencer instrument layer from alsa-lib.
The old symbols are compiled in as default as dummy functions
(unless --disable-old-symbols is given to configure) so that
the old binaries can still work more or less.
Takashi Iwai [Wed, 24 Oct 2007 10:53:08 +0000 (12:53 +0200)]
Change assert condition in error message handler
Activating assert() in the default error message handler isn't always
good for producitve systems. Make this optional and enable only when
a special configure option is given (i.e. for explicit debugging).
Takashi Iwai [Thu, 18 Oct 2007 09:10:35 +0000 (11:10 +0200)]
snd_pcm_dmix_close: raise semaphore if unable to discard
This patch causes snd_pcm_dmix_close() to up a semaphore after downing it
if it is unable to discard it. It prevents some deadlock that I am
getting when a couple of applications interact and one of them closes the
device and later re-opens it.