Home | History | Annotate | Download | only in audio

Lines Matching refs:err

173 static void GCC_FMT_ATTR (2, 3) alsa_logerr (int err, const char *fmt, ...)
181 AUD_log (AUDIO_CAP, "Reason: %s\n", FF(snd_strerror) (err));
185 int err,
199 AUD_log (AUDIO_CAP, "Reason: %s\n", FF(snd_strerror) (err));
220 int err = FF(snd_pcm_close) (*handlep);
221 if (err) {
222 alsa_logerr (err, "Failed to close PCM handle %p\n", *handlep);
235 int err = FF(snd_pcm_prepare) (handle);
236 if (err < 0) {
237 alsa_logerr (err, "Failed to prepare handle %p\n", handle);
245 int err = FF(snd_pcm_resume) (handle);
246 if (err < 0) {
247 alsa_logerr (err, "Failed to resume handle %p\n", handle);
255 int err, count;
272 err = FF(snd_pcm_poll_descriptors_revents) (hlp->handle, hlp->pfds,
274 if (err < 0) {
275 alsa_logerr (err, "snd_pcm_poll_descriptors_revents");
315 int i, count, err;
331 err = FF(snd_pcm_poll_descriptors) (handle, pfds, count);
332 if (err < 0) {
333 alsa_logerr (err, "Could not initialize poll mode\n"
341 err = qemu_set_fd_handler (pfds[i].fd, alsa_poll_handler,
348 err = qemu_set_fd_handler (pfds[i].fd, NULL,
352 dolog ("Set handler events=%#x index=%d fd=%d err=%d\n",
353 pfds[i].events, i, pfds[i].fd, err);
356 if (err) {
357 dolog ("Failed to set handler events=%#x index=%d fd=%d err=%d\n",
358 pfds[i].events, i, pfds[i].fd, err);
502 int err;
507 err = FF(snd_pcm_sw_params_current) (handle, sw_params);
508 if (err < 0) {
510 alsa_logerr (err, "Failed to get current software parameters\n");
514 err = FF(snd_pcm_sw_params_set_start_threshold) (handle, sw_params, threshold);
515 if (err < 0) {
517 alsa_logerr (err, "Failed to set software threshold to %ld\n",
522 err = FF(snd_pcm_sw_params) (handle, sw_params);
523 if (err < 0) {
525 alsa_logerr (err
535 int err;
549 err = FF(snd_pcm_open) (
555 if (err < 0) {
556 alsa_logerr2 (err, typ, "Failed to open `%s':\n", pcm_name);
560 err = FF(snd_pcm_hw_params_any) (handle, hw_params);
561 if (err < 0) {
562 alsa_logerr2 (err, typ, "Failed to initialize hardware parameters\n");
563 goto err;
566 err = FF(snd_pcm_hw_params_set_access) (
571 if (err < 0) {
572 alsa_logerr2 (err, typ, "Failed to set access type\n");
573 goto err;
576 err = FF(snd_pcm_hw_params_set_format) (handle, hw_params, req->fmt);
577 if (err < 0 && conf.verbose) {
578 alsa_logerr2 (err, typ, "Failed to set format %d\n", req->fmt);
579 goto err;
582 err = FF(snd_pcm_hw_params_set_rate_near) (handle, hw_params, &freq, 0);
583 if (err < 0) {
584 alsa_logerr2 (err, typ, "Failed to set frequency %d\n", req->freq);
585 goto err;
588 err = FF(snd_pcm_hw_params_set_channels_near) (
593 if (err < 0) {
594 alsa_logerr2 (err, typ, "Failed to set number of channels %d\n",
596 goto err;
600 alsa_logerr2 (err, typ,
603 goto err;
613 err = FF(snd_pcm_hw_params_set_buffer_time_near) (
624 err = FF(snd_pcm_hw_params_set_buffer_size_near) (
631 if (err < 0) {
632 alsa_logerr2 (err, typ, "Failed to set buffer %s to %d\n",
634 goto err;
649 err = FF(snd_pcm_hw_params_set_period_time_near) (
661 err = FF(snd_pcm_hw_params_set_period_size_near) (
670 if (err < 0) {
671 alsa_logerr2 (err, typ, "Failed to set period %s to %d\n",
673 goto err;
681 err = FF(snd_pcm_hw_params) (handle, hw_params);
682 if (err < 0) {
683 alsa_logerr2 (err, typ, "Failed to apply audio parameters\n");
684 goto err;
687 err = FF(snd_pcm_hw_params_get_buffer_size) (hw_params, &obt_buffer_size);
688 if (err < 0) {
689 alsa_logerr2 (err, typ, "Failed to get buffer size\n");
690 goto err;
693 err = FF(snd_pcm_hw_params_get_format) (hw_params, &obtfmt);
694 if (err < 0) {
695 alsa_logerr2 (err, typ, "Failed to get format\n");
696 goto err;
701 goto err;
704 err = FF(snd_pcm_prepare) (handle);
705 if (err < 0) {
706 alsa_logerr2 (err, typ, "Could not prepare handle %p\n", handle);
707 goto err;
755 err:
932 int err;
935 err = FF(snd_pcm_drop) (handle);
936 if (err < 0) {
937 alsa_logerr (err, "Could not stop %s\n", typ);
942 err = FF(snd_pcm_prepare) (handle);
943 if (err < 0) {
944 alsa_logerr (err, "Could not prepare handle for %s\n", typ);