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

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   Three independent struct extensions in nuttx/audio, each marked as a 
breaking change:
   
   - audio: add a userdata member to struct ap_buffer_s — an application that 
copies its own data blocks into apbs has to find the block again when 
AUDIO_MSG_DEQUEUE hands the apb back. Without a field for it the application 
keeps an apb-to-block table that must match the buffer count and is searched on 
every dequeue. The new userdata pointer is only for the application's use: the 
audio subsystem never reads or writes it, and apb_alloc() clears it.
   - audio: widen ac_chmap to 32 bits — an 8-bit channel map cannot describe a 
device with more than eight channels, such as a microphone array that adds 
digital microphones to the analog ones. ac_chmap becomes uint32_t and the 
unused reserved byte after it is dropped. The in-tree users only assign 
ac_chmap, so they build unchanged.
   - audio: carry frame_samples and extradata in audio_codec_s — a consumer 
that receives encoded data from another core or process cannot work out the 
samples per packet or the codec extradata from the stream itself. frame_samples 
and a fixed 64-byte extradata buffer (AUDIO_CODEC_EXTRADATA_MAX) let the 
encoder report them with the format.
   
   ## Impact
   
   All three change user-visible struct layout; each commit carries its own 
BREAKING CHANGE note with the details:
   
   - struct ap_buffer_s grows by one pointer. No member moves.
   - struct audio_caps_s and struct audio_caps_desc_s change size: every member 
after ac_chmap moves (ac_format from offset 6 to 8), and the reserved member is 
removed.
   - struct audio_codec_s grows by 72 bytes, and so do the structures that 
embed it (audio_caps_s, audio_caps_desc_s, audio_info_s, ap_buffer_s); in 
ap_buffer_s the members after the embedded audio_info_s move.
   
   The kernel and applications including nuttx/audio/audio.h must be rebuilt 
together. No behavior changes otherwise, and the audio documentation describes 
the new userdata member.
   
   ## Testing
   
   - The three commits apply on current master without depending on other 
pending series.
   - sim:alsa (audio enabled) builds and links clean with the new headers; 
checkpatch passes.
   


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