You are not logged in.

#1 2014-05-25 11:00:27

clentfort
Member
Registered: 2013-05-21
Posts: 17

Analog Dolby Surround Output / Encode 5.1 to Analog Dolby Surround

I recently go my hands on a used "Bose Lifestyle 30" System, it only has analog audio in (a red and a white RCA connector) but is able to decode Dolby Surround. My PC only has separated outputs for 5.1 so I can't use the system to it's fullest! Is there any way I can encode the audio output to Dolby Surround?

What I have:
- Bose Lifestyle 30 with analog audio in (2 RCA connector, red and white)
- PC with several outputs for different audio channels

What I want:
- Analog Dolby Surround output on a single channel from my PC.

What I have tried:
- Googling but all I ever find is Dolby Digital anything....

Offline

#2 2014-05-25 15:28:19

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Analog Dolby Surround Output / Encode 5.1 to Analog Dolby Surround

First off I am not that familiar with Dolby's formats and trademarks, so my interpretations of the data I gathered might be wrong. Bear with me.

Wikipedia article on Dolby Surround provides a simple matrix, that I assume is interpreted by your system to decode surround signal.

Dolby Surround matrix wrote:

Source\Target    |    L    |    R    |    C        |    S
Left Total   =    |    1    |    0    | 1 / sqrt(2)    | j / sqrt(2)
Right Total =    |    0    |    1    | 1 / sqrt(2)    | -j / sqrt(2)

clentfort wrote:

Analog Dolby Surround output on a single channel from my PC

I think you want analog Dolby Surround on two channels, not one, since with only one you would not get (C)enter or (S)urround, but a distorted (L)eft or (R)ight. Those two RCA connectors are used for stereo input, so you can only use two channels of your sound card.

I suggest doing this in alsa with ladspa, since it is the most straightforward and therefore less error prone way. You need to mix different channels (L, R, C, S) down to stereo (Dolby's terminology is Left Total and Right Total) and to introduce 90° phase shifts forward and backward. The latter is tricky, since you would either need to shift the rest of the signal forward or travel back in time.
So the configuration should consist out of preferably one plug pcm (alternatively route pcm) that uses ttable to mix the channels accordingly and two ladspa plugins that phase shift the signal. You need to do two phase shifts, your base signal that is usually in phase (L, R) need to be shifted 90° forward (leaving Surround Right with 90° phase shift backwards), and phase shift Surround Left 180° forward (90° forward relative to L and R). That way you get the mixing matrix right. Ladspa plugins that should do the job are Hilbert transformer and the inverter (inverting the signal will be sufficient) from Steve Harris' LADSPA Plugins. You would need to first separate appropriate channels, phase shift and then then mix them down with the rest. So other route/plug pcms might be necessary.

There is the question what Surround channel is, since it is mono, but will be used as apparently stereo or even higher. LFE is a similar case. If you can find a mixer matrix/documentation for you Bose system that takes a 5.1 sound system into account, the whole process could be repeated. I only skimmed through its manual. You obviously could just mix them down to your liking.

There is a thread in alsa mailing list archive about this topic. Stefan Bruens suggests calculating an additional phase shift into to the mix (similar to what I suggested), thus removing the need for ladspa plugins. That might be an even better idea and easier to implement, although I do not know about ttables current capabilities in this particular case.

I do not have the capability to test this, because of lack of appropriate [Dolby Surround] hardware, so I can only help with the configuration itself. The basic idea that I drew should be correct however.

Obviously the alternative is to use vdownmix or a custom ttable to mix all six channels down to stereo and live with that result. It might even sound better then Dolby's Surround, because of Videostage decoder technology your Bose system uses.

Last edited by emeres (2014-05-25 16:11:57)

Offline

#3 2014-05-25 16:06:46

clentfort
Member
Registered: 2013-05-21
Posts: 17

Re: Analog Dolby Surround Output / Encode 5.1 to Analog Dolby Surround

Wow thanks for your answer and the work you put into it! Since till now everything sound-related worked nearly out of the box I have not much experience with the entire ALSA structure so I'll need some time to figure how to get things working.

Offline

#4 2014-05-25 16:13:12

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Analog Dolby Surround Output / Encode 5.1 to Analog Dolby Surround

Take your time. ALSA wiki is a good source to start with.

Offline

Board footer

Powered by FluxBB