aboutsummaryrefslogtreecommitdiff
path: root/include/pcm.h
AgeCommit message (Collapse)Author
2018-03-27a set of fixes to reduce gcc warningsJaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2018-03-13pcm: Provide areas_copy function which handles buffer wrap aroundTimo Wischer
The already existing areas_copy functions do not care about the end of the source and destination buffer. Therefore the caller has to take care that the requested offset+size is not exceeding any buffer limit. This additional function will take care about the end of an buffer and will continue at the beginning of the buffer. For example this is required when copying between buffers with different sizes (not multiple of). This is often the case in IO plugins like the JACK plugin. Signed-off-by: Timo Wischer <twischer@de.adit-jv.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-12-18pcm: add and describe SND_PCM_FORMAT_{S, U}20Maciej S. Szmigiero
This patch adds and describes in various functions that query format properties SND_PCM_FORMAT_{S,U}20 formats that were recently added to the kernel as SNDRV_PCM_FORMAT_{S,U}20. These formats are similar to existing 20-bit PCM formats SND_PCM_FORMAT_{S,U}20_3, however they occupy 4 bytes instead of 3. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-11-14Change FSF address (Franklin Street)Jaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-07-15cleanup: Use uint*_t instead of u_int*_t everythwereNatanael Copa
Use the standard uint{8,16,32,64}_t everywhere instead of the non-standard u_int{8,16,32,64}_t. This changes the types in the public headers and removes the u_int*_t defines. This may break things. However, indentifiers ending with _t are reserved by POSIX[1]; defining those can lead to undefined behavior. So if you rely on alsa-lib defining those for you, then you want the compiler to error so things can be fixed properly. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_02 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-24pcm: Fix doxygen for two enumsDavid Henningsson
The doxygen comments were wrong, making doxygen output weird. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-02pcm: add support for get/set_audio_htstamp_configPierre-Louis Bossart
Enable kernel-side functionality by letting user select what sort of timestamp it desires Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-07-02pcm: add helper functions to query timestamping capabilitiesPierre-Louis Bossart
extend support to link, link_estimated and link_synchronized timestamp. wall-clock is deprecated Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-21pcm: Fix DSD sample format endianess and add big-endian formatJussi Laako
This patch adds big-endian DSD sample format and fixes return value of DSD formats for snd_pcm_format_little_endian(). Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-10pcm: add new 32-bit DSD sample formatJurgen Kramer
Add the new DSD_U32_LE sample format to alsa-lib. NB include/pcm.h and include/sound/asound.h are updated so a new sync with the kernel headers is not needed Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14pcm: Add sw_params API functions to get/set timestamp typeTakashi Iwai
For obtaining / changing the timestamp type, add the corresponding sw_params accessor API functions together with the public definitions of timestamp types. This patch only adds the functions and defines but doesn't bring the functional changes yet. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-25Use __inline__ for exported headersTakashi Iwai
Some programs are still using C90. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=817077 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-18bring pcm.h and pcm.c in sync with the kernel listDaniel Mack
In particular, this adds definitions and descriptions for G.723 and DSD types. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-08all places: doxygen cleanupsJaroslav Kysela
I see no errors with these changes using doxygen 1.8.1.1 . Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2013-04-08control, pcm: implement snd_ctl_abort() and snd_pcm_abort() functionsJaroslav Kysela
Upon an interrupt, it is necessary to abort the wait loops with the EINTR error code. Introduce snd_*_abort() functions to handle this case. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-11-26PCM: Add more chmap definitions for UAC2Takashi Iwai
The new PCM chmap positions have been added in (to be) 3.8-rc1 kernel, and now updated alsa-lib, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-25pcm: support for audio timestampsPierre-Louis Bossart
add new snd_pcm_status_get_audio_htstamp() routine to query the audio timestamps provided by the kernel. This change provides applications with better ways to track elapsed time. Before this patch, applications would subtract queued samples (delay) from written samples, resulting in a 1-2 sample error. Also add snd_pcm_hw_params_supports_audio_wallclock_ts() to query what the hardware supports. TODO: check protocol compatibility? Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13PCM: A few doxygen fixes for chmap stuffTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13PCM: Define MONO and other channel map positionsTakashi Iwai
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>
2012-09-13PCM: Add snd_pcm_chmap_long_name()Takashi Iwai
Just return a more verbose name than snd_pcm_chmap_name(), but including white spaces. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13PCM: Add SND_CHMAP_API_VERSION definitionTakashi Iwai
Just to make it easier for apps to support chmap conditionally via simple ifdefs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13PCM: Add string conversion helper functions for chmapTakashi Iwai
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>
2012-09-13PCM: Fix prefix for snd_pcm_chmap_type enum membersTakashi Iwai
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>
2012-09-13PCM: Implement snd_pcm_query_chmaps_from_hw()Takashi Iwai
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>
2012-09-13PCM: Introduce snd_pcm_chmap_t and snd_pcm_chmap_query_tTakashi Iwai
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>
2012-09-13Add SND_CHMAP_NA and bit flag definitionsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13Follow channel position definitions to mixer channel in mixer.hTakashi Iwai
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>
2012-09-11Define channel map position enum in pcm.hTakashi Iwai
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>
2012-09-11Implement the channel mapping APITakashi Iwai
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>
2012-01-19Improve hw_params documentationAndrew Eikum
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-27Add snd_{ctl|pcm}_open_fallback() functionsTakashi Iwai
This patch adds new API functions, snd_ctl_open_fallback() and snd_pcm_open_fallback(). These are just like snd_*_open_lconf() but used to open a fallback PCM/control. The difference is that it replaces the name string with the given original name, so that hctl and other upper-layers will recognize it as an alias. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-15support for period wakeup disablingClemens Ladisch
Add API to disable period wakeups. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-10snd_pcm_scope_set_ops: make ops parameter constClemens Ladisch
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-04remove unimplemented functions from headersClemens Ladisch
Remove some function declarations that are not (no longer) implemented. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2008-10-23Add snd_pcm_avail() and snd_pcm_avail_delay() prototypesJaroslav Kysela
Prototypes for new functions from commit fe5391c9da2212dc594d1ee7f366e55432af0454 were lost somehow. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-09Implemented snd_pcm_sw_params_(set|get)_period_event for interrupt wakeup ↵Jaroslav Kysela
like behaviour Actually, PCM timer is used as source for poll(). It might be optimized in the kernel code later.
2008-04-21implemented snd_pcm_rewindable() and snd_pcm_forwardable(), removed ↵Jaroslav Kysela
can_rewind and can_forward
2008-04-11added snd_pcm_hw_params_is_monotonic/can_forward/can_rewind functionsJaroslav Kysela
2008-02-11Fix conflict of obsoleted snd_pcm_hw_* definitionsTakashi Iwai
When only SND_PCM_OLD_HW_PARAMS_API is defined but no SND_PCM_OLD_SW_PARAMS_API, the declerations of some obsoleted functions conflict. Although the apps should define both at the same time, it's not good to break. Fixed the ifdef now.
2008-01-14Add SND_PCM_TSTAMP_MMAP backTakashi Iwai
SND_PCM_TSTAMP_MMAP is used (blidnly) by portaudio, unfortunately. Re-added it not to break API.
2008-01-11Added possibility to disable also channel and format conversions + softvol.Jaroslav Kysela
Unified disable option using mode bits in snd_pcm_open().
2008-01-11SND_PCM_TSTAMP_MMAP -> SND_PCM_TSTAMP_ENABLE changeJaroslav Kysela
2008-01-09Impemented snd_pcm_htimestamp() function.Jaroslav Kysela
2008-01-09Fix function declarations with old PCM APITakashi Iwai
The functions that are obsoleted in the last patches conflict with the old PCM API. Fixed with ifdef.
2008-01-08Remove sleep_min and tickTakashi Iwai
The sleep_min and tick are removed features from the kernel. This patch cleans the corresponding part in alsa-lib.
2008-01-08Remove PCM xfer_alignTakashi Iwai
The PCM xfer_align is a removed feature from the kernel. This patch cleans up the corresponding part in alsa-lib.
2007-12-21Add deprecated attribute to obsolete functionsTakashi Iwai
Added __attribute__((deprecated)) to declarations of obsolete functions.
2007-10-25Remove assert from header filesTakashi Iwai
Putting assert in the public macros isn't good idea at all. Let's get rid of them. Also, clean up snd*_alloca() functions to use a helper macro instead of copy and paste.
2007-10-15Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela
2007-07-11Split mmap-emulation code from hw layerTakashi Iwai
Move out mmap-emulation code from hw layer to its own plugin. This cleans up the mess in pcm_hw.c.