LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Surround sound problems through IEC958 (S/PDIF) optical out (https://www.linuxquestions.org/questions/linux-software-2/surround-sound-problems-through-iec958-s-pdif-optical-out-631414/)

cdhgee 03-29-2008 12:00 AM

Surround sound problems through IEC958 (S/PDIF) optical out
 
I have an interesting problem. I have my PC hooked up to my surround sound (7.1) system via an optical cable.

If I play a DVD in mplayer with hardware AC3 passthrough turned on, I get full surround sound through the speakers. This bit is fine.

Any other sounds played through the system come through the front speakers only. I've verified this by trying

Code:

speaker-test -c 8 -t wav
Sound only comes out for the Front Left and Front Right channels, even though the rest of the channels are printed. I've also tried testing it with 6 channels instead of 8 to no avail.

I think the problem might be that the optical GIGABYTEoutput is only encoding the front channels' signals, and not the surround channels, but there's no way to change this in the volume control. There is a channel mode, which has two options, "6ch" or "8ch". Changing it seems to have no effect.

Any ideas, anyone?

This is an onboard soundcard on a Gigabyte GA-P35-DS3L motherboard. The sound card is an Intel ICH9 with a Realtek ALC888 chip. It uses the snd-hda-intel kernel module.

Thanks in advance.
David

carl0ski 03-29-2008 12:08 AM

Quote:

Originally Posted by cdhgee (Post 3103748)
I have an interesting problem. I have my PC hooked up to my surround sound (7.1) system via an optical cable.

If I play a DVD in mplayer with hardware AC3 passthrough turned on, I get full surround sound through the speakers. This bit is fine.

Any other sounds played through the system come through the front speakers only. I've verified this by trying

Code:

speaker-test -c 8 -t wav
Sound only comes out for the Front Left and Front Right channels, even though the rest of the channels are printed. I've also tried testing it with 6 channels instead of 8 to no avail.

I think the problem might be that the optical GIGABYTEoutput is only encoding the front channels' signals, and not the surround channels, but there's no way to change this in the volume control. There is a channel mode, which has two options, "6ch" or "8ch". Changing it seems to have no effect.

Any ideas, anyone?

This is an onboard soundcard on a Gigabyte GA-P35-DS3L motherboard. The sound card is an Intel ICH9 with a Realtek ALC888 chip. It uses the snd-hda-intel kernel module.

Thanks in advance.
David


This is normal behaviour since all other sound only provide stereo (2 channel sound)

Optical has 6 or 8 raw channels. when you play mp3 or stereo wave 2 speakers will sound the remainder receive blank sounds.

My Optical Recevier supports Stereo mirroring (redirects stereo to all speakers)

There are Alsa software ways to use alsa.conf file to repeat stereo sounds on the rear and side speakers also. however i could NOT get that to work with Optical/SPdif

Only with the analogue output.

cdhgee 03-29-2008 12:11 AM

I agree with you in part - if I play an MP3, I'd expect only the front channels as it's only a stereo source.

Surely though if I'm using speaker-test and explicitly telling it to use 6 or 8 channels (to direct sound to individual channels at a time), then that should work?

Code:

[david@mars ~]$ speaker-test -c 8 -t wav

speaker-test 1.0.15

Playback device is default
Stream parameters are 48000Hz, S16_LE, 8 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 32 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
 0 - Front Left
 4 - Center
 1 - Front Right
 7 - Side Right
 3 - Rear Right
 2 - Rear Left
 6 - Side Left
 5 - LFE
Time per period = 11.093216


carl0ski 03-29-2008 04:00 AM

Quote:

Originally Posted by cdhgee (Post 3103753)
I agree with you in part - if I play an MP3, I'd expect only the front channels as it's only a stereo source.

Surely though if I'm using speaker-test and explicitly telling it to use 6 or 8 channels (to direct sound to individual channels at a time), then that should work?

It doesn't work like that

I'm very confident you will find that Optical/SPDif is Always stereo only with exception of digitally packaged AC3 or DTS placed into Pass through mode (pass through forces receiver to decode it)
If you play a 5.1 DVD in mplayer or kaffeine without pass through it will be stereo even if you set 5.1.

If you hook up all 8 channels using analogue you'll find speaker test works.

In theory the only way to get 5.1 to SPDIF for all sound would be to direct all your sound to a Sound recorder (mencoder)
encode it to 5.1/7.1 in realtime using AC3 codec. then play back in realtime.


My Soundblaster Audigy and on board realtek HD have the same limitation in Windows XP also, it doesnt allow me to send multiple channels through SDPIF.

Soundblasters have a feature that allows 5.1 independant WAV channels over SPDIF (non standard) provided you use propietory Creative digital 5.1 speakers (hell with that)

cdhgee 03-29-2008 04:32 PM

I think I'm beginning to see what you mean. I ended up using the a52 alsa encoder to do realtime encoding to AC3, and setting this as the default output. If I use this with speaker-test, I can get output through 5.1 connected via the optical. I don't get the additional 2 channels if I try 7.1, but I'd guess that's because Dolby Digital was around before 7.1, so it's maybe not supported. But 5.1 is good enough for me, and my receiver can upmix that to 7.1.

Thanks for your help.


All times are GMT -5. The time now is 07:02 PM.