ALSA failing with PulseAudio in Hardy

Bug #221673 reported by Diwaker Gupta
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-lib (Ubuntu)
Fix Released
Undecided
Luke Yelavich
Hardy
Won't Fix
Undecided
Unassigned
alsa-plugins (Ubuntu)
Fix Released
Undecided
Luke Yelavich
Hardy
Won't Fix
Undecided
Luke Yelavich
pulseaudio (Ubuntu)
Invalid
Undecided
Unassigned
Hardy
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: pulseaudio

I had been using PulseAudio in Gutsy for the past several months, so all the mundane stuff (groups, permissions, config files) is configured correctly. Since the upgrade to Hardy, ALSA is unable to use PulseAudio anymore. Details follow:

- I am in the groups pulse-rt and pulse-access
- ALSA without PulseAudio works just fine
- PulseAudio seems to work fine with GStreamer

Here's what my .asoundrc looks like:
=======================
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default { type pulse }
ctl.!default { type pulse }
=======================

I'm attaching my default.pa with the bug.

Here's the output of 'pulseaudio -vvv' when I try to run speaker-test (only relevant portion here, full output attached):
I: client.c: Created 1 "Native client (UNIX socket client)"
I: protocol-native.c: Got credentials: uid=1000 gid=1000 success=1
I: protocol-native.c: Enabled SHM for new connection
I: client.c: Client 1 changed name from "Native client (UNIX socket client)" to "ALSA plug-in [speaker-test]"
I: client.c: Freed 1 "ALSA plug-in [speaker-test]"
I: protocol-native.c: connection died.

speaker-test fails with the following:
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 43 to 349525
Period size range from 21 to 87382
Using max buffer size 349524
Periods = 4
was set period_size = 87381
was set buffer_size = 349524
*** PULSEAUDIO: Unable to create stream.
Unable to set hw params for playback: Input/output error
Setting of hwparams failed: Input/output error
speaker-test: pcm_pulse.c:115: pulse_stop: Assertion `pcm->stream' failed.
Aborted

TEST CASE:
1. Create an .asoundrc file in your home directory to direct alsa to use the pulseaudio plugin by default for all sound output. This is done with the command "asoundconf set-pulseaudio"
2. Attempt to run speaker-test with the following command: "speaker-test -twav -c2"
3. You should get the following error:

*** PULSEAUDIO: Unable to create stream.
speaker-test: pcm_pulse.c:115: pulse_stop: Assertion `pcm->stream' failed.

speaker-test 1.0.15

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 1048576
Period size range from 64 to 262144
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
Unable to set hw params for playback: Input/output error
Setting of hwparams failed: Input/output error

NOTE: This SRU is in two parts, one for alsa-lib, and the other for alsa-plugins. The new revision of alsa-plugins requires the new revision of alsa-lib in order to function properly.

Intrepid status:
This bug is fixed with alsa-lib 1.0.16 and alsa-plugins 1.0.16 which are both in intrepid.

Regression potential:
The diffs in comments 8 and 9 introduce fixes and in the case of alsa-lib, new symbols to be used by alsa-plugins to allow the pulse alsa-plugin to functino properly No other plugin's functionality should be affected with these changes.

Revision history for this message
Diwaker Gupta (diwaker) wrote :
Revision history for this message
Diwaker Gupta (diwaker) wrote :

Log of pulseaudio -vvv when speaker-test is run against it with the following arguments:
speaker-test -Dplug:default -twav -c6

Revision history for this message
Nikolaus Rath (nikratio) wrote :

Same problem here. Totem and mplayer work just fine, but speaker-test produces the same error.

Changed in pulseaudio:
status: New → Confirmed
Revision history for this message
Victor Engmark (victor-engmark) wrote :
Download full text (7.5 KiB)

Ran into (seemingly) the same problem when running NeverWinter Nights here:
$ /usr/local/games/nwn/nwnlaunch.sh
*** PULSEAUDIO: Unable to connect: Connection refused
*** glibc detected *** ./nwmain: corrupted double-linked list: 0x0e0a8090 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7bc2149]
/lib/tls/i686/cmov/libc.so.6[0xb7bc388e]
/lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7bc74f0]
/usr/lib/libGLcore.so.1[0xb752e720]
/lib/tls/i686/cmov/libc.so.6(exit+0xd4)[0xb7b86084]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe8)[0xb7b6e458]
./nwmain(AIL_WAV_info+0x39)[0x804f851]
======= Memory map: ========
08048000-08623000 r-xp 00000000 08:01 14647314 /usr/local/games/nwn/nwmain
08623000-087a1000 rwxp 005db000 08:01 14647314 /usr/local/games/nwn/nwmain
087a1000-0ebf0000 rwxp 087a1000 00:00 0 [heap]
b5020000-b5220000 rwxs 2e424000 00:0e 14843 /dev/nvidia0
b53f1000-b53f3000 rwxp b53f1000 00:00 0
b5680000-b56a2000 rwxs 00000000 00:09 0 /SYSV00000000 (deleted)
b56a3000-b56a4000 ---p b56a3000 00:00 0
b56a4000-b5ea4000 rwxp b56a4000 00:00 0
b5ea4000-b5eab000 r-xp 00000000 08:01 56590356 /lib/tls/i686/cmov/librt-2.7.so
b5eab000-b5ead000 rwxp 00006000 08:01 56590356 /lib/tls/i686/cmov/librt-2.7.so
b5f1b000-b5f1c000 rwxs fdc08000 00:0e 14843 /dev/nvidia0
b6200000-b6221000 rwxp b6200000 00:00 0
b6221000-b6300000 ---p b6221000 00:00 0
b632e000-b6332000 r-xp 00000000 08:01 49841129 /usr/lib/libXfixes.so.3.1.0
b6332000-b6333000 rwxp 00003000 08:01 49841129 /usr/lib/libXfixes.so.3.1.0
b6333000-b633b000 r-xp 00000000 08:01 49841254 /usr/lib/libXcursor.so.1.0.2
b633b000-b633c000 rwxp 00007000 08:01 49841254 /usr/lib/libXcursor.so.1.0.2
b634e000-b634f000 rwxs fd001000 00:0e 14843 /dev/nvidia0
b6350000-b6351000 rwxs 3459f000 00:0e 14843 /dev/nvidia0
b6351000-b6390000 r-xp 00000000 08:01 53575686 /usr/lib/locale/en_US.utf8/LC_CTYPE
b6390000-b6391000 r-xp 00000000 08:01 49906928 /usr/lib/locale/en_US.utf8/LC_NUMERIC
b6391000-b6392000 r-xp 00000000 08:01 49905837 /usr/lib/locale/en_US.utf8/LC_TIME
b6392000-b6473000 r-xp 00000000 08:01 53581288 /usr/lib/locale/en_US.utf8/LC_COLLATE
b6473000-b6474000 r-xp 00000000 08:01 49905839 /usr/lib/locale/en_US.utf8/LC_MONETARY
b6474000-b6475000 r-xp 00000000 08:01 49922087 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
b6475000-b6476000 r-xp 00000000 08:01 49906984 /usr/lib/locale/en_US.utf8/LC_PAPER
b6476000-b647d000 r-xs 00000000 08:01 49856817 /usr/lib/gconv/gconv-modules.cache
b647d000-b647e000 ---p b647d000 00:00 0
b647e000-b6c7e000 rwxp b647e000 00:00 0
b6ce2000-b6ce4000 rwxp b6ce2000 00:00 0
b6ce4000-b6ce8000 r-xp 00000000 08:01 49840952 /usr/lib/libXdmcp.so.6.0.0
b6ce8000-b6ce9000 rwxp 00003000 08:01 49840952 /usr/lib/libXdmcp.so.6.0.0
b6ce9000-b6d00000 r-xp 00000000 08:01 49840711 /usr/lib/libxcb.so.1.0.0
b6d00000-b6d01000 rwxp 00016000 08:01 49840711 /usr/lib/libxcb.so.1.0.0
b6d01000-b6d02000 r-xp 00000000 08:01 49840718 /usr/lib/libxcb-xlib.so.0.0.0
b6d02000-b6d03000 rwxp 00000000 08:01 49840718 /usr/lib/libxcb-xlib.so.0.0.0
b6d03000-b6d05000 r-xp 00000000 08:01 49840151 /usr/lib/libXau.so.6.0.0
b6d...

Read more...

Revision history for this message
Victor Engmark (victor-engmark) wrote :

Turns out that the PulseAudio daemon was off. However, if I turn it back on (pulseaudio -D) and then run /usr/local/games/nwn/nwnlaunch.sh, the game runs, the stereo and surround devices show up in the sound settings, there's no sound, and the game uses 100% CPU when trying to exit. I have to "kill -9" it.

Revision history for this message
Evan Carroll (evancarroll) wrote :

Another confirmation, this bug still exists in Hardy. I'm using a new ASUS Mobo with HDMI, I have hi-def sound card disabled, and hdmi sound card enabled, this shows one sound card in 'asoundconf list'.

I have that card set as the default under System -> Preferences -> Sound

Sound works in anything that uses pulse, and some things with alsa, sound does not work with speaker-test or firefox libflash. I get the assertion error.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 221673] Re: ALSA failing with PulseAudio in Hardy

Could everybody experiencing this bug please try the package of
libasound2, and if you use libasound2-plugins, the package of
libasound2-plugins from intrepid, and reply stating whether the issue
goes away when using these newer packages?

i386:
http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2_1.0.16-2ubuntu1_i386.deb
http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-plugins/libasound2-plugins_1.0.16-1ubuntu1_i386.deb

amd64:
http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2_1.0.16-2ubuntu1_amd64.deb
http://archive.ubuntu.com/ubuntu/pool/main/a/alsa-plugins/libasound2-plugins_1.0.16-1ubuntu1_amd64.deb

Thanks in advance.

Luke Yelavich (themuso)
Changed in pulseaudio:
status: Confirmed → Invalid
Changed in alsa-lib:
assignee: nobody → themuso
status: New → In Progress
Changed in alsa-plugins:
assignee: nobody → themuso
status: New → In Progress
Revision history for this message
Luke Yelavich (themuso) wrote :
description: updated
Revision history for this message
Luke Yelavich (themuso) wrote :
Revision history for this message
Nikolaus Rath (nikratio) wrote :

I tried the new packages. speaker-test -twav now works fine. However, if I omit the -twav option, I get

[1] nokile:~$ speaker-test -c2 | head -30
speaker-test 1.0.15

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 1048576
Period size range from 64 to 262144
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 0.004293
 0 - Front Left
 1 - Front Right
Time per period = 0.001916

the last lines repeat extremely fast and I don't hear anything.

Revision history for this message
Steve Langasek (vorlon) wrote :

marking as fixed in intrepid.

Changed in alsa-plugins:
status: In Progress → Fix Released
Changed in alsa-lib:
status: In Progress → Fix Released
assignee: nobody → themuso
status: New → Incomplete
status: Incomplete → In Progress
Changed in alsa-plugins:
assignee: nobody → themuso
status: New → In Progress
Changed in pulseaudio:
status: New → Invalid
Revision history for this message
Luke Yelavich (themuso) wrote :

Updated regression potential, as we are now aiming to upload alsa-lib 1.0.16 into hardy-proposed, due to being ale to track down specific fixes for many other issues users are experiencing.

description: updated
Revision history for this message
Luke Yelavich (themuso) wrote :

alsa-lib changelog

Revision history for this message
Luke Yelavich (themuso) wrote :

alsa-plugins changelog

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

Accepted into -proposed, please test and give feedback here

Changed in alsa-lib:
status: In Progress → Fix Committed
Changed in alsa-plugins:
status: In Progress → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

There are some additional specific verification requirements here before we can consider this ok for hardy-updates:

Debian bugs #470336 and #470330 point out that alsa-lib 1.0.16 has broken API compatibility with 1.0.15. It is appropriate to consider whether reverting the header changes is the more appropriate course of action for an SRU; we should also double-check that there are no ABI regressions in the library.

Debian bug #469064 shows a regression in hardware support for a particular sound device with alsa-lib 1.0.16. The patch for this is included in intrepid, and should be hand-picked for hardy-proposed as well.

We already know that there are bluetooth plugin packages that use the alsa-lib plugins API, which has been changed between 1.0.15 and 1.0.16. The impact of this API change must be carefully evaluated, and at a minimum the bluetooth plugin packages will need to be updated at the same time, with appropriate package relationships (depends/conflicts, as needed).

Finally, it's reported that there's a regression in support for the VT82xx chip in snd-hda-intel with 1.0.16. This should be tracked down with upstream and resolved prior to committing to -updates.

Revision history for this message
Steve Langasek (vorlon) wrote :

Inspecting the exported symbols from the old and new versions of the alsa-lib package, I see a significant number of symbols that are dropped in 1.0.16 relative to 1.0.15. These are accounted for in the changelog and the source under the heading of "make local functions really local"; none of them are exported in the public API headers, and upstream didn't believe it necessary to bump the library SONAME when making this change, so I'm comfortable with moving forward as far as the ABI in concerned.

Steve Langasek (vorlon)
Changed in alsa-lib:
milestone: none → ubuntu-8.04.1
Revision history for this message
Luke Yelavich (themuso) wrote :

Bug #240337 was filed, stating that xubuntu applications are hanging when using alsa-lib 1.0.16. The person who filed the bug attached this trace:

(gdb) where
#0 0xb7f2e410 in __kernel_vsyscall ()
#1 0xb7db6c11 in connect () from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb720474a in ?? () from /usr/lib/libesd.so.0
#3 0xb7204e82 in esd_open_sound () from /usr/lib/libesd.so.0
#4 0xb7d15f66 in ?? () from /usr/lib/libgnome-2.so.0
#5 0xb7d15f87 in gnome_sound_connection_get () from /usr/lib/libgnome-2.so.0
#6 0xb7d73b45 in ?? () from /usr/lib/libgnomeui-2.so.0
#7 0xb785cb20 in ?? () from /usr/lib/libgobject-2.0.so.0
#8 0xb785e916 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
#9 0xb785ec59 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#10 0xb7bd4837 in gtk_widget_show () from /usr/lib/libgtk-x11-2.0.so.0
#11 0xb7bdd9b9 in gtk_window_present () from /usr/lib/libgtk-x11-2.0.so.0
#12 0x0805b078 in ?? ()
#13 0xb7e0c7d4 in scm_boot_guile () from /usr/lib/libguile.so.12
#14 0x0805ad23 in ?? ()
#15 0xb75ec450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#16 0x08051b91 in ?? ()

Changed in alsa-plugins:
status: Fix Committed → Triaged
Changed in alsa-lib:
status: Fix Committed → Triaged
Luke Yelavich (themuso)
description: updated
Revision history for this message
Pelládi Gábor (pelladigabor) wrote :

What is the current status of this bug? Is there a package that needs to be tested? Is this still an SRU request, or hardy will not upgrade to alsa 1.0.16 because it would cause regressions? The milestone should be moved forward, because 8.04.1 is out.

Steve Langasek (vorlon)
Changed in alsa-lib:
milestone: ubuntu-8.04.1 → ubuntu-8.04.2
Steve Langasek (vorlon)
Changed in alsa-lib:
milestone: ubuntu-8.04.2 → none
Revision history for this message
Adolfo R. Brandes (arbrandes) wrote :

Users following this bug may want to give the following howto a shot, since there seems to be no chance that libasound2 will be fixed in hardy-updates:

http://ubuntuforums.org/showthread.php?t=789578

Luke Yelavich (themuso)
Changed in alsa-lib (Ubuntu Hardy):
assignee: Luke Yelavich (themuso) → nobody
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in alsa-lib (Ubuntu Hardy):
status: Triaged → Won't Fix
Changed in alsa-plugins (Ubuntu Hardy):
status: Triaged → Won't Fix
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.