diff --git a/hal/msm8916/platform.c b/hal/msm8916/platform.c index 56d9aec7..c31a8d87 100644 --- a/hal/msm8916/platform.c +++ b/hal/msm8916/platform.c @@ -6777,7 +6777,7 @@ void platform_check_and_update_copp_sample_rate(void* platform, snd_device_t snd *sample_rate = stream_sr; if (snd_device == SND_DEVICE_OUT_HDMI) - *sample_rate = platform_get_supported_sampling_rate_on_hdmi(stream_sr); + *sample_rate = platform_get_supported_copp_sampling_rate(stream_sr); ALOGI("sn_device %d device sr %d stream sr %d copp sr %d", snd_device, device_sr, stream_sr , *sample_rate); @@ -7882,7 +7882,7 @@ int platform_get_max_codec_backend() { return MAX_CODEC_BACKENDS; } -int platform_get_supported_sampling_rate_on_hdmi(uint32_t stream_sr) +int platform_get_supported_copp_sampling_rate(uint32_t stream_sr) { int sample_rate; switch (stream_sr){ diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index bf663555..53dfa434 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -6816,8 +6816,9 @@ void platform_check_and_update_copp_sample_rate(void* platform, snd_device_t snd } else *sample_rate = stream_sr; - if (snd_device == SND_DEVICE_OUT_HDMI) - *sample_rate = platform_get_supported_sampling_rate_on_hdmi(stream_sr); + if ((snd_device == SND_DEVICE_OUT_HDMI) || (snd_device == SND_DEVICE_OUT_DISPLAY_PORT) || + (snd_device == SND_DEVICE_OUT_USB_HEADSET)) + *sample_rate = platform_get_supported_copp_sampling_rate(stream_sr); ALOGI("sn_device %d device sr %d stream sr %d copp sr %d", snd_device, device_sr, stream_sr, *sample_rate); @@ -7627,7 +7628,7 @@ int platform_get_max_codec_backend() { return MAX_CODEC_BACKENDS; } -int platform_get_supported_sampling_rate_on_hdmi(uint32_t stream_sr) +int platform_get_supported_copp_sampling_rate(uint32_t stream_sr) { int sample_rate; switch (stream_sr){ diff --git a/hal/platform_api.h b/hal/platform_api.h index 0674761c..e72c6e93 100644 --- a/hal/platform_api.h +++ b/hal/platform_api.h @@ -184,7 +184,7 @@ void platform_get_device_to_be_id_map(int **be_id_map, int *length); int platform_set_channel_allocation(void *platform, int channel_alloc); int platform_get_edid_info(void *platform); -int platform_get_supported_sampling_rate_on_hdmi(uint32_t stream_sr); +int platform_get_supported_copp_sampling_rate(uint32_t stream_sr); int platform_set_channel_map(void *platform, int ch_count, char *ch_map, int snd_id); int platform_set_stream_channel_map(void *platform, audio_channel_mask_t channel_mask,