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

Commit cf711482 authored by Henri Chataing's avatar Henri Chataing
Browse files

[MTK] [CONVERGENCE] [ALPS07745105] Fix SWT when switch codec

[Detail] When switch codec, BT hal will calculate the
elapsed time since last out_write to sleep. If don't
set default value to last_write_time_us_, it may get
a wrong time to sleep for a long time in out_write.
It will cause Auidofinger work wrong.

[Solution] Set default value to last_write_time_us_

Bug: 328847539
Fix: 328847539
Test: m com.android.btservices
Flag: EXEMPT, minor bug fix
Change-Id: I323586ab5fc207980f8c36b336d2ebc5b4c65b00
parent a8eeda6c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -775,6 +775,7 @@ int adev_open_output_stream(struct audio_hw_device* dev, audio_io_handle_t /*han

  out->frames_rendered_ = 0;
  out->frames_presented_ = 0;
  out->last_write_time_us_ = 0;

  BluetoothStreamOut* out_ptr = out.release();
  {