Loading asoc/msm-dai-q6-v2.c +46 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ enum { ENC_FMT_APTX_ADAPTIVE = ASM_MEDIA_FMT_APTX_ADAPTIVE, DEC_FMT_APTX_ADAPTIVE = ASM_MEDIA_FMT_APTX_ADAPTIVE, DEC_FMT_MP3 = ASM_MEDIA_FMT_MP3, ENC_FMT_APTX_AD_SPEECH = ASM_MEDIA_FMT_APTX_AD_SPEECH, DEC_FMT_APTX_AD_SPEECH = ASM_MEDIA_FMT_APTX_AD_SPEECH, }; enum { Loading Loading @@ -2833,6 +2835,12 @@ static int msm_dai_q6_afe_enc_cfg_get(struct snd_kcontrol *kcontrol, &dai_data->enc_config.data, sizeof(struct asm_aptx_ad_enc_cfg_t)); break; case ENC_FMT_APTX_AD_SPEECH: memcpy(ucontrol->value.bytes.data + format_size, &dai_data->enc_config.data, sizeof(struct asm_aptx_ad_speech_enc_cfg_t)); break; default: pr_debug("%s: unknown format = %d\n", __func__, dai_data->enc_config.format); Loading Loading @@ -2896,6 +2904,12 @@ static int msm_dai_q6_afe_enc_cfg_put(struct snd_kcontrol *kcontrol, ucontrol->value.bytes.data + format_size, sizeof(struct asm_aptx_ad_enc_cfg_t)); break; case ENC_FMT_APTX_AD_SPEECH: memcpy(&dai_data->enc_config.data, ucontrol->value.bytes.data + format_size, sizeof(struct asm_aptx_ad_speech_enc_cfg_t)); break; default: pr_debug("%s: Ignore enc config for unknown format = %d\n", __func__, dai_data->enc_config.format); Loading Loading @@ -3222,6 +3236,7 @@ static int msm_dai_q6_afe_feedback_dec_cfg_get(struct snd_kcontrol *kcontrol, { struct msm_dai_q6_dai_data *dai_data = kcontrol->private_data; u32 format_size = 0; u32 abr_size = 0; if (!dai_data) { pr_err("%s: Invalid dai data\n", __func__); Loading @@ -3235,10 +3250,25 @@ static int msm_dai_q6_afe_feedback_dec_cfg_get(struct snd_kcontrol *kcontrol, pr_debug("%s: abr_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); abr_size = sizeof(dai_data->dec_config.abr_dec_cfg.imc_info); memcpy(ucontrol->value.bytes.data + format_size, &dai_data->dec_config.abr_dec_cfg, sizeof(struct afe_imc_dec_enc_info)); switch (dai_data->dec_config.format) { case DEC_FMT_APTX_AD_SPEECH: pr_debug("%s: afe_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); memcpy(ucontrol->value.bytes.data + format_size + abr_size, &dai_data->dec_config.data, sizeof(struct asm_aptx_ad_speech_dec_cfg_t)); break; default: pr_debug("%s: no afe_dec_cfg for format %d\n", __func__, dai_data->dec_config.format); break; } return 0; } Loading @@ -3247,6 +3277,7 @@ static int msm_dai_q6_afe_feedback_dec_cfg_put(struct snd_kcontrol *kcontrol, { struct msm_dai_q6_dai_data *dai_data = kcontrol->private_data; u32 format_size = 0; u32 abr_size = 0; if (!dai_data) { pr_err("%s: Invalid dai data\n", __func__); Loading @@ -3262,10 +3293,25 @@ static int msm_dai_q6_afe_feedback_dec_cfg_put(struct snd_kcontrol *kcontrol, pr_debug("%s: abr_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); abr_size = sizeof(dai_data->dec_config.abr_dec_cfg.imc_info); memcpy(&dai_data->dec_config.abr_dec_cfg, ucontrol->value.bytes.data + format_size, sizeof(struct afe_imc_dec_enc_info)); dai_data->dec_config.abr_dec_cfg.is_abr_enabled = true; switch (dai_data->dec_config.format) { case DEC_FMT_APTX_AD_SPEECH: pr_debug("%s: afe_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); memcpy(&dai_data->dec_config.data, ucontrol->value.bytes.data + format_size + abr_size, sizeof(struct asm_aptx_ad_speech_dec_cfg_t)); break; default: pr_debug("%s: no afe_dec_cfg for format %d\n", __func__, dai_data->dec_config.format); break; } return 0; } Loading asoc/msm-pcm-routing-v2.c +38 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ static struct cal_type_data *cal_data[MAX_ROUTING_CAL_TYPES]; static int fm_switch_enable; static int hfp_switch_enable; static int a2dp_switch_enable; static int sco_switch_enable; static int int0_mi2s_switch_enable; static int int4_mi2s_switch_enable; static int pri_mi2s_switch_enable; Loading Loading @@ -2559,6 +2560,34 @@ static int msm_routing_a2dp_switch_mixer_put(struct snd_kcontrol *kcontrol, return 1; } static int msm_routing_sco_switch_mixer_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.integer.value[0] = sco_switch_enable; pr_debug("%s: SCO Switch enable %ld\n", __func__, ucontrol->value.integer.value[0]); return 0; } static int msm_routing_sco_switch_mixer_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kcontrol); struct snd_soc_dapm_update *update = NULL; pr_debug("%s: SCO Switch enable %ld\n", __func__, ucontrol->value.integer.value[0]); sco_switch_enable = ucontrol->value.integer.value[0]; if (sco_switch_enable) snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, 1, update); else snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, 0, update); return 1; } static int msm_routing_get_int0_mi2s_switch_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { Loading Loading @@ -17592,6 +17621,11 @@ static const struct snd_kcontrol_new a2dp_slim7_switch_mixer_controls = 0, 1, 0, msm_routing_a2dp_switch_mixer_get, msm_routing_a2dp_switch_mixer_put); static const struct snd_kcontrol_new sco_slim7_switch_mixer_controls = SOC_SINGLE_EXT("Switch", SND_SOC_NOPM, 0, 1, 0, msm_routing_sco_switch_mixer_get, msm_routing_sco_switch_mixer_put); static const struct soc_enum lsm_port_enum = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(lsm_port_text), lsm_port_text); Loading Loading @@ -19736,6 +19770,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { &quat_mi2s_rx_switch_mixer_controls), SND_SOC_DAPM_SWITCH("QUIN_MI2S_RX_DL_HL", SND_SOC_NOPM, 0, 0, &quin_mi2s_rx_switch_mixer_controls), SND_SOC_DAPM_SWITCH("SCO_SLIM7_DL_HL", SND_SOC_NOPM, 0, 0, &sco_slim7_switch_mixer_controls), SND_SOC_DAPM_SWITCH("HFP_PRI_AUX_UL_HL", SND_SOC_NOPM, 0, 0, &hfp_pri_aux_switch_mixer_controls), SND_SOC_DAPM_SWITCH("HFP_AUX_UL_HL", SND_SOC_NOPM, 0, 0, Loading Loading @@ -22806,6 +22842,8 @@ static const struct snd_soc_dapm_route intercon[] = { {"SLIMBUS_4_RX", NULL, "SLIMBUS4_DL_HL"}, {"SLIMBUS6_DL_HL", "Switch", "SLIM0_DL_HL"}, {"SLIMBUS_6_RX", NULL, "SLIMBUS6_DL_HL"}, {"SCO_SLIM7_DL_HL", "Switch", "SLIM7_DL_HL"}, {"SLIMBUS_7_RX", NULL, "SCO_SLIM7_DL_HL"}, {"SLIM0_UL_HL", NULL, "SLIMBUS_0_TX"}, {"SLIM1_UL_HL", NULL, "SLIMBUS_1_TX"}, {"SLIM3_UL_HL", NULL, "SLIMBUS_3_TX"}, dsp/q6afe.c +138 −31 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ enum { APTX_AD_44_1 = 1 }; enum { AFE_MATCHED_PORT_DISABLE, AFE_MATCHED_PORT_ENABLE }; struct wlock { struct wakeup_source ws; }; Loading Loading @@ -3656,6 +3661,8 @@ static int q6afe_send_dec_config(u16 port_id, struct avs_dec_congestion_buffer_param_t dec_buffer_id_param; struct afe_enc_dec_imc_info_param_t imc_info_param; struct afe_port_media_type_t media_type; struct afe_matched_port_t matched_port_param; struct asm_aptx_ad_speech_mode_cfg_t speech_codec_init_param; struct param_hdr_v3 param_hdr; int ret; u32 dec_fmt; Loading @@ -3664,6 +3671,8 @@ static int q6afe_send_dec_config(u16 port_id, memset(&dec_media_fmt, 0, sizeof(dec_media_fmt)); memset(&imc_info_param, 0, sizeof(imc_info_param)); memset(&media_type, 0, sizeof(media_type)); memset(&matched_port_param, 0, sizeof(matched_port_param)); memset(&speech_codec_init_param, 0, sizeof(speech_codec_init_param)); memset(¶m_hdr, 0, sizeof(param_hdr)); param_hdr.module_id = AFE_MODULE_ID_DECODER; Loading Loading @@ -3782,6 +3791,9 @@ static int q6afe_send_dec_config(u16 port_id, break; } /* fall through for abr enabled case */ case ASM_MEDIA_FMT_APTX_AD_SPEECH: media_type.sample_rate = AFE_PORT_SAMPLE_RATE_32K; break; default: media_type.sample_rate = afe_config.slim_sch.sample_rate; Loading @@ -3808,7 +3820,8 @@ static int q6afe_send_dec_config(u16 port_id, } if (format != ASM_MEDIA_FMT_SBC && format != ASM_MEDIA_FMT_AAC_V2 && format != ASM_MEDIA_FMT_APTX_ADAPTIVE) { format != ASM_MEDIA_FMT_APTX_ADAPTIVE && format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s:Unsuppported dec format. Ignore AFE config %u\n", __func__, format); goto exit; Loading @@ -3819,6 +3832,24 @@ static int q6afe_send_dec_config(u16 port_id, pr_debug("%s: Ignore AFE config for abr case\n", __func__); goto exit; } if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s: sending AFE_PARAM_ID_RATE_MATCHED_PORT to DSP payload\n", __func__); param_hdr.param_id = AFE_PARAM_ID_RATE_MATCHED_PORT; param_hdr.param_size = sizeof(struct afe_matched_port_t); matched_port_param.minor_version = AFE_API_VERSION_PORT_MEDIA_TYPE; matched_port_param.enable = AFE_MATCHED_PORT_ENABLE; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &matched_port_param); if (ret) { pr_err("%s: AFE_PARAM_ID_RATE_MATCHED_PORT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } } pr_debug("%s: sending AFE_DECODER_PARAM_ID_DEC_MEDIA_FMT to DSP payload\n", __func__); Loading Loading @@ -3855,6 +3886,26 @@ static int q6afe_send_dec_config(u16 port_id, goto exit; } break; case ASM_MEDIA_FMT_APTX_AD_SPEECH: param_hdr.param_size = sizeof(struct asm_aptx_ad_speech_dec_cfg_t); pr_debug("%s: send AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_DEC_INIT to DSP payload\n", __func__); param_hdr.param_id = AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_DEC_INIT; speech_codec_init_param = cfg->data.aptx_ad_speech_config.speech_mode; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &speech_codec_init_param); if (ret) { pr_err("%s: AVS_DECODER_PARAM_ID_APTX_ADAPTIVE_SPEECH_DEC_INIT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } break; default: pr_debug("%s:No need to send DEC_MEDIA_FMT to DSP payload\n", __func__); Loading @@ -3881,6 +3932,8 @@ static int q6afe_send_enc_config(u16 port_id, struct asm_aac_frame_size_control_t frame_ctl_param; struct afe_port_media_type_t media_type; struct aptx_channel_mode_param_t channel_mode_param; struct afe_matched_port_t matched_port_param; struct asm_aptx_ad_speech_mode_cfg_t speech_codec_init_param; struct param_hdr_v3 param_hdr; int ret; Loading @@ -3895,12 +3948,15 @@ static int q6afe_send_enc_config(u16 port_id, memset(&imc_info_param, 0, sizeof(imc_info_param)); memset(&frame_ctl_param, 0, sizeof(frame_ctl_param)); memset(&media_type, 0, sizeof(media_type)); memset(&matched_port_param, 0, sizeof(matched_port_param)); memset(&speech_codec_init_param, 0, sizeof(speech_codec_init_param)); memset(¶m_hdr, 0, sizeof(param_hdr)); if (format != ASM_MEDIA_FMT_SBC && format != ASM_MEDIA_FMT_AAC_V2 && format != ASM_MEDIA_FMT_APTX && format != ASM_MEDIA_FMT_APTX_HD && format != ASM_MEDIA_FMT_CELT && format != ASM_MEDIA_FMT_LDAC && format != ASM_MEDIA_FMT_APTX_ADAPTIVE) { format != ASM_MEDIA_FMT_APTX_ADAPTIVE && format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_err("%s:Unsuppported enc format. Ignore AFE config\n", __func__); return 0; Loading Loading @@ -3935,6 +3991,9 @@ static int q6afe_send_enc_config(u16 port_id, enc_blk_param.enc_cfg_blk_size = sizeof(enc_blk_param.enc_blk_config) - sizeof(struct asm_aac_frame_size_control_t); } else if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { param_hdr.param_size = sizeof(struct afe_enc_aptx_ad_speech_cfg_blk_param_t); enc_blk_param.enc_cfg_blk_size = sizeof(struct asm_custom_enc_cfg_t); } else { param_hdr.param_size = sizeof(struct afe_enc_cfg_blk_param_t); enc_blk_param.enc_cfg_blk_size = Loading Loading @@ -4016,6 +4075,24 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } } if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s: sending AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_ENC_INIT to DSP\n", __func__); param_hdr.param_id = AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_ENC_INIT; param_hdr.param_size = sizeof(struct asm_aptx_ad_speech_dec_cfg_t); speech_codec_init_param = cfg->aptx_ad_speech_config.speech_mode; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &speech_codec_init_param); if (ret) { pr_err("%s: AFE_ID_APTX_ADAPTIVE_ENC_INIT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } } pr_debug("%s:sending AFE_ENCODER_PARAM_ID_PACKETIZER to DSP\n", __func__); param_hdr.param_id = AFE_ENCODER_PARAM_ID_PACKETIZER_ID; Loading @@ -4031,6 +4108,7 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } if (format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s:sending AFE_ENCODER_PARAM_ID_ENABLE_SCRAMBLING mode= %d to DSP payload\n", __func__, scrambler_mode); param_hdr.param_id = AFE_ENCODER_PARAM_ID_ENABLE_SCRAMBLING; Loading @@ -4045,6 +4123,7 @@ static int q6afe_send_enc_config(u16 port_id, __func__, port_id, ret); goto exit; } } if (format == ASM_MEDIA_FMT_APTX) { pr_debug("%s:sending CAPI_V2_PARAM_ID_APTX_ENC_SWITCH_TO_MONO mode= %d to DSP payload\n", Loading @@ -4065,7 +4144,9 @@ static int q6afe_send_enc_config(u16 port_id, if ((format == ASM_MEDIA_FMT_LDAC && cfg->ldac_config.abr_config.is_abr_enabled) || format == ASM_MEDIA_FMT_APTX_ADAPTIVE) { format == ASM_MEDIA_FMT_APTX_ADAPTIVE || format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { if (format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s:sending AFE_ENCODER_PARAM_ID_BIT_RATE_LEVEL_MAP to DSP payload", __func__); param_hdr.param_id = AFE_ENCODER_PARAM_ID_BIT_RATE_LEVEL_MAP; Loading @@ -4082,6 +4163,7 @@ static int q6afe_send_enc_config(u16 port_id, __func__, port_id, ret); goto exit; } } pr_debug("%s: sending AFE_ENCDEC_PARAM_ID_DEC_TO_ENC_COMMUNICATION to DSP payload", __func__); Loading @@ -4092,6 +4174,9 @@ static int q6afe_send_enc_config(u16 port_id, if (format == ASM_MEDIA_FMT_APTX_ADAPTIVE) imc_info_param.imc_info = cfg->aptx_ad_config.abr_cfg.imc_info; else if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) imc_info_param.imc_info = cfg->aptx_ad_speech_config.imc_info; else imc_info_param.imc_info = cfg->ldac_config.abr_config.imc_info; Loading @@ -4117,6 +4202,9 @@ static int q6afe_send_enc_config(u16 port_id, else if (format == ASM_MEDIA_FMT_APTX_ADAPTIVE) media_type.sample_rate = cfg->aptx_ad_config.custom_cfg.sample_rate; else if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) media_type.sample_rate = cfg->aptx_ad_speech_config.custom_cfg.sample_rate; else media_type.sample_rate = afe_config.slim_sch.sample_rate; Loading @@ -4142,6 +4230,25 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s: sending AFE_PARAM_ID_RATE_MATCHED_PORT to DSP payload", __func__); param_hdr.param_id = AFE_PARAM_ID_RATE_MATCHED_PORT; param_hdr.param_size = sizeof(struct afe_matched_port_t); matched_port_param.minor_version = AFE_API_VERSION_PORT_MEDIA_TYPE; matched_port_param.enable = AFE_MATCHED_PORT_ENABLE; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &matched_port_param); if (ret) { pr_err("%s: AFE_PARAM_ID_RATE_MATCHED_PORT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } } exit: return ret; } Loading include/dsp/apr_audio-v2.h +67 −0 Original line number Diff line number Diff line Loading @@ -2489,6 +2489,7 @@ struct afe_port_data_cmd_rt_proxy_port_read_v2 { #define AFE_MODULE_AUDIO_DEV_INTERFACE 0x0001020C #define AFE_PORT_SAMPLE_RATE_8K 8000 #define AFE_PORT_SAMPLE_RATE_16K 16000 #define AFE_PORT_SAMPLE_RATE_32K 32000 #define AFE_PORT_SAMPLE_RATE_44_1K 44100 #define AFE_PORT_SAMPLE_RATE_48K 48000 #define AFE_PORT_SAMPLE_RATE_96K 96000 Loading Loading @@ -3911,6 +3912,14 @@ struct afe_id_aptx_adaptive_enc_init */ #define AFE_ENCDEC_PARAM_ID_DEC_TO_ENC_COMMUNICATION 0x0001323D /* * This is needed to be used only for SWB voice call use case. * This is needed to be issued for each direction (RX AFE and TX AFE) * along with AFE_PARAM_ID_PORT_MEDIA_TYPE * (Issuing AF_PARAM_ID_RATE_MATCHED_PORT param alone is not useful). */ #define AFE_PARAM_ID_RATE_MATCHED_PORT 0x000102BE /* * Purpose of IMC set up between encoder and decoder. * Communication instance and purpose together form the Loading Loading @@ -4151,6 +4160,9 @@ struct asm_aac_enc_cfg_t { /* FMT ID for apt-X Adaptive */ #define ASM_MEDIA_FMT_APTX_ADAPTIVE 0x00013204 /* FMT ID for apt-X Adaptive speech */ #define ASM_MEDIA_FMT_APTX_AD_SPEECH 0x00013208 #define PCM_CHANNEL_L 1 #define PCM_CHANNEL_R 2 #define PCM_CHANNEL_C 3 Loading @@ -4167,6 +4179,22 @@ struct asm_custom_enc_cfg_t { uint32_t custom_size; } __packed; struct asm_aptx_ad_speech_mode_cfg_t { uint32_t speech_mode; /* * speech mode of codec. * * @values 0x0(swb), 0x4(sswb) */ uint32_t swapping; /* * byte swapping of codec. * * @values 0x1, enable swapping */ } __packed; struct asm_aptx_v2_enc_cfg_ext_t { /* * sync mode: 0x0 = stereo sync mode (default) Loading @@ -4188,6 +4216,19 @@ struct asm_aptx_ad_enc_cfg_t struct afe_abr_enc_cfg_t abr_cfg; } __attribute__ ((packed)); struct asm_aptx_ad_speech_enc_cfg_t { struct asm_custom_enc_cfg_t custom_cfg; struct afe_imc_dec_enc_info imc_info; struct asm_aptx_ad_speech_mode_cfg_t speech_mode; } __attribute__ ((packed)); struct afe_matched_port_t { uint32_t minor_version; uint32_t enable; } __attribute__ ((packed)); #define ASM_MEDIA_FMT_CELT 0x00013221 struct asm_celt_specific_enc_cfg_t { /* Loading Loading @@ -4464,6 +4505,10 @@ struct asm_aptx_ad_dec_cfg_t { */ } __packed; struct asm_aptx_ad_speech_dec_cfg_t { struct asm_aptx_ad_speech_mode_cfg_t speech_mode; }; union afe_enc_config_data { struct asm_sbc_enc_cfg_t sbc_config; struct asm_aac_enc_cfg_t aac_config; Loading @@ -4472,6 +4517,7 @@ union afe_enc_config_data { struct asm_aptx_enc_cfg_t aptx_config; struct asm_ldac_enc_cfg_t ldac_config; struct asm_aptx_ad_enc_cfg_t aptx_ad_config; struct asm_aptx_ad_speech_enc_cfg_t aptx_ad_speech_config; }; struct afe_enc_config { Loading @@ -4486,6 +4532,7 @@ union afe_dec_config_data { struct asm_aac_dec_cfg_v2_t aac_config; struct asm_mp3_dec_cfg_t mp3_config; struct asm_aptx_ad_dec_cfg_t aptx_ad_config; struct asm_aptx_ad_speech_dec_cfg_t aptx_ad_speech_config; }; struct afe_dec_config { Loading @@ -4502,6 +4549,14 @@ struct afe_enc_cfg_blk_param_t { union afe_enc_config_data enc_blk_config; }; struct afe_enc_aptx_ad_speech_cfg_blk_param_t { uint32_t enc_cfg_blk_size; /* * Size of the encoder configuration block that follows this member */ struct asm_custom_enc_cfg_t custom_cfg; }; /* * Payload of the AVS_DECODER_PARAM_ID_DEC_MEDIA_FMT parameter used by * AVS_MODULE_ID_DECODER. Loading Loading @@ -4589,6 +4644,18 @@ struct avs_dec_congestion_buffer_param_t { */ #define AVS_DECODER_PARAM_ID_DEC_MEDIA_FMT 0x00013232 /* * ID of the parameter used by #AVS_MODULE_ID_DECODER to configure * the decoder mode of adaptive speech and byte swap mode */ #define AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_DEC_INIT 0x0001334D /* * ID of the parameter used by #AVS_MODULE_ID_ENCODER to configure * the encoder mode of adaptive speech and byte swap mode */ #define AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_ENC_INIT 0x0001332B /* ID of the parameter used by #AFE_MODULE_AUDIO_DEV_INTERFACE to configure * the island mode for a given AFE port. */ Loading Loading
asoc/msm-dai-q6-v2.c +46 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ enum { ENC_FMT_APTX_ADAPTIVE = ASM_MEDIA_FMT_APTX_ADAPTIVE, DEC_FMT_APTX_ADAPTIVE = ASM_MEDIA_FMT_APTX_ADAPTIVE, DEC_FMT_MP3 = ASM_MEDIA_FMT_MP3, ENC_FMT_APTX_AD_SPEECH = ASM_MEDIA_FMT_APTX_AD_SPEECH, DEC_FMT_APTX_AD_SPEECH = ASM_MEDIA_FMT_APTX_AD_SPEECH, }; enum { Loading Loading @@ -2833,6 +2835,12 @@ static int msm_dai_q6_afe_enc_cfg_get(struct snd_kcontrol *kcontrol, &dai_data->enc_config.data, sizeof(struct asm_aptx_ad_enc_cfg_t)); break; case ENC_FMT_APTX_AD_SPEECH: memcpy(ucontrol->value.bytes.data + format_size, &dai_data->enc_config.data, sizeof(struct asm_aptx_ad_speech_enc_cfg_t)); break; default: pr_debug("%s: unknown format = %d\n", __func__, dai_data->enc_config.format); Loading Loading @@ -2896,6 +2904,12 @@ static int msm_dai_q6_afe_enc_cfg_put(struct snd_kcontrol *kcontrol, ucontrol->value.bytes.data + format_size, sizeof(struct asm_aptx_ad_enc_cfg_t)); break; case ENC_FMT_APTX_AD_SPEECH: memcpy(&dai_data->enc_config.data, ucontrol->value.bytes.data + format_size, sizeof(struct asm_aptx_ad_speech_enc_cfg_t)); break; default: pr_debug("%s: Ignore enc config for unknown format = %d\n", __func__, dai_data->enc_config.format); Loading Loading @@ -3222,6 +3236,7 @@ static int msm_dai_q6_afe_feedback_dec_cfg_get(struct snd_kcontrol *kcontrol, { struct msm_dai_q6_dai_data *dai_data = kcontrol->private_data; u32 format_size = 0; u32 abr_size = 0; if (!dai_data) { pr_err("%s: Invalid dai data\n", __func__); Loading @@ -3235,10 +3250,25 @@ static int msm_dai_q6_afe_feedback_dec_cfg_get(struct snd_kcontrol *kcontrol, pr_debug("%s: abr_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); abr_size = sizeof(dai_data->dec_config.abr_dec_cfg.imc_info); memcpy(ucontrol->value.bytes.data + format_size, &dai_data->dec_config.abr_dec_cfg, sizeof(struct afe_imc_dec_enc_info)); switch (dai_data->dec_config.format) { case DEC_FMT_APTX_AD_SPEECH: pr_debug("%s: afe_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); memcpy(ucontrol->value.bytes.data + format_size + abr_size, &dai_data->dec_config.data, sizeof(struct asm_aptx_ad_speech_dec_cfg_t)); break; default: pr_debug("%s: no afe_dec_cfg for format %d\n", __func__, dai_data->dec_config.format); break; } return 0; } Loading @@ -3247,6 +3277,7 @@ static int msm_dai_q6_afe_feedback_dec_cfg_put(struct snd_kcontrol *kcontrol, { struct msm_dai_q6_dai_data *dai_data = kcontrol->private_data; u32 format_size = 0; u32 abr_size = 0; if (!dai_data) { pr_err("%s: Invalid dai data\n", __func__); Loading @@ -3262,10 +3293,25 @@ static int msm_dai_q6_afe_feedback_dec_cfg_put(struct snd_kcontrol *kcontrol, pr_debug("%s: abr_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); abr_size = sizeof(dai_data->dec_config.abr_dec_cfg.imc_info); memcpy(&dai_data->dec_config.abr_dec_cfg, ucontrol->value.bytes.data + format_size, sizeof(struct afe_imc_dec_enc_info)); dai_data->dec_config.abr_dec_cfg.is_abr_enabled = true; switch (dai_data->dec_config.format) { case DEC_FMT_APTX_AD_SPEECH: pr_debug("%s: afe_dec_cfg for %d format\n", __func__, dai_data->dec_config.format); memcpy(&dai_data->dec_config.data, ucontrol->value.bytes.data + format_size + abr_size, sizeof(struct asm_aptx_ad_speech_dec_cfg_t)); break; default: pr_debug("%s: no afe_dec_cfg for format %d\n", __func__, dai_data->dec_config.format); break; } return 0; } Loading
asoc/msm-pcm-routing-v2.c +38 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ static struct cal_type_data *cal_data[MAX_ROUTING_CAL_TYPES]; static int fm_switch_enable; static int hfp_switch_enable; static int a2dp_switch_enable; static int sco_switch_enable; static int int0_mi2s_switch_enable; static int int4_mi2s_switch_enable; static int pri_mi2s_switch_enable; Loading Loading @@ -2559,6 +2560,34 @@ static int msm_routing_a2dp_switch_mixer_put(struct snd_kcontrol *kcontrol, return 1; } static int msm_routing_sco_switch_mixer_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { ucontrol->value.integer.value[0] = sco_switch_enable; pr_debug("%s: SCO Switch enable %ld\n", __func__, ucontrol->value.integer.value[0]); return 0; } static int msm_routing_sco_switch_mixer_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dapm_widget *widget = snd_soc_dapm_kcontrol_widget(kcontrol); struct snd_soc_dapm_update *update = NULL; pr_debug("%s: SCO Switch enable %ld\n", __func__, ucontrol->value.integer.value[0]); sco_switch_enable = ucontrol->value.integer.value[0]; if (sco_switch_enable) snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, 1, update); else snd_soc_dapm_mixer_update_power(widget->dapm, kcontrol, 0, update); return 1; } static int msm_routing_get_int0_mi2s_switch_mixer(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { Loading Loading @@ -17592,6 +17621,11 @@ static const struct snd_kcontrol_new a2dp_slim7_switch_mixer_controls = 0, 1, 0, msm_routing_a2dp_switch_mixer_get, msm_routing_a2dp_switch_mixer_put); static const struct snd_kcontrol_new sco_slim7_switch_mixer_controls = SOC_SINGLE_EXT("Switch", SND_SOC_NOPM, 0, 1, 0, msm_routing_sco_switch_mixer_get, msm_routing_sco_switch_mixer_put); static const struct soc_enum lsm_port_enum = SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(lsm_port_text), lsm_port_text); Loading Loading @@ -19736,6 +19770,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { &quat_mi2s_rx_switch_mixer_controls), SND_SOC_DAPM_SWITCH("QUIN_MI2S_RX_DL_HL", SND_SOC_NOPM, 0, 0, &quin_mi2s_rx_switch_mixer_controls), SND_SOC_DAPM_SWITCH("SCO_SLIM7_DL_HL", SND_SOC_NOPM, 0, 0, &sco_slim7_switch_mixer_controls), SND_SOC_DAPM_SWITCH("HFP_PRI_AUX_UL_HL", SND_SOC_NOPM, 0, 0, &hfp_pri_aux_switch_mixer_controls), SND_SOC_DAPM_SWITCH("HFP_AUX_UL_HL", SND_SOC_NOPM, 0, 0, Loading Loading @@ -22806,6 +22842,8 @@ static const struct snd_soc_dapm_route intercon[] = { {"SLIMBUS_4_RX", NULL, "SLIMBUS4_DL_HL"}, {"SLIMBUS6_DL_HL", "Switch", "SLIM0_DL_HL"}, {"SLIMBUS_6_RX", NULL, "SLIMBUS6_DL_HL"}, {"SCO_SLIM7_DL_HL", "Switch", "SLIM7_DL_HL"}, {"SLIMBUS_7_RX", NULL, "SCO_SLIM7_DL_HL"}, {"SLIM0_UL_HL", NULL, "SLIMBUS_0_TX"}, {"SLIM1_UL_HL", NULL, "SLIMBUS_1_TX"}, {"SLIM3_UL_HL", NULL, "SLIMBUS_3_TX"},
dsp/q6afe.c +138 −31 Original line number Diff line number Diff line Loading @@ -91,6 +91,11 @@ enum { APTX_AD_44_1 = 1 }; enum { AFE_MATCHED_PORT_DISABLE, AFE_MATCHED_PORT_ENABLE }; struct wlock { struct wakeup_source ws; }; Loading Loading @@ -3656,6 +3661,8 @@ static int q6afe_send_dec_config(u16 port_id, struct avs_dec_congestion_buffer_param_t dec_buffer_id_param; struct afe_enc_dec_imc_info_param_t imc_info_param; struct afe_port_media_type_t media_type; struct afe_matched_port_t matched_port_param; struct asm_aptx_ad_speech_mode_cfg_t speech_codec_init_param; struct param_hdr_v3 param_hdr; int ret; u32 dec_fmt; Loading @@ -3664,6 +3671,8 @@ static int q6afe_send_dec_config(u16 port_id, memset(&dec_media_fmt, 0, sizeof(dec_media_fmt)); memset(&imc_info_param, 0, sizeof(imc_info_param)); memset(&media_type, 0, sizeof(media_type)); memset(&matched_port_param, 0, sizeof(matched_port_param)); memset(&speech_codec_init_param, 0, sizeof(speech_codec_init_param)); memset(¶m_hdr, 0, sizeof(param_hdr)); param_hdr.module_id = AFE_MODULE_ID_DECODER; Loading Loading @@ -3782,6 +3791,9 @@ static int q6afe_send_dec_config(u16 port_id, break; } /* fall through for abr enabled case */ case ASM_MEDIA_FMT_APTX_AD_SPEECH: media_type.sample_rate = AFE_PORT_SAMPLE_RATE_32K; break; default: media_type.sample_rate = afe_config.slim_sch.sample_rate; Loading @@ -3808,7 +3820,8 @@ static int q6afe_send_dec_config(u16 port_id, } if (format != ASM_MEDIA_FMT_SBC && format != ASM_MEDIA_FMT_AAC_V2 && format != ASM_MEDIA_FMT_APTX_ADAPTIVE) { format != ASM_MEDIA_FMT_APTX_ADAPTIVE && format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s:Unsuppported dec format. Ignore AFE config %u\n", __func__, format); goto exit; Loading @@ -3819,6 +3832,24 @@ static int q6afe_send_dec_config(u16 port_id, pr_debug("%s: Ignore AFE config for abr case\n", __func__); goto exit; } if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s: sending AFE_PARAM_ID_RATE_MATCHED_PORT to DSP payload\n", __func__); param_hdr.param_id = AFE_PARAM_ID_RATE_MATCHED_PORT; param_hdr.param_size = sizeof(struct afe_matched_port_t); matched_port_param.minor_version = AFE_API_VERSION_PORT_MEDIA_TYPE; matched_port_param.enable = AFE_MATCHED_PORT_ENABLE; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &matched_port_param); if (ret) { pr_err("%s: AFE_PARAM_ID_RATE_MATCHED_PORT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } } pr_debug("%s: sending AFE_DECODER_PARAM_ID_DEC_MEDIA_FMT to DSP payload\n", __func__); Loading Loading @@ -3855,6 +3886,26 @@ static int q6afe_send_dec_config(u16 port_id, goto exit; } break; case ASM_MEDIA_FMT_APTX_AD_SPEECH: param_hdr.param_size = sizeof(struct asm_aptx_ad_speech_dec_cfg_t); pr_debug("%s: send AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_DEC_INIT to DSP payload\n", __func__); param_hdr.param_id = AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_DEC_INIT; speech_codec_init_param = cfg->data.aptx_ad_speech_config.speech_mode; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &speech_codec_init_param); if (ret) { pr_err("%s: AVS_DECODER_PARAM_ID_APTX_ADAPTIVE_SPEECH_DEC_INIT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } break; default: pr_debug("%s:No need to send DEC_MEDIA_FMT to DSP payload\n", __func__); Loading @@ -3881,6 +3932,8 @@ static int q6afe_send_enc_config(u16 port_id, struct asm_aac_frame_size_control_t frame_ctl_param; struct afe_port_media_type_t media_type; struct aptx_channel_mode_param_t channel_mode_param; struct afe_matched_port_t matched_port_param; struct asm_aptx_ad_speech_mode_cfg_t speech_codec_init_param; struct param_hdr_v3 param_hdr; int ret; Loading @@ -3895,12 +3948,15 @@ static int q6afe_send_enc_config(u16 port_id, memset(&imc_info_param, 0, sizeof(imc_info_param)); memset(&frame_ctl_param, 0, sizeof(frame_ctl_param)); memset(&media_type, 0, sizeof(media_type)); memset(&matched_port_param, 0, sizeof(matched_port_param)); memset(&speech_codec_init_param, 0, sizeof(speech_codec_init_param)); memset(¶m_hdr, 0, sizeof(param_hdr)); if (format != ASM_MEDIA_FMT_SBC && format != ASM_MEDIA_FMT_AAC_V2 && format != ASM_MEDIA_FMT_APTX && format != ASM_MEDIA_FMT_APTX_HD && format != ASM_MEDIA_FMT_CELT && format != ASM_MEDIA_FMT_LDAC && format != ASM_MEDIA_FMT_APTX_ADAPTIVE) { format != ASM_MEDIA_FMT_APTX_ADAPTIVE && format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_err("%s:Unsuppported enc format. Ignore AFE config\n", __func__); return 0; Loading Loading @@ -3935,6 +3991,9 @@ static int q6afe_send_enc_config(u16 port_id, enc_blk_param.enc_cfg_blk_size = sizeof(enc_blk_param.enc_blk_config) - sizeof(struct asm_aac_frame_size_control_t); } else if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { param_hdr.param_size = sizeof(struct afe_enc_aptx_ad_speech_cfg_blk_param_t); enc_blk_param.enc_cfg_blk_size = sizeof(struct asm_custom_enc_cfg_t); } else { param_hdr.param_size = sizeof(struct afe_enc_cfg_blk_param_t); enc_blk_param.enc_cfg_blk_size = Loading Loading @@ -4016,6 +4075,24 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } } if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s: sending AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_ENC_INIT to DSP\n", __func__); param_hdr.param_id = AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_ENC_INIT; param_hdr.param_size = sizeof(struct asm_aptx_ad_speech_dec_cfg_t); speech_codec_init_param = cfg->aptx_ad_speech_config.speech_mode; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &speech_codec_init_param); if (ret) { pr_err("%s: AFE_ID_APTX_ADAPTIVE_ENC_INIT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } } pr_debug("%s:sending AFE_ENCODER_PARAM_ID_PACKETIZER to DSP\n", __func__); param_hdr.param_id = AFE_ENCODER_PARAM_ID_PACKETIZER_ID; Loading @@ -4031,6 +4108,7 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } if (format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s:sending AFE_ENCODER_PARAM_ID_ENABLE_SCRAMBLING mode= %d to DSP payload\n", __func__, scrambler_mode); param_hdr.param_id = AFE_ENCODER_PARAM_ID_ENABLE_SCRAMBLING; Loading @@ -4045,6 +4123,7 @@ static int q6afe_send_enc_config(u16 port_id, __func__, port_id, ret); goto exit; } } if (format == ASM_MEDIA_FMT_APTX) { pr_debug("%s:sending CAPI_V2_PARAM_ID_APTX_ENC_SWITCH_TO_MONO mode= %d to DSP payload\n", Loading @@ -4065,7 +4144,9 @@ static int q6afe_send_enc_config(u16 port_id, if ((format == ASM_MEDIA_FMT_LDAC && cfg->ldac_config.abr_config.is_abr_enabled) || format == ASM_MEDIA_FMT_APTX_ADAPTIVE) { format == ASM_MEDIA_FMT_APTX_ADAPTIVE || format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { if (format != ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s:sending AFE_ENCODER_PARAM_ID_BIT_RATE_LEVEL_MAP to DSP payload", __func__); param_hdr.param_id = AFE_ENCODER_PARAM_ID_BIT_RATE_LEVEL_MAP; Loading @@ -4082,6 +4163,7 @@ static int q6afe_send_enc_config(u16 port_id, __func__, port_id, ret); goto exit; } } pr_debug("%s: sending AFE_ENCDEC_PARAM_ID_DEC_TO_ENC_COMMUNICATION to DSP payload", __func__); Loading @@ -4092,6 +4174,9 @@ static int q6afe_send_enc_config(u16 port_id, if (format == ASM_MEDIA_FMT_APTX_ADAPTIVE) imc_info_param.imc_info = cfg->aptx_ad_config.abr_cfg.imc_info; else if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) imc_info_param.imc_info = cfg->aptx_ad_speech_config.imc_info; else imc_info_param.imc_info = cfg->ldac_config.abr_config.imc_info; Loading @@ -4117,6 +4202,9 @@ static int q6afe_send_enc_config(u16 port_id, else if (format == ASM_MEDIA_FMT_APTX_ADAPTIVE) media_type.sample_rate = cfg->aptx_ad_config.custom_cfg.sample_rate; else if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) media_type.sample_rate = cfg->aptx_ad_speech_config.custom_cfg.sample_rate; else media_type.sample_rate = afe_config.slim_sch.sample_rate; Loading @@ -4142,6 +4230,25 @@ static int q6afe_send_enc_config(u16 port_id, goto exit; } if (format == ASM_MEDIA_FMT_APTX_AD_SPEECH) { pr_debug("%s: sending AFE_PARAM_ID_RATE_MATCHED_PORT to DSP payload", __func__); param_hdr.param_id = AFE_PARAM_ID_RATE_MATCHED_PORT; param_hdr.param_size = sizeof(struct afe_matched_port_t); matched_port_param.minor_version = AFE_API_VERSION_PORT_MEDIA_TYPE; matched_port_param.enable = AFE_MATCHED_PORT_ENABLE; ret = q6afe_pack_and_set_param_in_band(port_id, q6audio_get_port_index(port_id), param_hdr, (u8 *) &matched_port_param); if (ret) { pr_err("%s: AFE_PARAM_ID_RATE_MATCHED_PORT for port 0x%x failed %d\n", __func__, port_id, ret); goto exit; } } exit: return ret; } Loading
include/dsp/apr_audio-v2.h +67 −0 Original line number Diff line number Diff line Loading @@ -2489,6 +2489,7 @@ struct afe_port_data_cmd_rt_proxy_port_read_v2 { #define AFE_MODULE_AUDIO_DEV_INTERFACE 0x0001020C #define AFE_PORT_SAMPLE_RATE_8K 8000 #define AFE_PORT_SAMPLE_RATE_16K 16000 #define AFE_PORT_SAMPLE_RATE_32K 32000 #define AFE_PORT_SAMPLE_RATE_44_1K 44100 #define AFE_PORT_SAMPLE_RATE_48K 48000 #define AFE_PORT_SAMPLE_RATE_96K 96000 Loading Loading @@ -3911,6 +3912,14 @@ struct afe_id_aptx_adaptive_enc_init */ #define AFE_ENCDEC_PARAM_ID_DEC_TO_ENC_COMMUNICATION 0x0001323D /* * This is needed to be used only for SWB voice call use case. * This is needed to be issued for each direction (RX AFE and TX AFE) * along with AFE_PARAM_ID_PORT_MEDIA_TYPE * (Issuing AF_PARAM_ID_RATE_MATCHED_PORT param alone is not useful). */ #define AFE_PARAM_ID_RATE_MATCHED_PORT 0x000102BE /* * Purpose of IMC set up between encoder and decoder. * Communication instance and purpose together form the Loading Loading @@ -4151,6 +4160,9 @@ struct asm_aac_enc_cfg_t { /* FMT ID for apt-X Adaptive */ #define ASM_MEDIA_FMT_APTX_ADAPTIVE 0x00013204 /* FMT ID for apt-X Adaptive speech */ #define ASM_MEDIA_FMT_APTX_AD_SPEECH 0x00013208 #define PCM_CHANNEL_L 1 #define PCM_CHANNEL_R 2 #define PCM_CHANNEL_C 3 Loading @@ -4167,6 +4179,22 @@ struct asm_custom_enc_cfg_t { uint32_t custom_size; } __packed; struct asm_aptx_ad_speech_mode_cfg_t { uint32_t speech_mode; /* * speech mode of codec. * * @values 0x0(swb), 0x4(sswb) */ uint32_t swapping; /* * byte swapping of codec. * * @values 0x1, enable swapping */ } __packed; struct asm_aptx_v2_enc_cfg_ext_t { /* * sync mode: 0x0 = stereo sync mode (default) Loading @@ -4188,6 +4216,19 @@ struct asm_aptx_ad_enc_cfg_t struct afe_abr_enc_cfg_t abr_cfg; } __attribute__ ((packed)); struct asm_aptx_ad_speech_enc_cfg_t { struct asm_custom_enc_cfg_t custom_cfg; struct afe_imc_dec_enc_info imc_info; struct asm_aptx_ad_speech_mode_cfg_t speech_mode; } __attribute__ ((packed)); struct afe_matched_port_t { uint32_t minor_version; uint32_t enable; } __attribute__ ((packed)); #define ASM_MEDIA_FMT_CELT 0x00013221 struct asm_celt_specific_enc_cfg_t { /* Loading Loading @@ -4464,6 +4505,10 @@ struct asm_aptx_ad_dec_cfg_t { */ } __packed; struct asm_aptx_ad_speech_dec_cfg_t { struct asm_aptx_ad_speech_mode_cfg_t speech_mode; }; union afe_enc_config_data { struct asm_sbc_enc_cfg_t sbc_config; struct asm_aac_enc_cfg_t aac_config; Loading @@ -4472,6 +4517,7 @@ union afe_enc_config_data { struct asm_aptx_enc_cfg_t aptx_config; struct asm_ldac_enc_cfg_t ldac_config; struct asm_aptx_ad_enc_cfg_t aptx_ad_config; struct asm_aptx_ad_speech_enc_cfg_t aptx_ad_speech_config; }; struct afe_enc_config { Loading @@ -4486,6 +4532,7 @@ union afe_dec_config_data { struct asm_aac_dec_cfg_v2_t aac_config; struct asm_mp3_dec_cfg_t mp3_config; struct asm_aptx_ad_dec_cfg_t aptx_ad_config; struct asm_aptx_ad_speech_dec_cfg_t aptx_ad_speech_config; }; struct afe_dec_config { Loading @@ -4502,6 +4549,14 @@ struct afe_enc_cfg_blk_param_t { union afe_enc_config_data enc_blk_config; }; struct afe_enc_aptx_ad_speech_cfg_blk_param_t { uint32_t enc_cfg_blk_size; /* * Size of the encoder configuration block that follows this member */ struct asm_custom_enc_cfg_t custom_cfg; }; /* * Payload of the AVS_DECODER_PARAM_ID_DEC_MEDIA_FMT parameter used by * AVS_MODULE_ID_DECODER. Loading Loading @@ -4589,6 +4644,18 @@ struct avs_dec_congestion_buffer_param_t { */ #define AVS_DECODER_PARAM_ID_DEC_MEDIA_FMT 0x00013232 /* * ID of the parameter used by #AVS_MODULE_ID_DECODER to configure * the decoder mode of adaptive speech and byte swap mode */ #define AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_DEC_INIT 0x0001334D /* * ID of the parameter used by #AVS_MODULE_ID_ENCODER to configure * the encoder mode of adaptive speech and byte swap mode */ #define AVS_DECODER_PARAM_ID_APTX_AD_SPEECH_ENC_INIT 0x0001332B /* ID of the parameter used by #AFE_MODULE_AUDIO_DEV_INTERFACE to configure * the island mode for a given AFE port. */ Loading