Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Description

Get or set the mix status for a certain logical input and output channels couple.

Files

usbd_audio_drv_<codec-name>.h / usbd_audio_drv_<codec-name>.c

Prototype

Arguments

p_audio_drv

Pointer to audio driver structure.

req

Mixer status request:

USBD_AUDIO_REQ_GET_CUR
USBD_AUDIO_REQ_GET_RES
USBD_AUDIO_REQ_GET_MIN
USBD_AUDIO_REQ_GET_MAX
USBD_AUDIO_REQ_SET_CUR

unit_id

Mixer Unit ID.

log_in_ch_nbr

Logical channel In number.

log_out_ch_nbr

Logical channel Out number.

p_ctrl

Pointer to the mixer control request value to get or set.

Endianness

p_ctrl uses a little endian memory organization. Hence, you should use µC/LIB macros MEM_VAL_GET_INT16U_LITTLE() and MEM_VAL_SET_INT16U_LITTLE() when reading or writing the mixing control value from/to it. This will ensure data is accessed correctly regarding your CPU endianness.

Returned Value

DEF_OK, if NO error(s) occurred and request is supported.

DEF_FAIL, otherwise.

Callers

Audio Class.

Implementation guidelines

  1. The Mixer Control values range allowed for Mixer Unit is:
    1. From +127.9961 dB (0x7FFF) down to -127.9961 dB (0x8001) for CUR, MIN, and MAX attributes.
    2. From 1/256 dB (0x0001) to +127.9961 dB (0x7FFF) for RES attribute.
  • No labels