[pulseaudio-discuss] Pulseaudio 0.16-test4 - my experience

Lennart Poettering lennart at poettering.net
Sun Aug 16 14:12:17 PDT 2009


On Tue, 11.08.09 00:48, Maxim Levitsky (maximlevitsky at gmail.com) wrote:

> > > Small progress, this only happens with pulse backend of canberra, which
> > > isn't used in 9.04, which explains why I see that bug now.
> > > It is probably the canberra bug, maybe it doesn't tell pulse that sound
> > > is mono? (I think that notify sounds are mono)
> > 
> > Hmm, Ubuntu didn't use the pa backend for libcanberra? Oh my!
> > 
> > Hmm, we had some recent changes in the surround sound handling in
> > libcanberra. Which version are you running?
> 
> I pulled it from git repository.
> 
> git log
> 
> commit 605aee559f5bd6d53c4c93a9c3bbeefdcf10cad2
> Author: Lennart Poettering <lennart at poettering.net>
> Date:   Wed Aug 5 03:19:44 2009 +0200
> 
>     prepare release 0.15
> 
> commit 593511bad132e0d262780918cce469ad69804b52
> Author: Lennart Poettering <lennart at poettering.net>
> Date:   Tue Aug 4 01:55:53 2009 +0200
> 
>     gtk: don't take gdk lock since it is not recursive and it might
> already be taken


That's pretty recent. ;-)

Hmm, could you please file a bug on fdo's bz, so that I don't forget
about looking into this?

> > > Just one issue though. If a stream is played at low volume, and I click
> > > a button, a noise sound is emmited and it almost covers the notify
> > > sound.
> > > maybe this is a HW fault, or I suspect that PA reconfigures the played
> > > sound to play at lower volume, and this gives that noise sound. Anyway
> > > this is a bug.
> > 
> > I don't follow. Could you explain this again?
> Sure!
> 
> 
> Let say I start a music player, and set its PA stream volume to low
> (rhythbox for example does that)
> 
> Now I click on a button.
> 
> Now what happens:
> 
> 1 - PA sets hardware volume to high
> 2 - PA lowers music stream volume to low, so it plays at same volume.
> 3 - PA plays the notify sound.
> 
> What is wrong is that the above sequence triggers a short noise, which
> origin isn't yet known to me (also it is possible to hear the music at
> high volume for a moment).

Hmm, the short noise might be a problem with the volume setting
funcitonality of your driver/hw? Can you trigger it by low-level alsa
volume changes? Otherwise it might be triggered by a faulty
snd_pcm_rewind() implementation in your driver?

There is a little race here indeed, since we cannot change the mixer
volume and update our PCM data atomically at the same time. Usually
the hw mixer change should come first, the PCM data adjustment second,
which means this should annoy only if the overall volume is increased,
not when it is decreased.

In my checkout i have now modified the flat volume logic so that sink
input volume changes can increase the sink volume, but they never
dcrease it again. As a side effect this will make your problem go away
since a corollary of this is that a stream volume is always <= the
sink volume, meaning that for event sounds the sink volume is never
increased.

This new logic hence makes the sink volume something of a "barrier"
for sink input volumes. By default, no stream can increase the sink
volume beyond what was configured by the user.

> Since the notify sound is itself very short, it is almost replaced by
> this noise.
> 
> It is ether a hick-up in PA, while it changes the stream volume, or a
> hardware problem.

Could be a driver problem, too. Which driver is this?
 
> I do like the idea of flat volumes though, this is quite right, and nice
> addition. However in case this is a hardware fault, I think that final
> volume of a card should also be software one, and hardware volume set to
> high.
> 
> I don't know about this sound codec, but I do know that many sound cards
> like to emit all kinds of noises, when their volumes are touched. 

According to Takashi noises like this and when playback is
started/stopped should be considered driver problems and be fixed in
software. So please make sure to file a bug against your driver!

Lennart

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



More information about the pulseaudio-discuss mailing list