blue-debug opened a new pull request, #18348:
URL: https://github.com/apache/nuttx/pull/18348

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   We have enhanced the capabilities of the upper driver, mainly including the 
following features:
   1. Support for multiple applications simultaneously using the upper driver 
for playback/recording;
   2. Support for maintaining a ringbuffer in the upper driver for simultaneous 
access by multiple applications;
   3. Lower driver state management and retrieval;
   4. Support for poll/mmap;
   5. More comprehensive information retrieval via ioctl interfaces.
   
   ## Impact
   
   Affects: audio upper-half driver (playback/recording path).
   Behavior: supports concurrent apps, upper ringbuffer, extra ioctls, state 
management, poll/mmap. Playback now supports multiple instances; recorder 
behavior remains unchanged.
   Compatibility: no breaking API changes expected; existing apps should 
continue to work.
   
   ## Testing
   
   Simulator (NSH, audio_sim). Verified that existing playback/recording flows 
still work.
   
   Steps:
   1. mount hostfs and run `nxrecorder` to record raw audio
   2. run `nxplayer` to play raw audio
   
   Logs (excerpt):
   audio_register: Registering /dev/audio/pcm0p
   audio_register: Registering /dev/audio/pcm0c
   audio_register: Registering /dev/audio/pcm1p
   audio_register: Registering /dev/audio/pcm1c
   audio_register: Registering /dev/audio/mixer
   
   NuttShell (NSH) NuttX-3.6.1
   nsh> mount -t hostfs -o fs=/home/mi/music /music
   nsh> nxrecorder
   ...
   nxrecorder> recordraw /tmp/d_1ch_32bit_44100.pcm 1 16 16000
   ...
   nxrecorder_recordthread: Recording...
   ...
   nxrecorder_recordthread: Record complete.  outstanding=0
   ...
   nsh> nxplayer
   ...
   nxplayer> playraw /music/part_stereo.pcm 2 16 44100
   ...
   nxplayer_playthread: Playing...
   ...
   nxplayer_playthread: Play complete.  outstanding=0
   
   Result: PASS (recording + playback unchanged).
   
   Additional platform coverage:
   - Simulator – Playback/Recording, plus multi-instance playback verified via 
ALSA-lib port on NuttX.
   - BES Platform – Playback/Recording, plus multi-instance playback verified 
via ALSA-lib port on NuttX.
   - Allwinner Platform – Playback/Recording, plus multi-instance playback 
verified via ALSA-lib port on NuttX.
   


-- 
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