apps/nxplayer: add ioctl stop when play completed

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
This commit is contained in:
jinxiuxu 2024-02-27 15:14:13 +08:00 committed by Xiang Xiao
parent 9bfe138087
commit 8ebab7657f

View File

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