Add compatibility with cm

This commit merges 3 commits :-
https://github.com/armani-dev/android_hardware_qcom_media-caf-legacy/commit/14694b293a2c292d2d8cbf150895f3c40accd213
https://github.com/armani-dev/android_hardware_qcom_media-caf-legacy/commit/fe7f6aad2210480eeb5d891365adf8607e1d4727
https://github.com/armani-dev/android_hardware_qcom_media-caf-legacy/commit/4b541a4f1e53a1ce87572b6f090767155cec97f3
Thanks to Kra1o5 and fefifofum