stuttering output with version 0.8.9-0ubuntu1

Bug #17770 reported by Kimiko Koopman
34
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gstreamer plugins
Fix Released
Critical
gst-plugins0.8 (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Gstreamer Alsa output is choppy after upgrading to version 0.8.9. This happens
with any source, including the testsrc beep, so I know it's not in the Ogg
plugin or so. Downgrading to 0.8.8-3ubuntu5 gives normal sound output again
(kept the other plugins at 0.8.9).

http://bugzilla.gnome.org/show_bug.cgi?id=310859: http://bugzilla.gnome.org/show_bug.cgi?id=310859

Revision history for this message
Sebastien Bacher (seb128) wrote :

what soundcard do you use? does "aplay" works fine?

Revision history for this message
Kimiko Koopman (kimiko) wrote :

Yes, aplay works fine. Esd works fine too. It's only Gstreamer apps that
stutter, and downgrading the Alsa plugin fixes that.

Revision history for this message
Kimiko Koopman (kimiko) wrote :

Oh, forgot the soundcard. It's an Ensoniq ES1370.

Revision history for this message
Sebastien Bacher (seb128) wrote :

can you attach the output of "GST_DEBUG=alsa*:5 gstreamer-properties" while
playing a sound to the bug?

Revision history for this message
mike powers jr. (mjpowersjr) wrote :

I'm having the exact same problem after the alsa upgrade. aplay works fine just
as it does from koopman.
In response to:

 can you attach the output of "GST_DEBUG=alsa*:5 gstreamer-properties" while
playing a sound to the bug?

i wasnt sure what you exactly mean so i did the following:
tried just running the command from command line, and hitting the test buttons,
resulted in no output on the commandline.
then i left that gstreamer-properties window open, and ran totem and rythmbox
from command lines, both sounded overdriven, but their was still no output from
any command line.

also my audio device is a intergrated ADI AD1985 6-channel sound card.
(basically an intergrated intel ICH5 device.)

Ironically, I upgraded from hoary to breezy in hopes of getting correct surround
sound output from my new speakers. I could get crystal clear audio in stereo
from hoary, now breezy doesnt like my sound card at all :-) oh well, I like an
adventure. hope this may help.

Revision history for this message
Sebastien Bacher (seb128) wrote :

are you sure you use the alsasink while doing this?

Revision history for this message
Ian Ohr (munk3h) wrote :

I seem to be having stuttering output from esd since changing to "breezy" and I
have an
nforce2 based motherboard with onboard sound.

I can get good playback from these:
mpg321 -o alsa
mplayer using alsa

I get stuttering playback at increased speed from these programs/switches:
mpg321 -o esd
mpg321 -o oss
mplayer using esd
xmms using esd
rhythmbox

I cannot get xmms to use alsa as it complains with:
"Couldn't open Audio" error message

This seems to be the same for wav and mp3 filetypes, but I haven't bothered
to try any others as I suspect it will make no difference.

Revision history for this message
Ian Ohr (munk3h) wrote :

(In addition to comment #7)
I also get good playback from aplayer

Revision history for this message
Ian Ohr (munk3h) wrote :

(In addition to comment #8)
here is the output of:

aplayer -l

**** List of PLAYBACK Hardware Devices ****
card 0: nForce2 [NVidia nForce2], device 0: Intel ICH [NVidia nForce2]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: nForce2 [NVidia nForce2], device 2: Intel ICH - IEC958 [NVidia nForce2 -
IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
mike powers jr. (mjpowersjr) wrote :
Download full text (30.8 KiB)

In response to:
are you sure you use the alsasink while doing this?
------
oops, looks like i was more out of it than i thought. I wasnt using alsasink at
the time. Here is the generated output from alsasink when hitting the test button.
Interesting enough, the output sink was set to esd, while the input was set to
oss. I changed these to alsa as the output, and esd as the input, and everything
sounds good, are these correct settings?
------
mike@ionstorm:~$ GST_DEBUG=alsa*:5 gstreamer-properties
INFO (0x8053e10 - 310610:03:38.428164000) alsa( 8680)
gstalsa.c(1585):gst_alsa_open_audio: Opening alsa device "default"...
LOG (0x8053e10 - 310610:03:38.509947000) alsa( 8680)
gstalsa.c(1125):gst_alsa_get_caps:<alsasink1> get_caps returns audio/x-alaw,
rate=(int)[ 8000, 192000 ], channels=(int){ 1, 2 }; audio/x-alaw, rate=(int)[
8000, 192000 ], channels=(int)4, channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >;
audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE >;
audio/x-alaw, rate=(int)[ 8000, 192000 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE,
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >;
audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int){ 1, 2 };
audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)4,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT >;
audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)6,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE >;
audio/x-mulaw, rate=(int)[ 8000, 192000 ], channels=(int)8,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,
GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER, GST_AUDIO_CHANNEL_POSITION_LFE,
GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT, GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT >;
audio/x-raw-float, buffer-frames=(int)[ 0, 2147483647 ], width=(int){ 64, 32 },
endianness=(int)1234, rate=(int)[ 8000, 192000 ], channels=(int){ 1, 2 };
audio/x-raw-float, buffer-frames=(int)[ 0, 2147483647 ], width=(int){ 32, 64 },
endianness=(int)1234, rate=(int)[ 8000, 19200...

Revision history for this message
mike powers jr. (mjpowersjr) wrote :

just another update, the problem seems like it may be directly related to esd.
On my ubuntu desktop I have gaim set to output to esd for sound, and after
making the above stated changes to gstreamer-properties (setting output sink to
alsa) I can play music just fine, while gaim sound effects are still distored.
hope this may help ;-)

Revision history for this message
Sebastien Bacher (seb128) wrote :

the correct setting is alsasink and the issue with esd has already a bug:
http://bugzilla.ubuntu.com/show_bug.cgi?id=11407

Does anybody here has an issue while using alsasink?

Revision history for this message
Tristan Tarrant (tristan-tarrant) wrote :

Created an attachment (id=2726)
alsasink test when using dmix plugin

This is the log obtained by running the following command:

GST_DEBUG=alsa*:5 gstreamer-properties 2> dmix

Revision history for this message
Tristan Tarrant (tristan-tarrant) wrote :

Created an attachment (id=2727)
alsasink test when NOT using dmix plugin

Log obtained by running

GST_DEBUG=alsa*:5 gstreamer-properties 2> nodmix

after having disabled the dmix plugin.

Revision history for this message
Tristan Tarrant (tristan-tarrant) wrote :

I have attached two test cases. The problem only happens when the dmix plugin is
used in $HOME/.asoundrc.

Here is what I have:

pcm.mymix {
        type dmix
        ipc_key 1024
        slave {
                pcm "hw:0,0"
                period_time 0
                period_size 1024
                buffer_size 4096
                rate 48000
        }
}
pcm.!default {
        type plug
        slave.pcm "mymix"
}
pcm.dsp {
        type plug
        slave.pcm "mymix"
}
ctl.mixer0 {
    type hw
    card 0
}

Revision history for this message
Tristan Tarrant (tristan-tarrant) wrote :

And I confirm that downgrading gstreamer-alsa0.8 to a 0.8.8 release makes things
work again

Revision history for this message
Sebastien Bacher (seb128) wrote :

Martin, any opinion on all this?

Revision history for this message
Sven Herzberg (herzi) wrote :

For gstreamer-based application this bug is not present on my system (some
realtech alc etc. chipset) if i just want stereo sound.
If I want to have surround sound i still get stereo sound
If i set the alsa device explicitly to hw:0 i get stuttering output too.
Downgrading worked for me as well

Revision history for this message
Kimiko Koopman (kimiko) wrote :

Bug is still present in version 0.8.10-1ubuntu1

Revision history for this message
Tristan Tarrant (tristan-tarrant) wrote :

I believe it is a problem with upstream.
Here is a list of alsa-related bugfixes that were in 0.8.9:

162024 : [alsasink] doesn't probe HW buffer_size/period_size/perio...
305186 : alsasink borkage

Should we file this upstream

Tristan

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #20)
> I believe it is a problem with upstream.
> Here is a list of alsa-related bugfixes that were in 0.8.9:
>
> 162024 : [alsasink] doesn't probe HW buffer_size/period_size/perio...
> 305186 : alsasink borkage

These patches are already applied in the current Breezy version.

> Should we file this upstream

I think it is this bug:
  http://bugzilla.gnome.org/show_bug.cgi?id=310859

The bug mentions some tests; could you please write your hardware specifics and
the test results to that bug report?

Revision history for this message
Pavel Rojtberg (rojtberg) wrote :

(In reply to comment #21)
> The bug mentions some tests; could you please write your hardware specifics and
> the test results to that bug report?
the solution is setting 'alsasink period-size=1024' as the audio-sink in
gstreamer-properties.
Actually any value >= 2 works fine.

Revision history for this message
Martin Pitt (pitti) wrote :

(In reply to comment #22)
> (In reply to comment #21)
> > The bug mentions some tests; could you please write your hardware specifics and
> > the test results to that bug report?
> the solution is setting 'alsasink period-size=1024' as the audio-sink in
> gstreamer-properties.
> Actually any value >= 2 works fine.

Hm, but in comment #15, Tristan uses exactly 1024 as period_size, and it still
seems to break for him, so I don't believe that this is a generic solution.

Revision history for this message
Martin Pitt (pitti) wrote :

Do you still have problems with the latest version (0.8.11-0ubuntu3)?

Revision history for this message
Martin Pitt (pitti) wrote :

*** Bug 21638 has been marked as a duplicate of this bug. ***

Revision history for this message
Kimiko Koopman (kimiko) wrote :

Yes, version 0.8.11-0ubuntu3 still has the problem. As suggested, adding
period-size=1024 or 2 helps a little (no stuttering), but as soon as there is a
CPU usage spike (e.g. web browsing, screensaver), the stuttering reappears in
Rhythmbox (haven't tested it with the test beep). Quitting and restarting
Rhythmbox gets rid of the stuttering, until the next hit.

Revision history for this message
Thomas Hood (jdthood) wrote :

*** Bug 19254 has been marked as a duplicate of this bug. ***

Revision history for this message
Justin Mason (jm-ubuntu) wrote :

This has *just* started happening for me.

I upgraded last week from Hoary to Breezy, and sound was working fine -- until I
applied the alsa upgrades that showed up today in update-notifier.

I'm using the same kernel as I was using in Hoary, BTW. I'm on a Thinkpad T40.
lspci:

0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L
/ICH4-M) AC'97 Audio Controller (rev 01)

Sadly, the KDE player "Juk" doesn't support the period-size tweaks -- it will
just use "alsasink" with no args.

dpkg -l libasound2 gstreamer0.8-alsa libgstreamer0.8-0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii gstreamer0.8-a 0.8.11-0ubuntu ALSA plugin for GStreamer
ii libasound2 1.0.9-2 ALSA library
ii libgstreamer0. 0.8.11-1ubuntu Core GStreamer libraries, plugins, and utili

I've tried with and without ~/.asoundrc; there's no /etc/asound.conf .

Revision history for this message
Xalior (darran) wrote :

Created an attachment (id=5591)
Modified /etc/asound.conf using nForce chipset, dmix _AND_ solving the alsa
stuttering bug under latest gstreamer plugin with alsasink (for me - YMMV)

Hi,

I've attached my /etc/asound.conf to this bug as I was having loads of problems
with this too....

Sound played to Alsa OSS emulation worked perfectly, but amaroK using alsasink
or "gst-launch-0.8 sinesrc ! alsasink" stuttered - like audio buffer
underruns....

So I set my buffer_size to 24756 (a number slightly bigger than 24 * 1024 :) )
and fired up amaroK with a bunch of high-bitrate OGG files. Then launched 24
firefox windows by madly clicking on the icon and ran "gst-launch-0.8 sinesrc !
alsasink" on and off (ctrl-C ing it in a shell, wait a few seconds, start
again) - load climbed to about 6 on my athlon-xp2200+ with 1GB RAM. Audio
didn't stutter or jump once, played perfectly - from a USB2 mounted HDD.

Here endeth my first real Ubuntu bugreport and attempted fix - hope it helps
someone somewhere....

-Dx

Revision history for this message
Martin Pitt (pitti) wrote :

Dapper uses gstreamer 0.10 now, which has lots of improvements in this direction. Do you still experience this bug in the latest Dapper? (You can test a live CD if you do not want to upgrade yet). Thank you!

Changed in gst-plugins0.8:
status: Unconfirmed → Needs Info
Revision history for this message
Kimiko Koopman (kimiko) wrote :

Ow, is this bug still open? I haven't had any stuttering for months now. I guess it was fixed in 0.10. Yes, I have version 0.10.4-1ubuntu1 here, from Dapper.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for following up.

Changed in gst-plugins0.8:
status: Needs Info → Fix Released
Changed in gst-plugins:
status: Needs Info → Fix Released
Changed in gst-plugins:
importance: Unknown → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.