blues-fun opened a new pull request, #21798:
URL: https://github.com/apache/nuttx/pull/21798

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   * Why change is necessary: a library that drives an audio device through its 
file descriptor alone has to create a named message queue of its own just to 
receive events, and an application cannot query a driver parameter that it can 
already set.  The pending codec libraries need both.
   * What functional part of the code is being changed: the audio upper half 
(audio/audio.c), include/nuttx/audio/audio.h and Documentation/os/audio.
   * How the change exactly work:
     * AUDIOIOC_REGISTERMQ accepts AUDIO_MQ_KERNEL: the upper half creates the 
queue for that open file and removes it on AUDIOIOC_UNREGISTERMQ or close(), so 
a library can drive the device through its file descriptor alone.  Events are 
read with the new AUDIOIOC_RECEIVEMSG or with poll().  The application-supplied 
queue path is unchanged.
     * AUDIOIOC_GETPARAMTER is the read counterpart of AUDIOIOC_SETPARAMTER and 
returns any driver parameter as a key=value string.  Like AUDIOIOC_SETPARAMTER, 
the upper half passes it to the lower half unchanged.
     * Documentation/os/audio/index.rst describes AUDIO_MQ_KERNEL, 
AUDIOIOC_RECEIVEMSG and its poll() behaviour, and the AUDIOIOC_SETPARAMTER / 
AUDIOIOC_GETPARAMTER pair.
   
   Commits (3):
   
   * audio: let the upper half own a message queue per open file
   * audio: add AUDIOIOC_GETPARAMTER
   * Documentation/audio: describe AUDIO_MQ_KERNEL and AUDIOIOC_GETPARAMTER
   
   ## Impact
   
   * Is new feature added? Is existing feature changed? YES — AUDIO_MQ_KERNEL, 
AUDIOIOC_RECEIVEMSG, AUDIOIOC_GETPARAMTER and their documentation; purely 
additive.
   * Impact on user (will user need to adapt to change)? NO — the 
application-supplied queue path is unchanged; the new ioctls are opt-in.
   * Impact on build (will build process change)? NO.
   * Impact on hardware (will arch(s) / board(s) / driver(s) change)? NO.
   * Impact on documentation (is update required / provided)? YES — provided in 
Documentation/os/audio.
   * Impact on security (any sort of implications)? NO.
   * Impact on compatibility (backward/forward/interoperability)? NO.
   
   ## Testing
   
   I confirm that changes are verified on local setup and works as intended:
   
   * Build Host(s): Linux x86_64.
   * Target(s): sim:alsa with CONFIG_AUDIO_FAKE (64-bit, SIM_M32 off) — the 
split branch builds and links clean, and checkpatch passes (run on this branch 
alone).
   * As part of the split series: sim with the audio_fake playback/capture 
devices — nxplayer playraw and nxrecorder recordraw run clean against the new 
upper half (in.pcm is 2ch/16bit/48kHz), and the series was verified on BES 
platform (Cortex-M55) real hardware.  These runs exercised the series as a 
whole, not this branch alone.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to