From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] pcm: Don't store the state for SND_PCM_STATE_SUSPENDED Date: Wed, 01 Jun 2016 07:15:34 +0200 Message-ID: References: <1462866346-11878-1-git-send-email-shengjiu.wang@freescale.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id ED76326523B for ; Wed, 1 Jun 2016 07:15:34 +0200 (CEST) In-Reply-To: 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: Shengjiu Wang Cc: "alsa-devel@alsa-project.org" List-Id: alsa-devel@alsa-project.org On Wed, 01 Jun 2016 05:10:41 +0200, Shengjiu Wang wrote: > > I test this patch, it is ok. But I have some questions. > > 1. Why do you add snd_pcm_drop()? It seems only adding snd_pcm_resume(spcm) > can fix this issue also. The point is, that dmix *cannot* support resume by design. It's very same as dmix can't support pause, too. The multiple streams on the same slave can't be paused and restarted individually. In ALSA scheme, the resume is triggered explicitly by app, not automatically done in the driver. Now imagine two streams running on dmix. The first stream resumes the slave, and both streams are resumed. Then, what is the state of the second stream? It should have been still suspended, but now it is running secretly. > 2. Does the snd_pcm_drop cause some several period data be dropped? Yes. Very much same as others. > 3. The return values -ENOSYS, always cause error print "Failed. Restarting > stream." in aplay. Can it be fixed? No, this is the expected behavior. It's no error. Takashi