From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Sakamoto Subject: Re: Question about device recovery when under/over run error case Date: Tue, 19 Jan 2016 10:15:33 +0900 Message-ID: <569D8E35.4010306@sakamocchi.jp> References: <87twmbfqio.wl%kuninori.morimoto.gx@renesas.com> <569C7215.2000801@sakamocchi.jp> <87si1vfmv6.wl%kuninori.morimoto.gx@renesas.com> <87vb6q4ev2.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp310.phy.lolipop.jp (smtp310.phy.lolipop.jp [210.157.22.78]) by alsa0.perex.cz (Postfix) with ESMTP id 46CBA2604D6 for ; Tue, 19 Jan 2016 02:15:38 +0100 (CET) In-Reply-To: <87vb6q4ev2.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Kuninori Morimoto , Takashi Iwai Cc: Linux-ALSA , shiiba , Liam Girdwood , komatsu , Mark Brown , Hiroyuki Yokoyama List-Id: alsa-devel@alsa-project.org Hi, On Jan 19 2016 09:04, Kuninori Morimoto wrote: >>>> Userspace can get to know the XRUN state by calling some APIs. Then, >>>> it can recover PCM substream by executing SNDRV_PCM_IOCTL_PREPARE >>>> ioctl. >>> >>> I think we can use snd_pcm_stop_xrun() for this purpose. >> >> Right. But beware of locking by this function. Unlike snd_pcm_stop() >> this function takes the stream lock by itself. > > Thanks ! > I see. I will investigate it. The 'lock' is what I mentioned in former message to you: [alsa-devel] Can I stop sound from driver as system error ? http://mailman.alsa-project.org/pipermail/alsa-devel/2015-December/102010.html Regards Takashi Sakamoto