summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ascenario: Fix function declaration changesascenarioJaroslav Kysela2009-10-062-30/+31
| | | | | Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ascenario: rewrite header file and change C interfaceJaroslav Kysela2009-10-066-116/+174
| | | | | | | | | | - use typedef rather than structure to follow other alsa-lib's APIs for snd_scenario - merge functions with same type - use snd_ctl_elem_id_t for kcontrol ids - change inline comments to doxygen Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [PATCH] ascenario: Add scenario support to alsa-libJaroslav Kysela2009-10-062-0/+1528
| | | | | | | | | | | | | It allows switching audio settings between scenarios or uses-cases like listening to music and answering an incoming phone call. Made of control aliasing for playback, capture master and switch as well as the option to post- and prefix a sequence of control changes avoiding pops and other unwanted noise. Some example programs will be available in alsa-utils. CC: Ian Molton <ian@mnementh.co.uk> CC: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
* hcontrol: fix compare_default function to handle also id.device and id.subdeviceJaroslav Kysela2009-10-061-4/+10
| | | | | | | 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>
* alisp: Comment out an unused function to avoid compiler warnings.Stefan Schmidt2009-09-301-0/+4
| | | | | | | | 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>
* pcm_rate_linear: Annotate unused function parameter to avoid compiler warnings.Stefan Schmidt2009-09-301-4/+5
| | | | | Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: Remove unused variable.Stefan Schmidt2009-09-301-1/+1
| | | | | Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* configure.in: Add m4 check for new AM_SILENT_RULESStefan Schmidt2009-09-301-0/+3
| | | | | | | | | | 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>
* cvscompile: Remove in favour of gitcompile.Stefan Schmidt2009-09-301-19/+0
| | | | | | | | 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>
* dmix - Fix snd_pcm_info()Takashi Iwai2009-09-281-1/+4
| | | | | | | | 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>
* pcm_hw: Always use delay ioctl in snd_pcm_delay()Kai Vehmanen2009-09-111-22/+0
| | | | | | | | | | | | | 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>
* Release v1.0.21av1.0.21aJaroslav Kysela2009-09-091-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* PCM - Change the hw_params determination orderTakashi Iwai2009-09-091-9/+24
| | | | | | | | | | | | | 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>
* Change dmix.conf to accept user configuration from defaults.dmix.<driver_id>.xxxJaroslav Kysela2009-09-091-6/+6
| | | | | | | 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>
* Revert "Fix driver conf parsing in snd_config_hook_load_for_all_cards()"Jaroslav Kysela2009-09-091-2/+3
| | | | | | | | | | | 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>
* mixer: Add Speaker and Beep names to the weight listTakashi Iwai2009-08-311-0/+2
| | | | | | | 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>
* Release v1.0.21v1.0.21Jaroslav Kysela2009-08-311-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* pcm/ioplug: fix error code in start callbackTakashi Iwai2009-08-211-1/+1
| | | | | | | 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>
* pcm: workaround for avoiding automatic start in mmap modeTakashi Iwai2009-08-211-5/+29
| | | | | | | | | | | | | | | | 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>
* Fix driver conf parsing in snd_config_hook_load_for_all_cards()Takashi Iwai2009-08-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* control.c: snd_ctl_wait: fix revents handlingClemens Ladisch2009-08-101-17/+10
| | | | | | | The revents parameter of snd_ctl_poll_descriptors_revents() is a single value, not an array. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* timer_query: make ops structure constantClemens Ladisch2009-08-101-1/+1
| | | | | | | | 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>
* snd_pcm_scope_set_ops: make ops parameter constClemens Ladisch2009-08-102-3/+4
| | | | | | | | | 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>
* Fix zero-division in pcm_rate.cTakashi Iwai2009-08-101-1/+1
| | | | | | Patch from Debian bug#539454 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* fix doc errorsClemens Ladisch2009-08-0413-17/+22
| | | | | | Fix various errors in the documentation that make doxygen complain. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* doc: hide structs with typedefsClemens Ladisch2009-08-041-0/+1
| | | | | | | | 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>
* doc: fix handling of @top_srcdir@Clemens Ladisch2009-08-041-1/+1
| | | | | | | | | | 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>
* remove unimplemented functions from headersClemens Ladisch2009-08-042-4/+0
| | | | | | Remove some function declarations that are not (no longer) implemented. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* add config testsClemens Ladisch2009-08-032-1/+584
| | | | | | Add some test for the snd_config_* functions. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* conf.c: more documentationClemens Ladisch2009-07-272-243/+891
| | | | | | Expand the documentation for the snd_config_* functions. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* conf.c: rename 'node' to 'config'Clemens Ladisch2009-07-171-9/+9
| | | | | | | Just for consistency with the parameter names of all the other functions. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* conf.c: rename 'leaf' to 'child'Clemens Ladisch2009-07-171-20/+22
| | | | | | Nodes that (might) have children are not leaves. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* conf.c: rename 'father' to 'parent'Clemens Ladisch2009-07-171-45/+45
| | | | | | | I haven't found anything that would make compound nodes specifically male ... Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* conf.c: snd_config_add: prevent adopting a non-orphanClemens Ladisch2009-07-151-1/+1
| | | | | | | | 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>
* sound: rawmidi: disable active-sensing-on-close by defaultClemens Ladisch2009-07-131-1/+1
| | | | | | | | | 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>
* USB-Audio.conf: fix definition for M-Audio AudioPhile spdif deviceClemens Ladisch2009-07-131-5/+42
| | | | | | | 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>
* conf.c: fix handling of NULL string valuesClemens Ladisch2009-07-101-9/+10
| | | | | | | 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>
* conf.c: snd_config_set_id: prevent duplicate idsClemens Ladisch2009-07-101-0/+8
| | | | | | | | 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>
* conf.c: fix handling of NULL idsClemens Ladisch2009-07-091-6/+17
| | | | | | | | 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>
* test/lsb/midi_event.c: check for buffer size checkClemens Ladisch2009-07-081-0/+3
| | | | | | | Add a test to check that snd_midi_event_decode() checks its output buffer size. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* test/lsb/midi_event.c: abort on fatal errorsClemens Ladisch2009-07-081-6/+12
| | | | | | | If snd_midi_event_fails(), we cannot use the object and must abort the current test. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* Merge branch 'master' of git@git.alsa-project.org:alsa-libTakashi Iwai2009-07-067-56/+597
|\
| * add midi event testsClemens Ladisch2009-07-066-2/+403
| | | | | | | | | | | | Add some tests for the snd_midi_event_* functions. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
| * more midi_event documentationClemens Ladisch2009-07-061-54/+194
| | | | | | | | | | | | Expand the documentation for the snd_midi_event_* functions. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
* | test/pcm.c: float format supportTakashi Iwai2009-07-061-3/+15
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | test/pcm.c: Generic linear PCM supportTakashi Iwai2009-07-061-11/+19
| | | | | | | | | | | | | | | | - Fix the support of non-native endianness - Conversion for unsigned formats - Only allow linear formats Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | test/pcm.c: Fix S24 formatTakashi Iwai2009-07-061-1/+2
|/ | | | | | | | 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>
* test/pcm.c: Sample generation on big endian platforms was broken.Kenneth Johansson2009-07-031-11/+13
| | | | | | | Has not worked since commit 3d1fa924906996463ac33cba5b5143f762d913cf Signed-off-by: Kenneth Johansson <kenneth@southpole.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_hooks: cosmetic removal of unused variablesPaul Fertser2009-06-301-2/+0
| | | | | Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Manage dlobj lifetime in pcm_hooks.cTakashi Iwai2009-06-301-11/+52
| | | | | | | | | 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>