OSDN Git Service

android-x86/external-alsa-lib.git
14 years agoOpen device nodes with close-on-exec flag
Rémi Denis-Courmont [Sat, 7 Nov 2009 19:29:23 +0000 (21:29 +0200)]
Open device nodes with close-on-exec flag

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoDefined symbols exposing the hrtimer to applications.
Pedro Lopez-Cabanillas [Sat, 7 Nov 2009 23:01:06 +0000 (00:01 +0100)]
Defined symbols exposing the hrtimer to applications.

Signed-off-by: Pedro Lopez-Cabanillas <pedro.lopez.cabanillas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agonamehint: list card independent devices only once
Jaroslav Kysela [Tue, 3 Nov 2009 15:44:51 +0000 (16:44 +0100)]
namehint: list card independent devices only once

Card-independent devices such as "null" or "pulse" should only be
added once, not once for each card.

Signed-off-by: John Lindgren <john.lindgren@tds.net>\
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agonamehint: Allow snd_device_name_hint to search for CTL devices.
Jaroslav Kysela [Tue, 3 Nov 2009 15:38:30 +0000 (16:38 +0100)]
namehint: Allow snd_device_name_hint to search for CTL devices.

Signed-off-by: John Lindgren <john.lindgren@tds.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agonamehint: add missing list->card initialization
Jaroslav Kysela [Tue, 3 Nov 2009 15:36:55 +0000 (16:36 +0100)]
namehint: add missing list->card initialization

list->card is wrongly assumed to be initialized, but the previous
initialization is within a conditional that is false when only
card-independent devices are found.  (This is the case when searching
for mixers on my system; the end result is that the "pulse" mixer is
listed three times.)

Signed-off-by: John Lindgren <john.lindgren@tds.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoCache libasound.so access in snd_dlopen
Jaroslav Kysela [Tue, 3 Nov 2009 15:34:34 +0000 (16:34 +0100)]
Cache libasound.so access in snd_dlopen

Speed up repeated calls to snd_dlopen by caching the path to
libasound.so; this reduces the instructions executed by
snd_device_name_hint by 40 percent.

Signed-off-by: John Lindgren <john.lindgren@tds.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoFix corruption after snd_device_name_hint()
Takashi Iwai [Tue, 3 Nov 2009 07:57:10 +0000 (08:57 +0100)]
Fix corruption after snd_device_name_hint()

snd_device_name_hint() corrupts the config name space after its call.
This results in the error from the suceeding calls of snd_pcm_open()
after snd_device_name_hint().

The bug is in try_config() in namehint.c; it calls snd_config_delete(res)
but res can be two different objects in the function.  One is the object
obtained via snd_config_search_definition(), and another is the one from
snd_config_search_alias_hooks().  The former is the expanded objects,
thus it should be freed.  But, the latter is a reference, and must not be
freed.

This patch adds the check to free or not.

Reported-by: John Lindgren <john.lindgren@tds.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agohcontrol: fix compare_default function to handle also id.device and id.subdevice
Jaroslav Kysela [Tue, 6 Oct 2009 08:46:54 +0000 (10:46 +0200)]
hcontrol: fix compare_default function to handle also id.device and id.subdevice

In case when kcontrol differs only by device or subdevice numbers, the
find function can give wrong results.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoalisp: Comment out an unused function to avoid compiler warnings.
Stefan Schmidt [Wed, 30 Sep 2009 10:36:14 +0000 (12:36 +0200)]
alisp: Comment out an unused function to avoid compiler warnings.

The function should be useful later so keep it in place and just comment it out
until it is actually used.

Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopcm_rate_linear: Annotate unused function parameter to avoid compiler warnings.
Stefan Schmidt [Wed, 30 Sep 2009 10:36:13 +0000 (12:36 +0200)]
pcm_rate_linear: Annotate unused function parameter to avoid compiler warnings.

Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agocontrol: Remove unused variable.
Stefan Schmidt [Tue, 29 Sep 2009 21:48:21 +0000 (23:48 +0200)]
control: Remove unused variable.

Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoconfigure.in: Add m4 check for new AM_SILENT_RULES
Stefan Schmidt [Tue, 29 Sep 2009 21:48:20 +0000 (23:48 +0200)]
configure.in: Add m4 check for new AM_SILENT_RULES

Kbuild like output for automake (>=1.11). It's no hard dependency as it needs
the newest automake, but enable it by default if it is available. To turn it off
you can either use --disable-silent-rules at configure time or make V=0  at
compile time.

Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agocvscompile: Remove in favour of gitcompile.
Stefan Schmidt [Tue, 29 Sep 2009 21:48:19 +0000 (23:48 +0200)]
cvscompile: Remove in favour of gitcompile.

Alsa-lib is no longer hosted in cvs but in git and the only difference between
both helper scripts is the name of the NO_MAKE env VAR check.

Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agodmix - Fix snd_pcm_info()
Takashi Iwai [Mon, 28 Sep 2009 09:59:50 +0000 (11:59 +0200)]
dmix - Fix snd_pcm_info()

Call the slave snd_pcm_info() as long as possible in the direct plugins
(i.e. when the PCM device could be opened with O_APPEND mode).
This allows dmix/dsnoop as a salve for PCM hook controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agopcm_hw: Always use delay ioctl in snd_pcm_delay()
Kai Vehmanen [Thu, 10 Sep 2009 22:07:21 +0000 (01:07 +0300)]
pcm_hw: Always use delay ioctl in snd_pcm_delay()

As the result of snd_pcm_delay() is affected not only by hw_ptr
and appl_ptr, but also by 'runtime->delay' property,
either SNDRV_PCM_IOCTL_DELAY or SNDRV_PCM_IOCTL_STATUS ioctl
must be used to get the correct result.

Previously 'runtime->delay' was ignored in case 'hw->sync_ptr'
was used.

Signed-off-by: Kai Vehmanen <kvehmanen@eca.cx>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoRelease v1.0.21a
Jaroslav Kysela [Wed, 9 Sep 2009 12:34:54 +0000 (14:34 +0200)]
Release v1.0.21a

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoPCM - Change the hw_params determination order
Takashi Iwai [Wed, 9 Sep 2009 12:16:06 +0000 (14:16 +0200)]
PCM - Change the hw_params determination order

In snd_pcm_hw_params_choose(), set the buffer size before the period
size and time as default.  This will give more useful configuration for
most of apps, i.e. larger buffer size.

For apps that require the old behavior, now the function checks the
environment variable $LIBASOUND_COMPAT.  If this variable is set to
non-empty, the hw_params is determined in the old way, first period
then buffer sizes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoChange dmix.conf to accept user configuration from defaults.dmix.<driver_id>.xxx
Jaroslav Kysela [Wed, 9 Sep 2009 09:38:11 +0000 (11:38 +0200)]
Change dmix.conf to accept user configuration from defaults.dmix.<driver_id>.xxx

An attempt to fix problem described in reverted patch "Fix driver conf
parsing in snd_config_hook_load_for_all_cards()".

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoRevert "Fix driver conf parsing in snd_config_hook_load_for_all_cards()"
Jaroslav Kysela [Wed, 9 Sep 2009 09:24:11 +0000 (11:24 +0200)]
Revert "Fix driver conf parsing in snd_config_hook_load_for_all_cards()"

This reverts commit 96da0c842d14b40ce8e37726b259229634b3aa21.

This way of fix brokes card-specific configuration loading.
See http://bugzilla.redhat.com bug#521988 for details.

Appropriate way to handle this problem is to fix the dmix configuration file.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agomixer: Add Speaker and Beep names to the weight list
Takashi Iwai [Mon, 31 Aug 2009 14:41:12 +0000 (16:41 +0200)]
mixer: Add Speaker and Beep names to the weight list

Added strings "Speaker" and "Beep" to the weight list so that the entries
appear in more appropriate positions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoRelease v1.0.21
Jaroslav Kysela [Mon, 31 Aug 2009 13:09:38 +0000 (15:09 +0200)]
Release v1.0.21

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agopcm/ioplug: fix error code in start callback
Takashi Iwai [Thu, 20 Aug 2009 23:34:29 +0000 (01:34 +0200)]
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>
15 years agopcm: workaround for avoiding automatic start in mmap mode
Takashi Iwai [Thu, 20 Aug 2009 23:18:00 +0000 (01:18 +0200)]
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>
15 years agoFix driver conf parsing in snd_config_hook_load_for_all_cards()
Takashi Iwai [Mon, 10 Aug 2009 12:11:57 +0000 (14:11 +0200)]
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>
15 years agocontrol.c: snd_ctl_wait: fix revents handling
Clemens Ladisch [Mon, 10 Aug 2009 08:11:15 +0000 (10:11 +0200)]
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>
15 years agotimer_query: make ops structure constant
Clemens Ladisch [Mon, 10 Aug 2009 08:09:02 +0000 (10:09 +0200)]
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>
15 years agosnd_pcm_scope_set_ops: make ops parameter const
Clemens Ladisch [Mon, 10 Aug 2009 08:08:25 +0000 (10:08 +0200)]
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>
15 years agoFix zero-division in pcm_rate.c
Takashi Iwai [Mon, 10 Aug 2009 07:53:18 +0000 (09:53 +0200)]
Fix zero-division in pcm_rate.c

Patch from Debian bug#539454

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agofix doc errors
Clemens Ladisch [Tue, 4 Aug 2009 07:17:20 +0000 (09:17 +0200)]
fix doc errors

Fix various errors in the documentation that make doxygen complain.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agodoc: hide structs with typedefs
Clemens Ladisch [Tue, 4 Aug 2009 07:15:40 +0000 (09:15 +0200)]
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>
15 years agodoc: fix handling of @top_srcdir@
Clemens Ladisch [Tue, 4 Aug 2009 07:12:39 +0000 (09:12 +0200)]
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>
15 years agoremove unimplemented functions from headers
Clemens Ladisch [Tue, 4 Aug 2009 07:11:47 +0000 (09:11 +0200)]
remove unimplemented functions from headers

Remove some function declarations that are not (no longer) implemented.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoadd config tests
Clemens Ladisch [Mon, 3 Aug 2009 11:35:01 +0000 (13:35 +0200)]
add config tests

Add some test for the snd_config_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoconf.c: more documentation
Clemens Ladisch [Mon, 27 Jul 2009 08:09:03 +0000 (10:09 +0200)]
conf.c: more documentation

Expand the documentation for the snd_config_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoconf.c: rename 'node' to 'config'
Clemens Ladisch [Fri, 17 Jul 2009 10:41:43 +0000 (12:41 +0200)]
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>
15 years agoconf.c: rename 'leaf' to 'child'
Clemens Ladisch [Fri, 17 Jul 2009 10:41:17 +0000 (12:41 +0200)]
conf.c: rename 'leaf' to 'child'

Nodes that (might) have children are not leaves.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoconf.c: rename 'father' to 'parent'
Clemens Ladisch [Fri, 17 Jul 2009 10:40:00 +0000 (12:40 +0200)]
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>
15 years agoconf.c: snd_config_add: prevent adopting a non-orphan
Clemens Ladisch [Wed, 15 Jul 2009 09:20:29 +0000 (11:20 +0200)]
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>
15 years agosound: rawmidi: disable active-sensing-on-close by default
Clemens Ladisch [Mon, 13 Jul 2009 11:53:16 +0000 (13:53 +0200)]
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>
15 years agoUSB-Audio.conf: fix definition for M-Audio AudioPhile spdif device
Clemens Ladisch [Mon, 13 Jul 2009 11:28:21 +0000 (13:28 +0200)]
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>
15 years agoconf.c: fix handling of NULL string values
Clemens Ladisch [Fri, 10 Jul 2009 05:26:29 +0000 (07:26 +0200)]
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>
15 years agoconf.c: snd_config_set_id: prevent duplicate ids
Clemens Ladisch [Fri, 10 Jul 2009 05:25:50 +0000 (07:25 +0200)]
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>
15 years agoconf.c: fix handling of NULL ids
Clemens Ladisch [Thu, 9 Jul 2009 05:38:26 +0000 (07:38 +0200)]
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>
15 years agotest/lsb/midi_event.c: check for buffer size check
Clemens Ladisch [Wed, 8 Jul 2009 06:50:54 +0000 (08:50 +0200)]
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>
15 years agotest/lsb/midi_event.c: abort on fatal errors
Clemens Ladisch [Wed, 8 Jul 2009 06:50:19 +0000 (08:50 +0200)]
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>
15 years agoMerge branch 'master' of git@git.alsa-project.org:alsa-lib
Takashi Iwai [Mon, 6 Jul 2009 10:31:53 +0000 (12:31 +0200)]
Merge branch 'master' of git@git.alsa-project.org:alsa-lib

15 years agotest/pcm.c: float format support
Takashi Iwai [Mon, 6 Jul 2009 06:56:53 +0000 (08:56 +0200)]
test/pcm.c: float format support

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoadd midi event tests
Clemens Ladisch [Mon, 6 Jul 2009 10:00:04 +0000 (12:00 +0200)]
add midi event tests

Add some tests for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agomore midi_event documentation
Clemens Ladisch [Mon, 6 Jul 2009 09:55:31 +0000 (11:55 +0200)]
more midi_event documentation

Expand the documentation for the snd_midi_event_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agotest/pcm.c: Generic linear PCM support
Takashi Iwai [Mon, 6 Jul 2009 06:42:18 +0000 (08:42 +0200)]
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>
15 years agotest/pcm.c: Fix S24 format
Takashi Iwai [Mon, 6 Jul 2009 06:41:00 +0000 (08:41 +0200)]
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>
15 years agotest/pcm.c: Sample generation on big endian platforms was broken.
Kenneth Johansson [Fri, 3 Jul 2009 20:31:38 +0000 (22:31 +0200)]
test/pcm.c: Sample generation on big endian platforms was broken.

Has not worked since commit 3d1fa924906996463ac33cba5b5143f762d913cf

Signed-off-by: Kenneth Johansson <kenneth@southpole.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agopcm_hooks: cosmetic removal of unused variables
Paul Fertser [Tue, 30 Jun 2009 11:18:36 +0000 (15:18 +0400)]
pcm_hooks: cosmetic removal of unused variables

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoManage dlobj lifetime in pcm_hooks.c
Takashi Iwai [Tue, 30 Jun 2009 09:11:34 +0000 (11:11 +0200)]
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>
15 years agoMerge branch 'master' of git@git.alsa-project.org:alsa-lib
Takashi Iwai [Wed, 24 Jun 2009 10:25:47 +0000 (12:25 +0200)]
Merge branch 'master' of git@git.alsa-project.org:alsa-lib

15 years agoseq_midi_event: fix decoding of (N)RPN events
Clemens Ladisch [Mon, 22 Jun 2009 08:00:46 +0000 (10:00 +0200)]
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>
15 years agoMIDI event decoder: prevent running status after sysex
Clemens Ladisch [Mon, 22 Jun 2009 08:00:03 +0000 (10:00 +0200)]
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>
15 years agopcm dmix plugin: fix MIX_AREAS_24 routine for i386 & x86_64 platforms
Jaroslav Kysela [Tue, 16 Jun 2009 18:10:19 +0000 (20:10 +0200)]
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>
15 years agoAdd the support of TLV_DB_MINMAX types
Takashi Iwai [Tue, 16 Jun 2009 12:28:57 +0000 (14:28 +0200)]
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>
15 years agoFix SB-Xfi.conf
Takashi Iwai [Tue, 9 Jun 2009 02:49:57 +0000 (04:49 +0200)]
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>
15 years agoFix breakage of snd_card_load()
Takashi Iwai [Tue, 9 Jun 2009 02:45:18 +0000 (04:45 +0200)]
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>
15 years agoAdd IEC958 status bits support to SB-XFi.conf
Takashi Iwai [Tue, 2 Jun 2009 15:21:26 +0000 (17:21 +0200)]
Add IEC958 status bits support to SB-XFi.conf

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoQuery the supported rate ranges from rate plugins
Takashi Iwai [Tue, 2 Jun 2009 14:13:01 +0000 (16:13 +0200)]
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>
15 years agoAdd config file for SB-XFi driver
Takashi Iwai [Tue, 2 Jun 2009 14:08:57 +0000 (16:08 +0200)]
Add config file for SB-XFi driver

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosnd_card_get_index() - extend comment for last change
Jaroslav Kysela [Tue, 12 May 2009 06:28:06 +0000 (08:28 +0200)]
snd_card_get_index() - extend comment for last change

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoExtend snd_card_get_index() to accept also control device name like /dev/snd/controlC0
Jaroslav Kysela [Tue, 12 May 2009 06:06:41 +0000 (08:06 +0200)]
Extend snd_card_get_index() to accept also control device name like /dev/snd/controlC0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoRelease v1.0.20
Jaroslav Kysela [Wed, 6 May 2009 07:07:23 +0000 (09:07 +0200)]
Release v1.0.20

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoMerge branch 'master' of /export/git/alsa/alsa-lib/
Takashi Iwai [Thu, 23 Apr 2009 12:58:59 +0000 (14:58 +0200)]
Merge branch 'master' of /export/git/alsa/alsa-lib/

15 years agopcm: more better documentation for snd_pcm_poll_descriptors
Jaroslav Kysela [Tue, 21 Apr 2009 12:36:29 +0000 (14:36 +0200)]
pcm: more better documentation for snd_pcm_poll_descriptors

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agopcm_hw plugin: show appl_ptr and hw_ptr in dump() callback
Jaroslav Kysela [Thu, 9 Apr 2009 08:49:57 +0000 (10:49 +0200)]
pcm_hw plugin: show appl_ptr and hw_ptr in dump() callback

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agopcm_hw plugin: preserve monotonic flag also after snd_pcm_hw_params() call
Jaroslav Kysela [Wed, 8 Apr 2009 07:29:35 +0000 (09:29 +0200)]
pcm_hw plugin: preserve monotonic flag also after snd_pcm_hw_params() call

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoAdd route_policy copy to HDA-Intel.conf for capture
Takashi Iwai [Mon, 23 Mar 2009 08:06:23 +0000 (09:06 +0100)]
Add route_policy copy to HDA-Intel.conf for capture

Since some digital mics have the phase-inversion problem in one channel,
adding both channels for mono stream results in the noise.
Use route_policy copy to avoid that situation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoChange "%b" to represent bits instead of bytes in PCM file plugin
Pavel Hofman [Tue, 3 Mar 2009 16:07:55 +0000 (17:07 +0100)]
Change "%b" to represent bits instead of bytes in PCM file plugin

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix typos in ALSA Lib documentation
Patricio Paez [Sun, 22 Feb 2009 13:54:10 +0000 (07:54 -0600)]
Fix typos in ALSA Lib documentation

Signed-off-by: Patricio Paez <pp@pp.com.mx>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'master' of git@git.alsa-project.org:alsa-lib
Takashi Iwai [Tue, 17 Feb 2009 16:01:06 +0000 (17:01 +0100)]
Merge branch 'master' of git@git.alsa-project.org:alsa-lib

15 years agoChange numid properly with external ctl plugins
Takashi Iwai [Tue, 17 Feb 2009 15:58:12 +0000 (16:58 +0100)]
Change numid properly with external ctl plugins

So far, external ctl plugins don't change numid.  Some apps expect the
non-zero numids with list, and the plugin doesn't work for them.

This patch adds a fake numid to each control based on the offset
number.  The lookup with non-zero numid is supported but is pretty
inefficient.  Eventually the plugin side may be optimized to look
at the numid, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agooxygen: remove softvol plugin
Clemens Ladisch [Tue, 17 Feb 2009 08:45:57 +0000 (09:45 +0100)]
oxygen: remove softvol plugin

The change that removed the Master controls for Xonar D2(X) cards was
reverted, so we don't need to use the softvol plugin anymore ...

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoAdd hint.device = 0 to pcm.default of HDA-Intel.conf
Takashi Iwai [Fri, 13 Feb 2009 16:14:51 +0000 (17:14 +0100)]
Add hint.device = 0 to pcm.default of HDA-Intel.conf

The hd-audio driver may have no analog stream but only a digital one
which has usually non-zero device number.  To avoid the bogus namehint,
set hint.device 0 for pcm.default (it wasn't handled properly due to
asym).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agofix pcm_set_params() documentation
Clemens Ladisch [Wed, 11 Feb 2009 08:53:29 +0000 (09:53 +0100)]
fix pcm_set_params() documentation

The documentation for the latency parameter of pcm_set_params() says
that the value 0 uses an optimal value.  This is wrong, as there is no
special handling for 0, and the result will be a buffer of minimal size.
Therefore, remove that incorrect statement.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoFix misc compile warnings
Takashi Iwai [Mon, 2 Feb 2009 15:11:39 +0000 (16:11 +0100)]
Fix misc compile warnings

Shut up misc compile warnings from gcc:
  pcm_plug.c: In function ‘snd_pcm_plug_change_mmap’:
  pcm_plug.c:608: warning: enumeration value ‘SND_PCM_ACCESS_MMAP_INTERLEAVED’ not handled in switch
  pcm_plug.c:608: warning: enumeration value ‘SND_PCM_ACCESS_MMAP_NONINTERLEAVED’ not handled in switch
  pcm_plug.c:608: warning: enumeration value ‘SND_PCM_ACCESS_MMAP_COMPLEX’ not handled in switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix handling of revents in snd_pcm_poll_descriptors_revents()
Takashi Iwai [Mon, 2 Feb 2009 14:43:48 +0000 (15:43 +0100)]
Fix handling of revents in snd_pcm_poll_descriptors_revents()

The revents parameter is ambiguously defined whether it's a pointer
to a single event or an arary.

This patch defines the behavior of revents more strictly (in the
function description): it's a pointer of a single event.

Also fixed snd_pcm_wait_nocheck() to follow that rule.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoPCM parameters in file plugin
Pavel Hofman [Thu, 29 Jan 2009 10:59:27 +0000 (11:59 +0100)]
PCM parameters in file plugin

* added support for including pcm stream params in the output filename
* added support for piping the stream to a shell command if the filename
  string starts with a pipe char

Signed-off-by: Pavel Hofman <pavel.hofman@insite.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix off_t in kernel struct
Takashi Iwai [Wed, 28 Jan 2009 14:00:35 +0000 (15:00 +0100)]
Fix off_t in kernel struct

The off_t in kernel struct (for ioctls) is actually different from the
definition of user-space off_t.  The kernel off_t is equial with long
while user-space off_t depends on the large-file support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRemove own "default" PCM config from GUS.conf
Takashi Iwai [Wed, 28 Jan 2009 08:07:53 +0000 (09:07 +0100)]
Remove own "default" PCM config from GUS.conf

The system-wide default PCM config works now (by the fix of plug
mmap_emul support), thus no card-specific hackish config is needed
for GUS.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix plug conversion with mmap emulation
Takashi Iwai [Tue, 27 Jan 2009 16:21:34 +0000 (17:21 +0100)]
Fix plug conversion with mmap emulation

If the slave PCM supports only another type of interleaved format,
plug did convert it wrongly and resulted in an unused access type
error.  For example, if a slave PCM supporst only RW_NONINTERLEAVE
access and you try to play an interleaved format file, it resulted
in an error.

This patch fixes the conversion rule.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix GUS.conf to be usable
Krzysztof Helt [Tue, 27 Jan 2009 10:44:14 +0000 (11:44 +0100)]
Fix GUS.conf to be usable

Fix GUS.conf to work for default PCM.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoAdd missing -ldl to modules/mixer/simple/*
Takashi Iwai [Wed, 21 Jan 2009 08:29:35 +0000 (09:29 +0100)]
Add missing -ldl to modules/mixer/simple/*

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix build with softfloat option
Takashi Iwai [Wed, 21 Jan 2009 08:25:48 +0000 (09:25 +0100)]
Fix build with softfloat option

Fix build of alsa-lib when --with-softfloat is used:
 - disable ladspa plugin
 - don't use sqrt() function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoRelease v1.0.19
Jaroslav Kysela [Mon, 19 Jan 2009 11:17:18 +0000 (12:17 +0100)]
Release v1.0.19

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoadd softvol for CMI8788
Clemens Ladisch [Mon, 19 Jan 2009 09:20:38 +0000 (10:20 +0100)]
add softvol for CMI8788

Master Volume controls were removed from Xonar D2/D2X cards; add the
softvol plugin so that we have at least PCM volume.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
15 years agoAdd m4/attributes.m4 as dist file..
Jaroslav Kysela [Mon, 5 Jan 2009 12:10:32 +0000 (13:10 +0100)]
Add m4/attributes.m4 as dist file..

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
15 years agoDon't accept an empty string for $ALSA_CONFIG_PATH
Takashi Iwai [Wed, 10 Dec 2008 17:20:50 +0000 (18:20 +0100)]
Don't accept an empty string for $ALSA_CONFIG_PATH

The variable $ALSA_CONFIG_PATH specifies the config path, but the current
code accepts the empty string and results in a mysterious error because
no config file is found.

This patch fixes the check of the variable and takes the default value
if the string is empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix softvol access refine
Takashi Iwai [Thu, 4 Dec 2008 14:21:40 +0000 (15:21 +0100)]
Fix softvol access refine

The commit a13707da6bb0161db855a146c3e4d1d849e4108b

    pcm_softvol plugin: remove access type change for refine

breaks the softvol in the case of RW -> MMAP.  The slave of softvol
must be an mmap although the previous fix forces RW access.

This patch reverts the commit, and the fixed access refine method
to hanle non-interleaved <-> interleaved changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoFix snd-pcsp default configuration
Takashi Iwai [Wed, 26 Nov 2008 13:09:06 +0000 (14:09 +0100)]
Fix snd-pcsp default configuration

The softvol must be inside the plug.  Otherwise it gets stuck.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMark static tables as constant when possible.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 21:19:28 +0000 (22:19 +0100)]
Mark static tables as constant when possible.

This makes it possible to write them to .data.rel.ro or to .rodata if
there is no relocation involved (arrays of character arrays).

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake string arrays as constant as possible.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 18:46:44 +0000 (19:46 +0100)]
Make string arrays as constant as possible.

Use "const char *const []" as type for string arrays, or convert to
"const char [][x]" when it makes sense.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake all the remaining ops structure constants.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 18:43:33 +0000 (19:43 +0100)]
Make all the remaining ops structure constants.

This excludes the mixer for now since it requires a change to the
public headers.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake all the PCM plugins ops structure constant.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 19:38:09 +0000 (20:38 +0100)]
Make all the PCM plugins ops structure constant.

This ensures they are emitted in .data.rel.ro rather than .data.rel,
which should make a nice difference when using prelink.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake snd_pcm_hw_params_names static to pcm_params.c .
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 19:28:56 +0000 (20:28 +0100)]
Make snd_pcm_hw_params_names static to pcm_params.c .

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
15 years agoMake seq, rawmidi and control operation structures static const.
Diego E. 'Flameeyes' Pettenò [Fri, 21 Nov 2008 19:26:12 +0000 (20:26 +0100)]
Make seq, rawmidi and control operation structures static const.

Since they are never changed it does not make sense to have them in
the writeable .data section, just make sure to add const to the ops
member in the structure definitions so that there are no extra
warnings added.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>