Loading hal/audio_extn/utils.c +6 −5 Original line number Diff line number Diff line Loading @@ -704,13 +704,14 @@ void audio_extn_utils_update_stream_output_app_type_cfg(void *platform, struct stream_format *sf_info; char value[PROPERTY_VALUE_MAX] = {0}; if ((bit_width >= 24) && (devices & AUDIO_DEVICE_OUT_SPEAKER)) { int32_t bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); if (-ENOSYS != bw) if (devices & AUDIO_DEVICE_OUT_SPEAKER) { int bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); if ((-ENOSYS != bw) && (bit_width > (uint32_t)bw)) bit_width = (uint32_t)bw; else if (-ENOSYS == bw) bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH; sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE; ALOGI("%s Allowing 24-bit playback on speaker ONLY at default sampling rate", __func__); ALOGI("%s Allowing 24 and above bits playback on speaker ONLY at default sampling rate", __func__); } property_get("vendor.audio.playback.mch.downsample",value,""); Loading hal/msm8974/platform.c 100755 → 100644 +7 −4 Original line number Diff line number Diff line Loading @@ -6267,11 +6267,14 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev, * backend with speaker, and these devices are restricited to 48kHz. */ if (platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device)) { if (bit_width >= 24) { bit_width = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); int bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); if ((-ENOSYS != bw) && (bit_width > (uint32_t)bw)) { bit_width = (uint32_t)bw; ALOGD("%s:becf: afe: reset bitwidth to %d (based on supported" " value for this platform)", __func__, bit_width); } else if (-ENOSYS == bw) { bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH; ALOGD("%s:becf: afe: reset to default bitwidth %d", __func__, bit_width); } sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE; ALOGD("%s:becf: afe: playback on codec device not supporting native playback set " Loading Loading
hal/audio_extn/utils.c +6 −5 Original line number Diff line number Diff line Loading @@ -704,13 +704,14 @@ void audio_extn_utils_update_stream_output_app_type_cfg(void *platform, struct stream_format *sf_info; char value[PROPERTY_VALUE_MAX] = {0}; if ((bit_width >= 24) && (devices & AUDIO_DEVICE_OUT_SPEAKER)) { int32_t bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); if (-ENOSYS != bw) if (devices & AUDIO_DEVICE_OUT_SPEAKER) { int bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); if ((-ENOSYS != bw) && (bit_width > (uint32_t)bw)) bit_width = (uint32_t)bw; else if (-ENOSYS == bw) bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH; sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE; ALOGI("%s Allowing 24-bit playback on speaker ONLY at default sampling rate", __func__); ALOGI("%s Allowing 24 and above bits playback on speaker ONLY at default sampling rate", __func__); } property_get("vendor.audio.playback.mch.downsample",value,""); Loading
hal/msm8974/platform.c 100755 → 100644 +7 −4 Original line number Diff line number Diff line Loading @@ -6267,11 +6267,14 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev, * backend with speaker, and these devices are restricited to 48kHz. */ if (platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device)) { if (bit_width >= 24) { bit_width = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); int bw = platform_get_snd_device_bit_width(SND_DEVICE_OUT_SPEAKER); if ((-ENOSYS != bw) && (bit_width > (uint32_t)bw)) { bit_width = (uint32_t)bw; ALOGD("%s:becf: afe: reset bitwidth to %d (based on supported" " value for this platform)", __func__, bit_width); } else if (-ENOSYS == bw) { bit_width = CODEC_BACKEND_DEFAULT_BIT_WIDTH; ALOGD("%s:becf: afe: reset to default bitwidth %d", __func__, bit_width); } sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE; ALOGD("%s:becf: afe: playback on codec device not supporting native playback set " Loading