casaroli opened a new pull request, #20507: URL: https://github.com/apache/nuttx/pull/20507
## Summary With `CONFIG_AUDIO_MULTI_SESSION`, `audio_pause()` and `audio_resume()` take a session argument. Two internal calls in `audio/audio.c` do not pass it: `audio_start()` when it resumes a paused device, and `audio_stop()` when it pauses the device. So `audio.c` does not compile, and the option cannot be used. This change passes the session, with the same `#ifdef` that the ioctl handler uses for the same calls. The first commit fixes older nxstyle errors in `audio.c`, because CI checks every file that a change touches. It changes whitespace only. ## Impact Only builds with `CONFIG_AUDIO_MULTI_SESSION`, which did not compile before. Other builds do not change. ## Testing `sim:nsh` with `AUDIO`, `AUDIO_MULTI_SESSION` and `AUDIO_NULL` (`SIM_SOUND` off, because the sim sound driver needs Linux ALSA). Before: ``` audio.c:612:32: error: too few arguments to function call, expected 2, have 1 audio.c:694:30: error: too few arguments to function call, expected 2, have 1 ``` After, the build passes. A local test app (not part of this PR) on the null audio device runs the two changed paths: `AUDIOIOC_START` on a paused device resumes it, and `AUDIOIOC_STOP` while another open is paused pauses the device. State 5 is running, 2 is paused: ``` audiomstest: fd3 AUDIOIOC_PAUSE ret=0 errno=0 -> state 2 audiomstest: fd3 AUDIOIOC_START ret=0 errno=0 -> state 5 audiomstest: fd4 AUDIOIOC_PAUSE ret=0 errno=0 -> state 5 audiomstest: fd3 AUDIOIOC_STOP ret=0 errno=0 -> state 2 ``` `tools/checkpatch.sh -c -u -m -g` 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]
