Loading configs/sdm660/sound_trigger_mixer_paths_wcd9335.xml +4 −4 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ <ctl name="MADONOFF Switch" value="1" /> <ctl name="TX13 INP MUX" value="CPE_TX_PP" /> <ctl name="AIF4_MAD Mixer SLIM TX13" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="CPE AFE MAD Enable" value="1"/> </path> Loading @@ -111,14 +111,14 @@ <ctl name="CLK MODE" value="INTERNAL" /> <ctl name="EC BUF MUX INP" value="DEC1" /> <ctl name="ADC MUX1" value="DMIC" /> <ctl name="DMIC MUX1" value="DMIC0" /> <ctl name="DMIC MUX1" value="DMIC2" /> </path> <!-- path name used for low bandwidth FTRT codec interface --> <path name="listen-cpe-handset-mic low-speed-intf"> <ctl name="MADONOFF Switch" value="1" /> <ctl name="AIF4_MAD Mixer SLIM TX12" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="CPE AFE MAD Enable" value="1"/> </path> Loading @@ -126,7 +126,7 @@ <ctl name="MAD_BROADCAST Switch" value="1" /> <ctl name="TX13 INP MUX" value="MAD_BRDCST" /> <ctl name="AIF4_MAD Mixer SLIM TX13" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> </path> </mixer> configs/sdm660/sound_trigger_mixer_paths_wcd9340.xml +4 −4 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ </path> <path name="listen-cpe-handset-mic"> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="MAD_SEL MUX" value="SPE" /> <ctl name="MAD_INP MUX" value="MAD" /> <ctl name="MAD_CPE1 Switch" value="1" /> Loading @@ -181,19 +181,19 @@ <ctl name="CLK MODE" value="INTERNAL" /> <ctl name="EC BUF MUX INP" value="DEC1" /> <ctl name="ADC MUX1" value="DMIC" /> <ctl name="DMIC MUX1" value="DMIC0" /> <ctl name="DMIC MUX1" value="DMIC2" /> </path> <!-- path name used for low bandwidth FTRT codec interface --> <path name="listen-cpe-handset-mic low-speed-intf"> <ctl name="MADONOFF Switch" value="1" /> <ctl name="AIF4_MAD Mixer SLIM TX12" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="CPE AFE MAD Enable" value="1"/> </path> <path name="listen-ape-handset-mic"> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="MAD_SEL MUX" value="MSM" /> <ctl name="MAD_INP MUX" value="MAD" /> <ctl name="MAD_BROADCAST Switch" value="1" /> Loading hal/audio_extn/utils.c +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ const struct string_to_enum s_flag_name_to_enum_table[] = { STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_INCALL_MUSIC), #endif STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_TIMESTAMP), STRING_TO_ENUM(AUDIO_INPUT_FLAG_NONE), STRING_TO_ENUM(AUDIO_INPUT_FLAG_FAST), STRING_TO_ENUM(AUDIO_INPUT_FLAG_HW_HOTWORD), Loading hal/audio_hw.c +14 −3 Original line number Diff line number Diff line Loading @@ -2579,9 +2579,12 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) { struct stream_out *out = (struct stream_out *)stream; if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) { if (out->flags & AUDIO_OUTPUT_FLAG_TIMESTAMP) return out->compr_config.fragment_size - sizeof(struct snd_codec_metadata); else return out->compr_config.fragment_size; else if(out->usecase == USECASE_COMPRESS_VOIP_CALL) } else if(out->usecase == USECASE_COMPRESS_VOIP_CALL) return voice_extn_compress_voip_out_get_buffer_size(out); else if (is_offload_usecase(out->usecase) && out->flags == AUDIO_OUTPUT_FLAG_DIRECT) Loading Loading @@ -4097,6 +4100,11 @@ int adev_open_output_stream(struct audio_hw_device *dev, */ if (!audio_extn_passthru_is_passthrough_stream(out)) out->bit_width = AUDIO_OUTPUT_BIT_WIDTH; if (out->flags & AUDIO_OUTPUT_FLAG_TIMESTAMP) out->compr_config.codec->flags |= COMPRESSED_TIMESTAMP_FLAG; ALOGVV("%s : out->compr_config.codec->flags -> (%#x) ", __func__, out->compr_config.codec->flags); /*TODO: Do we need to change it for passthrough */ out->compr_config.codec->format = SND_AUDIOSTREAMFORMAT_RAW; Loading Loading @@ -4159,6 +4167,9 @@ int adev_open_output_stream(struct audio_hw_device *dev, out->compr_config.fragments = COMPRESS_OFFLOAD_NUM_FRAGMENTS; } if (out->flags & AUDIO_OUTPUT_FLAG_TIMESTAMP) { out->compr_config.fragment_size += sizeof(struct snd_codec_metadata); } if (config->offload_info.format == AUDIO_FORMAT_FLAC) out->compr_config.codec->options.flac_dec.sample_size = AUDIO_OUTPUT_BIT_WIDTH; Loading hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ struct stream_out { struct audio_out_start_delay_param delay_param; /*start delay*/ audio_offload_info_t info; qahwi_stream_out_t qahwi_out; }; struct stream_in { Loading Loading
configs/sdm660/sound_trigger_mixer_paths_wcd9335.xml +4 −4 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ <ctl name="MADONOFF Switch" value="1" /> <ctl name="TX13 INP MUX" value="CPE_TX_PP" /> <ctl name="AIF4_MAD Mixer SLIM TX13" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="CPE AFE MAD Enable" value="1"/> </path> Loading @@ -111,14 +111,14 @@ <ctl name="CLK MODE" value="INTERNAL" /> <ctl name="EC BUF MUX INP" value="DEC1" /> <ctl name="ADC MUX1" value="DMIC" /> <ctl name="DMIC MUX1" value="DMIC0" /> <ctl name="DMIC MUX1" value="DMIC2" /> </path> <!-- path name used for low bandwidth FTRT codec interface --> <path name="listen-cpe-handset-mic low-speed-intf"> <ctl name="MADONOFF Switch" value="1" /> <ctl name="AIF4_MAD Mixer SLIM TX12" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="CPE AFE MAD Enable" value="1"/> </path> Loading @@ -126,7 +126,7 @@ <ctl name="MAD_BROADCAST Switch" value="1" /> <ctl name="TX13 INP MUX" value="MAD_BRDCST" /> <ctl name="AIF4_MAD Mixer SLIM TX13" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> </path> </mixer>
configs/sdm660/sound_trigger_mixer_paths_wcd9340.xml +4 −4 Original line number Diff line number Diff line Loading @@ -171,7 +171,7 @@ </path> <path name="listen-cpe-handset-mic"> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="MAD_SEL MUX" value="SPE" /> <ctl name="MAD_INP MUX" value="MAD" /> <ctl name="MAD_CPE1 Switch" value="1" /> Loading @@ -181,19 +181,19 @@ <ctl name="CLK MODE" value="INTERNAL" /> <ctl name="EC BUF MUX INP" value="DEC1" /> <ctl name="ADC MUX1" value="DMIC" /> <ctl name="DMIC MUX1" value="DMIC0" /> <ctl name="DMIC MUX1" value="DMIC2" /> </path> <!-- path name used for low bandwidth FTRT codec interface --> <path name="listen-cpe-handset-mic low-speed-intf"> <ctl name="MADONOFF Switch" value="1" /> <ctl name="AIF4_MAD Mixer SLIM TX12" value="1" /> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="CPE AFE MAD Enable" value="1"/> </path> <path name="listen-ape-handset-mic"> <ctl name="MAD Input" value="DMIC0" /> <ctl name="MAD Input" value="DMIC2" /> <ctl name="MAD_SEL MUX" value="MSM" /> <ctl name="MAD_INP MUX" value="MAD" /> <ctl name="MAD_BROADCAST Switch" value="1" /> Loading
hal/audio_extn/utils.c +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ const struct string_to_enum s_flag_name_to_enum_table[] = { STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_INCALL_MUSIC), #endif STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH), STRING_TO_ENUM(AUDIO_OUTPUT_FLAG_TIMESTAMP), STRING_TO_ENUM(AUDIO_INPUT_FLAG_NONE), STRING_TO_ENUM(AUDIO_INPUT_FLAG_FAST), STRING_TO_ENUM(AUDIO_INPUT_FLAG_HW_HOTWORD), Loading
hal/audio_hw.c +14 −3 Original line number Diff line number Diff line Loading @@ -2579,9 +2579,12 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) { struct stream_out *out = (struct stream_out *)stream; if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) { if (out->flags & AUDIO_OUTPUT_FLAG_TIMESTAMP) return out->compr_config.fragment_size - sizeof(struct snd_codec_metadata); else return out->compr_config.fragment_size; else if(out->usecase == USECASE_COMPRESS_VOIP_CALL) } else if(out->usecase == USECASE_COMPRESS_VOIP_CALL) return voice_extn_compress_voip_out_get_buffer_size(out); else if (is_offload_usecase(out->usecase) && out->flags == AUDIO_OUTPUT_FLAG_DIRECT) Loading Loading @@ -4097,6 +4100,11 @@ int adev_open_output_stream(struct audio_hw_device *dev, */ if (!audio_extn_passthru_is_passthrough_stream(out)) out->bit_width = AUDIO_OUTPUT_BIT_WIDTH; if (out->flags & AUDIO_OUTPUT_FLAG_TIMESTAMP) out->compr_config.codec->flags |= COMPRESSED_TIMESTAMP_FLAG; ALOGVV("%s : out->compr_config.codec->flags -> (%#x) ", __func__, out->compr_config.codec->flags); /*TODO: Do we need to change it for passthrough */ out->compr_config.codec->format = SND_AUDIOSTREAMFORMAT_RAW; Loading Loading @@ -4159,6 +4167,9 @@ int adev_open_output_stream(struct audio_hw_device *dev, out->compr_config.fragments = COMPRESS_OFFLOAD_NUM_FRAGMENTS; } if (out->flags & AUDIO_OUTPUT_FLAG_TIMESTAMP) { out->compr_config.fragment_size += sizeof(struct snd_codec_metadata); } if (config->offload_info.format == AUDIO_FORMAT_FLAC) out->compr_config.codec->options.flac_dec.sample_size = AUDIO_OUTPUT_BIT_WIDTH; Loading
hal/audio_hw.h +1 −0 Original line number Diff line number Diff line Loading @@ -270,6 +270,7 @@ struct stream_out { struct audio_out_start_delay_param delay_param; /*start delay*/ audio_offload_info_t info; qahwi_stream_out_t qahwi_out; }; struct stream_in { Loading