Bug 506851 - surround40 does not work
surround40 does not work
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: pulseaudio (Show other bugs)
11
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Lennart Poettering
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-18 17:32 EDT by Peter Gückel
Modified: 2009-08-10 13:51 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-10 13:51:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
The requested output to pulseaudio -vvvv (103.33 KB, text/plain)
2009-06-29 16:11 EDT, Peter Gückel
no flags Details
Another run of pulseaudio -vvvv (125.54 KB, text/plain)
2009-08-08 11:51 EDT, Peter Gückel
no flags Details
pulseaudio -vvvv with patched rpms (84.68 KB, text/plain)
2009-08-10 01:12 EDT, Peter Gückel
no flags Details

  None (edit)
Description Peter Gückel 2009-06-18 17:32:35 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:
?
Comment 1 Lennart Poettering 2009-06-25 12:18:54 EDT
"the applet"?

Please use pavucontrol to enable Surround 4.0 mode.
Comment 2 Peter Gückel 2009-06-26 15:13:13 EDT
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.
Comment 3 Lennart Poettering 2009-06-29 08:31:22 EDT
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.
Comment 4 Peter Gückel 2009-06-29 14:07:24 EDT
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).
Comment 5 Lennart Poettering 2009-06-29 14:19:03 EDT
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.
Comment 6 Peter Gückel 2009-06-29 16:11:06 EDT
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.
Comment 7 Lennart Poettering 2009-08-05 10:40:09 EDT
Does "aplay -D plug:surround41:0 -f CD < /dev/urandom" work properly? (i.e. does it produce noise on all 4 speakers?)
Comment 8 Peter Gückel 2009-08-05 13:10:29 EDT
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.
Comment 9 Lennart Poettering 2009-08-05 20:30:45 EDT
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?
Comment 10 Peter Gückel 2009-08-06 01:25:13 EDT
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.
Comment 11 Lennart Poettering 2009-08-07 20:05:30 EDT
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.
Comment 12 Peter Gückel 2009-08-08 11:51:35 EDT
Created attachment 356776 [details]
Another run of pulseaudio -vvvv
Comment 13 Lennart Poettering 2009-08-08 13:45:31 EDT
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
Comment 14 Peter Gückel 2009-08-09 12:33:11 EDT
I have never built an rpm and don't have the foggiest idea how to do it.
Comment 15 Peter Gückel 2009-08-09 12:46:49 EDT
You're the developer. Why don't you build the rpm? I will install it and run another one of these tests on it.
Comment 16 Lubomir Rintel 2009-08-09 14:24:15 EDT
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).
Comment 17 Peter Gückel 2009-08-10 00:50:02 EDT
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?
Comment 18 Peter Gückel 2009-08-10 01:11:49 EDT
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.
Comment 19 Peter Gückel 2009-08-10 01:12:42 EDT
Created attachment 356848 [details]
pulseaudio -vvvv with patched rpms
Comment 20 Lubomir Rintel 2009-08-10 01:16:19 EDT
(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
Comment 21 Lennart Poettering 2009-08-10 13:51:24 EDT
OK, so the problem is fixed in 0.9.16 then. Closing bug.

Note You need to log in before you can comment on or make changes to this bug.