summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add morphology for alsa-libbaserock/morphJannis Pohlmann2012-10-051-0/+6
|
* Update .gitignoreTakashi Iwai2012-09-221-0/+2
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* test: add audio_timePierre-Louis Bossart2012-09-222-1/+240
| | | | | | | | | | | | | | | | | | | Simple test to create playback and capture streams, and check elapsed time vs. sample counts reported by driver. This should be helpful for driver developers and anyone interested in system/audio time drift. tested only on HDAudio [added Makefile.am change by tiwai] TODO: - make period configurable - better output messages - support for wall clock when it's in the mainline Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Fix infinite loop in htimestamp of dmix, dsnoop and dshare pluginsTakashi Iwai2012-09-213-0/+3
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Fill SND_CHMAP_NA to silent channels in route pluginTakashi Iwai2012-09-201-1/+3
| | | | | | Instead of SND_CHMAP_UNKNOWN, fill SND_CHMAP_NA to the silent channels. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: A few doxygen fixes for chmap stuffTakashi Iwai2012-09-132-7/+54
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Fix the conversion from string to chmap positionTakashi Iwai2012-09-131-10/+27
| | | | | | | Use strncasecmp() to allow lower cases, and also evaluate the inverted phase suffix, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Define MONO and other channel map positionsTakashi Iwai2012-09-133-8/+30
| | | | | | | Follow the new definitions in the kernel side. MONO and others have been added, and the order of position table was changed again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* test/chmap: Fix wrong malloc sizeTakashi Iwai2012-09-131-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: Add chmap definitions to TRIDENT and SI7018 configurationsTakashi Iwai2012-09-132-0/+4
| | | | | | | Manually add the channel map definitions as the channel front/rear is determined dynamically. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Use compounds for overriding / enhancing chmapsTakashi Iwai2012-09-137-45/+144
| | | | | | | | | Instead of a single channel map, multiple channel maps can be provided in a form of compound (array) to hw and null plugins. In null get_chmap, the channel map corresponding to the current channels is copied from the given channel maps. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add chmap override definitions for Emu10k1, Audigy and Audigy2 cardsTakashi Iwai2012-09-133-0/+10
| | | | | | | | | These cards won't provide the channel maps from the driver itself because of the dynamic routing. For simplicity, define chmaps in the configurations, so that chmap querying of individual stereo streams and combined multi streams works properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Add the missing query_chmaps for route pluginTakashi Iwai2012-09-131-5/+19
| | | | | | Also fix the channel count in get_chmap for route plugin. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Add chmap options to hw and null pluginsTakashi Iwai2012-09-134-1/+111
| | | | | | | | Add a config definition "chmap" to override (or enhance) the channel maps. So far, only a single channel map can be provided, and the channel count consistency isn't strictly tested at all. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Add query_chmaps support to multi pluginTakashi Iwai2012-09-131-41/+111
| | | | | | Also fix some bugs in get_chmap(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Add snd_pcm_chmap_long_name()Takashi Iwai2012-09-132-0/+33
| | | | | | | Just return a more verbose name than snd_pcm_chmap_name(), but including white spaces. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Add SND_CHMAP_API_VERSION definitionTakashi Iwai2012-09-131-0/+3
| | | | | | | Just to make it easier for apps to support chmap conditionally via simple ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Add string conversion helper functions for chmapTakashi Iwai2012-09-133-57/+160
| | | | | | | | | | | Added a few helper functions between chmap and string. snd_pcm_chmap_type_name() -- a string of the given chmap type snd_pcm_chmap_name() -- a string of the given channel position snd_pcm_chmap_print() -- print channel map on the given buffer snd_pcm_chmap_from_string() -- get a channel position from string snd_pcm_parse_string() -- parse the whole channel map from string Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Fix prefix for snd_pcm_chmap_type enum membersTakashi Iwai2012-09-131-4/+5
| | | | | | | | Add _TYPE prefix to distinguish from the channel position. Also add SND_CHMAP_TYPE_LAST entry pointing the last one like other enums. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Fix duplicated channel entry in test/chmap.cTakashi Iwai2012-09-131-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Implement snd_pcm_query_chmaps_from_hw()Takashi Iwai2012-09-132-41/+79
| | | | | | | | This is a function similar like snd_pcm_query_chmaps() but performs the query without a PCM handle. The card, device and substream numbers are passed as well as stream direction. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Introduce snd_pcm_chmap_t and snd_pcm_chmap_query_tTakashi Iwai2012-09-1315-84/+102
| | | | | | | | Instead of passing ambiguous integer array, define snd_pcm_chmap_t and snd_pcm_chmap_query_t so that user can understand more easily which element is for what. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add SND_CHMAP_NA and bit flag definitionsTakashi Iwai2012-09-133-7/+23
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Follow channel position definitions to mixer channel in mixer.hTakashi Iwai2012-09-133-21/+20
| | | | | | | | | | | | | | mixer.h already contains some channel position definitions. To be more consistent over all systems, better to follow the same order for the new channel map, too. But since UNKNOWN channel must be zero but the definition in mixer.h contains -1 as UNKNOWN, simply shift the value with 1. If the conversion is required between SND_CHMAP and SND_MIXER_SCHN, just increment/decrement 1. Eventually I'll provide helper functions for that... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Define channel map position enum in pcm.hTakashi Iwai2012-09-111-1/+27
| | | | | | | The original definition is in sound/asound.h, but we need to export to alsa-lib users, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Cache the chmap operation errorsTakashi Iwai2012-09-111-12/+54
| | | | | | ... not to retry the same error again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Add test/chmap programTakashi Iwai2012-09-113-1/+257
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Implement get_chmap/set_chmap for PCM extplug/ioplug pluginsTakashi Iwai2012-09-114-3/+93
| | | | | | | Added the new ops for both external plugins, so the protocol numbers are incremented. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Implement get_chmap/set_chmap for PCM plug, route and multi pluginsTakashi Iwai2012-09-113-0/+93
| | | | | | | Still incomplete implementations. The query and set ops are missing for route and multi plugins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Implement the channel mapping APITakashi Iwai2012-09-1127-0/+386
| | | | | | | | Added new channel-mapping API functions. Not all plugins are covered, especially the route, multi and external plugins don't work yet. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Release v1.0.26v1.0.26Jaroslav Kysela2012-09-061-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* doc: Use 'rm -rf' for the html doxygen tree (it contains search/ dir now)Jaroslav Kysela2012-09-061-2/+2
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* PCM: plug: Move fast_ops copy after slave configuration.Reilly Grant2012-08-311-2/+3
| | | | | | | | | | | | | | | | | | This is an OpenPGP/MIME signed message (RFC 2440 and 3156) The plug plugin copies the fast_ops structure and fast_op_arg from its slave PCM on initialization and after inserting a new plugin. This works unless the slave PCM is also an instance of the plug plugin because plug can change its fast_ops structure during _snd_pcm_hw_params. Instead of copying fast_ops in snd_pcm_plug_insert_plugins wait until the end of snd_pcm_plug_hw_params when the slave has been fully initialized. This fixes a crash when two instances of plug are instantiated back to back and the format conversion plugin inserted by the second is skipped by the first because the fast_ops pointer is not properly updated. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCM: Allow to run older version of extplug pluginTakashi Iwai2012-08-152-4/+8
| | | | | | Also show the incompatible plugin version number in error messages. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Ignore .* files in generalTakashi Iwai2012-08-101-2/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Add const to execute_cset() argumentTakashi Iwai2012-08-101-1/+1
| | | | | | | Now with the previous rewrite of execute_cset(), the cset string is no longer modified, thus we can pass const safely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Improve cset command parsingTakashi Iwai2012-08-102-24/+46
| | | | | | | | | | | | The cset command parsing in ucm/main.c assumes implicitly that the argument contains no space, thus an example below wouldn't work: cset "name='Input Select' Digital Mic" This patch introduces a new internal API function __snd_ctl_ascii_elem_id_parse() to improve the cset parser. Reported-by: Tanu Kaskinen <tanu.kaskinen@digia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* test/latency.c: Fix string argument to getopt_long, so now it handles -E and -BMario Domenech Goulart2012-08-081-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Return NULL from get_list0() and get_list20() in case of empty lists.Tanu Kaskinen2012-08-011-2/+6
| | | | | | | | | | | alloc_str_list() sets the result to NULL too, so this patch makes the behavior more consistent. This also fixes a crash in PulseAudio, because PulseAudio assumes that snd_use_case_get_list() always initializes the result, and since snd_use_case_get_list() uses get_list20(), this assumption didn't hold. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* build: Disable another compile chack with --disable-alsatestArun Raghavan2012-07-171-0/+2
| | | | | Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Add missing pthread.h includeArun Raghavan2012-07-171-0/+1
| | | | | | | Needed for the use of pthread_mutex_t Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* build: Fallback to alphasort() if versionsort() isn't availableArun Raghavan2012-07-172-2/+12
| | | | | | | | | versionsort() is a GNU-ism and can't be relied on for non-GNU systems. [modified to define SORTFUNC instead of copying lines by tiwai] Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: Use strcpy() instead of stpcpy()Arun Raghavan2012-07-171-2/+4
| | | | | | | | | | | | This allows us to build in environments that don't provide stpcpy(). This makes it necessary to traverse the string twice, but should not be noticeable in clients since this function is very unlikely to be part of a performance-critical path. [coding style fixed by tiwai] Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* hctl: Remove a useless assertMartin Sandsmark2012-07-051-1/+0
| | | | | | | | | | The case where the element is unavailable (for example gone away since the event was created) is handled beneath. See also bug 5471. https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5471 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Fix the binary compatibility of ext-ctl plugin with protocol 1.0.0Takashi Iwai2012-06-252-5/+7
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: Handle repeat device and modifier enables/disablesArun Raghavan2012-05-291-28/+34
| | | | | | | | | | | | | Currently, enabling a device twice can cause it to be added to snd_use_case_mgr_t->active_devices twice, causing the list to become a loop and subsequent uses to result in an infinite loop. This patch makes sure we don't enable/disable a device twice, and avoid doing the same for modifiers. Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* conf: Add more USB devices to S/PDIF blacklistDavid Henningsson2012-05-231-0/+4
| | | | | | | | These devices don't have digital in/out, so prevent them from being opened. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* tlv: improve robustness of raw value rangesBenoît Thébaudeau2012-05-231-20/+16
| | | | | | | | | snd_tlv_convert_from_dB() relies on rangemin/max blindly. Since this function is exported, it is better for robustness and consistency to parse the range properly, which this patch does. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm_dsnoop: comment fall-through in next "case"Antonio Borneo2012-05-141-0/+1
| | | | | Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* pcm: add missing "break" in "switch"Antonio Borneo2012-05-141-0/+1
| | | | | | | | | | | | | | | A missing "break" in procedure snd_pcm_write_mmap() causes execution of "case SND_PCM_ACCESS_MMAP_NONINTERLEAVED" to fall through next "default" case of the "switch" statement. Since "default" handles error cases, the procedure returns error. The error fixed by this patch blocks transfer of capture data from kernel to application. Execution get stuck in alsa-lib, that discards all received data. Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>