From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: hw pause in USB Date: Tue, 13 Dec 2005 12:14:20 +0100 Message-ID: References: <439E2735.4060700@pianodisc.com> <20051213091651.GA23938@turing.informatik.uni-halle.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <20051213091651.GA23938@turing.informatik.uni-halle.de> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Clemens Ladisch Cc: Steve deRosier , Alsa-Devel List-Id: alsa-devel@alsa-project.org At Tue, 13 Dec 2005 10:16:51 +0100, Clemens Ladisch wrote: > > Steve deRosier wrote: > > When running my player via commandline and pressing pause, I get the > > following error message out of ALSA lib: > > > > ALSA lib pcm_hw.c:535:(snd_pcm_hw_pause) SNDRV_PCM_IOCTL_PAUSE failed: > > Function not implemented > > > > I'm guessing that the USB driver doesn't implement pause. > > Yes. > > > My program implements pause by calling snd_pcm_pause( hPCM, 1 );. > > You cannot call snd_pcm_pause() when the device doesn't support it > (it should have returned an error code). > See snd_pcm_hw_params_can_pause(). > > > * Is there a better way to implement pause in my client program? > > snd_pcm_stop() Heh, it's snd_pcm_drop() in alsa-lib :) snd_pcm_drop() will stop DMA and abandon the whole data on the ring buffer. To restart the stream, you have to call snd_pcm_prepare() and fill the rest data again (and start with snd_pcm_start() if necessary). So, obviously, this procedure isn't "better" than snd_pcm_pause(), but works with all devices as a fallback. Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click