Skip to content

Stop stream flow document #318

Description

@ymodlin

Documentation Issue: Stream Stop Flow in d4xx.c

Summary

Document the complete flow for stopping a video stream in the RealSense D4xx driver (kernel/realsense/d4xx.c).

Motivation

  • Help developers understand how the D4xx driver handles stream shutdown and resource cleanup.
  • Enable easier debugging, extension, and maintenance of the stop logic.
  • Provide a reference for integration with other components and for hardware bring-down.

Tasks

  1. Introduction
    • Briefly describe the purpose and context of the stream stop flow.
  2. High Level Design
    • Summarize the major steps and components involved in stopping a stream.
    • Use a Mermaid diagram to visualize the flow from user-space request to hardware deactivation.
  3. Low Level Design
    • Detail the key functions, data structures, and kernel interactions in d4xx.c.
    • Reference specific code regions and configuration points.
    • Document error handling and edge cases.
  4. Integration Points
    • Note interactions with device tree, kernel modules, and user-space APIs.

Example Mermaid Diagram

sequenceDiagram
    participant User
    participant V4L2
    participant D4xx Driver
    participant Hardware
    User->>V4L2: Close video device / VIDIOC_STREAMOFF ioctl
    V4L2->>D4xx Driver: Request stream stop
    D4xx Driver->>Hardware: Stop and cleanup stream
    Hardware-->>D4xx Driver: Stream stopped
    D4xx Driver-->>V4L2: Notify stream stopped
    V4L2-->>User: Stream closed
Loading

References

  • kernel/realsense/d4xx.c
  • Device tree overlays in hardware/realsense/
  • V4L2 API documentation

Feedback Requested:
Please specify any missing details, edge cases, or integration points that should be covered in the documentation.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions