Commit graph

631 commits

Author SHA1 Message Date
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
Takashi Iwai
52160de21e Fix the binary compatibility of ext-ctl plugin with protocol 1.0.0
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-25 23:16:14 +02:00
Dylan Reid
a6c50d64d9 control_external: Add ability to specify TLV data.
Allow external control plugins to provide TLV data.  This allows
user-space pcms to specify dB ranges for controls.

This follows the same model as the ALSA drivers for accessing the
data.  The code is based on that implementation.  The control can
provide static data or a callback.  The data is accessed or modified
in the new snd_ctl_ext_elem_tlv callback.

Rev bump the protocol version to enable checking if an external
control supports TLV.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-16 10:16:17 +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
Clemens Ladisch
15c6f83296 control: add snd_ctl_elem_add_enumerated()
Handling of user control elements was implemented for all types except
BYTES and ENUMERATED.  Enumerated user controls will be needed for the
device-specific mixers of upcoming FireWire drivers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-07 23:38:55 +02:00
Clemens Ladisch
567cc19a88 asound.h: cosmetic changes for consistency with kernel asound.h
Change some whitespace and comments to remove spurious differences
between the alsa-lib and kernel versions of asound.h.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-05 11:01:38 +02:00
Clemens Ladisch
9736511b36 asound.h: update for latest kernel
Refresh asound.h to be up to date with its kernel source.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2011-10-05 11:01:33 +02:00
Takashi Iwai
78dbc57b99 Merge branch 'fallback' 2011-07-29 15:56:39 +02:00
Adrian Knoth
e31aaac530 Add RME RPM to HDSP_IO_Type.
The hdsp.c driver supports the RME RPM devices, but we also need this
information in alsa-lib for tools like hdsploader and hdspmixer.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-29 07:38:19 +02: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
Stephen Warren
e2c2262403 UCM: get: Implement 'exact' value retrieval
[=]<NAME>[/[<modifier>|</device>][/<verb>]]
- value identifier <NAME>
- Search starts at given modifier or device if any,
    else at a verb
- Search starts at given verb if any,
    else current verb
- Searches modifier/device, then verb, then defaults
- Specify a leading "=" to search only the exact
  device/modifier/verb specified, and not search
  through each object in turn.
- Examples:
    "PlaybackPCM/Play Music"
    "CapturePCM/SPDIF"
  From ValueDefaults only:
    "=Variable"
  From current active verb:
    "=Variable//"
  From verb "Verb":
    "=Variable//Verb"
  From "Modifier" in current active verb:
    "=Variable/Modifier/"
  From "Modifier" in "Verb":
    "=Variable/Modifier/Verb"

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-08 18:22:15 +02:00
Stephen Warren
32d24f4071 UCM: Allow querying of {Supported,Conflicting}Devices
At any time, one can query:

_supporteddevs/<modifier>|<device>/<verb>
_conflictingdevs/<modifier>|<device>/<verb>

If a verb is current, one can query:

_supporteddevs/<modifier>|<device>
_conflictingdevs/<modifier>|<device>

Note that at most one of the supported/conflicting devs lists has
any entries, and when neither is present, all devices are supported.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-08 18:21:21 +02:00
Jaroslav Kysela
60397387ef UCM: comment fixes and fix myvalue initialization fix in add_values()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-03-19 00:54:43 +01:00
Jaroslav Kysela
cf446218c2 Update hdspm.h file from Adrian Knoth - final version
This one matches the settled driver version.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-27 11:50:40 +01:00
Jaroslav Kysela
f0f8d22701 Update hdspm.h file from Adrian Knoth
To satisfy new hdspmixer requirements, update hdspm.h file.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-26 11:36:17 +01:00
Jaroslav Kysela
59977f90b4 Add hdspm.h kernel header to include/alsa/sound tree for the hdspmixer app
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-26 10:35:59 +01:00
Jaroslav Kysela
916a203d94 Merge branch 'ucm' 2011-01-24 14:55:23 +01:00
Jaroslav Kysela
e1b4bd6c89 ucm: add snd_use_case_verb_list() inline function
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-11 19:05:12 +01: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
Jaroslav Kysela
9b6df1cf64 control: add ASCII parsers from amixer
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-04 19:58:44 +01:00
Jaroslav Kysela
3a34394508 ucm: unify snd_use_case_geti(), add snd_use_case_card_list() template
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-12 13:29:05 +02:00
Jaroslav Kysela
0ae6c43b86 ucm: cosmetic fix
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-01 13:30:59 +02:00
Jaroslav Kysela
404cd090b2 ucm: Introduce "Value {}" section, more implementation work
- new "Value {}" section is introduced for read-only values
  describing the PCM and control/mixer IDs (or any other
  things)
- more complete implementation for API functions

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-22 14:31:15 +02:00
Jaroslav Kysela
1c79fad969 ucm: Moved ucm to src/ucm subdirectory
- separate code to more files
- use standard lists to represent structures
- use alsa-lib configuration parser

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-15 08:09:31 +02:00
Jaroslav Kysela
fcc9adb260 ucm: Recode header to be more universal
- merge all similar functions to one - make everything
  string based
- add possibility to create virtual cards
- add comment pairs for the end user interface

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-08-25 09:42:58 +02:00
Liam Girdwood
1c5afdb0c1 ucm: build - add build support for Use Case Manager
Add doxygen and make support for UCM.

CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Justin Xu <justinx@slimlogic.co.uk>
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-23 20:05:45 +02:00
Liam Girdwood
4adb3c325b ucm: header - ALSA Use Case Manager
This patch adds the API header for alsa-lib Use Case Management support.

This file defines the public interface exported by UCM to client
applications.

UCM development has been kindly sponsored by Texas Instruments Inc,
Wolfson Microelectronics PLC and Slimlogic Ltd.

CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Stefan Schmidt <stefan@slimlogic.co.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Justin Xu <justinx@slimlogic.co.uk>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-23 20:05:23 +02:00
Jaroslav Kysela
91c9c8f1b8 general: recoded snd_dlobj_ functions
- changed logic to get/put blocks
- added mutex locking of the symbol list
- added reference counting (do not free used dl handles)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-08-23 17:10:16 +02:00
David Fries
63acb87329 modem.conf Off-hook improve behavior
Only restore the old value if it differs from the requested
value, because if it has changed restoring the old value
overrides the change.  Take for example, a voice modem with
a .conf that sets preserve off-hook.  Start playback (on-hook
to off-hook), start record (off-hook to off-hook), stop
playback (off-hook to restore on-hook), stop record (on-hook
to restore off-hook), Clearly you don't want to leave the
modem "on the phone" now that there isn't any playback or
recording active.

Signed-off-by: David Fries <david@fries.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-22 11:45:35 +01:00
Mike Frysinger
d3c6e2b097 add atomic operations for Blackfin parts
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-18 08:35:57 +01:00
Rémi Denis-Courmont
8264b2fd0a 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>
2009-11-08 09:23:07 +01:00
Pedro Lopez-Cabanillas
ef2d3cf747 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>
2009-11-08 09:21:56 +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
5332d74a67 fix doc errors
Fix various errors in the documentation that make doxygen complain.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-08-04 09:17:20 +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
Clemens Ladisch
5fe83677b5 conf.c: more documentation
Expand the documentation for the snd_config_* functions.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-07-27 10:09:03 +02:00
Takashi Iwai
f8a34aa683 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>
2009-06-16 14:28:57 +02:00
Takashi Iwai
1929c55d2e 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>
2009-06-02 16:26:03 +02:00
Takashi Iwai
c821f2e7f2 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>
2009-01-28 15:00:35 +01:00
Jaroslav Kysela
8feae77e13 Merge branch 'master' of git@git.alsa-project.org:alsa-lib 2008-10-23 09:58:10 +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
Takashi Iwai
ce3df03135 Increase the components array size
Increase the components array size from 80 to 128 chars.
The string there is supposed to be null-terminated, so it can cover
the smaller array size in the older version, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-07 12:08:29 +02:00
Lennart Poettering
8d6838450a alsa-lib: Don't call the simple mixer interface "legacy"
The simpler mixer interface is not legacy, so the header file shouldn't claim
otherwise.

Fixes bug#3569

From: Lennart Poettering <mznyfn@0pointer.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-31 15:46:56 +02:00
Pawel MOLL
6d426e3e92 IEC958 definition for consumer status channel update
Updated IEC958 consumer status channel definitions according
to the third edition of IEC60958-3 spec.

Signed-off-by: Pawel Moll <pawel.moll@st.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-08-01 13:17:52 +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
058dde8b7d implemented integer volume <-> dB volume conversion functions for simple mixer 2008-04-21 11:44:20 +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
Pawel MOLL
12944a024f IEC958 definitions for consumer status channel, byte 4
Added definition for byte 4 of SPDIF channel status, according to
second edition of IEC 60958-3 (consumer) spec.

Signed-off-by: Pawel MOLL <pawel.moll@st.com>
2008-02-29 12:42:57 +01:00
Aldrin Martoq
75ecdac6f4 add snd_seq_client_info_event_filter_*() functions
Added snd_seq_client_info_event_filter_{clear,add,del,check} to alsa
sequencer API

Signed-off-by: Aldrin Martoq <amartoq@dcc.uchile.cl>
2008-02-22 17:46:50 +01:00