Mandriva Home   Linux   Store   Club   Support   Updates   Partner 
Mandriva Club Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 Forum SubscriptionsNew: Follow discussions by email !   
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   En   Fr   De   Es   It   Nl   Int  

Mandriva 2006.0 x86_64 : no spdif sound inside KDE 3.4

 
Post new topic   Reply to topic    Mandriva Club Forum Index -> Sound
View previous topic :: View next topic  
Author Message
stock
Silver


Joined: 15 Nov 2003
Posts: 29

PostPosted: Mon Nov 28, 2005 6:34 pm    Post subject: Mandriva 2006.0 x86_64 : no spdif sound inside KDE 3.4 Reply with quote

(If you run a Linux desktop with linux kernel 2.6.14 or higher, things have become more easy, as the OSS-Emulation features have improved significantly, giving oldfashioned audio applications like macromedia flash 9 a new life. Newcomers into Linux audio programming are welcomed with a jump start. Here's an update.)


I installed Mandriva 2006.0 x86_64 but get no spdif sound inside KDE 3.4. On the command line things like :

$ aplay -Dspdif testsound.wav

just work fine . But inside KDE 3.4 when one chooses ALSA , there's not a single sound to
be heard. Maybe inside the KDE 3.4 sound config one needs to configure a spdif
device inside the artsd config. Anyone who has a spdif setup working with Mandriva 2006.0
using a digital spdif speaker set?

Code:

 [jackson:stock]:(~)$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: AMD8111 [AMD AMD8111], device 0: Intel ICH [AMD AMD8111]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
[jackson:stock]:(~)$
[jackson:stock]:(~)$ aplay -L
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'
default 'cards.pcm.default'
dmix 'cards.pcm.dmix'
dsnoop 'cards.pcm.dsnoop'
[jackson:stock]:(~)$

Back to top
View user's profile Send private message
stock
Silver


Joined: 15 Nov 2003
Posts: 29

PostPosted: Tue Nov 29, 2005 7:30 am    Post subject: Mandriva 2006.0 : no spdif sound inside KDE 3.4 (solved) Reply with quote

After a lot of troublesome debugging i found the solution. I even went back to mandrake 10.1 x86_64 to debug things. At first i started debugging sound using the artsd FAQ from kde.org

http://docs.kde.org/development/en/kdebase/faq/sound.html

One first kills artsd with artsshell terminate , and next i started the artsd from the command line using : artsd -l 0 displaying both on Mandrake 10.1 and Mandriva 2006.0 the same error message :

Code:

ALSA lib pcm_hw.c:549:(snd_pcm_hw_start) SNDRV_PCM_IOCTL_START failed:
 (continued from previous line) Broken pipe


So after that i upgraded artsd to a newer version arts-1.3.2-9mdk.x86_64.rpm . No luck though as i still got the same error, which points the error to a flawed version of alsa-lib, which inside Mandrake/Mandriva is called libalsa2 . So i then upgraded to new alsa lib, utils and tools gear. For that i downloaded the source SRPMS from Mandriva 2006.0 :

Code:

-rw-r--r--  1 root root 2947231 Nov 29 06:14 alsa-tools-1.0.9-1mdk.src.rpm
-rw-r--r--  1 root root   71174 Nov 29 06:14 alsamixergui-0.9.0-0.10rc1_3mdk.src.rpm
-rw-r--r--  1 root root   90928 Nov 29 06:14 gnome-alsamixer-0.9.6-2mdk.src.rpm
-rw-r--r--  1 root root  716378 Nov 29 06:17 libalsa2-1.0.9-1mdk.src.rpm
-rw-r--r--  1 root root  966009 Nov 29 06:20 alsa-utils-1.0.9-4mdk.src.rpm


After building and installing these on Mandrake 10.1 i rebooted and went back to debugging artsd according the artsd FAQ from KDE.org. The artsd now did function ok:

Code:

[jackson:stock]:(~)$ artsd -l 0
artsd version is 1.3.2
gsl: using Unix98 pthreads directly for mutexes and conditions
[artsd:  4795] SoundServerStartup --> got lock
autodetecting driver:
 - oss: 10
 - alsa: 15
 - null: -1
 - esd: -1
 - nas: -1
 - toss: 4
... which means we'll default to alsa
ALSA driver: default
buffering: 15 fragments with 940 bytes (audio latency is 79.9 ms)
Closing ALSA-driver
virtualize StereoVolumeControl
ALSA driver: default
buffering: 15 fragments with 940 bytes (audio latency is 79.9 ms)
audio format is 44100 Hz, 16 bits, 2 channels
addDirectory(/usr/lib64/mcop,)
addDirectory(/usr/lib64/mcop/Arts,Arts)
addDirectory(/usr/lib64/mcop/Arts/Environment,Arts::Environment)
addDirectory(/usr/lib64/mcop/Noatun,Noatun)
addDirectory(/usr/lib64/mcop/Amarok,Amarok)
addDirectory(/home/stock/.mcop/trader-cache,)
Arts::MidiManager registered successfully.
[artsd:  4795] SoundServerStartup <-- released lock


with artsplay i could see the wav file now being played, but still no spdif sound. Next i started the Sound System Configurator from KDE, (which should actually be called Arts Config Tool) . I adjusted the Hardware TAB according this picture

http://crashrecovery.org/kde-artsd-config.jpg

After that SPDIF sound through Artsd/KDE just rocked! Notice that i had to switch of full-duplex, because apparently the onboard AMD AMD8111 soundcard with Analog Devices AD1981B Chipset doesn't support this. Here's a picture of the alsamixer settings :

http://crashrecovery.org/alsamixergui.jpg

Allthough people frequently rant about aRts , it actualy solves a LOT of sound problems with a single blow. E.g. when using the spdif ALSA driver inside xmms one can of course play stereo audio but no mono audio. When using the "aRts Output 0.7.1 [libarts.so]" plugin you can also play low quality mono-sound audio files, like radio interview recordings with the best possible quality. Which is sole reason i bought that Logitech Z-5500 Digital speakerset.

Robert M. Stockmann
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 01, 2005 2:14 am    Post subject: Reply with quote

Thanks so much! you've helped so much! I finally got my spdif to work on 2006 x86_64.

All I had to do was put the force audio device location parameter in.
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 01, 2005 6:08 am    Post subject: Reply with quote

Ok, I lied. *laugh*

I have "normal" output from my spdif, but I can't get AC3 or DTS to work with Kaffeine. Any video files that are encoded with these are not watchable, as I only get the "background" channels, no voices, or very faint voices.

What is wrong?
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
stock
Silver


Joined: 15 Nov 2003
Posts: 29

PostPosted: Thu Dec 01, 2005 2:34 pm    Post subject: Reply with quote

" have "normal" output from my spdif, but I can't get AC3 or DTS to work with Kaffeine."

AFAIK Kaffeine uses the xine engine. I do know how to get spdif sound inside xine, which also then provides for AC3 and DTS sound. My advise is to first remove all the old xine settings by removing .xine :

Code:

$ rm -rf $HOME/.xine


Fire up xine, and thus have it create a fresh $HOME/.xine/config, next inside $HOME/.xine/config one should check if the following is set :

Code:

# speaker arrangement
# { Mono 1.0  Stereo 2.0  Headphones 2.0  Stereo 2.1  Surround 3.0  Surround 4.0
# Surround 4.1  Surround 5.0  Surround 5.1  Surround 6.0  Surround 6.1  Surround 7.1
#  Pass Through }, default: 1
audio.speaker_arrangement:Pass Through


Code:

# audio driver to use
# { auto  null  alsa  oss  arts  esd  none  file }, default: 0
audio.driver:alsa


After making only these 2 adjustments anything works ( DTS/AC3/THX whatever) and is even displayed on the Logitech display center :

Input: Coax
Effect: dts Digiutal

So to get DTS/AC3/THX going one apparently has to bypass Artsd and go directly with the alsa driver

Cheers,

Robert M. Stockmann
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 01, 2005 4:05 pm    Post subject: Reply with quote

Hmm, that would be excellent if my ./xine directory even had a config file in it. Sorry, didn't mean to be cheeky =) It's only got the catalog.cache, which seems to be a file telling wher the xine libraries are. Plus, I can't launch xine from the commandline, bash doesn't recognize the command "xine"

I can change those parameters you said graphically in Kaffeine and now I have no sound output whereas I had some before when the speaker arrangement was set to Surround 5.1

So, it stands to reason that my settings are being kept somewhere else and I need to delete that file to make xine/kaffeine regenerate it to defaults, then make the changes.
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
stock
Silver


Joined: 15 Nov 2003
Posts: 29

PostPosted: Thu Dec 01, 2005 4:36 pm    Post subject: Reply with quote

no xine ? hmm you should make sure all the xine gear is installed :

Code:

[jackson:stock]:(/mnt/cdrom/media/main)$ ls *xine* | grep -v xinetd
lib64xine1-1-0.rc5.9mdk.x86_64.rpm
lib64xine1-devel-1-0.rc5.9mdk.x86_64.rpm
libxine1-1-0.rc5.8mdk.i586.rpm
xine-aa-1-0.rc5.9mdk.x86_64.rpm
xine-arts-1-0.rc5.9mdk.x86_64.rpm
xine-dxr3-1-0.rc5.9mdk.x86_64.rpm
xine-esd-1-0.rc5.9mdk.x86_64.rpm
xine-flac-1-0.rc5.9mdk.x86_64.rpm
xine-gnomevfs-1-0.rc5.9mdk.x86_64.rpm
xine-plugins-1-0.rc5.9mdk.x86_64.rpm
xine-ui-0.99.2-1mdk.x86_64.rpm
xine-ui-aa-0.99.2-1mdk.x86_64.rpm
xine-ui-fb-0.99.2-1mdk.x86_64.rpm
[jackson:stock]:(/mnt/cdrom/media/main)$


next i found out that after firing up xine, only the audio.speaker_arrangement:Pass Through setting needs to be adjusted. Your mileage may vary. I also found out that the days of xmms are numbered as amarok is for me the way to go, especially for playing low kHz mono audio and mp3 files which are compressed by using VBR recording. Here's my essential non-default .xine/config settings when using for normal audio.

Code:

[jackson:stock]:(~/.xine)$ cat config | grep -v "^#" | sed '/^$/d'
.version:1
gui.experience_level:Master of the known universe
gui.panel_visible:0
gui.setup_x:110
gui.setup_y:152
audio.speaker_arrangement:Pass Through
audio.alsa_front_device:default
codec.real_codecs_path:/usr/lib/win32
misc.memcpy_method:libc
[jackson:stock]:(~/.xine)$


inside Amarok choosing the xine engine adapts these settings automaticly , and here's a picture of that :

http://crashrecovery.org/amarok-xine-engine.jpg

with the addition that the full string inside "device used for 5.1-channel output" is :

Code:

iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2


Ok i admit that when adding the "audio.driver:alsa" inside the xine config file, the amarok sound stopped working .. dunno why that is. The most important stuff for me is good audio quality when playing flaky manufactured low kHz mono mp3 files using VBR recording.

Robert M. Stockmann
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 01, 2005 5:29 pm    Post subject: Reply with quote

Hmm... I don't really like the xine interface. I actually like the Kaffeine interface. But none of this is working. I can't even get proper sound out of my analog outputs.

Actually since I installed xine and modified things, I get no sound out of anything when trying to play a digital signal. Analogue files like MP3's, regualr .avi or .mpg files work fine, it's only in situations where encoded stuff is being played.

Also, i looked through the config file that xine made and I don't have a audio.speaker_arrangement parameter, i only have audio.output.speaker_arrangement option. I changed it to passthrough and still nothing. This is aggravating. Almost aggravating enough to go back to windows (or maybe not....)
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 01, 2005 5:31 pm    Post subject: Reply with quote

Hang on. I just checked my cables, and it seems that I was using a plain RCA cable for the SPDIF coaxial, maybe I have to get a specific SPDIF cable?

But, even ifthat was the case, I should be able to hear properly from the regular analog outputs(1/8" phone jacks)

Hmm... strange.
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 01, 2005 5:48 pm    Post subject: Reply with quote

Ok, Changing the speaker output to Pass Through negates all digital audio. This is strange, as I've been able to watch these movies before, on this system, just using a different speaker setup.
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Fri Dec 02, 2005 2:04 am    Post subject: Reply with quote

Ok. Figured it out. The parameter: device.alsa_passthrough_device has to be set to "default" NOT "iec958:AES0=0x6....."

This directs the passthrough to the proper device and allows the audio to be decoded by external decoders.

Thanks for the help!
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
stock
Silver


Joined: 15 Nov 2003
Posts: 29

PostPosted: Fri Dec 02, 2005 2:42 am    Post subject: Reply with quote

amazing, i just found out that when running alsamixer and i do NOT put "IEC958 Playback AC97-SPSA" to 0, all the sound is gone.
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Fri Dec 02, 2005 2:52 am    Post subject: Reply with quote

Yep, same here.
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
awilliamson
Site Admin, Mandriva


Joined: 30 Mar 2005
Posts: 5837
Location: Vancouver, B.C.

PostPosted: Fri Dec 02, 2005 4:36 am    Post subject: Reply with quote

I think the ALSA guys decided long ago that giving all the controls simple and obvious names which would make it clear which way you should set them would be just way, way too easy...

(and, of course, to keep us all on our toes, every two releases they change the old cryptic name to a new cryptic name, and swap the setting, so when before it should have been off, now it must be on. If they didn't do this, my afternoons would be boring.)
_________________
Adam Williamson | Editor, Mandriva Community Newsletter; Mandriva Club Monkey | awilliamson A T mandriva D 0 T com
All opinions posted here are my own and do not represent official Mandriva policy.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Fri Dec 02, 2005 4:49 am    Post subject: Reply with quote

awilliamson wrote:
I think the ALSA guys decided long ago that giving all the controls simple and obvious names which would make it clear which way you should set them would be just way, way too easy...

(and, of course, to keep us all on our toes, every two releases they change the old cryptic name to a new cryptic name, and swap the setting, so when before it should have been off, now it must be on. If they didn't do this, my afternoons would be boring.)


That's awesome Adam. I love it.

I'm pretty new to linux and I know I'm a pretty savvy person, I can investigate and diagnose problems fairly easily if given the right tools, but I don't know how anyone who's not prepared to put quite a large amount of energy into solving problems like this is ever going to be able to use Linux as a daily desktop environment.

I love the challenge though. I like the thought of just being able to tinker with my os!

But I do know others who hate configuring stuff (my girlfriend) and she would get frustrated and abandon computers for ever if I wasn't there to help her solve those little quirks and such.

I'm slowly winning her over to the linux side, she has KDE's mascot, Konqui as her background in XP Wink
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
awilliamson
Site Admin, Mandriva


Joined: 30 Mar 2005
Posts: 5837
Location: Vancouver, B.C.

PostPosted: Sat Dec 03, 2005 3:25 am    Post subject: Reply with quote

ALSA drives me bonkers to an extent nothing else can manage. Most of the actual functional stuff they do works really well, but they don't seem to have anyone whose job is to say "this is what we need to do to make normal people who don't actually _live_ this stuff understand what they're supposed to do. And please don't CHANGE it, okay?"
_________________
Adam Williamson | Editor, Mandriva Community Newsletter; Mandriva Club Monkey | awilliamson A T mandriva D 0 T com
All opinions posted here are my own and do not represent official Mandriva policy.
Back to top
View user's profile Send private message Visit poster's website AIM Address MSN Messenger
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Tue Dec 06, 2005 6:36 pm    Post subject: Reply with quote

More drama! I tried to play mp3's in amaroK last night and no sound. doh. This was the first time since I got my spdif working that I tried to play music.

stock: I was wondering if you were using the standard amarok-xine-engine package from the mirrors, or what you are using because when I try to use the xine engine, amaroK crashes. I'll keep looking around.

Also, what version of amarok do you have? my amarok settings box doesn't look like yours, you have way more options in the xine engine box than I do. I'm using the standard amarok 1.3.1 from the mirrors
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
purelithium
Silver


Joined: 06 Nov 2005
Posts: 62
Location: Canada

PostPosted: Thu Dec 08, 2005 6:58 pm    Post subject: Reply with quote

figured it out.

I just had to disable the "Override device location" parameter. That is not needed to configure SPDIF output in Mandriva, which is strange....

I can't say for sure what is required for SPDIF in mandriva, but I think it's the fact that you have to select ALSA as the audio device in the KDE sound system.

In actual fact, I didn't have to do nearly as much configuration as you did to sort this problem out for myself.
_________________
Gelan Hopkins

When you have a problem, reboot. It will probably fix whatever was broken.

http://easyurpmi.zarb.org/ -- use it. know it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Mandriva Club Forum Index -> Sound All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group