Re: HOWTO: Surround sound in pulseaudio
You know what, sammydee?
I played you file under windows, and I got swapped channels, like I used to have under Ubuntu...
There's something wicked :-D
I should boot into Ubuntu soon, I'll let you know what happens :-)
EDIT:
Under Ubuntu, everything plays fine... (except for side channels which I do not have :-P)
Now, I don't know how it's possible, I mean: DVDs play correctly, and they have multichannel sound; moreover, they play the same under Windows and Ubuntu, so how do I get swapped channels in Windows, now? :confused:
Well, I'll take it as that, but it surely is strange
Re: HOWTO: Surround sound in pulseaudio
Ok, I've tested it myself, and the channel order played in that flac file seems to differ depending on the media player playing it :-S
Gstreamer and mplayer play it the right way round, but winamp doesn't...? Not sure why this is.
Either way, probably best not to assume the file is correct for the moment until I have time to work out what is going on.
Sam
EDIT: Ok I'm fairly sure both mplayer AND gstreamer handle flacs badly in this respect, they both have the channel order wrong. So that flac file I specified will play fine in gstreamer and mplayer, but has a non-standard channel order so will sound reversed in windows players (which presumably follow the spec properly). I am reporting bugs to both players now. Phew that took a while to track down.
Re: HOWTO: Surround sound in pulseaudio
OK, I'm confused. I followed this howto, and when I rebooted, I only had sound out of two channels. When I look at pavucontrol, under the playback devices tab, it shows no sinks available, then a box for ALSA PCM on hw:0 with only two channels (front left, and front right). I have a Sound blaster Audigy SE, and an altek Lansing 5.1 channel speaker system where the speakers plug directly into the sub. Any help would be greatly appreciated.
Thanks,
Guy
Re: HOWTO: Surround sound in pulseaudio
Hi guyster.
Which part of the howto did you follow, the easy way or the hard way? Have you tried the test flac file?
Sam
Re: HOWTO: Surround sound in pulseaudio
Great discussion you guys have going on here.
Here's my issue. I started with the easy guide since I have an integrated Realtek850 (5.1) card. Rebooted, but nothing happened (still only sound from the front two speakers), except that when I did a sudo pactl stat it said I had 6ch...).
I then read the whole thread, and saw that MeURi had a similar card (Realtek 650), and got it working. I copied his setup, but only changed the name. Rebooted, but again, only sound from the front two.
BTW I tested this using the surround audio test (thanks for that!).
Any ideas?
Thanks,
Tomás
Re: HOWTO: Surround sound in pulseaudio
togume (and any others with problems):
It's much easier to help you if you post your daemon.conf and default.pa files here so we can see what you have done.
Sam
Re: HOWTO: Surround sound in pulseaudio
Hey Sam,
Here are my files:
daemon.conf
Code:
; daemonize = no
; fail = yes
; disallow-module-loading = no
; use-pid-file = yes
; system-instance = no
; disable-shm = no
; high-priority = yes
; nice-level = -11
; realtime-scheduling = no
; realtime-priority = 5
; exit-idle-time = -1
; module-idle-time = 20
; scache-idle-time = 20
; dl-search-path = (depends on architecture)
; default-script-file =
; log-target = auto
; log-level = notice
; resample-method = speex-float-3
; disable-remixing = no
; no-cpu-limit = no
; rlimit-as = -1
; rlimit-core = -1
; rlimit-data = -1
; rlimit-fsize = -1
; rlimit-nofile = 256
; rlimit-stack = -1
; rlimit-nproc = -1
; rlimit-memlock = -1
; rlimit-nice = 31
; rlimit-rtprio = 9
; default-sample-format = s16le
; default-sample-rate = 44100
default-sample-channels = 6
; default-fragments = 4
; default-fragment-size-msec = 25
default.pa
Code:
.nofail
### Load something into the sample cache
#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
.fail
### Load audio drivers statically (it's probably better to not load
### these drivers manually, but instead use module-hal-detect --
### see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
#load-module module-null-sink
#load-module module-pipe-sink
### Automatically load driver modules depending on the hardware available
#.ifexists module-hal-detect.so
#load-module module-hal-detect
#.else
### Alternatively use the static hardware detection module (for systems that
### lack HAL support)
#load-module module-detect
#.endif
load-module module-alsa-sink device_id=0 channels=6 channel_map=front-left,front-right,front-center,rear-left,rear-right,lfe
### Load several protocols
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
#load-module module-esound-protocol-tcp
#load-module module-native-protocol-tcp
#load-module module-zeroconf-publish
### Load the RTP reciever module (also configured via paprefs, see above)
#load-module module-rtp-recv
### Load the RTP sender module (also configured via paprefs, see above)
#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
#load-module module-rtp-send source=rtp.monitor
### Automatically restore the volume of playback streams
load-module module-volume-restore
### Automatically restore the default sink/source when changed by the user during runtime
load-module module-default-device-restore
### Automatically move streams to the default sink if the sink they are
### connected to dies, similar for sources
load-module module-rescue-streams
### Automatically suspend sinks/sources that become idle for too long
load-module module-suspend-on-idle
### Load X11 bell module
#load-module module-x11-bell sample=x11-bell
### Register ourselves in the X11 session manager
# Deactivated by default, to avoid deadlock when PA is started as esd from gnome-session
# Instead we load this via /etc/xdg/autostart/ and "pactl load-module" now
# load-module module-x11-xsmp
### Load additional modules from GConf settings. This can be configured with the paprefs tool.
### Please keep in mind that the modules configured by paprefs might conflict with manually
### loaded modules.
.ifexists module-gconf.so
.nofail
load-module module-gconf
.fail
.endif
### Publish connection data in the X11 root window
.ifexists module-x11-publish.so
.nofail
load-module module-x11-publish
.fail
.endif
### Make some devices default
#set-default-sink output
#set-default-source input
I'm only getting sound on my front two. My setup is 5.1 (Front L,R,C, Rear L,R, and subwoofer).
Any ideas welcome.
Thanks again,
Tomás
Re: HOWTO: Surround sound in pulseaudio
Hi Tomas
What is the output if you start pulseaudio from the terminal? Do:
Code:
pulseaudio -k && pulseaudio -vv
Sam
Re: HOWTO: Surround sound in pulseaudio
Hrm, interesting. I don't know what I'm looking at, but does not look pretty.
Code:
I: main.c: Called SUID root and real-time/high-priority scheduling was requested in the configuration. However, we lack the necessary priviliges:
I: main.c: We are not in group 'pulse-rt' and PolicyKit refuse to grant us priviliges. Dropping SUID again.
I: main.c: For enabling real-time scheduling please acquire the appropriate PolicyKit priviliges, or become a member of 'pulse-rt', or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
I: main.c: Note that real-time/high-priority scheduling is NOT normally required. If you experience crackling or other sound anomalies, consider one or more of the above solutions.
I: main.c: High-priority scheduling enabled in configuration but now allowed by policy. Disabling forcibly.
I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: main.c: This is PulseAudio 0.9.10
I: main.c: Page size is 4096 bytes
I: main.c: Fresh high-resolution timers available! Bon appetit!
D: alsa-util.c: Trying surround71:0...
ALSA lib setup.c:334:(snd_config_get_ctl_elem_value) bad value type
I: alsa-util.c: PCM device surround71:0 refused our hw parameters: Invalid argument
D: alsa-util.c: Trying surround51:0...
W: alsa-util.c: Device surround51:0 doesn't support 44100 Hz, changed to 48000 Hz.
I: module-alsa-sink.c: Successfully opened device surround51:0.
I: module-alsa-sink.c: Successfully enabled mmap() mode.
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL surround51:0
I: alsa-util.c: Unable to attach to mixer surround51:0: No such file or directory
I: alsa-util.c: Successfully attached to mixer 'hw:0'
I: alsa-util.c: Using mixer control "Master".
I: sink.c: Created sink 0 "alsa_output.surround51_0" with sample spec "s16le 6ch 48000Hz"
I: source.c: Created source 0 "alsa_output.surround51_0.monitor" with sample spec "s16le 6ch 48000Hz"
I: module-alsa-sink.c: Using 4 fragments of size 13224 bytes.
I: alsa-util.c: ALSA device lacks separate volumes control for channel 'rear-left', falling back to software volume control.
D: module-alsa-sink.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
I: module-alsa-sink.c: Starting playback.
I: module.c: Loaded "module-alsa-sink" (index: #0; argument: "device_id=0 channels=6 channel_map=front-left,front-right,front-center,lfe,side-left,side-right").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules/module-esound-protocol-unix.so': success
I: module.c: Loaded "module-esound-protocol-unix" (index: #1; argument: "").
I: protocol-native.c: loading cookie from disk.
I: module.c: Loaded "module-native-protocol-unix" (index: #2; argument: "").
I: module.c: Loaded "module-volume-restore" (index: #3; argument: "").
D: module-default-device-restore.c: No previous default sink setting, ignoring.
D: module-default-device-restore.c: No previous default source setting, ignoring.
I: module.c: Loaded "module-default-device-restore" (index: #4; argument: "").
I: module.c: Loaded "module-rescue-streams" (index: #5; argument: "").
D: module-suspend-on-idle.c: Sink alsa_output.surround51_0 becomes idle.
D: module-suspend-on-idle.c: Source alsa_output.surround51_0.monitor becomes idle.
I: module.c: Loaded "module-suspend-on-idle" (index: #6; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules/module-gconf.so': success
I: module.c: Loaded "module-gconf" (index: #7; argument: "").
D: cli-command.c: Checking for existance of '/usr/lib/pulse-0.9/modules/module-x11-publish.so': success
D: module-x11-publish.c: using already loaded auth cookie.
E: x11wrap.c: XOpenDisplay() failed
E: module.c: Failed to load module "module-x11-publish" (argument: ""): initialization failed.
E: main.c: Module load failed.
I: main.c: Daemon startup complete.
I: module-suspend-on-idle.c: Sink alsa_output.surround51_0 idle for too long, suspending ...
I: module-alsa-sink.c: Device suspended...
I: module-suspend-on-idle.c: Source alsa_output.surround51_0.monitor idle for too long, suspending ...
Thanks,
Tomás
Re: HOWTO: Surround sound in pulseaudio
Hi Thomas
From the first lines of your output, it seems that your user is not in the pulse-rt group
Check that every user who needs to use audio is in the right groups, as specified here in section "Adding Users to the PulseAudio groups" (assuming you're using Gnome)
See if this solves part of your issues
For the error you get while loading the module-x11-publish, I can't tell right now since I'm on Windows... I'll check when I reboot into Ubuntu