hal: Correct voice_conc check and compr cfg channel mask update
- Correct conditional check of DSP decoder availability.
- Update compress config structure with out stream channel mask
instead of config channel mask. Compress open fails when hal is
used standalone where client is updating compress config channel
mask instead of config channel mask and config channel mask has
invalid value.
CRs-Fixed: 1044635
Change-Id: I9d48c875bc1fe6bade710af58e2f0207956166d6
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 870012b..65c285f 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -3764,7 +3764,7 @@
out->compr_config.codec->bit_rate =
config->offload_info.bit_rate;
out->compr_config.codec->ch_in =
- audio_channel_count_from_out_mask(config->channel_mask);
+ audio_channel_count_from_out_mask(out->channel_mask);
out->compr_config.codec->ch_out = out->compr_config.codec->ch_in;
out->bit_width = AUDIO_OUTPUT_BIT_WIDTH;
/*TODO: Do we need to change it for passthrough */
diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c
index 9b7616e..c8e3a3b 100644
--- a/hal/msm8916/platform.c
+++ b/hal/msm8916/platform.c
@@ -3817,8 +3817,8 @@
!strncmp("true", propValue, 4);
}
- if (prop_playback_enabled && (voice_is_in_call(my_data->adev) ||
- (SND_CARD_STATE_OFFLINE == get_snd_card_state(my_data->adev)))) {
+ if ((prop_playback_enabled && (voice_is_in_call(my_data->adev))) ||
+ (SND_CARD_STATE_OFFLINE == get_snd_card_state(my_data->adev))) {
char *decoder_mime_type = value;
//check if unsupported mime type or not
diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c
index 7d8d5c7..e2adc3e 100644
--- a/hal/msm8974/platform.c
+++ b/hal/msm8974/platform.c
@@ -3886,8 +3886,8 @@
!strncmp("true", propValue, 4);
}
- if (prop_playback_enabled && (voice_is_in_call(my_data->adev) ||
- (SND_CARD_STATE_OFFLINE == get_snd_card_state(my_data->adev)))) {
+ if ((prop_playback_enabled && (voice_is_in_call(my_data->adev))) ||
+ (SND_CARD_STATE_OFFLINE == get_snd_card_state(my_data->adev))) {
char *decoder_mime_type = value;
//check if unsupported mime type or not