Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17051138 authored by Gaurav Asati's avatar Gaurav Asati
Browse files

Bluetooth: Set sampling rate.

Set audio sample rate to 8k for CVSD and
16k for mSBC.

CRs-Fixed: 582484

Change-Id: I769746d7adcd32111092f95a97bdee03a8ca690e
parent b5ff6942
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1990,6 +1990,15 @@ final class HandsfreeClientStateMachine extends StateMachine {
                         mAudioManager.setMode(newAudioMode);
                    }
                    Log.d(TAG,"hfp_enable=true");
                    Log.d(TAG,"mAudioWbs is " + mAudioWbs);
                    if (mAudioWbs) {
                        Log.d(TAG,"Setting sampling rate as 16000");
                        mAudioManager.setParameters("hfp_set_sampling_rate=16000");
                    }
                    else {
                        Log.d(TAG,"Setting sampling rate as 8000");
                        mAudioManager.setParameters("hfp_set_sampling_rate=8000");
                    }
                    mAudioManager.setParameters("hfp_enable=true");
                    broadcastAudioState(device, BluetoothHandsfreeClient.STATE_AUDIO_CONNECTED,
                            BluetoothHandsfreeClient.STATE_AUDIO_CONNECTING);