Commit graph

2569 commits

Author SHA1 Message Date
Jaroslav Kysela
a64f6defd0 Release v1.0.21
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-08-31 15:09:38 +02:00
Takashi Iwai
cbf5675eef pcm/ioplug: fix error code in start callback
When snd_pcm_start() is called in the invalid state, it should return
-EBADFD.  But ioplug plugin returns -EAGAIN.  Let's fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-21 01:34:29 +02:00
Takashi Iwai
bd5389278c pcm: workaround for avoiding automatic start in mmap mode
In the normal mmap mode, the stream isn't started automatically even after
the data >= start_threshold has been written.   However, in the
mmap-emulation mode, the stream is started because it uses
snd_pcm_write_areas() internally.

As a workaround for this inconsistency, start_threshold value is changed
dynamically in sw_parmams and mmap_commit callbacks in mmap-emul plugin.
Meanwhile, start_threshold for slave PCM is set to boundary so that only
this plugin (or the one over it) can control the start of the stream.

This will fix problems in some apps using pulse plugin in the mmap mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-21 01:23:08 +02:00
Takashi Iwai
96da0c842d Fix driver conf parsing in snd_config_hook_load_for_all_cards()
Reported by Kevin Goodsell.

Summary: load_for_all_cards fails with existing configuration elements

In snd_config_hook_load_for_all_cards, the first call to
snd_config_search attempts to locate an existing configuration node with
the name of the driver.  Typically none is found, and everything is
good. However, if such a node is located, the next line assumes it is a
leaf node with type 'string' and calls snd_config_get_string to fetch
the string value. If this fails, the entire hook is abandoned.

Because of this, setting something like the following in asoundrc:

cards.<driver name>.foo 0

is sufficient to disable the entire card-specific configuration.

As a concrete example, I have a HDA-Intel sound card. dmix.conf includes
a way to set period_size, period_time, and periods by using
configuration elements of the form cards.<driver name>.pcm.dmix.<var>.
In ~/.asoundrc I add

cards.HDA-Intel.pcm.dmix.period_size 1024

This will cause HDA-Intel.conf to fail to load, and the pcm defined in
default.conf will fail to find the device-specific pcm
cards.HDA-Intel.pcm.default, and fall back on the default pcm using
plughw.  By attempting to configure dmix, I have disabled it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-10 14:14:10 +02:00
Clemens Ladisch
34d63b449f control.c: snd_ctl_wait: fix revents handling
The revents parameter of snd_ctl_poll_descriptors_revents() is a single
value, not an array.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-10 10:11:15 +02:00
Clemens Ladisch
f3dc8e2aa4 timer_query: make ops structure constant
The contents of the snd_timer_query_ops structure are not going to be
changed, so we might as well declare is as constant.  This change avoids
a warning if some ops structure is actually defined as const.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-10 10:09:02 +02:00
Clemens Ladisch
2905af225f snd_pcm_scope_set_ops: make ops parameter const
The contents of the snd_pcm_scope_ops structure are not going to be
changed, so we might as well declare is as constant.  This change is
backwards compatible, and avoids warnings if some ops structure is
actually defined as const.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-10 10:08:25 +02:00
Takashi Iwai
79345b523e Fix zero-division in pcm_rate.c
Patch from Debian bug#539454

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-10 09:53:18 +02:00
Clemens Ladisch
5332d74a67 fix doc errors
Fix various errors in the documentation that make doxygen complain.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-04 09:17:20 +02:00
Clemens Ladisch
0ed67883af doc: hide structs with typedefs
In the documentation, hide structure types that have a corresponding
typedef.  Since doxygen 1.5.4, this is no longer the default when
OPTIMIZE_OUTPUT_FOR_C is set.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-04 09:15:40 +02:00
Clemens Ladisch
1b4dedc62e doc: fix handling of @top_srcdir@
The value of top_srcdir should be replaced in the config file, not in
the makefile, so we have to escape it in the makefile.

In the default case, the value of top_srcdir is ".." which, when used as
a regular expression, is a little bit too inclusive.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-04 09:12:39 +02:00
Clemens Ladisch
fa30246096 remove unimplemented functions from headers
Remove some function declarations that are not (no longer) implemented.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-04 09:11:47 +02:00
Clemens Ladisch
da19588063 add config tests
Add some test for the snd_config_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-03 13:35:01 +02:00
Clemens Ladisch
5fe83677b5 conf.c: more documentation
Expand the documentation for the snd_config_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-27 10:09:03 +02:00
Clemens Ladisch
930335668a conf.c: rename 'node' to 'config'
Just for consistency with the parameter names of all the other
functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-17 12:41:43 +02:00
Clemens Ladisch
9258e8c851 conf.c: rename 'leaf' to 'child'
Nodes that (might) have children are not leaves.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-17 12:41:17 +02:00
Clemens Ladisch
9bf79f43c5 conf.c: rename 'father' to 'parent'
I haven't found anything that would make compound nodes specifically
male ...

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-17 12:40:00 +02:00
Clemens Ladisch
5d56a11a8e conf.c: snd_config_add: prevent adopting a non-orphan
When adding a configuration node to another, check that the child node
does not already have a parent.  Otherwise, the old parent's children
list would become corrupted.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-15 11:20:29 +02:00
Clemens Ladisch
76c60af00a sound: rawmidi: disable active-sensing-on-close by default
Sending an Active Sensing message when closing a port can interfere with
the following data if the port is reopened and a note-on is sent before
the device's timeout has elapsed.  Therefore, it is better to disable
this setting by default.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-13 13:53:16 +02:00
Clemens Ladisch
a9b1299556 USB-Audio.conf: fix definition for M-Audio AudioPhile spdif device
Add custom definitions for the AudioPhile "default" and "iec958" devices
so that output and input are routed to the correct PCM device.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-13 13:28:21 +02:00
Clemens Ladisch
efda3e2bc7 conf.c: fix handling of NULL string values
Make sure that we do not crash when encountering configuration nodes
with a NULL string value, or that at least we run into an assert().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-10 07:26:29 +02:00
Clemens Ladisch
e2317969e1 conf.c: snd_config_set_id: prevent duplicate ids
snd_config_add() checks for duplicate ids, but it was possible to create
duplicates by adding a note and changing the id afterwards with
snd_config_set_id(); so we have to add a check there, too.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-10 07:25:50 +02:00
Clemens Ladisch
2c4b3c7d09 conf.c: fix handling of NULL ids
Make sure that we do not crash when encountering configuration nodes
with a NULL id.  Furthermore, since we cannot avoid having NULL ids
anyway, allow the id of a top-level node to be reset to NULL.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-09 07:38:26 +02:00
Clemens Ladisch
a7f744888e test/lsb/midi_event.c: check for buffer size check
Add a test to check that snd_midi_event_decode() checks its output
buffer size.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-08 08:50:54 +02:00
Clemens Ladisch
61f5b8438b test/lsb/midi_event.c: abort on fatal errors
If snd_midi_event_fails(), we cannot use the object and must abort the
current test.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-08 08:50:19 +02:00
Takashi Iwai
7469306165 Merge branch 'master' of git@git.alsa-project.org:alsa-lib 2009-07-06 12:31:53 +02:00
Takashi Iwai
b8c4fef8bf test/pcm.c: float format support
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 12:31:09 +02:00
Clemens Ladisch
7f73f1bb15 add midi event tests
Add some tests for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-06 12:00:04 +02:00
Clemens Ladisch
8541983799 more midi_event documentation
Expand the documentation for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-06 11:55:31 +02:00
Takashi Iwai
184301ae4c test/pcm.c: Generic linear PCM support
- Fix the support of non-native endianness
- Conversion for unsigned formats
- Only allow linear formats

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 08:42:18 +02:00
Takashi Iwai
3d0843e8ce test/pcm.c: Fix S24 format
S24 format has different bit width and physical width.
For calculating the byte offset for big-endian packing, the latter value
has to be used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-06 08:41:00 +02:00
Kenneth Johansson
d23845e563 test/pcm.c: Sample generation on big endian platforms was broken.
Has not worked since commit 3d1fa92490

Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-03 22:49:59 +02:00
Paul Fertser
5a70411d6c pcm_hooks: cosmetic removal of unused variables
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 14:53:42 +02:00
Takashi Iwai
2a77d217a6 Manage dlobj lifetime in pcm_hooks.c
The shared object may be still needed depending on the implementation
of hook-installation functions.  When any hooks are registered in the
installation function, the dlobj has to be kept opened until closing
the PCM instance.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-30 11:11:34 +02:00
Takashi Iwai
608cccb088 Merge branch 'master' of git@git.alsa-project.org:alsa-lib 2009-06-24 12:25:47 +02:00
Clemens Ladisch
394b376b3b seq_midi_event: fix decoding of (N)RPN events
When decoding (N)RPN sequencer events into raw MIDI commands, the
extra_decode_xrpn() function had accidentally swapped the MSB and LSB
controller values of both the parameter number and the data value.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-22 10:00:46 +02:00
Clemens Ladisch
cbf395d692 MIDI event decoder: prevent running status after sysex
Running status cannot be using in the command immediately following
a system exclusive command, so we have to reset the running status
state in that case.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-22 10:00:03 +02:00
Jaroslav Kysela
e94f3cfdf9 pcm dmix plugin: fix MIX_AREAS_24 routine for i386 & x86_64 platforms
The code was copied from ALSA bug#4577 from CannibalZerg.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-06-16 20:10:19 +02:00
Takashi Iwai
f8a34aa683 Add the support of TLV_DB_MINMAX types
Added the support of the new TLV_DB_MINMAX types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-16 14:28:57 +02:00
Takashi Iwai
e5ca075cde Fix SB-Xfi.conf
Added missing hint.device for rear, clfe, etc definitions.
Removed invalid iec958 capture definition.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 04:49:57 +02:00
Takashi Iwai
4d2ba6a460 Fix breakage of snd_card_load()
Fixed the breakage of snd_card_load() for secondary and later cards
due to changes in snd_card_load1().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-09 04:45:18 +02:00
Takashi Iwai
bb956b7b70 Add IEC958 status bits support to SB-XFi.conf
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 17:21:26 +02:00
Takashi Iwai
1929c55d2e Query the supported rate ranges from rate plugins
Extend the PCM-rate plugin protocol to allow the host to query the
supported sample rates.  The protocol version is bumped to 0x010002,
and the version number negotiaion is slightly changed.
Now the plugin is supposed to fill the version it supports in return.

The old versioned plugins are still supported, but they may spew
version-mismatch warning prints.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 16:26:03 +02:00
Takashi Iwai
29841e67e9 Add config file for SB-XFi driver
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02 16:08:57 +02:00
Jaroslav Kysela
d2aadec5e4 snd_card_get_index() - extend comment for last change
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-05-12 08:28:06 +02:00
Jaroslav Kysela
33ab0b5381 Extend snd_card_get_index() to accept also control device name like /dev/snd/controlC0
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-05-12 08:06:41 +02:00
Jaroslav Kysela
3e30007a19 Release v1.0.20
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-05-06 09:07:23 +02:00
Takashi Iwai
646f24a04c Merge branch 'master' of /export/git/alsa/alsa-lib/ 2009-04-23 14:58:59 +02:00
Jaroslav Kysela
0de385109a pcm: more better documentation for snd_pcm_poll_descriptors
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-21 14:36:33 +02:00
Jaroslav Kysela
a987a692bf pcm_hw plugin: show appl_ptr and hw_ptr in dump() callback
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-04-09 10:49:57 +02:00