26 Sep, 2016

1 commit

  • In commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()"), the new
    macro was added so that "dB range information can be specified without
    having to count the items manually for TLV_DB_RANGE_HEAD()". In short,
    TLV_DB_RANGE_HEAD macro was obsoleted.

    In commit 46e860f76804 ("ALSA: rename TLV-related macros so that they're
    friendly to user applications"), TLV-related macros are exposed for
    applications in user land to get content of data structured by
    Type/Length/Value shape. The commit managed to expose TLV-related macros
    as many as possible, while obsoleted TLV_DB_RANGE_HEAD() was included to
    the list of exposed macros.

    This situation brings some confusions to application developers because
    they might think all exposed macros have their own purpose and useful for
    applications.

    For the reason, this commit moves TLV_DB_RANGE_HEAD macro from UAPI header
    to a header for kernel land, again. The above commit is done within the
    same development period for kernel 4.9, thus not published yet. This
    commit might certainly brings no confusions to user land.

    Reference: commit bf1d1c9b6179 ("ALSA: tlv: add DECLARE_TLV_DB_RANGE()")
    Reference: commit 46e860f76804 ("ALSA: rename TLV-related macros so that they're friendly to user applications")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

15 Sep, 2016

2 commits

  • In a previous commit, some macros newly appeared to UAPI header for TLV
    packet. These macros have short names and they easily bring name conflist
    to applications. The conflict can be avoided to rename them with a proper
    prefix.

    For this purpose, this commit renames these macros with prefix
    'SNDRV_CTL_TLVD_'.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In ALSA control interface, each element set can have threshold level
    information. This information is transferred between drivers/applications,
    in a shape of tlv packet. The layout of this packet is defined in
    'uapi/sound/asound.h' (struct snd_ctl_tlv):

    struct snd_ctl_tlv {
    unsigned int numid;
    unsigned int length;
    unsigned int tlv[0];
    };

    Data in the payload (struct snd_ctl_tlv.tlv) is expected to be filled
    according to our own protocol. This protocol is described in
    'include/sound/tlv.h'. A layout of the payload is expected as:

    struct snd_ctl_tlv.tlv[0]: one of SNDRV_CTL_TLVT_XXX
    struct snd_ctl_tlv.tlv[1]: Length of data
    struct snd_ctl_tlv.tlv[2...]: data

    Unfortunately, the macro is not exported to user land yet, thus
    applications cannot get to know the protocol.

    Additionally, ALSA control core has a feature called as 'user-defined'
    element set. This allows applications to add/remove arbitrary element sets
    with elements to control devices. Elements in the element set can be
    operated by the same way as the ones added by in-kernel implementation.

    For threshold level information of 'user-defined' element set, applications
    need to register the information to an element set. However, as described
    above, layout of the payload is closed in kernel land. This is quite
    inconvenient, too.

    This commit moves the protocol to UAPI header for TLV.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

04 Jun, 2015

1 commit


08 May, 2013

1 commit


07 Sep, 2012

1 commit

  • 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

    Takashi Iwai
     

16 Jul, 2012

3 commits


17 Oct, 2010

1 commit


17 Jun, 2009

1 commit

  • 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

    Takashi Iwai
     

16 Oct, 2007

1 commit


23 Sep, 2006

3 commits