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

Skip to content
Commit f7351175 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

CameraHardwareInterface: Reconnect preview in HAL set_buffer_count

Workaround for b/27039775

Some camera device HAL v1 implementations expect that calling
preview_stream_ops->set_buffer_count resets the preview stream's flag
for whether any buffers have been queued up by the camera HAL, allowing
the HAL to dequeue all buffers in the stream again (instead of just its
own buffer count limit, which is lower).

The underlying buffer queue behavior has now changed, and that flag is
no longer reset on a change of buffer count, to support dynamic buffer
queue buffer count features.

To maintain backwards compatibility with HALv1 implementations that rely
on this implicit HAL interface behavior, add a disconnect/connect pair
to the set_buffer_count call, which will reset the dequeue flag, along
with all other preview stream parameters.

To maintain other parameters, cache them when they are originall
set (either by the HAL or by the higher-level camera client), and apply
them again after reconnecting.

Bug: 27039775
Change-Id: I9fa220b356715e7f8e48adc7acdffbfa598c329c
parent 66404133
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment