Commit graph

223 commits

Author SHA1 Message Date
Takashi Iwai
01dc0e6825 PCM: Implement snd_pcm_query_chmaps_from_hw()
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-13 08:24:58 +02:00
Takashi Iwai
9c1a0ce72d PCM: Introduce snd_pcm_chmap_t and snd_pcm_chmap_query_t
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-13 08:24:58 +02:00
Takashi Iwai
48c2c90f19 Add SND_CHMAP_NA and bit flag definitions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-13 08:24:58 +02:00
Takashi Iwai
0f36270dd3 Follow channel position definitions to mixer channel in mixer.h
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-13 08:24:47 +02:00
Takashi Iwai
915b26bfe8 Define channel map position enum in pcm.h
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-11 11:34:50 +02:00
Takashi Iwai
3c4a22ea49 Implement the channel mapping API
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-09-11 11:34:50 +02:00
Andrew Eikum
43956de710 Improve hw_params documentation
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-19 12:36:39 +01:00
Takashi Iwai
acb423d937 Add snd_{ctl|pcm}_open_fallback() functions
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>
2011-07-27 15:24:13 +02:00
Clemens Ladisch
7c99bd24bc support for period wakeup disabling
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>
2010-11-15 10:43:13 +01: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
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
Jaroslav Kysela
cc7fec138e Add snd_pcm_avail() and snd_pcm_avail_delay() prototypes
Prototypes for new functions from commit
	fe5391c9da
were lost somehow.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-10-23 09:57:11 +02:00
Jaroslav Kysela
8aaccc9484 Implemented snd_pcm_sw_params_(set|get)_period_event for interrupt wakeup like behaviour
Actually, PCM timer is used as source for poll(). It might be optimized
in the kernel code later.
2008-05-09 16:02:02 +02:00
Jaroslav Kysela
c88672d86f implemented snd_pcm_rewindable() and snd_pcm_forwardable(), removed can_rewind and can_forward 2008-04-21 12:46:50 +02:00
Jaroslav Kysela
82af1df465 added snd_pcm_hw_params_is_monotonic/can_forward/can_rewind functions 2008-04-11 14:11:04 +02:00
Takashi Iwai
c96984f181 Fix conflict of obsoleted snd_pcm_hw_* definitions
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-02-11 14:19:32 +01:00
Takashi Iwai
bf004f1c52 Add SND_PCM_TSTAMP_MMAP back
SND_PCM_TSTAMP_MMAP is used (blidnly) by portaudio, unfortunately.
Re-added it not to break API.
2008-01-14 17:15:13 +01:00
Jaroslav Kysela
ab8331c882 Added possibility to disable also channel and format conversions + softvol.
Unified disable option using mode bits in snd_pcm_open().
2008-01-11 17:21:44 +01:00
Jaroslav Kysela
6814d23d29 SND_PCM_TSTAMP_MMAP -> SND_PCM_TSTAMP_ENABLE change 2008-01-11 08:54:07 +01:00
Jaroslav Kysela
2c1318803f Impemented snd_pcm_htimestamp() function. 2008-01-09 13:50:45 +01:00
Takashi Iwai
8fab259170 Fix function declarations with old PCM API
The functions that are obsoleted in the last patches conflict with the
old PCM API.  Fixed with ifdef.
2008-01-09 09:45:26 +01:00
Takashi Iwai
679cea4125 Remove sleep_min and tick
The sleep_min and tick are removed features from the kernel.
This patch cleans the corresponding part in alsa-lib.
2008-01-08 18:36:18 +01:00
Takashi Iwai
cf15e49d84 Remove PCM xfer_align
The PCM xfer_align is a removed feature from the kernel.
This patch cleans up the corresponding part in alsa-lib.
2008-01-08 18:35:29 +01:00
Takashi Iwai
173d8a8b58 Add deprecated attribute to obsolete functions
Added __attribute__((deprecated)) to declarations of obsolete functions.
2007-12-21 15:25:47 +01:00
Takashi Iwai
68e5771a6f Remove assert from header files
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-25 15:36:03 +02:00
Jaroslav Kysela
d25e281230 Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:24:55 +02:00
Takashi Iwai
4cdb17c601 Split mmap-emulation code from hw layer
Move out mmap-emulation code from hw layer to its own plugin.
This cleans up the mess in pcm_hw.c.
2007-07-11 17:44:09 +02:00
Jaroslav Kysela
ddf9599542 pcm: fix ipc offset calculation for direct plugins
Also add more accurate description to x24 formats.
2006-10-23 11:34:00 +02:00
Jaroslav Kysela
23f7e58fa1 implementation of pcm simple helper function
- snd_pcm_recovery()
- snd_pcm_set_params()
- snd_pcm_get_params()
2006-01-06 19:59:56 +00:00
Jaroslav Kysela
31595805b2 fixed typo in comment 2005-09-21 08:24:31 +00:00
Takashi Iwai
4d7c53d280 Add snd_pcm_hw_params_get/set_export_buffer()
Add snd_pcm_hw_params_get/set_export_buffer() API functions.
They control to ensure the buffer export to other processes.
If this flag is set, the local buffer of a plugin is exported over IPC shm.
Otherwise the buffer can be handled only locally (no shm).

Also fixed Version file for 1.0.9.
2005-05-19 16:59:04 +00:00
Takashi Iwai
91f7dd2378 Move old PCM API to pcm_old.h
Clean up -- move old 0.9.x PCM API to pcm_old.h.
2005-04-14 14:01:10 +00:00
Jaroslav Kysela
f65d9f3108 Added snd_pcm_hw_params_set_rate_resample function
- snd_pcm_hw_params_set_rate_resample()
- snd_pcm_hw_params_get_rate_resample()
2005-04-12 12:09:55 +00:00
Takashi Iwai
5eb794fe0b Add filter-type external plugin SDK
Added the SDK for filter-type PCM plugins.
Share some codes with ioplug.
2005-02-14 13:33:08 +00:00
Takashi Iwai
94c4cdcd30 Add external PCM plugin SDK (draft version)
Added the external PCM plugin SDK (draft version).
This can be used to create external PCM plugins.
Example codes are found in alsa-plugins directory.
2005-02-08 20:57:51 +00:00
Clemens Ladisch
04c2de32c1 fix some file paths in comments
doxygen complains if the file name specified with \file does
not match the real file name, so fix it
2005-01-17 17:34:31 +00:00
Takashi Iwai
30f35c1f7a Add softvol PCM plugin
The softvol PCM plugin is added.  It applies the software volume attenuation,
which may be useful for codecs without volume controls.

Currently, the control is only mono.  The attenuation is applied to all
channels equally.  The control is probed and automatically created
when not exists yet.
2004-12-27 14:40:19 +00:00
Takashi Iwai
6fc5e5dd2a Fix warnings with -Wshadow
Fixed compile warnings when compiled with -Wshadow.
(Renamed the shadow parameteres with _ prefix to avoid confliction.)
2004-09-21 10:35:57 +00:00
Takashi Iwai
5586e5cbb1 added a new plugin "iec958" to convert IEC958 subframes. 2004-05-04 15:13:23 +00:00
Jaroslav Kysela
a190b87d94 Initial implementation of PCM simple API extension. 2004-03-26 16:08:01 +00:00
Jaroslav Kysela
894bd9157e Initial proposal for simple PCM API extension 2004-03-14 18:37:55 +00:00
Jaroslav Kysela
9105bb7fcd Added SNDRV_PCM_STATE_DISCONNECTED state.
Changed direct plugins to handle DISCONNECT/SUSPEND states from slave.
2004-01-19 19:48:27 +00:00
Jaroslav Kysela
beb837bcf7 Fixed typo - snd_pcm_type_name() 2003-12-22 08:31:22 +00:00
Jaroslav Kysela
d4af763f8a Switch from old to new PCM API retaining binary compatibility
Changed version to 1.0.0pre1
2003-11-05 10:38:37 +00:00
Jaroslav Kysela
bc28eccdcd Extracted common code from dmix plugin.
Initial framework for dsnoop and dshare plugins.
2003-03-18 20:37:42 +00:00
Jaroslav Kysela
157107491c Added snd_pcm_type_name()
Fixed rate conversion plugin (SIGSEGV) - rounding problem
2003-03-08 16:35:18 +00:00
Jaroslav Kysela
1ac62945f8 Added htstamp functions 2003-02-28 20:29:23 +00:00
Jaroslav Kysela
cf9e518d51 Timestamp update (struct timeval -> struct timespec). 2003-02-28 17:23:28 +00:00
Jaroslav Kysela
7b09000813 Removed snd_pcm_hwdiff() function 2003-02-22 17:53:01 +00:00
Jaroslav Kysela
2dab1dfbc3 Removed snd_pcm_hwptr().
Added snd_pcm_hwdiff() and snd_pcm_forward().
Returned the behaviour for snd_pcm_mmap_begin().
2003-02-22 17:19:02 +00:00