After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 365429 - Ticking sound when playing in 5.1 config
Ticking sound when playing in 5.1 config
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.10
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-10-26 20:24 UTC by j_greenhouse
Modified: 2006-12-09 14:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Output from : GST_DEBUG="*:2,alsa*:4" totem 2>alsa.log (3.02 KB, application/x-bzip)
2006-10-26 20:25 UTC, j_greenhouse
Details
GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,alsa*:4" gst-launch-0.10 2>alsa.log filesrc location=2.mp3 ! mad ! alsasink (8.96 KB, application/x-bzip)
2006-12-07 13:29 UTC, j_greenhouse
Details
GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,alsa*:4" totem 2>alsa.log (5.93 KB, application/x-gzip)
2006-12-08 20:32 UTC, j_greenhouse
Details

Description j_greenhouse 2006-10-26 20:24:32 UTC
I'm currently using
.asoundrc
> pcm.!default {
> type plug
> slave.pcm "surround51"
> slave.channels 6
> route_policy duplicate
> }

to enable 5.1 sound on my Card: Intel ICH5 Chip: C-Media Electronics CMI9780 

Sound quality is great when using alsaplayer or xine. However, when using 
Totem-GStreamer, or any other GStreamer player (Rhythmbox). The sound is 
ticking badly.
I've tried several scripts to enable 5.1 sound, but the all had the same 
outcome.


Not using the script, when only playing sound from 2 speakers, I can not 
notice any ticks.

> GStreamer0.10.10-1ubuntu1
> Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
Comment 1 j_greenhouse 2006-10-26 20:25:30 UTC
Created attachment 75470 [details]
Output from : GST_DEBUG="*:2,alsa*:4" totem 2>alsa.log

Output from GST_DEBUG="*:2,alsa*:4" totem 2>alsa.log as requested on mailing list.
Comment 2 j_greenhouse 2006-11-22 13:15:30 UTC
Is there any other information I can supply? GStreamer seems to become the standard for audio playback. So this is a major problem for me.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2006-12-07 11:51:41 UTC
the first think that looks bad is:
alsa pcm_hw.c:1246:snd_pcm_hw_open:alsalib error: open /dev/snd/pcmC0D0p failed: Device or resource busy
gstalsasink.c:636:gst_alsasink_open:<autoaudiosink0-actual-sink-alsadmix> error: Device 'default' is busy

can you do something like:
gst-launch filesrc location=my.mp3 ! mad ! alsasink

what does 'aplay -l' say?

can you experiment with the 'device' option of alsasink?
Comment 4 j_greenhouse 2006-12-07 12:44:01 UTC
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ICH5 [Intel ICH5], device 4: Intel ICH - IEC958 [Intel ICH5 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
Comment 5 j_greenhouse 2006-12-07 13:29:01 UTC
Created attachment 77887 [details]
GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,alsa*:4" gst-launch-0.10 2>alsa.log filesrc location=2.mp3 ! mad ! alsasink

Output from : GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,alsa*:4" gst-launch-0.10 2>alsa.log filesrc location=2.mp3 ! mad ! alsasink

No ticking sound when using this.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2006-12-07 14:52:07 UTC
gst-launch case (works)
-----------------------
alsasink_parse_spec:<alsasink0> Linear format : depth=32, width=32, sign=1, bigend=0
set_hwparams:<alsasink0> Negotiating to 2 channels @ 44100 Hz (format = S32_LE)
set_hwparams:<alsasink0> buffer time 200000, min 22, max 56871
set_hwparams:<alsasink0> period time 10000, min 41, max 56875
set_hwparams:<alsasink0> periods min 0, max 2508
set_hwparams:<alsasink0> buffer size 2508, period size 418


totem (can't open device -> fails)
----------------------------------
alsasink_parse_spec:<autoaudiosink0-actual-sink-alsa> Linear format : depth=16, width=16, sign=1, bigend=0
set_hwparams:<autoaudiosink0-actual-sink-alsa> Negotiating to 2 channels @ 44100 Hz (format = S16_LE)
set_hwparams:<autoaudiosink0-actual-sink-alsa> buffer time 200000, min 45, max 113765
set_hwparams:<autoaudiosink0-actual-sink-alsa> period time 10000, min 62, max 113771
set_hwparams:<autoaudiosink0-actual-sink-alsa> periods min 0, max 2509
set_hwparams:<autoaudiosink0-actual-sink-alsa> buffer size 5017, period size 5017

difference is that totel uses 'autoaudiosink' and not the alsasink, as set in gconf.
Comment 7 j_greenhouse 2006-12-08 20:30:29 UTC
I'm running Ubuntu feisty now. So I'm on a "clean" system with:

Advanced Linux Sound Architecture Driver Version 1.0.13 (Sun Oct 22 08:56:16 2006 UTC). and GStreamer 0.10.11-0ubuntu1

The ticking is less bad, but still present. I'll attach a full log.
 
0:00:06.317665000  8023 0x83c0ab0 WARN                  alsa pcm_hw.c:517:snd_pcm_hw_hwsync: alsalib error: SNDRV_PCM_IOCTL_HWSYNC failed: Broken pipe
Comment 8 j_greenhouse 2006-12-08 20:32:06 UTC
Created attachment 77985 [details]
GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,alsa*:4" totem 2>alsa.log

Output from GST_DEBUG_NO_COLOR=1 GST_DEBUG="*:2,alsa*:4" totem 2>alsa.log
On ubuntu Feisty
Comment 9 j_greenhouse 2006-12-09 14:34:13 UTC
This is an Alsa problem. Only weird that it doesn't show when using xine.
Can be closed now.

thnx for the help.
Comment 10 j_greenhouse 2006-12-09 14:51:17 UTC
What I was getting where in fact underruns

An "xrun" can be either a (buffer underrun)? or a (buffer overrun)?. In both cases an audio app was either not fast enough to deliver data to the ALSA audio buffer or not fast enough to process data from the ALSA audio buffer. Usually xruns are audible as crackles or pops.