View Full Version : Need help getting 6 ch audio from analog jacks


zim2dive
01-06-09, 06:41 PM
See EDITs at bottom before responding...

As detailed in gory detail here... http://www.avsforum.com/avs-vb/showthread.php?t=1032645&page=2 I have reverted to nvidia173 b/c later drivers have some very adverse effects on my 8200 IGP.... the consequence of this is losing HDMI audio.. ok, no problem I thought.. on the rear of the machine (Acer X1200) I have a set of jacks 2-wide and 3-high.. the manual that came with the machine says nothing about which is which.. so I rebooted into Vista and the Audio control panel showed me a picture indicating that 3 jacks each carry 2 channels..

- orange is front L+R
- black is rear L+R
- green is Center+Sub

And under Vista I was able to click on each speaker and confirm its location with a test tone. I also downloaded several test sound clips from around the web that will speak the speaker location from each speaker.

Back to Ubuntu...

When I play the same clips under Ubuntu with aplay, the sounds maybe sorta seem to come out the right place... I think.

I can't get speaker-test to work tho... I tried speaker-test -c6 -l1 -twavand speaker-test -c6 -l1 -Dplug:surround51 -twav and only hear sound from front left/right.

When I load 5.1 clip in to VLC and set the Audio to 5.1, the center is played out both L+R and the rear sounds come out the front as well... so it seems like its being downmixed.

When I load a true 5.1 movie, its like the speakers are all rotated.. center channel audio is barely audible, seemingly coming from the wrong speakers. I dunno, maybe the jack colors is totally software configurable and Vista is picking one mapping and Ubuntu is picking another?

In sound prefs I am using HDA NVidia ALC888 Analog (ALSA) for the various pull-downs and HDA NVidia (Alsa mixer) as my mixer, with all tracks selected in the select box.

To my /etc/modprobe.d/alsa-base file I have added and then removedoptions snd-hda-intel model=3stack which didn't seem to help nor hurt.

So in the process of this I now seem to have killed sound.. so I reboot.. still no sound.. and it gets stranger.. on the small speaker/sound icon on the toolbar I hit mute and then unmute.. now I have sound, but its full of background white noise. I reboot again, same thing.. best approximation is like there is a rogue process entering in to the mixer

EDIT: I have sound again.. but still not getting it from anything other than front L/R. In VLC, if I load a 5.1 movie, it sounds "ok" if I leave VLC audio device to stereo, but when I go to 5.1, I lose dialog, etc, as the center channel signal isn't getting to my rcvr.

EDIT 2: in VLC, in advanced options, if I go to ALSA and change the ALSA device name to HDA NVIDIA:ALC888 Analog(hw:0.0) now I have center channel dialog.... so I think the remaining question is how to get speaker-test working?

EDIT3: another clip in VLC doesn't have 5.1 as an audio device, only A52 over SPDIF.. which I don't have.. so I can't get 5.1 from that ???!?!

argh.. I thought my life was going to be simpler by not using the bleeding edge HDMI audio.. but that was MUCH simpler.. it just worked (ignoring the fact that nvidia video choked on full-screen flash)

thanks for any pointers,
Mike

mythmaster
01-06-09, 07:23 PM
- orange is front L+R
- black is rear L+R
- green is Center+Sub
This is incorrect. The winduhs software detects which speakers are plugged in where and assigns jack outputs accordingly.

Green is front L/R, but I can't remember black and orange. I think black is rear L+R (surround), though; so, orange should be center+sub.

zim2dive
01-06-09, 09:28 PM
This is incorrect. The winduhs software detects which speakers are plugged in where and assigns jack outputs accordingly.

Green is front L/R, but I can't remember black and orange. I think black is rear L+R (surround), though; so, orange should be center+sub.

My mistake, but only in what I wrote.. they are connected already as you say.... I do get stereo front L+R with the connections as is...when I run speaker-test the only speakers I get any voice for are front left/right. I get no sound for the other speakers.

mythmaster
01-06-09, 09:46 PM
OK, but I've got to sleep on this one since the vino runs rampant... :)

zim2dive
01-06-09, 11:04 PM
OK, but I've got to sleep on this one since the vino runs rampant... :)

I dunno.. it brings to mind the Doc Holiday quote (at least from the movies).. in vino veritas (tho typos tend to abound) :)

I suspect I need to set an option type in my alsa-base.. I just can't tell from the various google search results if there is any method other than trial/error, and if I have to reboot between each, or if I really can just do a restart on alsa-utils (a restart on alsa for me came up saying no such beast...)

EDIT:
per this thread: http://ubuntuforums.org/showthread.php?t=795525 I have also already uncommented the default-sample-channels and set to 6.. no change. (also no idea if pulse is coming in to the picture or not... for HDMI audio the emphasis seemed to be on killing pulse...)

mythmaster
01-07-09, 10:59 AM
OK, I'm sober again. :D

What is the output of:
aplay -L && aplay -l

zim2dive
01-07-09, 11:07 AM
OK, I'm sober again. :D

What is the output of:
aplay -L && aplay -l

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC888 Analog [ALC888 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

$ aplay -L
default:CARD=NVidia
HDA NVidia, ALC888 Analog
Default Audio Device
front:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
Front speakers
surround40:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
HDA NVidia, ALC888 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
null
Discard all samples (playback) or generate zero samples (capture)

$ cat /proc/asound/card0/codec#* | grep Codec
Codec: Realtek ALC888
Codec: Generic 10de NVIDIA MCP78 HDMI

mythmaster
01-07-09, 11:18 AM
Hmm...that all looks ok. I'm not sure what to try on this one.

quantumstate
01-07-09, 11:21 AM
You're missing two devices (digital audio devices 1 & 2) You must have bios set to HDMI for HD audio.

I can't believe that nVidia driver 180.11 doesn't work for you?

zim2dive
01-07-09, 11:35 AM
You're missing two devices (digital audio devices 1 & 2) You must have bios set to HDMI for HD audio.

Ok... but I don't know enough to know what to take from that? also, as mentioned, the jacks do work under Vista.

I can't believe that nVidia driver 180.11 doesn't work for you?

Any driver after 173 kills Flash performance on the nvidia 8200 (and my bug report thread at nvnews has folks with the 8300 reporting the same problems).
So with the available drivers I can choose good video or audio over HDMI, but not both, so I am trying to use the 3 2-channel audio jacks instead, which one would think should have been working long before HDMI audio was working...

quantumstate
01-07-09, 11:59 AM
Yes the jacks should work, but not optical. The bios setting makes you choose between spdif or hdmi out for digital audio. I know that spdif is limited to 5.1, but I don't know whether hdmi can only do stereo and 7.1 .

Oh, I remember the flash problem. I'm sure there's a way to make it work full-screen, but I just don't have time to research.

zim2dive
01-07-09, 12:16 PM
Yes the jacks should work, yep, that's what I'm trying to accomplish
Oh, I remember the flash problem. I'm sure there's a way to make it work full-screen, but I just don't have time to research.With the 8200, I am now convinced it is a true issue with the nvidia drivers.. that is also the conclusion of other folks over at nvnews, so while there may be other fixes for other nvidia products, that does not appear to be the case for the 8200, trust me, I've researched little else for the past month.

Rgb
01-07-09, 05:10 PM
Some things to try-

Use SMplayer instead of VLC-

http://smplayer.sourceforge.net/downloads.php?tr_lang=en

Be sure to update to a recent vintage Mplayer as suggested on the SMplayer site. Intrepid repos should have a recent Mplayer.

In SMplayer, set the audio channels in Options->Preferences->General->Audio

This may sound obvious, but I just checked default Gnome Volume Control applet (usually in the systray with a speaker icon), and my Surround and LFE channels are muted by default, plus there is a Duplicate Front option on the Switches tab, visible when you check it in the Preferences dialog of the Volume Control panel. I am running Nvidia audio also, but not using more than stereo analog out- doing SPDIF for DD/DTS 5.1 and 2 channel PCM.

You may need to futz with the Volume Control panel.

zim2dive
01-07-09, 05:48 PM
Some things to try-

Use SMplayer instead of VLC-

http://smplayer.sourceforge.net/downloads.php?tr_lang=en

Be sure to update to a recent vintage Mplayer as suggested on the SMplayer site. Intrepid repos should have a recent Mplayer.

In SMplayer, set the audio channels in Options->Preferences->General->Audio

This may sound obvious, but I just checked default Gnome Volume Control applet (usually in the systray with a speaker icon), and my Surround and LFE channels are muted by default, plus there is a Duplicate Front option on the Switches tab, visible when you check it in the Preferences dialog of the Volume Control panel. I am running Nvidia audio also, but not using more than stereo analog out- doing SPDIF for DD/DTS 5.1 and 2 channel PCM.

You may need to futz with the Volume Control panel.

I made some progress.. I ran alsaconf.. and then when I went in to alsamixer I found a setting I did not think I had before that let me chance the # of channels from 2 to 6.. .speaker-test now works for me... under VLC, I am not yet (no longer) convinced that sound is coming out in 6 ch format at all..

A quick test with smplayer looks good!

gotta head out but will debug more in a few hours.

mythmaster
01-07-09, 05:51 PM
LOL, I didn't see the forest for all them trees! :D

Thanks, Rgb :)

Rgb
01-07-09, 06:59 PM
LOL, I didn't see the forest for all them trees! :D

Thanks, Rgb :)

You and the other commandline ninjas just keep doing your thing- I'll handle the obvious questions and the GUI picks ;)

Rgb
01-07-09, 07:36 PM
Be sure Alsa is selected in SMPlayer Options->Perferences->General->Audio->Output Driver

and the Device in the Gnome Volume Control applet is set to (Alsa Mixer)

As a last resort, you may need to disable PulseAudio/stop it from running, in a term window-

killall pulseaudio

zim2dive
01-08-09, 08:37 AM
Some things to try-

Use SMplayer instead of VLC-
........
plus there is a Duplicate Front option on the Switches tab, visible when you check it in the Preferences dialog of the Volume Control panel.

I had a mild pref for VLC.. is there a reason not to try to get it to work as well? (I get the impression there may be a philosophical debate between the 2 players...)

Also I don't seem to have the duplicate front checkbox to enable... are you sure I should have that?

It was wierd.. I've run alsamixer no less than 40 times at this point (with all the recompiles re-installs I've done)... I've never seen that mixer channel before... could alsaconf really have added/enabled something so that it then showed up?

Rgb
01-08-09, 09:03 AM
I had a mild pref for VLC.. is there a reason not to try to get it to work as well? (I get the impression there may be a philosophical debate between the 2 players...)

Also I don't seem to have the duplicate front checkbox to enable... are you sure I should have that?

It was wierd.. I've run alsamixer no less than 40 times at this point (with all the recompiles re-installs I've done)... I've never seen that mixer channel before... could alsaconf really have added/enabled something so that it then showed up?

No philosophical issues with VLC- in fact, it's the best Linux DVD player, and a good alternative for problem video files. All my standard loads use SMplayer + VLC.

The Duplicate Front checkbox won't show on the Switches tab unless you activate it in Gnome Volume Control->Preferences

Make sure you're using VLC 0.9.4 or higher.

zim2dive
02-16-09, 03:17 PM
Some things to try-

Use SMplayer instead of VLC-

http://smplayer.sourceforge.net/downloads.php?tr_lang=en

Be sure to update to a recent vintage Mplayer as suggested on the SMplayer site. Intrepid repos should have a recent Mplayer.

In SMplayer, set the audio channels in Options->Preferences->General->Audio


So now I can't get smplayer to give me audio.... argh.

Looking at the logs, the left hand giveth... SMPlayer allows you to specify your own options, the right hand taketh away...SMPlayer looks like it insists on ading its own -ao <something> to the command line, no matter what.. so I can't get my-ao alsa:device=hw=0,3 to override the -ao that it inserts... ideas short of recompiling it myself and ripping out their -ao ?

MichaelZ
02-16-09, 03:48 PM
Try editing the ~/.mplayer/config file. You can set mplayer's defaults there. I am not sure of all the settings but it is well documented. I liked that you could set a hierarchical audio/video settings so if one fails it trys the next one, etc.
For example, in the config file you can specify ac=hwac3 and it will pass ac3 to the hw passthrough or ac=hwac3,hwdts it will pass ac3 or dts through to the digital output depending on ac3 or dts.
BTW, the .mplayer folder is the default location in ubuntu - not sure where the other distros place it.

zim2dive
02-16-09, 05:54 PM
Try editing the ~/.mplayer/config file. You can set mplayer's defaults there. I am not sure of all the settings but it is well documented. I liked that you could set a hierarchical audio/video settings so if one fails it trys the next one, etc.
For example, in the config file you can specify ac=hwac3 and it will pass ac3 to the hw passthrough or ac=hwac3,hwdts it will pass ac3 or dts through to the digital output depending on ac3 or dts.
BTW, the .mplayer folder is the default location in ubuntu - not sure where the other distros place it.

I can give that a shot, yes, but my experience is that options in any .config file (for any tool) are generally super-ceded by those that appear on the command line ?

Thus if SMPlayer is going to always launch with "-ao alsa".. my config file will be ignored in preference to that.

So I tried the config and I can use mplayer on the command line using no options (which is nice), but still no luck with SMPlayer. The problem is the massive command line it issues.. from the SMPlayer log files
/home/zimmy/bin/mplayer -noquiet -nofs -afm hwac3 -sub-fuzziness 1 -identify -slave -vo xv -ao alsa -zoom -nokeepaspect -framedrop -input conf=/usr/share/smplayer/input.conf -stop-xscreensaver -wid 54525964 -monitorpixelaspect 1 -subfont-autoscale 1 -subfont-text-scale 5 -subcp ISO-8859-1 -aid 1 -subpos 100 -contrast 0 -brightness 0 -hue 0 -saturation 0 -nocache -ss 48 -osdlevel 0 -vf-add screenshot -channels 6 /home/zimmy/Desktop/movie.avi you just can't get SMPlayer (as far as I can tell) to NOT issue 2/3 of these options.. including -ao alsa. :(

zim2dive
02-16-09, 06:01 PM
Ah, found the trick...

In the SMPlayer options.. in the Audio pull down.. you can pick "alsa" .. and then using a method I've never seen before, you can then type additional info in the "pull down" area.. so you can add the additional alsa info.

Can't say I give them any points for making this obvious or intuitive, but at least the option is there... I only tried this after grepping the source code and finding that some provisions did exist for specifying an alsa device.. tho I had yet to find any evidence via the options GUI.

Edit: also bitten by the out of date packages in the Ubuntu repos... newer versions of SMPlayer have made the option more obvious with a "user defined" option under Audio (that did not exist in the 8 month old version I got via the Intrepid repos)..