Help - Search - Members - Calendar
Full Version: AC3 (Aften) vs Analog?
Hydrogenaudio Forums > Lossy Audio Compression > Other Lossy Codecs
haarp
Hello, I'm new here.

I wanted to ask you guys a question.

As of lately, I've been using the Front Stereo Channels of my Audigy 2 ZS soundcard for simple Stereo analog sound. A few days ago, a buddy of mine gave a pretty badass amp to me for free. It's a Sony V555ES 5.1 receiver with a shitload of analog and digital inputs. Backplate is covered by about 80 connectors...

Well, so I was looking for ways to connect my soundcard to this machine. I discovered that by using Analog connection, the receiver disables most of its functionality. No soundfields, no Equalizer, nothing. Just plain amplification of the analog signal.
When I hook it up using Coax however, I get all the functionality the amp has to offer. Pretty sweet. There's only one problem: I can only get Stereo sound. After some searching on the net I discovered that an uncompressed digital connection only supports 2 channels. For all 6 channels I would need a receiver that can use 3 Coax inputs simutaneously. Not this one. I'm stuck with 2 channels at 48kHz (which gets upsampled from 44.1 anyway by my Audigy it seems)

I can, however, use SPDIF passthrough from DVDs or such. This gives me a compressed signal that can contain full 5.1 channel support. Works pretty well. The amp lights up like a christmas tree with all sorts "Multi channel decoding" lights and stuff.
This only works for movies that include an AC3 track. I'm also planning to play stereo music (should work fine since it's only 2 channels) and play games. Most modern games, as you probably know, can utilize 6 channels and more without problems. As they don't encode AC3 on-the-fly, I would need to make an analog connection, else I would only be able to use stereo. That's pretty stupid, considering the functions the amp gives me only for digital connections.

So in short: Either I connect it via analog, or I would need some sort of realtime AC3-encoder. As a Linux user, I found ac3jack ( http://essej.net/ac3jack ) after searching for quite a while on the net. This would give me a realtime AC3 encoder using Aften.

Encoding also means compressing. I think I can use up to 640kbps or something, which seems pretty low considering I'm dealing with 6 channels here. My MP3s use 320 for 2 channels and I also have a few FLACs that are lossless. My fear is that sound quality will degrade when I use an AC3 encoder. Also, I find it pretty retarded that I need to encode my sound, just to decode it again after traversing one meter of cable.
Additional problems would be that I need to install jack, which is known to cause problems with some apps. Also, realtime encoding probably will take up a bit CPU time, which I'd rather keep for actual computer usage.

AC3:
-Lossy
-Costs CPU time
-Needs jack

Analog connection:
-No additional functions from my amp
-Analog connections sound worse, maybe?

What do you guys think? Does anyone have experience with realtime encoding in general or ac3jack/Aften in particular?
xmixahlx
luckily there is another option!

i'm assuming you are using a recent linux kernel with alsa - if so check out the pcm.a52encode alsa function.

gentoo has a good write up here:
http://gentoo-wiki.com/HOWTO_Dolby_Digital_and_DTS

essentially it encodes your audio output to ac3 in real time and sends it out the sound card.

this WILL be lossy, however the default is 448kbps/5.1/48000 so i'm going to guess this will suffice. it also has the benefit of being completely temporary (i.e. only touching audio output) so you need not fear for your FLAC's smile.gif



later
haarp
...I don't know what to say. This is -awesome- ! As a matter of fact I'm using Gentoo, but somehow I seem to have missed that part in this Howto.
Thanks very much!

I can't see any additional CPU load. My receiver also seems to be able to cope with 640kbps quite well, but I can't increase it furthermore.
What encoder is used for this? How is the quality compared to raw?

I also seem to be having 2 problems with this:
- The encoder seems to hog the SPDIF, the same problem like when I specify SPDIF in any other ALSA prog. This means that only one app can play audio at a time. Using the default device, I've never had this problem
- Sometimes after playback, the SPDIF refuses to switch back to unencoded-mode. I have to run speaker-test -D spdif -c 2 -l 1 to reset the port and need to disable 'IEC958 Optical Raw' for it to work again. The same problem appears when I use passthrough.

Any ideas on that?
haarp
Well, I'm still curious how A52@6ch@640kbps sounds compared to unencoded. I don't have the right equipment (yet) to test for myself. Does anyone have experience with that A52 in that regard?
InspectorGadget
QUOTE (haarp @ Oct 9 2008, 09:04) *
Well, I'm still curious how A52@6ch@640kbps sounds compared to unencoded. I don't have the right equipment (yet) to test for myself. Does anyone have experience with that A52 in that regard?


What's your (presumably) uncompressed 6-channel source?
haarp
QUOTE (InspectorGadget @ Oct 9 2008, 16:38) *
QUOTE (haarp @ Oct 9 2008, 09:04) *

Well, I'm still curious how A52@6ch@640kbps sounds compared to unencoded. I don't have the right equipment (yet) to test for myself. Does anyone have experience with that A52 in that regard?


What's your (presumably) uncompressed 6-channel source?

48kHz PCM from FLAC (upsampled)
edit: that's 2 channels actually. But they get upmixed to 6 by ALSA.
niktheblak
My personal opinion is that everything an amplifier does besides plain decoding/amplifying the signal is useless. All DSP, equalization (unless it's a powerful parametric EQ to combat room resonance) etc. just makes the audio quality worse. So I don't see much point in using SPDIF just to get some DSP modes active.

You mentioned that your use of the amplifier will consist of the following:

1) Stereo music
2) Multichannel tracks in DVDs
3) Games with 5.1 audio channels

Stereo music works fine with uncompressed 2-channel SPDIF. AC3 tracks on DVD get passed through SPDIF already. If I were you, I would just use the uncompressed 2-channel SPDIF output and be done with it. You mentioned you're on Linux. Just how many games with 5.1 audio there are on Linux anyway? I wouldn't consider this use case important enough to drop my entire output into lossy AC3.

Edit: and if you're afraid of the 44.1 kHz -> 48 kHz SPDIF upsampling in stereo music, just use the analog connection. I see no problem in wiring both analog and SPDIF connections in and using analog for stereo music and SPDIF for DVD audio.
haarp
QUOTE (niktheblak @ Oct 10 2008, 09:13) *
My personal opinion is that everything an amplifier does besides plain decoding/amplifying the signal is useless. All DSP, equalization (unless it's a powerful parametric EQ to combat room resonance) etc. just makes the audio quality worse. So I don't see much point in using SPDIF just to get some DSP modes active.

My Receiver offers them. I want to test them on my own, but I will probably come to the same conclusion, the DSP modes are probably as useless as they sound.
Except for the Equalizer. Sure, it may change the way it sounds, but I like to increase the Bass and Treble for Heavy Metal.

QUOTE
Stereo music works fine with uncompressed 2-channel SPDIF. AC3 tracks on DVD get passed through SPDIF already. If I were you, I would just use the uncompressed 2-channel SPDIF output and be done with it.

I agree with you. That is assuming the Receiver itself upmixes 2ch-PCM to all speakers. I can't verify that as I don't have enough speakers yet, but I want Stereo tracks out of every speaker. If it does not Upmix on its own, I need ALSA to do that for me and output 6 channels -> A52

QUOTE
You mentioned you're on Linux. Just how many games with 5.1 audio there are on Linux anyway? I wouldn't consider this use case important enough to drop my entire output into lossy AC3.

Mainly Quake Wars. I play it a lot, so I want to try Surround sound with it

QUOTE
Edit: and if you're afraid of the 44.1 kHz -> 48 kHz SPDIF upsampling in stereo music, just use the analog connection. I see no problem in wiring both analog and SPDIF connections in and using analog for stereo music and SPDIF for DVD audio.



All in all, I want to use AC3 for consistency. I want several streams to be able to play at the same time. That means that either all are encoded or none are (excluding Passtrough here). However, I noticed that despite two apps using the same ALSA A52 device, they cannot play simultaneously. This sucks, and I need a workaround for this.
As for Analog connections: Sure, they might be nice, but I don't really like the fact that I lose the EQ. I also need to switch around the receiver all the time, I'd much rather have it sit in one mode and only touch it to change the volume.
On top of all that, most people can absolutely not hear the difference between a high-bitrate MP3 and WAV. So if I can't hear the difference between 640kbps A52 and WAV, it will be fine. I fully agree that lossy codecs suck, but that's just the way it is. I'm jsut curious what others have to say about A52's quality.
JRace
Home Theater recievers do not process the anaolog inputs.
Higher-end ones will apply bass management, which is desirable.
The other processing which is very usefull and not found on the anaolog inputs is speaker delay.

If you really want EQ on your analog inputs use a PC based EQ system.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.