From: "J. Scott Merritt" <alsauser@pragmasoft.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: SALSA-Lib: Playback overrun on initial PCM start
Date: Fri, 29 Jun 2007 13:33:46 -0400 [thread overview]
Message-ID: <20070629133346.74ab86b7.alsauser@pragmasoft.com> (raw)
In-Reply-To: <s5h7ipmd6nf.wl%tiwai@suse.de>
On Fri, 29 Jun 2007 19:15:00 +0200
Takashi Iwai <tiwai@suse.de> wrote:
> At Fri, 29 Jun 2007 12:26:45 -0400,
> J. Scott Merritt wrote:
> >
> > I no longer get the PlayBack overrun on PCM start. However, it appears
> > that "poll" or the snd_pcm_sw_params_set_avail_min (=4096) is not being
> > properly honored. With the normal alsa-lib, when the "poll" returns
> > snd_pcm_avail_update reports that space is available for 4096 frames.
> > However, in my initial testing, when running with SALSA lib, only about
> > 100 frames or so are available when the poll returns.
> >
> > I will examine this more closely.
>
> Found out another bug. Try the patch below.
>
> Thanks for reporting!
>
>
> Takashi
>
> diff -r ad2c81608e10 src/pcm.c
> --- a/src/pcm.c Fri Jun 29 17:59:52 2007 +0200
> +++ b/src/pcm.c Fri Jun 29 19:12:04 2007 +0200
> @@ -857,6 +857,7 @@ static int snd_pcm_hw_mmap_status(snd_pc
> pcm->mmap_status = NULL;
> goto no_mmap;
> }
> + pcm->mmap_control->avail_min = 1;
> return 0;
>
> no_mmap:
> @@ -865,6 +866,7 @@ static int snd_pcm_hw_mmap_status(snd_pc
> return -ENOMEM;
> pcm->mmap_status = &pcm->sync_ptr->s.status;
> pcm->mmap_control = &pcm->sync_ptr->c.control;
> + pcm->mmap_control->avail_min = 1;
> _snd_pcm_sync_ptr(pcm, 0);
> return 0;
> }
> diff -r ad2c81608e10 src/pcm_params.c
> --- a/src/pcm_params.c Fri Jun 29 17:59:52 2007 +0200
> +++ b/src/pcm_params.c Fri Jun 29 19:12:04 2007 +0200
> @@ -1052,6 +1052,7 @@ int snd_pcm_sw_params(snd_pcm_t *pcm, sn
> if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_SW_PARAMS, params) < 0)
> return -errno;
> pcm->sw_params = *params;
> + pcm->mmap_control->avail_min = params->avail_min;
> return 0;
> }
That did the trick :)
Many thanks for the extremely quick and accurate assistance !
Best regards, Scott.
next prev parent reply other threads:[~2007-06-29 17:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-28 19:01 SALSA-Lib: Playback overrun on initial PCM start J. Scott Merritt
2007-06-29 9:25 ` Takashi Iwai
2007-06-29 15:24 ` J. Scott Merritt
2007-06-29 16:07 ` Takashi Iwai
2007-06-29 16:26 ` J. Scott Merritt
2007-06-29 17:15 ` Takashi Iwai
2007-06-29 17:33 ` J. Scott Merritt [this message]
2007-06-29 17:10 ` SALSA-Lib: Playback Select/Poll not effective J. Scott Merritt
2007-06-29 17:16 ` SALSA-Lib: Playback overrun on initial PCM start J. Scott Merritt
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=20070629133346.74ab86b7.alsauser@pragmasoft.com \
--to=alsauser@pragmasoft.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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.