[pulseaudio-discuss] Couple problems when using 0.9.11 and fixes

Lennart Poettering lennart at poettering.net
Thu Sep 4 11:07:50 PDT 2008


On Thu, 04.09.08 14:56, Jyri Sarha (lepbtetfmvbz at spammotel.com) wrote:

> Hi,
> 	I found couple of problems when upgrading to pulseaduio 0.9.11. The 
> both are related to a case when tsched turned off on alsa-sink. First, 
> problem appears when trying the select a specific number fragment with
> module-alsa-sink parameters, for instance this:
> 
> load-module module-alsa-sink device=hw:0 rate=44100 fragment_size=882 fragments=2 tsched=0
> 
> The above produces three fragments of 588 bytes each. The actual bug
> appears to be in alsa-lib, but it can be by-passed without breaking
> things when alsa-lib gets fixed. To do that apply
> fix_incremented_number_of_fragments.patch.

Patch looks good to me. But please, when you add a work-around for
some bug in libraries we use, document that with a small comment, so
that we know that we can remove this when their upstream fixed the
issue.

Have you already contacted the ALSA people?

> The other problem appears when trying to use alsa-sink with tsched=0 on a 
> slow CPU. After writing a set of samples to device alsa-sink checks whether
> there is room to write some more samples. On a slow CPU there is always room
> for couple of samples more and alsa-sink keeps busy looping in the write
> function. "parameter_to_set_minimum_write_size.patch" adds a parameter to 
> module-alsa-sink to set the minimum number of samples to write on device,
> setting this parameter to a reasonable value fixes the above problem,
> like this:
> 
> load-module module-alsa-sink device=hw:0 rate=44100 fragment_size=882 fragments=2 tsched=0 hwbuf_min_frames_to_write=32

This patch looks good to me. May I ask you to make similar chnages for
the soruce too? I will then merge both.

Also, as Marc-Andre already pointed out, may I ask you to submit your
patches in a more "gitty" way? i.e. git-format-patch preferred, one
patch per mail. 

Please fix the two mentioned issues and I'll appy them on my tree.

Thanks,

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list