gstreamer/alsa high cpu usage (wrong sample rate)

Bug #391861 reported by ikus060
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gst-plugins-base0.10 (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

When playing music using gstreamer & alsa, the cpu usage is higher then expected compare to other configuration.

Step to reproduce :
gst-launch filesrc location='any.mp3' ! mad ! audioconvert ! alsasink

With great help of gstreamer and alsa developers we manage to identify the problem come from the dmix'ed default device in alsa. To completely fix the problem, I add the following line in /etc/asound.conf

defaults.pcm.dmix.rate 44100

The result is starting from a 17% cpu usage to 3%.

The conclusion is Alsa are not using the right sample rate in dmix.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: gstreamer0.10-alsa 0.10.22-5
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_CA.UTF-8
SourcePackage: gst-plugins-base0.10
Uname: Linux 2.6.29-02062903-generic i686

Revision history for this message
ikus060 (ikus060-renamed) wrote :
Revision history for this message
ikus060 (ikus060-renamed) wrote :

$ lspci
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation Mobile 915GM/PM Express PCI Express Root Port (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: ATI Technologies Inc M22 [Mobility Radeon X300]
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit Ethernet PCI Express (rev 11)
0b:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8d)
0b:02.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)

$ aplay -L
default:CARD=ICH6
    Intel ICH6, Intel ICH6
    Default Audio Device
front:CARD=ICH6,DEV=0
    Intel ICH6, Intel ICH6
    Front speakers
surround40:CARD=ICH6,DEV=0
    Intel ICH6, Intel ICH6
    4.0 Surround output to Front and Rear speakers
surround41:CARD=ICH6,DEV=0
    Intel ICH6, Intel ICH6
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=ICH6,DEV=0
    Intel ICH6, Intel ICH6
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=ICH6,DEV=0
    Intel ICH6, Intel ICH6
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
iec958:CARD=ICH6,DEV=0
    Intel ICH6, Intel ICH6 - IEC958
    IEC958 (S/PDIF) Digital Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)

Revision history for this message
Pedro Villavicencio (pedro) wrote :

do you get the same with karmic version of gstreamer?

Changed in gst-plugins-base0.10 (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in gst-plugins-base0.10 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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