hal: Avoid resampling when hifi audio is enabled
On internal codec, headset and speaker are on the same backend. platform_check_codec_backend_cfg is wrongly setting backend sample rate to 48 KHz when hifi audio is enabled on headset. Avoid resampling to default sample rate for headset when hifi audio is enabled. CRs-Fixed: 2210964 Change-Id: I170729fa286461f8de161fd4485a588a0303dac4
This commit is contained in:
parent
23492249d0
commit
f00a3050b1
|
@ -6081,7 +6081,9 @@ static bool platform_check_codec_backend_cfg(struct audio_device* adev,
|
||||||
* Check if the device is speaker or handset,assumption handset shares
|
* Check if the device is speaker or handset,assumption handset shares
|
||||||
* backend with speaker, and these devices are restricited to 48kHz.
|
* backend with speaker, and these devices are restricited to 48kHz.
|
||||||
*/
|
*/
|
||||||
if (platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device)) {
|
if (platform_check_backends_match(SND_DEVICE_OUT_SPEAKER, snd_device) &&
|
||||||
|
!(codec_device_supports_native_playback(usecase->devices) &&
|
||||||
|
my_data->hifi_audio && !check_hdset_combo_device(snd_device))) {
|
||||||
sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
|
sample_rate = CODEC_BACKEND_DEFAULT_SAMPLE_RATE;
|
||||||
|
|
||||||
if (bit_width >= 24) {
|
if (bit_width >= 24) {
|
||||||
|
|
Loading…
Reference in New Issue