Skip to content

Propose dmsai dmdrvi device interface and port stubs - #3

Merged
JohnAmadis merged 5 commits into
mainfrom
feature/generic-sai-interface
Oct 8, 2026
Merged

JohnAmadis merged 5 commits into
mainfrom
feature/generic-sai-interface

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Propose dmsai as a dmdrvi 2.0 DIF, discovered by dmdevfs from driver_name=dmsai, following dmeth's device model.
  • Define portable PCM/configuration types and device-specific ioctl commands; applications use /dev/dmsaiN with ordinary read/write.
  • Add buildable -ENOSYS core/port stubs. The core create stub returns NULL, so no device node or audio functionality is claimed yet.
  • Put STM32 port entry points in stm32_common and keep the STM32F7 file for family lifecycle and future IRQ glue.
  • Document the proposed INI and file API usage in README; preserve both README badges, the Makefile and all test sources.
  • Add packaged board INI files for STM32F746G-DISCO and STM32F769I-DISCOVERY and pin-agnostic MCU defaults for STM32F746NG and STM32F769NI. Pin mappings follow ST BSP audio headers.
  • Include the dmsai_port.dmr file in its own package, as required by the DMOD resource format.

Research basis

dmdevfs resolves dmdrvi_create from the driver's DIF and exposes the returned device context as a node. dmeth uses that path and reserves private controls from DMDRVI_IOCTL_CUSTOM_BASE; dmdrvi has no generic audio command set today. This proposal follows those local contracts.

Verification

  • Configured with the local DMOD SDK for stm32f7.
  • Built dmsai, dmsai_port, and the existing test_dmsai target; packages generated successfully.
  • git diff --check passed. Final PR diff does not include Makefile or tests/ changes.
  • Parsed all new INI files, checked unique GPIO pins and required device keys, and verified both DMR packages include their metadata and configuration resources.

The Cortex-M7 test module cannot execute through the Raspberry Pi AArch64 loader, so the test is compiled but not run on this host.

@JohnAmadis
JohnAmadis self-requested a review October 8, 2026 09:18
@JaxCalder JaxCalder changed the title Propose generic dmsai API and buildable port stubs Propose dmsai dmdrvi device interface and port stubs Oct 8, 2026

@JohnAmadis JohnAmadis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

dodaj jeszcze pliki konfiguracyjne ini dla boardow i mcu

Comment thread README.md
@@ -1,98 +1,116 @@
# dmsai

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

czemu usunales te plakietki z ci i licencja?

Comment thread dmsai_port.dmr
dmfc=./${module}.dmfc => ${destination}/${module}.dmfc [origin=${build_dir}/dmfc/${module}.dmfc]
dmd=./${module}.dmd => ${destination}/${module}.dmd [origin=${dmf_dir}/${module}.dmd]
version=./${module}_version.txt => ${destination}/${module}_version.txt [origin=${dmf_dir}/${module}_version.txt]
inc=./include => ${destination}/${module}/include [origin=${repo_dir}/include] [origin=${build_dir}/src/port/${module}_defs.h]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pliki dmr musza wskazywac rowniez na siebie same

@JohnAmadis
JohnAmadis merged commit 4f84e06 into main Oct 8, 2026
3 checks passed
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.

2 participants