From: Joshua Haberman <joshua@haberman.com>
To: alsa-devel@lists.sourceforge.net
Subject: snd_pcm_start fails
Date: Thu, 4 Jul 2002 15:06:31 -0700 [thread overview]
Message-ID: <20020704220631.GA23530@reverberate.org> (raw)
I am stumped. This short and simple program fails for me:
---
#include <alsa/asoundlib.h>
#include <assert.h>
#define NOFAIL == 0 || (assert(0), 1)
int main() {
snd_pcm_t *playback_handle;
snd_pcm_hw_params_t *hw_params;
snd_output_t *debug;
snd_output_stdio_attach(&debug, stdout, 0) NOFAIL;
/* I have tried both hw:0 and plughw:0 */
snd_pcm_open( &playback_handle, "hw:0", SND_PCM_STREAM_PLAYBACK, 0) NOFAIL;
snd_pcm_hw_params_malloc( &hw_params ) NOFAIL;
snd_pcm_hw_params_any( playback_handle, hw_params ) NOFAIL;
snd_pcm_hw_params_set_access( playback_handle, hw_params, SND_PCM_ACCESS_MMAP_INTERLEAVED ) NOFAIL;
snd_pcm_hw_params_set_format( playback_handle, hw_params,SND_PCM_FORMAT_S16 ) NOFAIL;
snd_pcm_hw_params_set_rate( playback_handle, hw_params, 44100, 0 ) NOFAIL;
snd_pcm_hw_params_set_channels( playback_handle, hw_params, 2 ) NOFAIL;
snd_pcm_hw_params_set_period_size( playback_handle, hw_params, 2048, 0 ) NOFAIL;
snd_pcm_hw_params( playback_handle, hw_params ) NOFAIL;
snd_pcm_prepare( playback_handle ) NOFAIL;
snd_pcm_dump( playback_handle, debug );
snd_pcm_start( playback_handle ) NOFAIL;
}
---
Everything seems to be in good shape up until the call to snd_pcm_start,
but then the snd_pcm_start fails. Here is the output:
---
Hardware PCM card 0 'Sound Blaster Live!' device 0 subdevice -1
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 16384
period_size : 2048
period_time : 46439
tick_time : 10000
tstamp_mode : NONE
period_step : 1
sleep_min : 0
avail_min : 2048
xfer_align : 2048
start_threshold : 1
stop_threshold : 16384
silence_threshold: 0
silence_size : 0
boundary : 1073741824
ALSA lib pcm_hw.c:384:(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed: Broken pipe
display: display.c:29: main: Assertion `0' failed.
Aborted
---
Any ideas?? This is ALSA 0.9.0rc1, kernel 2.4.17, emu10k1 as you can
see. Other ALSA apps such as alsaplayer and JACK work fine.
Josh
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Caffeinated soap. No kidding.
http://thinkgeek.com/sf
next reply other threads:[~2002-07-04 22:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-04 22:06 Joshua Haberman [this message]
2002-07-04 22:27 ` snd_pcm_start fails Joshua Haberman
2002-07-05 15:49 ` Paul Davis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020704220631.GA23530@reverberate.org \
--to=joshua@haberman.com \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.