This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 8ebab7657 apps/nxplayer: add ioctl stop when play completed
8ebab7657 is described below
commit 8ebab7657f3394984a748d26413c338417ffbe09
Author: jinxiuxu <[email protected]>
AuthorDate: Tue Feb 27 15:14:13 2024 +0800
apps/nxplayer: add ioctl stop when play completed
Signed-off-by: jinxiuxu <[email protected]>
---
system/nxplayer/nxplayer.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c
index a0d10e590..1221935b7 100644
--- a/system/nxplayer/nxplayer.c
+++ b/system/nxplayer/nxplayer.c
@@ -1121,6 +1121,13 @@ static FAR void *nxplayer_playthread(pthread_addr_t
pvarg)
audinfo("Play complete. outstanding=%d\n", outstanding);
DEBUGASSERT(outstanding == 0);
#endif
+
+#ifdef CONFIG_AUDIO_MULTI_SESSION
+ ioctl(pplayer->dev_fd, AUDIOIOC_STOP,
+ (unsigned long)pplayer->session);
+#else
+ ioctl(pplayer->dev_fd, AUDIOIOC_STOP, 0);
+#endif
running = false;
break;