Commit Graph

11 Commits

Author SHA1 Message Date
David Henningsson d24f5a9ad9 ALSA: Add comment for control TLV API
Userspace is not meant to have to handle all strange dB ranges,
so add a specification comment.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-05-08 15:43:56 +02:00
Takashi Iwai 2d3391ec0e ALSA: PCM: channel mapping API implementation
This patch implements the basic data types for the standard channel
mapping API handling.

- The definitions of the channel positions and the new TLV types are
  added in sound/asound.h and sound/tlv.h, so that they can be
  referred from user-space.

- Introduced a new helper function snd_pcm_add_chmap_ctls() to create
  control elements representing the channel maps for each PCM
  (sub)stream.

- Some standard pre-defined channel maps are provided for
  convenience.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06 18:01:16 +02:00
Clemens Ladisch bf1d1c9b61 ALSA: tlv: add DECLARE_TLV_DB_RANGE()
Add a DECLARE_TLV_DB_RANGE() macro so that dB range information
can be specified without having to count the items manually for
TLV_DB_RANGE_HEAD().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-16 10:02:18 +02:00
Clemens Ladisch 570aef5de1 ALSA: tlv: add DECLARE_TLV_CONTAINER()
Add the DECLARE_TLV_CONTAINER() macro to allow having static
TLVs containing more than one item.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-16 10:02:16 +02:00
Clemens Ladisch b5b9eb5467 ALSA: tlv: compute TLV_*_ITEM lengths automatically
Add helper macros with a little bit of preprocessor magic to
automatically compute the length of a TLV item.  This lets us avoid
having to compute this by hand, and will allow to use items that do
not use a fixed length.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-16 10:02:10 +02:00
Takashi Iwai c08d91695b ALSA: tlv - Define numbers in sound/tlv.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-10-17 10:46:14 +02:00
Takashi Iwai 085f306541 ALSA: Add new TLV types for dBwith min/max
Add new types for TLV dB scale specified with min/max values instead
of min/step since the resolution can't match always with the one
a device provides.  For example, usb audio devices give 1/256 dB
resolution while ALSA TLV is based on 1/100 dB resolution.
The new min/max types have less problems because the possible
rounding error happens only at min/max.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 10:56:53 +02:00
Jaroslav Kysela c1017a4cdb [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16 16:51:18 +02:00
Takashi Iwai 55a29af5ed [ALSA] Add definition of TLV dB range compound
Added the definition of TLV dB range compound.  It contains one or
more dB-range or linear-volume TLV entries with min/max ranges.
Used for volume controls with non-linear curves.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:46:11 +02:00
Takashi Iwai 063a40d911 [ALSA] Add the definition of linear volume TLV
Added the definition of linear volume TLV type.
Some DSP chips and codecs (e.g. AK codec) use linear volume control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:44:44 +02:00
Jaroslav Kysela 42750b04c5 [ALSA] Control API - TLV implementation for additional information like dB scale
This patch implements a TLV mechanism to transfer an additional information
like dB scale to the user space. The types might be extended in future.
Acked-by: Takashi Iwai <tiwai@suse.de>

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23 10:36:42 +02:00