Merge "dsp: Update AFE driver to support 16 ch"

This commit is contained in:
Linux Build Service Account 2018-10-07 21:19:44 -07:00 committed by Gerrit - the friendly Code Review server
commit fe905271a8
4 changed files with 523 additions and 7 deletions

View File

@ -890,6 +890,8 @@ int afe_sizeof_cfg_cmd(u16 port_id)
case AFE_PORT_ID_QUATERNARY_PCM_TX:
case AFE_PORT_ID_QUINARY_PCM_RX:
case AFE_PORT_ID_QUINARY_PCM_TX:
case AFE_PORT_ID_SENARY_PCM_RX:
case AFE_PORT_ID_SENARY_PCM_TX:
default:
pr_debug("%s: default case 0x%x\n", __func__, port_id);
ret_size = SIZEOF_CFG_CMD(afe_param_id_pcm_cfg);
@ -3979,6 +3981,8 @@ static int __afe_port_start(u16 port_id, union afe_port_config *afe_config,
case AFE_PORT_ID_QUATERNARY_PCM_TX:
case AFE_PORT_ID_QUINARY_PCM_RX:
case AFE_PORT_ID_QUINARY_PCM_TX:
case AFE_PORT_ID_SENARY_PCM_RX:
case AFE_PORT_ID_SENARY_PCM_TX:
cfg_type = AFE_PARAM_ID_PCM_CONFIG;
break;
case PRIMARY_I2S_RX:
@ -4250,6 +4254,10 @@ int afe_get_port_index(u16 port_id)
return IDX_AFE_PORT_ID_QUINARY_PCM_RX;
case AFE_PORT_ID_QUINARY_PCM_TX:
return IDX_AFE_PORT_ID_QUINARY_PCM_TX;
case AFE_PORT_ID_SENARY_PCM_RX:
return IDX_AFE_PORT_ID_SENARY_PCM_RX;
case AFE_PORT_ID_SENARY_PCM_TX:
return IDX_AFE_PORT_ID_SENARY_PCM_TX;
case SECONDARY_I2S_RX: return IDX_SECONDARY_I2S_RX;
case SECONDARY_I2S_TX: return IDX_SECONDARY_I2S_TX;
case MI2S_RX: return IDX_MI2S_RX;
@ -4649,6 +4657,8 @@ int afe_open(u16 port_id,
case AFE_PORT_ID_QUATERNARY_PCM_TX:
case AFE_PORT_ID_QUINARY_PCM_RX:
case AFE_PORT_ID_QUINARY_PCM_TX:
case AFE_PORT_ID_SENARY_PCM_RX:
case AFE_PORT_ID_SENARY_PCM_TX:
cfg_type = AFE_PARAM_ID_PCM_CONFIG;
break;
case SECONDARY_I2S_RX:

View File

@ -44,6 +44,10 @@ int q6audio_get_port_index(u16 port_id)
return IDX_AFE_PORT_ID_QUINARY_PCM_RX;
case AFE_PORT_ID_QUINARY_PCM_TX:
return IDX_AFE_PORT_ID_QUINARY_PCM_TX;
case AFE_PORT_ID_SENARY_PCM_RX:
return IDX_AFE_PORT_ID_SENARY_PCM_RX;
case AFE_PORT_ID_SENARY_PCM_TX:
return IDX_AFE_PORT_ID_SENARY_PCM_TX;
case SECONDARY_I2S_RX: return IDX_SECONDARY_I2S_RX;
case SECONDARY_I2S_TX: return IDX_SECONDARY_I2S_TX;
case MI2S_RX: return IDX_MI2S_RX;
@ -377,6 +381,10 @@ int q6audio_get_port_id(u16 port_id)
return AFE_PORT_ID_QUINARY_PCM_RX;
case AFE_PORT_ID_QUINARY_PCM_TX:
return AFE_PORT_ID_QUINARY_PCM_TX;
case AFE_PORT_ID_SENARY_PCM_RX:
return AFE_PORT_ID_SENARY_PCM_RX;
case AFE_PORT_ID_SENARY_PCM_TX:
return AFE_PORT_ID_SENARY_PCM_TX;
case SECONDARY_I2S_RX: return AFE_PORT_ID_SECONDARY_MI2S_RX;
case SECONDARY_I2S_TX: return AFE_PORT_ID_SECONDARY_MI2S_TX;
case MI2S_RX: return AFE_PORT_ID_PRIMARY_MI2S_RX;
@ -729,6 +737,8 @@ int q6audio_is_digital_pcm_interface(u16 port_id)
case AFE_PORT_ID_QUATERNARY_PCM_TX:
case AFE_PORT_ID_QUINARY_PCM_RX:
case AFE_PORT_ID_QUINARY_PCM_TX:
case AFE_PORT_ID_SENARY_PCM_RX:
case AFE_PORT_ID_SENARY_PCM_TX:
case SECONDARY_I2S_RX:
case SECONDARY_I2S_TX:
case MI2S_RX:
@ -898,6 +908,8 @@ int q6audio_validate_port(u16 port_id)
case AFE_PORT_ID_QUATERNARY_PCM_TX:
case AFE_PORT_ID_QUINARY_PCM_RX:
case AFE_PORT_ID_QUINARY_PCM_TX:
case AFE_PORT_ID_SENARY_PCM_RX:
case AFE_PORT_ID_SENARY_PCM_TX:
case SECONDARY_I2S_RX:
case SECONDARY_I2S_TX:
case MI2S_RX:

View File

@ -212,6 +212,17 @@ struct adm_cmd_matrix_map_routings_v5 {
*/
#define ADM_CMD_DEVICE_OPEN_V6 0x00010356
/* This command allows a client to open a COPP/Voice Proc the
* way as ADM_CMD_DEVICE_OPEN_V8 but supports any number channel
* of configuration.
*
* @return
* #ADM_CMDRSP_DEVICE_OPEN_V8 with the resulting status and
* COPP ID.
*/
#define ADM_CMD_DEVICE_OPEN_V8 0x0001036A
/* Definition for a low latency stream session. */
#define ADM_LOW_LATENCY_DEVICE_SESSION 0x2000
@ -490,6 +501,110 @@ struct adm_cmd_device_open_v6 {
*/
} __packed;
/* ADM device open endpoint payload the
* #ADM_CMD_DEVICE_OPEN_V8 command.
*/
struct adm_device_endpoint_payload {
u16 dev_num_channel;
/* Number of channels the audio COPP sends to/receives from
* the endpoint.
* Supported values: 1 to 32.
* The value is ignored for the voice processor Tx block,
* where channel
* configuration is derived from the topology ID.
*/
u16 bit_width;
/* Bit width (in bits) that the audio COPP sends to/receives
* from the
* endpoint. The value is ignored for the voice processing
* Tx block,
* where the PCM width is 16 bits.
*/
u32 sample_rate;
/* Sampling rate at which the audio COPP/voice processor
* Tx block
* interfaces with the endpoint.
* Supported values for voice processor Tx: 8000, 16000,
* 48000 Hz
* Supported values for audio COPP: >0 and <=192 kHz
*/
u8 dev_channel_mapping[32];
} __packed;
/* ADM device open command payload of the
* #ADM_CMD_DEVICE_OPEN_V8 command.
*/
struct adm_cmd_device_open_v8 {
struct apr_hdr hdr;
u16 flags;
/* Bit width Native mode enabled : 11th bit of flag parameter
* If 11th bit of flag is set then that means matrix mixer will be
* running in native mode for bit width for this device session.
*
* Channel Native mode enabled : 12th bit of flag parameter
* If 12th bit of flag is set then that means matrix mixer will be
* running in native mode for channel configuration for this device session.
* All other bits are reserved; clients must set them to 0.
*/
u16 mode_of_operation;
/* Specifies whether the COPP must be opened on the Tx or Rx
* path. Use the ADM_CMD_COPP_OPEN_MODE_OF_OPERATION_* macros for
* supported values and interpretation.
* Supported values:
* - 0x1 -- Rx path COPP
* - 0x2 -- Tx path live COPP
* - 0x3 -- Tx path nonlive COPP
* Live connections cause sample discarding in the Tx device
* matrix if the destination output ports do not pull them
* fast enough. Nonlive connections queue the samples
* indefinitely.
*/
u32 topology_id;
/* Audio COPP topology ID; 32-bit GUID. */
u16 endpoint_id_1;
/* Logical and physical endpoint ID of the audio path.
* If the ID is a voice processor Tx block, it receives near
* samples.
* Supported values: Any pseudoport, AFE Rx port,
* or AFE Tx port For a list of valid IDs, refer to
* @xhyperref{Q4,[Q4]}.
* Q4 = Hexagon Multimedia: AFE Interface Specification
*/
u16 endpoint_id_2;
/* Logical and physical endpoint ID 2 for a voice processor
* Tx block.
* This is not applicable to audio COPP.
* Supported values:
* - AFE Rx port
* - 0xFFFF -- Endpoint 2 is unavailable and the voice
* processor Tx
* block ignores this endpoint
* When the voice processor Tx block is created on the audio
* record path,
* it can receive far-end samples from an AFE Rx port if the
* voice call
* is active. The ID of the AFE port is provided in this
* field.
* For a list of valid IDs, refer @xhyperref{Q4,[Q4]}.
*/
u16 endpoint_id_3;
/*
* Logical and physical endpoint ID of the audio path.
* This indicated afe rx port in ADM loopback use cases.
* In all other use cases this should be set to 0xffff
*/
u16 reserved;
} __packed;
/*
* This command allows the client to close a COPP and disconnect
* the device session.
@ -620,6 +735,9 @@ struct adm_cmd_rsp_device_open_v5 {
/* Returns the status and COPP ID to an #ADM_CMD_DEVICE_OPEN_V6 command. */
#define ADM_CMDRSP_DEVICE_OPEN_V6 0x00010357
/* Returns the status and COPP ID to an #ADM_CMD_DEVICE_OPEN_V8 command. */
#define ADM_CMDRSP_DEVICE_OPEN_V8 0x0001036B
/* Payload of the #ADM_CMDRSP_DEVICE_OPEN_V6 message,
* which returns the
* status and COPP ID to an #ADM_CMD_DEVICE_OPEN_V6 command
@ -804,6 +922,12 @@ struct audproc_enable_param_t {
*/
#define ADM_CMD_MATRIX_RAMP_GAINS_V5 0x0001032C
/*
* Allows a client to control the gains on various session-to-COPP paths.
* Maximum support 32 channels
*/
#define ADM_CMD_MATRIX_RAMP_GAINS_V7 0x0001036C
/* Indicates that the target gain in the
* current adm_session_copp_gain_v5
* structure is to be applied to all
@ -916,12 +1040,97 @@ struct adm_session_copp_gain_v5 {
/* Target linear gain for channel 8 in Q13 format; */
} __packed;
/* Payload of the #ADM_CMD_MATRIX_RAMP_GAINS_V7 command.
* Immediately following this structure are num_gains of the
* adm_session_copp_gain_v5structure.
*/
struct adm_cmd_matrix_ramp_gains_v7 {
struct apr_hdr hdr;
u32 matrix_id;
/* Specifies whether the matrix ID is Audio Rx (0) or Audio Tx (1).
* Use the ADM_MATRIX_ID_AUDIO_RX or ADM_MATRIX_ID_AUDIOX
* macros to set this field.
*/
u16 num_gains;
/* Number of gains being applied. */
u16 reserved_for_align;
/* Reserved. This field must be set to zero.*/
} __packed;
/* Session-to-COPP path gain structure, used by the
* #ADM_CMD_MATRIX_RAMP_GAINS_V7 command.
* This structure specifies the target
* gain (per channel) that must be applied
* to a particular session-to-COPP path in
* the audio matrix. The structure can
* also be used to apply the gain globally
* to all session-to-COPP paths that
* exist for the given session.
* The aDSP uses device channel mapping to
* determine which channel gains to
* use from this command. For example,
* if the device is configured as stereo,
* the aDSP uses only target_gain_ch_1 and
* target_gain_ch_2, and it ignores
* the others.
*/
struct adm_session_copp_gain_v7 {
u16 session_id;
/* Handle of the ASM session.
* Supported values: 1 to 8.
*/
u16 copp_id;
/* Handle of the COPP. Gain will be applied on the Session ID
* COPP ID path.
*/
u16 ramp_duration;
/* Duration (in milliseconds) of the ramp over
* which target gains are
* to be applied. Use
* #ADM_CMD_MATRIX_RAMP_GAINS_RAMP_DURATION_IMMEDIATE
* to indicate that gain must be applied immediately.
*/
u16 step_duration;
/* Duration (in milliseconds) of each step in the ramp.
* This parameter is ignored if ramp_duration is equal to
* #ADM_CMD_MATRIX_RAMP_GAINS_RAMP_DURATION_IMMEDIATE.
* Supported value: 1
*/
u16 ramp_curve;
/* Type of ramping curve.
* Supported value: #ADM_CMD_MATRIX_RAMP_GAINS_RAMP_CURVE_LINEAR
*/
u16 stream_type;
/* Type of stream_type.
* Supported value: #STREAM_TYPE_ASM STREAM_TYPE_LSM
*/
u16 num_channels;
/* Number of channels on which gain needs to be applied.
* Supported value: 1 to 32.
*/
u16 reserved_for_align;
/* Reserved. This field must be set to zero. */
} __packed;
/* Allows to set mute/unmute on various session-to-COPP paths.
* For every session-to-COPP path (stream-device interconnection),
* mute/unmute can be set individually on the output channels.
*/
#define ADM_CMD_MATRIX_MUTE_V5 0x0001032D
/* Allows to set mute/unmute on various session-to-COPP paths.
* For every session-to-COPP path (stream-device interconnection),
* mute/unmute can be set individually on the output channels.
*/
#define ADM_CMD_MATRIX_MUTE_V7 0x0001036D
/* Indicates that mute/unmute in the
* current adm_session_copp_mute_v5structure
* is to be applied to all the session-to-COPP
@ -987,6 +1196,50 @@ struct adm_cmd_matrix_mute_v5 {
/* Clients must set this field to zero.*/
} __packed;
/* Payload of the #ADM_CMD_MATRIX_MUTE_V7 command*/
struct adm_cmd_matrix_mute_v7 {
struct apr_hdr hdr;
u32 matrix_id;
/* Specifies whether the matrix ID is Audio Rx (0) or Audio Tx (1).
* Use the ADM_MATRIX_ID_AUDIO_RX or ADM_MATRIX_ID_AUDIOX
* macros to set this field.
*/
u16 session_id;
/* Handle of the ASM session.
* Supported values: 1 to .
*/
u16 copp_id;
/* Handle of the COPP.
* Use ADM_CMD_MATRIX_MUTE_COPP_ID_ALL_CONNECTED_COPPS
* to indicate that mute/unmute must be applied to
* all the COPPs connected to session_id.
* Supported values:
* - 0xFFFF -- Apply mute/unmute to all connected COPPs
* - Other values -- Valid COPP ID
*/
u16 ramp_duration;
/* Duration (in milliseconds) of the ramp over
* which target gains are
* to be applied. Use
* #ADM_CMD_MATRIX_RAMP_GAINS_RAMP_DURATION_IMMEDIATE
* to indicate that gain must be applied immediately.
*/
u16 stream_type;
/* Specify whether the stream type is connectedon the ASM or LSM
* Supported value: 1
*/
u16 num_channels;
/* Number of channels on which gain needs to be applied
* Supported value: 1 to 32
*/
} __packed;
#define ASM_PARAM_ID_AAC_STEREO_MIX_COEFF_SELECTION_FLAG_V2 (0x00010DD8)
struct asm_aac_stereo_mix_coeff_selection_param_v2 {
@ -1235,13 +1488,19 @@ struct adm_cmd_connect_afe_port_v5 {
/* ID of the Internal 6 MI2S Tx port */
#define AFE_PORT_ID_INT6_MI2S_TX 0x103B
#define AFE_PORT_ID_QUINARY_PCM_RX 0x103C
#define AFE_PORT_ID_QUINARY_PCM_TX 0x103D
#define AFE_PORT_ID_QUINARY_PCM_RX 0x103C
#define AFE_PORT_ID_QUINARY_PCM_TX 0x103D
#define AFE_PORT_ID_PRIMARY_SPDIF_RX 0x5000
#define AFE_PORT_ID_PRIMARY_SPDIF_TX 0x5001
#define AFE_PORT_ID_SECONDARY_SPDIF_RX 0x5002
#define AFE_PORT_ID_SECONDARY_SPDIF_TX 0x5003
/* ID of the senary auxiliary PCM Rx port. */
#define AFE_PORT_ID_SENARY_PCM_RX 0x103E
/* ID of the senary auxiliary PCM Tx port. */
#define AFE_PORT_ID_SENARY_PCM_TX 0x103F
#define AFE_PORT_ID_PRIMARY_SPDIF_RX 0x5000
#define AFE_PORT_ID_PRIMARY_SPDIF_TX 0x5001
#define AFE_PORT_ID_SECONDARY_SPDIF_RX 0x5002
#define AFE_PORT_ID_SECONDARY_SPDIF_TX 0x5003
#define AFE_PORT_ID_SPDIF_RX AFE_PORT_ID_PRIMARY_SPDIF_RX
#define AFE_PORT_ID_RT_PROXY_PORT_001_RX 0x2000
#define AFE_PORT_ID_RT_PROXY_PORT_001_TX 0x2001
@ -2248,6 +2507,17 @@ struct afe_port_data_cmd_rt_proxy_port_read_v2 {
#define AFE_PORT_I2S_QUAD23 0x6
#define AFE_PORT_I2S_6CHS 0x7
#define AFE_PORT_I2S_8CHS 0x8
#define AFE_PORT_I2S_10CHS 0x9
#define AFE_PORT_I2S_12CHS 0xA
#define AFE_PORT_I2S_14CHS 0xB
#define AFE_PORT_I2S_16CHS 0xC
#define AFE_PORT_I2S_SD4 0xD
#define AFE_PORT_I2S_SD5 0xE
#define AFE_PORT_I2S_SD6 0xF
#define AFE_PORT_I2S_SD7 0x10
#define AFE_PORT_I2S_QUAD45 0x11
#define AFE_PORT_I2S_QUAD67 0x12
#define AFE_PORT_I2S_8CHS_2 0x13
#define AFE_PORT_I2S_MONO 0x0
#define AFE_PORT_I2S_STEREO 0x1
#define AFE_PORT_CONFIG_I2S_WS_SRC_EXTERNAL 0x0
@ -2280,6 +2550,17 @@ struct afe_param_id_i2s_cfg {
* - #AFE_PORT_I2S_QUAD23
* - #AFE_PORT_I2S_6CHS
* - #AFE_PORT_I2S_8CHS
* - #AFE_PORT_I2S_10CHS
* - #AFE_PORT_I2S_12CHS
* - #AFE_PORT_I2S_14CHS
* - #AFE_PORT_I2S_16CHS
* - #AFE_PORT_I2S_SD4
* - #AFE_PORT_I2S_SD5
* - #AFE_PORT_I2S_SD6
* - #AFE_PORT_I2S_SD7
* - #AFE_PORT_I2S_QUAD45
* - #AFE_PORT_I2S_QUAD67
* - #AFE_PORT_I2S_8CHS_2
*/
u16 mono_stereo;
@ -4949,15 +5230,80 @@ struct asm_softvolume_params {
/* Rear right of center. */
#define PCM_CHANNEL_RRC 16
/* Second low frequency channel. */
#define PCM_CHANNEL_LFE2 17
/* Side left channel. */
#define PCM_CHANNEL_SL 18
/* Side right channel. */
#define PCM_CHANNEL_SR 19
/* Top front left channel. */
#define PCM_CHANNEL_TFL 20
/* Left vertical height channel. */
#define PCM_CHANNEL_LVH 20
/* Top front right channel. */
#define PCM_CHANNEL_TFR 21
/* Right vertical height channel. */
#define PCM_CHANNEL_RVH 21
/* Top center channel. */
#define PCM_CHANNEL_TC 22
/* Top back left channel. */
#define PCM_CHANNEL_TBL 23
/* Top back right channel. */
#define PCM_CHANNEL_TBR 24
/* Top side left channel. */
#define PCM_CHANNEL_TSL 25
/* Top side right channel. */
#define PCM_CHANNEL_TSR 26
/* Top back center channel. */
#define PCM_CHANNEL_TBC 27
/* Bottom front center channel. */
#define PCM_CHANNEL_BFC 28
/* Bottom front left channel. */
#define PCM_CHANNEL_BFL 29
/* Bottom front right channel. */
#define PCM_CHANNEL_BFR 30
/* Left wide channel. */
#define PCM_CHANNEL_LW 31
/* Right wide channel. */
#define PCM_CHANNEL_RW 32
/* Left side direct channel. */
#define PCM_CHANNEL_LSD 33
/* Right side direct channel. */
#define PCM_CHANNEL_RSD 34
#define PCM_FORMAT_MAX_NUM_CHANNEL 8
#define PCM_FORMAT_MAX_CHANNELS_9 9
/* Used for ADM_CMD_DEVICE_OPEN_V8 */
#define PCM_FORMAT_MAX_NUM_CHANNEL_V8 32
#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V2 0x00010DA5
#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 0x00010DDC
#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4 0x0001320C
#define ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V5 0x00013222
#define ASM_MEDIA_FMT_EVRCB_FS 0x00010BEF
#define ASM_MEDIA_FMT_EVRCWB_FS 0x00010BF0
@ -5172,6 +5518,56 @@ struct asm_multi_channel_pcm_fmt_blk_v4 {
*/
} __packed;
struct asm_multi_channel_pcm_fmt_blk_v5 {
uint16_t num_channels;
/*
* Number of channels
* Supported values: 1 to 32
*/
uint16_t bits_per_sample;
/*
* Number of bits per sample per channel
* Supported values: 16, 24, 32
*/
uint32_t sample_rate;
/*
* Number of samples per second
* Supported values: 2000 to 48000, 96000,192000 Hz
*/
uint16_t is_signed;
/* Flag that indicates that PCM samples are signed (1) */
uint16_t sample_word_size;
/*
* Size in bits of the word that holds a sample of a channel.
* Supported values: 12,24,32
*/
uint16_t endianness;
/*
* Flag to indicate the endianness of the pcm sample
* Supported values: 0 - Little endian (all other formats)
* 1 - Big endian (AIFF)
*/
uint16_t mode;
/*
* Mode to provide additional info about the pcm input data.
* Supported values: 0 - Default QFs (Q15 for 16b, Q23 for packed 24b,
* Q31 for unpacked 24b or 32b)
* 15 - for 16 bit
* 23 - for 24b packed or 8.24 format
* 31 - for 24b unpacked or 32bit
*/
uint8_t channel_mapping[32];
/*
* Each element, i, in the array describes channel i inside the buffer where
* 0 <= i < num_channels. Unused channels are set to 0.
*/
} __packed;
/*
* Payload of the multichannel PCM configuration parameters in
* the ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V3 media format.
@ -5192,6 +5588,16 @@ struct asm_multi_channel_pcm_fmt_blk_param_v4 {
struct asm_multi_channel_pcm_fmt_blk_v4 param;
} __packed;
/*
* Payload of the multichannel PCM configuration parameters in
* the ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V5 media format.
*/
struct asm_multi_channel_pcm_fmt_blk_param_v5 {
struct apr_hdr hdr;
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
struct asm_multi_channel_pcm_fmt_blk_v5 param;
} __packed;
struct asm_stream_cmd_set_encdec_param {
u32 param_id;
/* ID of the parameter. */
@ -5243,6 +5649,78 @@ struct asm_dec_ddp_endp_param_v2 {
int endp_param_value;
} __packed;
/*
* Payload of the multichannel PCM encoder configuration parameters in
* the ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V5 media format.
*/
struct asm_multi_channel_pcm_enc_cfg_v5 {
struct apr_hdr hdr;
struct asm_stream_cmd_set_encdec_param encdec;
struct asm_enc_cfg_blk_param_v2 encblk;
uint16_t num_channels;
/*
* Number of PCM channels.
* @values
* - 0 -- Native mode
* - 1 -- 8 channels
* Native mode indicates that encoding must be performed with the number
* of channels at the input.
*/
uint16_t bits_per_sample;
/*
* Number of bits per sample per channel.
* @values 16, 24
*/
uint32_t sample_rate;
/*
* Number of samples per second.
* @values 0, 8000 to 48000 Hz
* A value of 0 indicates the native sampling rate. Encoding is
* performed at the input sampling rate.
*/
uint16_t is_signed;
/*
* Flag that indicates the PCM samples are signed (1). Currently, only
* signed PCM samples are supported.
*/
uint16_t sample_word_size;
/*
* The size in bits of the word that holds a sample of a channel.
* @values 16, 24, 32
* 16-bit samples are always placed in 16-bit words:
* sample_word_size = 1.
* 24-bit samples can be placed in 32-bit words or in consecutive
* 24-bit words.
* - If sample_word_size = 32, 24-bit samples are placed in the
* most significant 24 bits of a 32-bit word.
* - If sample_word_size = 24, 24-bit samples are placed in
* 24-bit words. @tablebulletend
*/
uint16_t endianness;
/*
* Flag to indicate the endianness of the pcm sample
* Supported values: 0 - Little endian (all other formats)
* 1 - Big endian (AIFF)
*/
uint16_t mode;
/*
* Mode to provide additional info about the pcm input data.
* Supported values: 0 - Default QFs (Q15 for 16b, Q23 for packed 24b,
* Q31 for unpacked 24b or 32b)
* 15 - for 16 bit
* 23 - for 24b packed or 8.24 format
*/
uint8_t channel_mapping[PCM_FORMAT_MAX_NUM_CHANNEL_V8];
/*
* Channel mapping array expected at the encoder output.
* Channel[i] mapping describes channel i inside the buffer, where
* 0 @le i < num_channels. All valid used channels must be present at
* the beginning of the array.
* If Native mode is set for the channels, this field is ignored.
* @values See Section @xref{dox:PcmChannelDefs}
*/
} __packed;
/*
* Payload of the multichannel PCM encoder configuration parameters in
* the ASM_MEDIA_FMT_MULTI_CHANNEL_PCM_V4 media format.
@ -10188,6 +10666,8 @@ struct avcs_fwk_ver_info {
/* LSM Specific */
#define VW_FEAT_DIM (39)
#define APRV2_IDS_SERVICE_ID_ADSP_ASM_V (0x7)
#define APRV2_IDS_SERVICE_ID_ADSP_ADM_V (0x8)
#define APRV2_IDS_SERVICE_ID_ADSP_LSM_V (0xD)
#define APRV2_IDS_DOMAIN_ID_ADSP_V (0x4)
#define APRV2_IDS_DOMAIN_ID_APPS_V (0x5)
@ -10505,6 +10985,10 @@ enum afe_lpass_clk_mode {
#define Q6AFE_LPASS_CLK_ID_QUIN_PCM_EBIT 0x209
/* Clock ID for QUINARY PCM OSR */
#define Q6AFE_LPASS_CLK_ID_QUI_PCM_OSR 0x20A
/* Clock ID for Senary PCM IBIT */
#define Q6AFE_LPASS_CLK_ID_SEN_PCM_IBIT 0x20B
/* Clock ID for Senary PCM EBIT */
#define Q6AFE_LPASS_CLK_ID_SEN_PCM_EBIT 0x20C
/** Clock ID for Primary TDM IBIT */
#define Q6AFE_LPASS_CLK_ID_PRI_TDM_IBIT 0x200
@ -10549,6 +11033,9 @@ enum afe_lpass_clk_mode {
*/
#define AFE_CLOCK_SET_CLOCK_ID_SWR_NPL_CLK 0x307
/* Clock ID for MCLK5 */
#define Q6AFE_LPASS_CLK_ID_MCLK_5 0x308
/* Clock ID for AHB HDMI input */
#define Q6AFE_LPASS_CLK_ID_AHB_HDMI_INPUT 0x400

View File

@ -24,6 +24,10 @@
#define MSM_AFE_4CHANNELS 4
#define MSM_AFE_6CHANNELS 6
#define MSM_AFE_8CHANNELS 8
#define MSM_AFE_10CHANNELS 10
#define MSM_AFE_12CHANNELS 12
#define MSM_AFE_14CHANNELS 14
#define MSM_AFE_16CHANNELS 16
#define MSM_AFE_I2S_FORMAT_LPCM 0
#define MSM_AFE_I2S_FORMAT_COMPR 1
@ -255,9 +259,12 @@ enum {
IDX_SECONDARY_SPDIF_RX,
IDX_PRIMARY_SPDIF_TX,
IDX_SECONDARY_SPDIF_TX,
/* IDX 185 to 187 */
/* IDX 185 to 186 */
IDX_SLIMBUS_9_RX,
IDX_SLIMBUS_9_TX,
/* IDX 187 -> 189 */
IDX_AFE_PORT_ID_SENARY_PCM_RX,
IDX_AFE_PORT_ID_SENARY_PCM_TX,
AFE_MAX_PORTS
};