[Linux-Ubuntu] [How to] Make Spdif output work for beginners !
#1
Hi,
After wasted hours of searching on the internet/xbmc forum the way to make my Spdif works, I found a thread in the xbmc passion forum but it is in French...
Unfortunately, I did not find this information on the official xbmc forum Oo
So, here is the English translation checked by myself :


For information, IEC958 corresponds to optical output and / or digital RCA.
HDMI is named as such under Linux
[Note from redactor : My hardware is an Asrock ION working with Ubuntu 9.04 & Alsa 1.018]

To begin you must activate the IEC958 output which is disabled by default:

Open the the gnome volume controller and activate the IEC958 like on the picture
Image
Close the gnome volume controller.


To be sure settings are saved, you can write in your terminal :

Code:
sudo alsactl store 1
[Note from redactor : Do not take care if you get error message]


WARNING: Under Ubuntu 9.04 there is a bug that can be circumvented in this way:

Open a terminal and write
Code:
sudo gedit /etc/modprobe.d/alsa-base.conf
add one of the 3 lines below that corresponds to your hardware

Code:
options snd-hda-intel model=6stack-dig
options snd-hda-nvidia model=6stack-dig
options snd-hda-ati model=6stack-dig
into the gedit editor and close it with accepting changes



To activate SPDIF output, in your terminal, write :
Code:
sudo gedit /etc/asound.conf

Copy exactly the following text into the gedit editor and close it with accepting changes

Code:
pcm.!default {

   type plug
   slave {
       pcm "iec958"
   }

}

Now that your asound (or. Asoundrc) is properly done, you can configure the sound on XBMC. To do this go to / Settings / System / Audio Hardware.

The default settings "Digital" is ready for its optical
Image

That should work Wink
Reply
#2
I did not checked this part which is about hdmi output. But this should work also.



[Note from redactor : My hardware is an Asrock ION working with Ubuntu 9.04 & Alsa 1.018]

To begin you must activate the IEC958 output which is disabled by default:

Open the the gnome volume controller and activate the IEC958 like on the picture
Image
Close the gnome volume controller.


To be sure settings are saved, you can write in your terminal :

Code:
sudo alsactl store 1
[Note from redactor : Do not take care if you get error message]


WARNING: Under Ubuntu 9.04 there is a bug that can be circumvented in this way:

Open a terminal and write
Code:
sudo gedit /etc/modprobe.d/alsa-base.conf
add one of the 3 lines below that corresponds to your hardware

Code:
options snd-hda-intel model=6stack-dig
options snd-hda-nvidia model=6stack-dig
options snd-hda-ati model=6stack-dig
into the gedit editor and close it with accepting changes



To activate SPDIF output, in your terminal, write :
Code:
sudo gedit /etc/asound.conf

Copy exactly the following text into the gedit editor and close it with accepting changes

Code:
pcm.!default {

   type plug
   slave {
       pcm "hdmi"
   }

}

Now that your asound (or. Asoundrc) is properly done, you can configure the sound on XBMC. To do this go to / Settings / System / Audio Hardware.

The default settings "Digital" is ready for its optical
Image
You just have to replace "iec958" output device by "hdmi"

On some motherboard, you'll have to uncheck DTS and AC3 to make it work


That should work Wink
Reply
#3
Quote:You just have to replace "iec958" output device by it to "HDMI"
or "hdmi"?
Reply
#4
vikjon0 Wrote:or "hdmi"?

Thanks :p
Reply
#5
Thanks for this very easy "How-to". I finally think that all xbmc related stuff is working on my ion 330.
Reply
#6
Those of you who used this method, did you try a speaker-test -c 6 and get sound out of all six speakers? Just curious. I am on a mac mini, using the SPDIF out converted to HDMI, and still can only get 2 channels out of alsa when I run the test from the terminal.
Reply
#7
BDPNA Wrote:Those of you who used this method, did you try a speaker-test -c 6 and get sound out of all six speakers? Just curious. I am on a mac mini, using the SPDIF out converted to HDMI, and still can only get 2 channels out of alsa when I run the test from the terminal.

That, I believe, only works if using analog out for surround. If you're using SPDIF, you'll need to grab an AC3 encoded file and play it with mplayer.

For example, grab the test AC3 file off this page: http://www.lynnemusic.com/surround.html.

And play it with mplayer (may need to install mplayer on your mac):
mplayer -ao alsa:device=iec958 -ac hwac3 test.ac3

You may need to replace iec958 with hdmi and test.ac3 with the actual filename to use.
Reply
#8
Hi, I followed your How-To but Sound still doesn't work... I also have a AsRock ION 330 with Ubuntu 9.10. I don't have gnome installed, just X11, alsa and load XBMC directly. I think gnome is doing something, that I am missing so far, do you have any idea what it could be?
Reply
#9
I also can't seem to get spdif output to work 100%.
  • Revo 1600
  • Turtle Beach Audio Advantage Micro USB card for optical out
  • Dolby Digital and dts output fine in movies
  • MP3s play fine
  • No menu sounds!!!

Code:
aplay -L
front:CARD=NVidia,DEV=0
    HDA NVidia, ALC662 rev1 Analog
    Front speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, ALC662 rev1 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, ALC662 rev1 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, ALC662 rev1 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, ALC662 rev1 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, ALC662 rev1 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, NVIDIA HDMI
    HDMI Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)
front:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    Front speakers
surround40:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=default,DEV=0
    USB Sound Device        , USB Audio
    IEC958 (S/PDIF) Digital Audio Output


xbmc audio output settings:
Code:
audio output = Digital
-Dolby Digital (AC3) capable receiver = yes
-DTS Capable Receiver = yes
Audio Output Device = USB Sound Device iec958
(also tried "default" and "USB Sound Device default")
Passthrough output device = USB Sound Device iec958
Downmix multichannel audio to stereo = no
(also tried "yes")

I tried these settings with and without the .asoundrc file as mentioned in OP, it seems to make no difference.

All devices appear to be unmuted in alsamixer
Reply
#10
x
Reply
#11
My problem is how to turn spdif off, I have no sound for aboth a month. The problem ocured in windows 7, one day no device plug in detected. I reseted bios, reinstall windows a few times & evreytime I notice spdif insted of spekers. Proably some interferance between videocard & onboard sound. The board is NF61S Micro am2 Se, videocard 8800gt.
Here is a video when sound was working in unbuntu .
Right know I'm on linux mint & sound is not working, here is a picture of the alsamixer, & know it only alows me to set channel only on 6 or 8ch .
Image
Here is the alsa base config.
PHP Code:
# autoloader aliases
install sound-slot-/sbin/modprobe snd-card-0
install sound
-slot-/sbin/modprobe snd-card-1
install sound
-slot-/sbin/modprobe snd-card-2
install sound
-slot-/sbin/modprobe snd-card-3
install sound
-slot-/sbin/modprobe snd-card-4
install sound
-slot-/sbin/modprobe snd-card-5
install sound
-slot-/sbin/modprobe snd-card-6
install sound
-slot-/sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index
=-2
options saa7134
-alsa index=-2
options snd
-atiixp-modem index=-2
options snd
-intel8x0m index=-2
options snd
-via82xx-modem index=-2
options snd
-usb-audio index=-2
options snd
-usb-us122l index=-2
options snd
-usb-usx2y index=-2
options snd
-usb-caiaq index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-
Remember that I'm only a beginer I used linux only a few times, but I will apreciate is some one can help me to regain the analog sound.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
[Linux-Ubuntu] [How to] Make Spdif output work for beginners !00
This forum uses Lukasz Tkacz MyBB addons.