[pulseaudio-discuss] [PATCH] update process_usec before enter sleep

Colin Guthrie gmane at colin.guthr.ie
Thu Aug 11 06:35:36 PDT 2011


'Twas brillig, and Colin Guthrie at 11/08/11 13:39 did gyre and gimble:
> 'Twas brillig, and Colin Guthrie at 09/08/11 13:02 did gyre and gimble:
>> 'Twas brillig, and xing wang at 09/08/11 04:26 did gyre and gimble:
>>>
>>>
>>> 2011/8/5 Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com
>>> <mailto:pierre-louis.bossart at linux.intel.com>>
>>>
>>>     > during mmap_write(), there's chance to increase/decrease watermark. So
>>>     > before
>>>     > sleep, the actural sleep time should based on latest watermark.
>>>     [snip]
>>>     > @@ -787,6 +787,7 @@ static int unix_write(struct userdata *u,
>>>     pa_usec_t
>>>     > *sleep_usec, pa_bool_t polle
>>>
>>>     Change makes sense, but this should be done both for unix_write and
>>>     mmap_write for consistency. And while I am at it for alsa-source as
>>>     well, we
>>>     should keep the same algorithm across all cases.
>>>
>>>
>>> Thanks your review, Pierre.
>>> And Sorry for late reply, i was fighting for some bugs.
>>>
>>> Please find attached update patch based on your suggestions, which
>>> should fulfill the requirement. :-)
>>
>> For future reference, please make sure you do not mix tabs and spaces
>> and stick with the coding style (it might suck at times bug consistence
>> is still desirable).
>>
>> I'll take a look at the actual patches shortly.
> 
> OK, based on Pierre's general ACK, I've merged this now.

Forgot to mention: can you please fix your name (full name please if
possible, with capital letters etc. - it makes the shortlog nicer), your
tabs (we use spaces) and in this case there was actually a bug - u->sink
was used in the alsa-source code.... it should have been u->source, so
please do a compile test at least before submitting patches :D

All the best

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]



More information about the pulseaudio-discuss mailing list