Red Hat Bugzilla – Bug 506851
surround40 does not work
Last modified: 2009-08-10 13:51:24 EDT
Description of problem: After update to most recent version of pulseaudio, Intel sound ceased. I have 4 speakers, 2 left and 2 right, hence had the applet configured for 4.0 stereo output. No amount of ajusting volume, etc (having followed some recent threads on the fedora mailing lists) has any effect. In fact, although kmix shows the sound card, the pulseaudio volume applet does not show it at all for output, yet does show it for input. By accident, while fiddling, I noticed that when I set the output to 5.1 stereo, my sound works again (but I have no subwoofer!). Version-Release number of selected component (if applicable): 0.9.15-14.fc11.x86_64 How reproducible: Observe lack of sound on 4 speakers, set to false 5.1 setting and sound appears. Set to correct 4.0 setitng and sound disappears. Also, the card (dis)appears in the pulseaudio applet under output, but now input, correspondingly. Steps to Reproduce: 1. as described in detail above 2. 3. Actual results: No cound with correct 4.0 output setting; sound with incorrect 5.1 setting Expected results: When only 4 speakers without a subwoofer are present, it should be possible to have the correct 4.0 setting and sound output. Additional info: ?
"the applet"? Please use pavucontrol to enable Surround 4.0 mode.
When I hover on the docked program that has an icon like a pci sound card, the tool tip says PulseAudio Applet. Is this pavucontrol? When I click on the applet, I am presented with a menu, including default server, manager, volume control, etc. When I click on volume control, a window with 5 tabs is presented. The final one is configuration. When I set my card to Output Analog 4.0 + Input Analog Stereo and then look under the third tab, namely output devices, then the card disappears. I no longer have any available output, hence there is no sound, hence I reported this bug. When I go back to the 5th tab and select Output Analog Surround 5.1 + Input Analog Stereo, then look at the 3rd tab, suddenly I have a sound card again and I am able to use applications emitting sound. As I said when I reported the bug, I only have 4 speakers and I do not have a 5.1 sound system, ie., I have no subwoofer, but I am forced to set 5.1, otherwise I don't have a sound card available.
Pleasae don't use that panel applet, it's obsolete. Please run pulseaudio in a terminal with -vvvvv (ou might need to kill the running instance with pulseaudio -k first). Then do this switching and paste the output of PA when the problem appears here.
I always have my system updated to the most recent yummy state. The applet is installed via fedora 11 repositories. But... no matter. I have now configured it to no longer start up at system boot. If I knew what it was called, I could uninstall it. So... I run pavucontrol, and have the configuration set to the correct output 4.0 + input stereo setting. Under Output devices, all I have is the Null Output device. Here is the -vvvvv listing: D: main.c: Started as real root: no, suid root: yes I: main.c: We're in the group 'pulse-rt', allowing high-priority scheduling. I: main.c: RLIMIT_RTPRIO is set to 20, allowing real-time scheduling. I: main.c: RLIMIT_NICE is set to 40, allowing high-priority scheduling. I: core-util.c: Successfully gained nice level -11. D: main.c: Can realtime: yes, can high-priority: yes I: main.c: Giving up CAP_NICE D: main.c: Can realtime: yes, can high-priority: yes I: main.c: This is PulseAudio 0.9.15 D: main.c: Compilation host: x86_64-redhat-linux-gnu D: main.c: Compilation CFLAGS: -ggdb -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option D: main.c: Running on host: Linux x86_64 2.6.29.5-191.fc11.x86_64 #1 SMP Tue Jun 16 23:23:21 EDT 2009 D: main.c: Found 2 CPUs. I: main.c: Page size is 4096 bytes D: main.c: Compiled with Valgrind support: no D: main.c: Running in valgrind mode: no D: main.c: Optimized build: no D: main.c: All asserts enabled. I: main.c: Machine ID is 88e62c5748bebfb4b2a62c6b49b5df15. I: main.c: Session ID is 88e62c5748bebfb4b2a62c6b49b5df15-1246297490.930199-1204655737. I: main.c: Using runtime directory /home/peter/.pulse/88e62c5748bebfb4b2a62c6b49b5df15:runtime. I: main.c: Using state directory /home/peter/.pulse. I: main.c: Running in system mode: no E: pid.c: Daemon already running. E: main.c: pa_pid_file_create() failed. ------------------------- Now, I set pavucontrol configuration to the false Output 5.1 + input stereo setting. Now, I have Internal Audio under Output Devices. I run -vvvvv again and get this listing: D: main.c: Started as real root: no, suid root: yes I: main.c: We're in the group 'pulse-rt', allowing high-priority scheduling. I: main.c: RLIMIT_RTPRIO is set to 20, allowing real-time scheduling. I: main.c: RLIMIT_NICE is set to 40, allowing high-priority scheduling. I: core-util.c: Successfully gained nice level -11. D: main.c: Can realtime: yes, can high-priority: yes I: main.c: Giving up CAP_NICE D: main.c: Can realtime: yes, can high-priority: yes I: main.c: This is PulseAudio 0.9.15 D: main.c: Compilation host: x86_64-redhat-linux-gnu D: main.c: Compilation CFLAGS: -ggdb -Wall -W -Wextra -pipe -Wno-long-long -Winline -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option D: main.c: Running on host: Linux x86_64 2.6.29.5-191.fc11.x86_64 #1 SMP Tue Jun 16 23:23:21 EDT 2009 D: main.c: Found 2 CPUs. I: main.c: Page size is 4096 bytes D: main.c: Compiled with Valgrind support: no D: main.c: Running in valgrind mode: no D: main.c: Optimized build: no D: main.c: All asserts enabled. I: main.c: Machine ID is 88e62c5748bebfb4b2a62c6b49b5df15. I: main.c: Session ID is 88e62c5748bebfb4b2a62c6b49b5df15-1246297490.930199-1204655737. I: main.c: Using runtime directory /home/peter/.pulse/88e62c5748bebfb4b2a62c6b49b5df15:runtime. I: main.c: Using state directory /home/peter/.pulse. I: main.c: Running in system mode: no E: pid.c: Daemon already running. E: main.c: pa_pid_file_create() failed. ---------------------------- They look pretty much the same to me, without getting out the magnifying glass. The Null Output device gives me no sound. The Internal Output device works correctly, except that I have to set it to 5.1 to enable it (I don't know if I am losing bass tone, due to not having a subwoofer, but it sounds about right).
As said, you need to terminate the running PA instance first before you can run pulseaudio -vvvv. Please do this: 1) open a terminal 2) in there, type "pulseaudio -k ; pulseaudio -vvvv" 3) now start pavucontrol by some other means 4) try to reproduce 5) post the output that was caused by the reproduced bug here.
Created attachment 349867 [details] The requested output to pulseaudio -vvvv I had to do it like this, as the length exceeds the allowed length of a comment.
Does "aplay -D plug:surround41:0 -f CD < /dev/urandom" work properly? (i.e. does it produce noise on all 4 speakers?)
No, "aplay -D plug:surround41:0 -f CD < /dev/urandom" only produces earsplitting noise on the front speakers. Next, I tried "aplay -D plug:surround40:0 -f CD < /dev/urandom" and I veritably did get noise on all four speakers.
Uh, yepp, "plug:surround40:0" is actually what I wanted to say. So, hmm, let's check if I got that right: you enable Surround 4.0 as profile in PA, and then use "pacat /dev/urandom" to play noise you get audio only on the front speakers, but "aplay -D plug:surround40:0 -f CD < /dev/urandom" gets you audio on all 4?
1. Open terminal, type pulseaudio -k 2. Open other terminal and run pavucontrol, set audio to output analog 4.0 + input analog stereo 3. Output devices in pavucontrol shows null output device with 2 speakers and: aplay -D plug:surround40:0 -f CD < /dev/urandom gives me noise on all 4 speakers, but amarok emits no sound and there are no KDE system sounds possible. 4. In terminal, type pulseaudio -k 5. In other terminal run pavucontrol, set audio to output analog 5.1 + input analog stereo 6. Output devices in pavucontrol shows internal audio with 4 speakers plus a centre speaker which I don't have and: aplay -D plug:surround40:0 -f CD < /dev/urandom aplay -D plug:surround41:0 -f CD < /dev/urandom aplay -D plug:surround51:0 -f CD < /dev/urandom, and even aplay -D plug:surround50:0 -f CD < /dev/urandom all give this message: aplay: main:608: audio open error: Device or resource busy Maybe that was because amarok was still open. However, system sounds are back on all 4 speakers and amarok works again! I closed and reopened amarok. Then I tried again, leaving pavucontrol at 5.1 and not killing pulseaudio and now I get: aplay -D plug:surround40:0 -f CD < /dev/urandom --> sound on 4 speakers aplay -D plug:surround41:0 -f CD < /dev/urandom --> sound on 2 front speakers aplay -D plug:surround50:0 -f CD < /dev/urandom --> sound on 2 front speakers aplay -D plug:surround51:0 -f CD < /dev/urandom --> sound on 4 speakers It is very tedious. I hope I did the experiment properly.
Hmm, so I get this right whenever you select surround40 as output you don't get the real surround40 but a null sink instead? Interesting. Could you please get me the pulseaudio -vvv output that is generated when you select the surround40 configuration? What you posted above only shows the output of seleting surround51 and stereo.
Created attachment 356776 [details] Another run of pulseaudio -vvvv
Hmm, this is interesting. During the probe phase we manage to configure surround40 properly: D: alsa-util.c: Checking for playback on analog-surround-40 (surround40) D: alsa-util.c: Trying surround40:0 with SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open surround40:0 But then, when we actually try to use it later on, we get this: D: alsa-util.c: Trying surround40:0 with SND_PCM_NO_AUTO_FORMAT ... D: alsa-util.c: Managed to open surround40:0 D: alsa-util.c: Maximum hw buffer size is 11888 ms I: alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument I: alsa-util.c: snd_pcm_hw_params_set_periods_near() failed: No such file or directory Which is a bit strange. I am tempted to point in ALSA's direction here. Do you think you are able to rebuild the PA rpm and apply a patch? If so, I'd like to ask you if could check if this patch fixes your problems: http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff_plain;h=39aa1cf94d43efaa80571b3f9d3dc56297f2f5be
I have never built an rpm and don't have the foggiest idea how to do it.
You're the developer. Why don't you build the rpm? I will install it and run another one of these tests on it.
Petrus, there (if you trust binary packages from random weirdos across the internet): http://koji.fedoraproject.org/koji/taskinfo?taskID=1593391 (it will take some time to build, and will be available for about a week since it's a scratch build).
Well, since it is being built on koji, I'm sure there shouldn't be any security risk, should there? Now, I clicked on that link and a page opened up that says 'State: Closed' and then I clicked on another link that took me to an information for task page and there I see a whole slew of rpms. Do I install all of them? I guess so, eh?
Ok, here are the results: aplay 40 gives me sound on 4 speakers, aplay 41 only on front, aplay 50 only on front and aplay 51 on 4 speakers. Also, setting output 40+input stereo in pavucontrol gives me a 4 speaker internal audio system and 2 speakers for input and system sounds and amarok DO work again. The patch appears to be a success. I have attached the pulseaudio -vvvv output in a file.
Created attachment 356848 [details] pulseaudio -vvvv with patched rpms
(just had a middle-air collision with you, so the following is just for reference/curiosity) (In reply to comment #17) > Well, since it is being built on koji, I'm sure there shouldn't be any security > risk, should there? Oh, I did not notice there's a src.rpm no the list of downloadable packages (I am quite sure it wasn't in past). I thought the source was not downloadable, but as it is, the risk of using the scratch build is probably not bigger than of any other package from the distribution (apart from that it's provided via insecure protocol (http) and is not gpg-signed). ;) > Now, I clicked on that link and a page opened up that says 'State: Closed' and > then I clicked on another link that took me to an information for task page and > there I see a whole slew of rpms. > > Do I install all of them? I guess so, eh? Well, probably not. You can either 1.) Check which packages of those do you have installed and update just those: rpm -qa |grep pulseaudio 2.) Download all the binary packages and do a rpm freshen: rpm -Fvh *.x86_64.rpm
OK, so the problem is fixed in 0.9.16 then. Closing bug.