LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-05-2008, 12:22 AM   #1
slakka
LQ Newbie
 
Registered: Mar 2008
Posts: 12

Rep: Reputation: 1
SPDIF Output Setup


Had a few battles getting my SPDIF sound output working and wanted to post the process now that it is working. Just an FYI that this is an ASUS M2N-E motherboard with the snd-hda-intel driver under openSUSE 11.0 and KDE. Please feel free to add comments or tell me if this was all actually required.

"Start" button, configure desktop, sound, sound system, hardware tab.
Set audio device to "advanced linux sound architecture"

If you haven't already, install alsa-utils so that you have aplay and alsamixer installed on your system.

From terminal run:
aplay -L

Output:
Code:
front:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Analog
    Front speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
    HDA NVidia, AD198x Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia
    HDMI Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)
Note that my digital output is listed as iec958

From terminal run:
alsamixer
For my specific setup I needed to make sure "IEC958" was not muted (shouldn't be MM) use m to toggle and "IEC958 playback source" was set to PCM use up/down arrows to toggle.

Testing
From terminal run:
speaker-test -Dplug:iec958 -c2 -l5 -twav (Dplug: corrolates to aplay -L output and will test a specific output)

speaker-test -c2 -l5 -twav (Tests default playback device)

To change the default playback device create a .asoundrc file in your home directory with:

Code:
pcm.!default iec958
(iec958 corrolates to aplay -L output)

Restart the sound system if you changed the default playback device
From terminal run:
rcalsasound restart

Last edited by slakka; 10-05-2008 at 02:07 AM.
 
Old 09-24-2009, 05:47 PM   #2
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
I cannot get sound from my spdif (optical digital out). Searched and found this post. Created the .asoundrc file. Now I got sound out from optical digital out, but I cannot get sound from other analog out, e.g., I can use my headphone before, but now it has no sound. The alsamixer show that all analog devices are ummuted.

So, how do I get both analog sound and digital working at the same time?

TIA.
 
Old 09-25-2009, 09:49 AM   #3
slakka
LQ Newbie
 
Registered: Mar 2008
Posts: 12

Original Poster
Rep: Reputation: 1
Using optical output and analog headphones together may not be supported and I am not sure there is a quick and easy way to switch between the two... Are you connecting the optical output to an amplifier? Does it have a head phone jack you could use? Perhaps this would be a solution.
 
Old 09-25-2009, 12:13 PM   #4
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
Thanks for quick reply. I connect my optical out to my headphone amplifier, but I have pc speakers which I would like to have sound when I am not using the headphone.

Yesterday, after setting up the .asoundrc file, I rebooted, and played music on vlc. It actually sent the sound to the spdif. But, today, using vlc, sound goes to analog. If I use Rhythmbox Music Player, sound is sent to spdif. I can't understand what happened that vlc is not working in spdif, and I like to use it since it has its own built in equalizer.
 
Old 09-27-2009, 10:31 AM   #5
ks8
Member
 
Registered: May 2003
Posts: 38

Rep: Reputation: 15
I found out what is happening. I use Gnome desktop.
Here is what I do to switch between digital and analog, very easy.

System->preference->sound

Choose sound capture - analog or digital
Choose device mixer - alsa or OSS.

Digital goes with OSS, Anlaog goes with Alsa.
 
Old 09-27-2009, 11:18 PM   #6
slakka
LQ Newbie
 
Registered: Mar 2008
Posts: 12

Original Poster
Rep: Reputation: 1
That's great! Thanks for the update... Hope this helps someone else out.
 
  


Reply



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
No output through SPDIf, but analog works. How do I get output through SPDIF? seanwnz Linux - General 11 11-08-2007 11:24 AM
Creative Live! Value (dell) Spdif Output? TZRick Linux - Hardware 1 09-02-2006 08:46 PM
Getting SPDIF output with gstreamer in FC5 freejump06 Fedora 2 09-01-2006 11:17 PM
Getting AC97 drivers use Realtek ALC850 SPDIF output Jaegermeister Linux - Hardware 14 05-01-2006 03:58 AM
Complete Linux Newbie + SPDIF output = HELP ! pierrafeu Linux - Hardware 5 10-02-2003 11:58 AM

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

All times are GMT -5. The time now is 09:29 AM.

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
Open Source Consulting | Domain Registration