> A driver which keeps private capture counters needs to reset those > counters together with the PCM application's position. The ioctl RESET > path releases the stream lock before core completes the position rebase, > and appl_ptr is updated in a separate post_action. Period processing can > observe the intermediate state. > > Add an optional reset operation whose stream lock remains held through > the core position and appl_ptr updates. Export the common pointer reset > as snd_pcm_lib_reset(), so drivers can reuse pointer validation, time > accounting and XRUN handling without reacquiring the stream lock. > Drivers without the new operation keep their existing ioctl path. > > A successful callback member completes its reset immediately. If a later > linked member fails, the first error is returned and completed members > are not rolled back. Legacy members retain the existing post_action > [ ... ] > a user-visible failure. The new-candidate tests validate the > synchronization contract and recovery paths. > > Assisted-by: LLM > Signed-off-by: Joonho Lee <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=12
