At Wed, 22 Jul 2009 12:07:56 +0200, Peter Hanzel wrote: > > Hello. > > This.patch works like a charm. > aplay is good and also mplayer works fine. Thanks for testing. Now I merged the patch. Takashi > > Thanks. > > ----- Original Message ----- > From: "Takashi Iwai" <tiwai@xxxxxxx> > To: "Peter Hanzel" <hanzelpeter@xxxxxxxxx> > Sent: Tuesday, July 21, 2009 3:17 PM > Subject: Re: ALSA in kernel 2.6.30.1 in VMWare > > > > At Tue, 21 Jul 2009 14:06:39 +0200, > > Peter Hanzel wrote: > >> > >> Hello. > >> > >> The pcm_lib.c from 2.6.29 is working. > >> Exactly this: > >> git checkout 1c85cc64456c97f3b265788abafec5c482c6a908 > >> sound/core/pcm_lib.c > >> > >> Is the good one. I recompiled 2.6.30 with this pcm_lib.c from that > >> checkout > >> and it works like a charm. > > > > OK. Then ignoring the bogus update would be a solution. > > Try the patch below with the latest code. Does it work? > > (You shouldn't set xrun_debug proc file in this case. Otherwise you'll > > get many messages.) > > > > > > Takashi > > > > --- > > diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c > > index 333e4dd..3b673e2 100644 > > --- a/sound/core/pcm_lib.c > > +++ b/sound/core/pcm_lib.c > > @@ -244,18 +244,27 @@ static int snd_pcm_update_hw_ptr_interrupt(struct > > snd_pcm_substream *substream) > > delta = new_hw_ptr - hw_ptr_interrupt; > > } > > if (delta < 0) { > > - delta += runtime->buffer_size; > > + if (runtime->periods == 1) > > + delta += runtime->buffer_size; > > if (delta < 0) { > > hw_ptr_error(substream, > > "Unexpected hw_pointer value " > > "(stream=%i, pos=%ld, intr_ptr=%ld)\n", > > substream->stream, (long)pos, > > (long)hw_ptr_interrupt); > > +#if 1 > > + /* simply skipping the hwptr update seems more > > + * robust in some cases, e.g. on VMware with > > + * inaccurate timer source > > + */ > > + return 0; /* skip this update */ > > +#else > > /* rebase to interrupt position */ > > hw_base = new_hw_ptr = hw_ptr_interrupt; > > /* align hw_base to buffer_size */ > > hw_base -= hw_base % runtime->buffer_size; > > delta = 0; > > +#endif > > } else { > > hw_base += runtime->buffer_size; > > if (hw_base >= runtime->boundary) > > > ------------------------------------------------------------------------------ _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user