Import the file into Audacity. The file should be imported as six mono audio tracks 1 to 6.
They are usually in the following order:-
- = front left
- = front right
- = centre
- = sub bass
- = rear left
- = rear right
Then in Edit - Preferences - Import/Export, select the radio button for "Use custom mix".
Then in the output device, situated just below the play, pause, etc buttons in the top left, select "surround51"
When you have finished editing the tracks click file export as ac3 for example and set the correct sample rate. Click save, You will then be shown a graphic showing the six tracks and how they are linked to the six output tracks, this is usually correct, but you can change the track order here if you wish. then click save. Job done.