Change the rate converter type to allow string arrays in addition to
a string. When a string array is given, the rate plugin probes each
string and try to load the converter plugin in the order of the list.
For example, you can set
defaults.pcm.rate_converter [ "samplerate" "linear" ]
so that samplerate plugin is preferred to linear plugin if it's
installed.
Make sure that the rate plugin does not try to change the slave's
boundary value when setting software parameters; such a change wouldn't
affect the slave pcm.
Furthermore, the stop_threshold conversion code used the wrong boundary
value, and the silence_size conversion code did not take into account
the boundary value at all.
Add the internal start_pending state in the rate plugin for supporting
delayed start in the case no data is committed to slave PCM.
This fixes the problem of CPU hog with artsd.
The fix to enable finer sync of dmix in delay callback seems
rather harmful for some apps like xmms on SMP.
The problem of aoss was solved by max_periods=0, so better to
revert this change.
Sync pointers in delay callback in dmix. This solves some problems
of aoss with apps that don't check poll_revents.
The rate plugin is fixed to call delay of slave appropriately, too.
Created a new rate converter plugin SDK.
A rate converter can be replaced as an extra plugin now.
The default rate converter is a built-in linear converter.
You can find a sample external converter in alsa-plugins package.
When calculating the size of the second fragment, do not assume that the
entire size is one period size (which is not true in the draining state)
but use the actual size passed by the caller.
When calculating the continuous part till the end of the buffer, we can
use the slave_frames value that has already been calculated by
snd_pcm_mmap_begin().
Fixed the bug producing silent tones with some combinations of plugins.
The internal buffer handling is now better (cleaner) integrated with
snd_pcm_generic_*().
- added link/unlink/link_fd fast_ops callbacks
- moved code from snd_pcm_link to pcm_hw.c
- moved "empty" routines pointing to slave to pcm_generic.c
- introduced snd_pcm_generic_t
Change the handling of non-fatal errors. Now the non-fatal error
messages are not shown in stderr and no assert() as default. The
behavior can be changed with LIBASOUND_DEBUG environment variable.
My gnomemeeting hung when accessing the microphone.
The problem was that the rate variable was not initialized when jumping to
the __partial label.
Signed-off-by: Andreas Fenkart <afenkart@gmx.ch>
Description: The patch replaces the nearest neighbor downsampling method
in the sample rate conversion plugin by linear interpolation of the closest
two samples, thus significantly reducing the resampling noise.
Signed-off-by: Markus Grabner <grabner@icg.tu-graz.ac.at>
This patch fixes a number of different bugs in pcm_rate.c.
1) Resampling now works for rate 192000 -> 8000.
2) zero samples are not accidentally inserted into the stream any more.
3) Corrects period size calculations.
4) Prevents avail_min and xfer_align being less than 1.