Skip to content

Conversation

@ym
Copy link
Contributor

@ym ym commented Oct 15, 2025

No description provided.

@ym ym requested review from adamshiervani and chemhack October 15, 2025 18:43
@adamshiervani adamshiervani linked an issue Oct 16, 2025 that may be closed by this pull request
1 task
Implemented a new feature to enable or disable HDMI sleep mode, allowing users to reduce power consumption when the device is not in use. Added state management for the power saving setting and integrated it with the existing settings page.
ym and others added 5 commits October 17, 2025 14:55
V4L2 buffers were not explicitly freed before closing the device, causing VIDIOC_S_FMT to fail with EBUSY on restart. Added  VIDIOC_REQBUFS(count=0) call in cleanup to free buffer queue synchronously before close().

This ensures subsequent opens can set format immediately without EBUSY errors, eliminating 100ms+ retry delays.
@CLAassistant
Copy link

CLAassistant commented Oct 17, 2025

CLA assistant check
All committers have signed the CLA.

@adamshiervani adamshiervani merged commit 2444817 into dev Oct 17, 2025
3 checks passed
@adamshiervani adamshiervani deleted the fix/hdmi-sleep-mode branch October 17, 2025 15:51
ym added a commit that referenced this pull request Oct 17, 2025
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
ym added a commit that referenced this pull request Oct 17, 2025
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
Copy link
Contributor

@IDisposable IDisposable left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this already merged, but I had a couple questions/comments

// it's used to ensure that only one change is made to the video stream at a time.
// as the change usually requires to restart video streaming
// TODO: check video streaming status instead of using a hardcoded timeout
func (n *Native) useExtraLock(fn func() error) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this queuing-up be better handled by pushing the change into a channel to be handled inside a go-routine that serves up the changes in-order?


uint32_t detected_width, detected_height;
bool detected_signal = false, streaming_flag = false;
bool detected_signal = false, streaming_flag = false, streaming_stopped = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we declare streaming_stopped as volatile so the compiler knows that another thread might be mucking with them? (streaming_flag is protected by mutex, so should be fine, but wouldn't hurt to declare it volatile as well?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EDID unable to survive a JetKVM reboot

7 participants