LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-25-2004, 08:42 AM   #1
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Rep: Reputation: 15
Unhappy 5.1 Surround sound in SuSE Linux 9.0


It's been a few days and I was just starting to get comfortable with my Linux system...

I was just starting to come to terms with inability to play DVD's on Linux... when I discovered that I couldn't get my 5.1 surround sound working. Really, truly, if there were anything that might persuade me to go back to Windows, it would be the knowledge that both DVD's AND surround sound were not possible.

I've got Avance AC'97 inbuilt sound- with holes at the back for front speaker set, rear speaker set, and centre/subwoofer speaker set.

Currently, only the front set plays sounds, music etc. By going into ALSA MixerGUI and activating the "duplicate front" sliders, I can produce the same sounds from my rear set (though I would argue that this is not truly surround sound). However I can't get a peep out of centre speaker or sub; and to be honest, duplicating front output at the rear is far from true surround sound.

Apparently my computer is using the Intel 8x0 driver. Can anyone help out here before I go insane and do something stupid like revert back to WinXP? Help!
 
Old 03-26-2004, 09:49 AM   #2
Atomsmasher
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Rep: Reputation: 15
I am using the spdif built in to my board and your same driver. I can't get it to work except when using XMMS player. I would like to have it work for all sounds, events, games, etc. But no. And out of all the ports for audio in the back only the front speaker out works, similar to your issue.

I am still looking for an answer to this quesiton:

Am I only going to get sould out of my spdif with using XMMS or watching a movie? I would like to get the system sounds and Tgames, beeps, buzzes, etc. ALL sounds out of the spdif. Is this possible?

Thanks,

Bobby
 
Old 04-02-2004, 06:00 PM   #3
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
Anyone got any ideas on this one?
 
Old 04-02-2004, 11:58 PM   #4
Atomsmasher
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Rep: Reputation: 15
Well.... I hate to admit it, but I gave up. I installed my SB Audigy back in and the digital out works very well now. I got the mono mini plug to rca and plugged that into my coaxial digital in and no probs. Alsamixer had the digital out muted by default but that was expected. I now have 5.1 sound all the time in both desktop and games..... now to get speech working in ut2004.

I wish u luck getting the onboard spdif port working and if you do pleasee drop us a line here.
 
Old 04-03-2004, 03:39 AM   #5
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
This doesn't look good. Lack of DVD and surround sound is causing me to appreciate Windows in a whole new way
 
Old 04-03-2004, 01:42 PM   #6
Atomsmasher
LQ Newbie
 
Registered: Mar 2004
Posts: 24

Rep: Reputation: 15
Well, I was actually able to get the surround sound working using XMMS for mp3's and Xine for my dvds. However, that's the ONLY time it would work. Seems that the nfroce/alsa drivers are not up to speed yet but the emu10k1 or whatever its called for the sound blaster stuff hasn't givin me any issues yet.
 
Old 07-13-2005, 11:47 AM   #7
LordInquisitor
LQ Newbie
 
Registered: Jul 2005
Location: Russia, Moscow
Posts: 3

Rep: Reputation: 0
Try this config in ~/.asoundrc

Use sound51 device as alsa device in xmms, bmp or another music player, where you want to use 5.1 sound. I've kept 2.0 default setting for system beeps like irc, icq etc, because I don't want them to be 5.1. If you want ALL sounds be 5.1 just unconmment first slave.pcm in !default and comment the second.

Code:
pcm.!default {
    type plug
    #slave.pcm "sound51"
    slave.pcm "dmix"
}

pcm.dmixs51 {
        type dmix
        ipc_key 1024
        slave {
                pcm "hw:0,1"
                rate 48000
                channels 6
                period_time 0
                period_size 1024
                buffer_time 0
                buffer_size 4096
        }
}

pcm.s51 {
   type plug
   slave.pcm "dmixs51"
}

pcm.dsp0 {
   type plug
   slave.pcm "dmixs51"
}

pcm.sound51 {
    type route
    slave.pcm s51
    slave.channels 6
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    ttable.0.4 0.5
    ttable.1.4 0.5
    ttable.0.5 0.5
    ttable.1.5 0.5
}
Regardigs dvd's I dont know, but 5.1 ac3-s in divX moves works well in mplayer with

Code:
channels = 6
line in /etc/mplayer.conf

P.S. Sorry for my english ...
 
Old 07-13-2005, 01:11 PM   #8
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
Thanks for the advice LordInquisitor - it's been over a year and I'm now on SuSE 9.3 and STILL can't get the thing working.

I checked my home directory (/home/me) and my root directory (/root) and found no file called .asoundrc - so I copied the code you wrote above and saved it as a new file called .asoundrc in both directories. I restarted my machine but although there are no errors displayed, there is now no sound at all.

Any idea why it might not be working? :S
 
Old 07-13-2005, 03:14 PM   #9
LordInquisitor
LQ Newbie
 
Registered: Jul 2005
Location: Russia, Moscow
Posts: 3

Rep: Reputation: 0
At first start "alsamixer" in console and see are required channels are muted. If so - unmute them.

If all is correct, find any WAV file and try playing it using different alsa devices.

aplay -D default a.wav
aplay -D hw:0,0 a.wav
aplay -D hw:0,1 a.wav
aplay -D surround51 a.wav
aplay -D s51 a.wav

If there will be any errors - post them here.
 
Old 07-13-2005, 03:50 PM   #10
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Its better to change
Code:
    type route
    slave.pcm s51
    slave.channels 6
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    ttable.0.4 0.5
    ttable.1.4 0.5
    ttable.0.5 0.5
    ttable.1.5 0.5
to

Code:
    type route
    slave.pcm s51
    slave.channels 6
    ttable.0.0 0.9
    ttable.1.1 0.9
    ttable.0.2 0.75
    ttable.1.3 0.75
    ttable.0.4 0.5
    ttable.1.4 0.5
    ttable.0.5 0.5
    ttable.1.5 0.5
This way you can hear all five channels seperately instead all channels comming at you at the same level. The subwoofer channel have to be filtered by an active low-pass filter because using ladpa filters will not work for just one channel. Its better to have just two channels playing for the best sound quality. Surround sound screws up sound quality by canceling out frequencies. About 98% of people positions rear speaker incorrectly. Their are three types of rear speakers. They are directional, dipole, and bipole. The directional speakers should be pointed away from the listening area, but they should be pointed at an diffused material. Bipole speakers should be placed on the back wall. Dipole speakers should placed on the side wall.

You are really spoiled if you need surround sound for everything.
 
Old 07-13-2005, 05:55 PM   #11
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
^ I confess to being spoilt

I removed the .asoundrc file I made from /home/me but left it in /root and rebooted; sound came back. I checked alsamixer and all the necessary channels seemed to work. Running the commands you suggested produced the following results:

aplay -D default a.wav = WORKS

aplay -D hw:0,0 a.wav
Code:
Playing WAVE 'a.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono
aplay: set_params:882: Sample format non available
aplay -D hw:0,1 a.wav
Code:
aplay: main:533: audio open error: Permission denied
aplay -D surround51 a.wav
Code:
Playing WAVE 'a.wav' : Unsigned 8 bit, Rate 11025 Hz, Mono
aplay: set_params:882: Sample format non available
aplay -D s51 a.wav
Code:
ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM s51
aplay: main:533: audio open error: No such file or directory
Seeing the error about permissions made me wonder whether I should run as root; all tests produced the same result as root except:

aplay -D s51 thinkwhite.wav
ALSA lib pcm_dmix.c:802snd_pcm_dmix_open) unable to open slave
aplay: main:533: audio open error: Permission denied

I'm going to try restoring the .asoundrc file to my /home/me directory and run again to see if it makes a difference.

Anyone who manages to solve this cunning mystery has a standing round of beer for me if they're ever in England

Last edited by MoghNX01; 07-13-2005 at 05:57 PM.
 
Old 07-14-2005, 03:30 AM   #12
LordInquisitor
LQ Newbie
 
Registered: Jul 2005
Location: Russia, Moscow
Posts: 3

Rep: Reputation: 0
At first - you don't need to reboot, when you make changes to ~/.asoundrc or /etc/asound.conf (THIS IS NOT A WINDOWS). You don't need even to restart alsa.

Maybe you need to add your user to group "audio":

gpasswd -a <user> audio

(I don't know how it is in SuSE, but in Gentoo it is required)

Check permissions to
/dev/dsp
/dev/adsp
/dev/audio
/dev/mixer

And to all devices in /dev/snd (Try adding "options snd device_mode=0666" to /etc/modules.conf)

What output gives "aplay -L" command?
 
Old 07-14-2005, 04:32 AM   #13
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
I made sure I was added to audio and that I had permissions to the four audio devices you specified, as well as /dev/snd. Oddly enough, there was no /etc/modules.conf file, and a search of the filesystem did not reveal any file named that anywhere on the computer.

Since restoring the .asoundrc file, two of the results for the five tests above have changed to:

aplay -D default a.wav
ALSA lib pcm_dmix.c:802snd_pcm_dmix_open) unable to open slave
aplay: main:533: audio open error: Permission denied

aplay -D s51 a.wav
ALSA lib pcm_dmix.c:802snd_pcm_dmix_open) unable to open slave
aplay: main:533: audio open error: Permission denied

I also did aplay -L and got the following:

Code:
PCM list:
hw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
}
plughw {
        @args.0 CARD
        @args.1 DEV
        @args.2 SUBDEV
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars {
                                0 ALSA_PCM_CARD
                                1 ALSA_CARD
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.card'
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars {
                                0 ALSA_PCM_DEVICE
                        }
                        default {
                                @func refer
                                name 'defaults.pcm.device'
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name 'defaults.pcm.subdevice'
                }
        }
        type plug
        slave.pcm {
                type hw
                card $CARD
                device $DEV
                subdevice $SUBDEV
        }
}
plug {
        @args.0 SLAVE
        @args.SLAVE {
                type string
        }
        type plug
        slave.pcm $SLAVE
}
shm {
        @args.0 SOCKET
        @args.1 PCM
        @args.SOCKET {
                type string
        }
        @args.PCM {
                type string
        }
        type shm
        server $SOCKET
        pcm $PCM
}
tee {
        @args.0 SLAVE
        @args.1 FILE
        @args.2 FORMAT
        @args.SLAVE {
                type string
        }
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm $SLAVE
        file $FILE
        format $FORMAT
}
file {
        @args.0 FILE
        @args.1 FORMAT
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default raw
        }
        type file
        slave.pcm null
        file $FILE
        format $FORMAT
}
null {
        type null
}
cards 'cards.pcm'
front 'cards.pcm.front'
rear 'cards.pcm.rear'
center_lfe 'cards.pcm.center_lfe'
side 'cards.pcm.side'
surround40 'cards.pcm.surround40'
surround41 'cards.pcm.surround41'
surround50 'cards.pcm.surround50'
surround51 'cards.pcm.surround51'
surround71 'cards.pcm.surround71'
iec958 'cards.pcm.iec958'
spdif 'cards.pcm.iec958'
modem 'cards.pcm.modem'
dmix 'cards.pcm.dmix'
dsnoop 'cards.pcm.dsnoop'
default {
        type plug
        slave.pcm sound51
}
dmixs51 {
        type dmix
        ipc_key 1024
        slave {
                pcm 'hw:0,1'
                rate 48000
                channels 6
                period_time 0
                period_size 1024
                buffer_time 0
                buffer_size 4096
        }
}
s51 {
        type plug
        slave.pcm dmixs51
}
dsp0 {
        type plug
        slave.pcm dmixs51
}
sound51 {
        type route
        slave.pcm s51
        slave.channels 6
        ttable.0.0 1
        ttable.0.2 1
        ttable.0.4 0.5
        ttable.0.5 0.5
        ttable.1.1 1
        ttable.1.3 1
        ttable.1.4 0.5
        ttable.1.5 0.5
}
Also, when I removed the .asoundrc file after doing these tests, sound did not come back on (should I restart?). I killed the artsd process but when I tried to run it again I got the following:

/opt/kde3/bin/artsd
ALSA lib pcm_dmix.c:802snd_pcm_dmix_open) unable to open slave
Error while initializing the sound driver:
device: default can't be opened for playback (Permission denied)

Thanks for your help so far, very much appreciated

Last edited by MoghNX01; 07-14-2005 at 04:37 AM.
 
Old 07-26-2005, 05:00 PM   #14
fuzzyworm
Member
 
Registered: Sep 2003
Location: Stroud, UK
Distribution: Kubuntu, Debian
Posts: 149

Rep: Reputation: 15
Getting DVDs to play

I hope this isn't an extra unnecessary answer, I did scan the post, but couldn't find a bit releveant to your dvd problem.

You may not have had success getting DVDs to play, because most distributions don't officially support them, unless you want to buy a commercial DVD player, because the technology involved is patented. (see nosoftwarepatents.com)

There are various programs, however, which will allow you to watch them, the legality is a little grey, but then, who has a licensed DVD player in windows anyway?

The thing you need most of all is libdvdcss, or equivalent. My reccommended way of doing this, though I must point out that you should thoroughly research the legal implications, is below. This method has been written from the point of view of a debian user, so may be different for SuSE.

Use apt-get to install 'ogle', and optionally the GUI version.
search through the documentation, under debian, I think the file is under /usr/share/doc/libdvdread3.
This folder should contain a file with instructions for how to install libdvdcss. Once this is installed, you should be able to play dvds in any program that supports dvds, though I usually use ogle or (g)mplayer.

You may also be able to get a commercial dvd app from SuSE, or certain other retailers.

Hope this is of help to you.
 
Old 07-27-2005, 03:34 PM   #15
MoghNX01
Member
 
Registered: Mar 2004
Location: Leeds, West Yorkshire, UK
Distribution: OpenSUSE 10.3 x86_64
Posts: 69

Original Poster
Rep: Reputation: 15
^ Thanks- I did eventually work out how to get DVDs working! Still, as much as my Linux proficiency has increased, no joy on the surround sround. Ta for the post though!

Any experts on 5.1 would be welcome...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Surround Sound. PowersurgeX Linux - Hardware 7 11-22-2005 04:31 PM
Sound blaster Live! 24bit + Surround sound Jay_highlands Linux - Hardware 3 05-14-2005 01:37 AM
Linux Surround Sound benrose111488 Linux - Hardware 0 07-19-2004 06:00 PM
Surround sound in Suse 9 (SBlive 5.1) goldeneyexs Linux - Hardware 0 02-21-2004 03:01 PM
SuSE 8.2 & Surround Sound mandika Linux - Hardware 0 08-02-2003 07:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration