hal: Configure correct COPP sample rate for USB and HDMI devices.
-In case of playback over HDMI/USB, the device might not support
the same sample rate as of the stream, though it is preferred that
resampling happens after post processing, but if device sample rate
is not even a multiple of stream sample rate, ensure that resampling
happens in the COPP.
Change-Id: Ia8cdff5294433ec099b703001d11da905bf82c9b
diff --git a/hal/platform_api.h b/hal/platform_api.h
index 61f42de..a12f865 100644
--- a/hal/platform_api.h
+++ b/hal/platform_api.h
@@ -25,7 +25,9 @@
#define CODEC_BACKEND_DEFAULT_SAMPLE_RATE 48000
#define CODEC_BACKEND_DEFAULT_CHANNELS 2
#define CODEC_BACKEND_DEFAULT_TX_CHANNELS 1
-
+#define SAMPLE_RATE_8000 8000
+#define SAMPLE_RATE_11025 11025
+#define sample_rate_multiple(sr, base) ((sr % base)== 0?true:false)
enum {
NATIVE_AUDIO_MODE_SRC = 1,
@@ -187,4 +189,6 @@
unsigned char* platform_get_license(void* platform, int* size);
int platform_get_max_mic_count(void *platform);
+void platform_check_and_update_copp_sample_rate(void *platform, snd_device_t snd_device,
+ unsigned int stream_sr,int *sample_rate);
#endif // AUDIO_PLATFORM_API_H