Commit graph

2115 commits

Author SHA1 Message Date
Jaroslav Kysela
5c51b6570e Changed permissions for scripts and added .hgignore file
Initial version of .hgignore file
2006-04-06 19:14:01 +02:00
Takashi Iwai
ff176aa01a Make plugin functions static
Make plugin functions that are not referred from others static.
2006-03-29 09:35:14 +00:00
Takashi Iwai
d9dc944a75 Fix errors in partial reads/writes with rate plugin
Fix errors in partial reads/writes (e.g. draining) with rate plugin.
2006-03-29 09:33:46 +00:00
Takashi Iwai
18a6132a66 Fix PCM without control/status mmap
Fix the update of appl_ptr via mmap_commit when control/status structs
are not mmapped (e.g. 32bit compatible mode on 64bit kernel).
2006-03-29 09:32:18 +00:00
Takashi Iwai
504a2e34a4 Fix compile warnings
Fix compile warnings by adding cast.
2006-03-29 09:29:44 +00:00
Takashi Iwai
09c5db44a4 Fix noisy output of dmix with two periods
Fixed the noisy output of dmix with two (or less) periods.
The dmix tends to give noise or XRUN when running with two periods
because of its implementation nature.  To avoid this, the start
position is aligned to the period size, so that the updates are synced
with interrupts of slave PCM.
2006-03-24 14:53:41 +00:00
Takashi Iwai
1a9c520529 Fix PCM auto-start conditions
Fix the PCM auto-start conditions

- The capture stream should be started the PCM anyway before reads
- Fixed the endless poll() when the written size doesn't fit to the
  buffer size due to lack of auto-start
2006-03-24 14:51:24 +00:00
Takashi Iwai
912f0d5ddf Fix snd_pcm_write*() return values at start up
If an error occurs at starting the stream, snd_pcm_write*() should return
an error value instead of the size to be written.
2006-03-24 14:41:40 +00:00
Jaroslav Kysela
944a4ad310 release 1.0.11rc4
Patch-level: Merged
2006-03-22 10:47:32 +00:00
Takashi Iwai
dc438157c5 Fix the description of snd_mixer_handle_events()
Fixed the description about the return value of snd_mixer_handle_events()
(ALSA bug#1932).
2006-03-21 16:58:32 +00:00
Takashi Iwai
3b692f9d6b Change autoconf requirement to 2.59
Change AC_PREREQ to 2.59.
2006-03-21 16:56:16 +00:00
Juergen Kreileder
5ba4634ab5 Add support for S32_3LE and byte-swapped S16/S32 to softvol
Here's a patch which adds support for S24_3LE and byte-swapped S16 and
S32 to softvol.  I've tested S24_3LE and byte-swapped S16 on powerpc
with snd-usb-audio.  All other cases are untested so far.
(Config at http://blog.blackdown.de/static/alsa/USB-Audio.conf)

Signed-off-by: Juergen Kreileder <jk@blackdown.de>
2006-03-21 16:55:25 +00:00
Takashi Iwai
91066a98b9 Fix timer read from 32bit user-space on 64bit kernel
snd_timer_tread struct is a bad design for 32/64bit compatibility,
and reading this struct on 32bit program returns zero.  This results
in tight poll looping (bug#1938, #1945).

For avoiding this bug, now more bigger buffer is read to cover the
64bit tread struct, too.  Also this optimizes the read without
checking -EAGAIN in the case both user-space and kernel have the same
tread size.
2006-03-21 10:39:49 +00:00
Takashi Iwai
24a3cfc236 Fix extplug->channels initialization
Fixed the missing initialization of extplug->channels in hw_params.
2006-03-21 10:30:44 +00:00
Takashi Iwai
7e6c920836 dmix - Allow more flexible buffer sizes
With the patch, dmix allows apps to use more flexible buffer sizes.
The max buffer size is unlimited, and the minimal buffer size is
(period size * 2).  The buffer size is aligned to period size.

The period size is still bound to the period size of slave PCM.

To back to the old behavior (the fixed buffer size), you can set

   defaults.pcm.dmix_variable_buffer false

in your configuration.
2006-03-21 10:27:35 +00:00
Juergen Kreileder
8ef339762a Fixes S16 byte swapping with generic dmix code
Here's a patch for generic dmix which fixes S16 byte swapping.

Tested on powerpc with snd-usb-audio.  (Without the patch I get crackling.)

Signed-off-by: Juergen Kreileder <jk@blackdown.de>
2006-03-20 20:24:13 +00:00
Takashi Iwai
5c0674aee3 Add init callback to extplug
- Fix the hw constraints of extplug
- Add init callback to extplug
2006-03-20 11:26:16 +00:00
Takashi Iwai
38a3aa096c Fix restoration of PCM open mode
The original PCM open mode was lost by the change of default non-blocking
open.  The patch fix the restoration of the original open mode.
2006-03-20 11:22:23 +00:00
Takashi Iwai
eecfed7569 Add channels parameter to surround40/51 definitions
Add channels parameter to surround40/51 definitions for drivers
using a single device.
2006-03-17 18:14:23 +00:00
Takashi Iwai
90112fff1e Add restriction parameters to pcm hw layer
Add restriction parameters to pcm hw layer.

The PCM hw has optional parameters, format, rate and channels, to restrict
the configuration.  This is useful for definition of surround slave PCMs,
for example.
2006-03-17 18:09:07 +00:00
Takashi Iwai
8e6ac040a6 Fix double free in rate plugin
Fixed double free in rate plugin (bug#1937).
2006-03-17 18:06:23 +00:00
Jaroslav Kysela
63207b3ad6 alsa-lib - added ENOTTY and ENODEV to pcm_errors section 2006-03-15 12:38:37 +00:00
Jaroslav Kysela
36eb137f69 alsa-lib - added pcm_errors section 2006-03-15 12:22:29 +00:00
Takashi Iwai
f032a8cf3f Suppress warning messages from old timer
Suppress warning messages when the new timer ioctl isn't available
(happening when using dmix in the new alsa-lib with older kernels).
2006-03-14 19:02:23 +00:00
Clemens Ladisch
e58f4d966f rate plugin: wait for data to be drained
When draining, wait for the slave device to become ready to prevent
committing more data than would have been available in the buffer.
2006-03-13 10:41:54 +00:00
Clemens Ladisch
aaaf843871 rate plugin: fix fragment size calculation
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.
2006-03-13 10:40:21 +00:00
Clemens Ladisch
931e840a9f rate plugin: optimize calculation of the continuous buffer part
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().
2006-03-13 10:38:51 +00:00
Takashi Iwai
46c67fe070 Portability fix for alsa-lib on mips
From: Henryk Plötz <henryk@ploetzli.ch>

I recently had problems building alsa-lib 1.0.10 on mips (for my
Netgear WGT634U). Turned out the problem was in include/alsa-symbols.h
were there was __asm__ code that wouldn't work with the mips assembler.
Attached is a patch that makes this work again.
2006-03-03 17:51:33 +00:00
Clemens Ladisch
8f61812f1c return ENODEV for disconnected devices
Return -ENODEV instead of -ENOTTY for disconnected devices.
2006-03-03 14:08:58 +00:00
Takashi Iwai
d730ff3556 Fix segfault with PCM rate plugin
Fix segfault with PCM rate plugin (bug#1878)
2006-03-02 17:01:58 +00:00
Clemens Ladisch
09f598e57c allow changing of device directory path
Add configuration options to change the default device path from the
default /dev/snd.  This is useful for embedded systems that do not want
subdirectories in /dev.
2006-02-27 10:03:19 +00:00
Clemens Ladisch
3f00bc728b fix a typo
Fix a memory leak in an error path of snd_seq_hw_open().
2006-02-27 09:59:18 +00:00
Clemens Ladisch
4433248bf3 remove superfluous free() checks
free() correctly handles NULL pointers, so we can omit explicit checks
for that condition.
2006-02-27 09:58:32 +00:00
Clemens Ladisch
45850439b3 Do not abort in snd_xxx_close() functions
Remove several memory leaks by not aborting prematurely from a
snd_xxx_close() function when some operation fails.
This can happen when a USB device was unplugged.
2006-02-27 09:54:57 +00:00
Takashi Iwai
f9c7321670 Fix infinite loop in snd_pcm_wait()
Fix possible infinite loop in snd_pcm_wait() with direct plugins
when XRUN occurs during poll.
2006-02-20 19:34:45 +00:00
Takashi Iwai
43a04650f1 Remove bogus ATTRIBUTE_UNUSED
Removed bogus ATTRIBUTE_UNUSED.
2006-02-20 19:33:53 +00:00
Takashi Iwai
2e0c2b0ac1 Fix compile warnings
Fix compile warnings on 64bit architectures.
2006-02-20 19:33:25 +00:00
Takashi Iwai
609d4a7de6 Avoid unnecesasry call of resmgr
Avoid unnecesasry call of resmgr if the device file really doesn't exist.
2006-02-20 19:32:53 +00:00
Takashi Iwai
37aa30ddc3 Add description about non-blocking behavior
Add description about the default non-blocking behavior.
2006-02-17 20:51:12 +00:00
Takashi Iwai
b4f9e5f8e7 Fix plug conversion of non-linear formats
Fix plug conversion of non-linear formats with channel or rate conversion.
2006-02-17 20:50:45 +00:00
Takashi Iwai
c002c69d52 Fix fullduplex with dmix/dsnoop
Fixed the fullduplex of dmix and dsnoop plugins due to confliction of
ipc keys.
2006-02-17 20:50:00 +00:00
Takashi Iwai
67868a886f Fix check of nonblock option
Fix the check of nonblock option for all hw layer.
Instead of passing in asound.conf, check the option in snd_pcm_hw_open()
so that the nonblock option is referred in the case of "type hw ..." style
definition, too.
2006-02-17 20:49:21 +00:00
Takashi Iwai
0757f70b1b Fix memory leaks
Fixed small memory leaks in the parser.
2006-02-09 11:37:04 +00:00
Jaroslav Kysela
9e86ea6902 alsa-lib virtual rawmidi device: fixed typo (NONBLOCK mode)
See bug#1821 for details.
2006-02-05 15:36:21 +00:00
Jaroslav Kysela
59b598fac0 Fixed snd_pcm_set_params() error code 2006-02-01 06:34:43 +00:00
Jaroslav Kysela
937f396663 snd_pcm_set_params() - added workaround for vortex driver 2006-01-31 09:16:05 +00:00
Takashi Iwai
eccc92a34d Fix infinite parse of recursive definitions
Fixed the infinite parse (and eventually segfault) of recursive definitions.
Also fixed the parse of a string slave PCM of direct plugins.
2006-01-30 14:41:51 +00:00
Jaroslav Kysela
bf174b7046 release 1.0.11rc3
Patch-level: Merged
2006-01-27 15:22:16 +00:00
Takashi Iwai
b23f367ee3 Remove bad assert
From: Pierre Ossman <drzeus-list@drzeus.cx>

Freeing the global config update structure when it had been created
without any configs present caused an assertion to trigger. Since this
is a valid scenario and the assertion didn't really protect against
anything, it should simply be removed. Attached patch does exactly that.
2006-01-27 11:54:06 +00:00
Nathan Kurz
d9cfe1e9ff pcm_ladspa - setup control outputs all times
It turned out that plugins that had control outputs were not being set
up properly if there was no corresponding "output" section.

Signed-off-by: Nathan Kurz <nate@verse.com>
2006-01-20 08:17:49 +00:00