# SPDIF header -> Toslink bracket (snd_hda) ?



## dndlnx (Jun 25, 2012)

My motherboard has no direct Optical Out. I bought a sound card and got it partially working using OSSv4 from ports, when I noticed there's an SPDIF header on the board. All I needed was this PCI bracket and connector:

http://db.tt/9H2Heapd

But I can't make it work. I hear sound from regular ports on the motherboard. However, the optical doesn't light up red like usual on this bracket. And I hear nothing.  Is this something that should work with FreeBSD?

/dev/sndstat

```
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:
pcm0: <HDA VIA VT1708S_0 PCM #0 Analog> (play/rec) default
pcm1: <HDA VIA VT1708S_0 PCM #1 Digital> (play)
pcm2: <HDA Intel Cougar Point HDMI PCM #0 DisplayPort> (play)
```

Is there a hint I need, a switch somewhere?


----------



## mav@ (Jun 25, 2012)

Have you tried to play sound via pcm1 device? For example [cmd=]cat /dev/random >/dev/dsp1[/cmd]
?


----------



## Terry_Kennedy (Jun 26, 2012)

dbsd said:
			
		

> But I can't make it work. I hear sound from regular ports on the motherboard. However, the optical doesn't light up red like usual on this bracket. And I hear nothing.  Is this something that should work with FreeBSD?


Is your motherboard also from ASUS, like the bracket is? There might be an incompatibility in the pinout if not. The three pins will be power (normally red), ground (normally black), and data (some third color). I think the TOSLINK emitter lights when powered, even if there is no signal, but I'm not 100% certain about that.


----------



## dndlnx (Jun 26, 2012)

mav@ said:
			
		

> Have you tried to play sound via pcm1 device? For example [cmd=]cat /dev/random >/dev/dsp1[/cmd]
> ?



No sound. :\



			
				Terry_Kennedy said:
			
		

> Is your motherboard also from ASUS, like the bracket is? There might be an incompatibility in the pinout if not. The 3 pins will be power (normally red), ground (normally black), and data (some 3rd color). I think the TOSLINK emitter lights when powered, even if there is no signal, but I'm not 100% certain about that.



Motherboard is ASUS. I was looking through the manual, that's where I noticed the header. And where I learned about this bracket.


----------------------------------------------

I'm trying to do this with a GENERIC kernel. I thought the bracket would work with "normal" OSS, because it's just an extension of the Intel HDA.  

Out of curiosity, I ran:

[CMD=] nextboot -k kernel.old[/CMD]
And reenabled OSS 4.

As soon as it reboots, the red light comes on. I have lots more /dev/dsp* entries, once again. And the same one I used before with the sound card, /dev/dsp_ac3, works.

```
lrwxr-xr-x  1 root  wheel  29 Jun 26 00:41 /dev/dsp_ac3@ -> /dev/oss/oss_hdaudio0/spdout0
lrwxr-xr-x  1 root  wheel  26 Jun 26 00:41 /dev/dsp_in@ -> /dev/oss/oss_hdaudio0/pcm0
lrwxr-xr-x  1 root  wheel  26 Jun 26 00:41 /dev/dsp_mmap@ -> /dev/oss/oss_hdaudio0/pcm0
lrwxr-xr-x  1 root  wheel  26 Jun 26 00:41 /dev/dsp_multich@ -> /dev/oss/oss_hdaudio0/pcm0
lrwxr-xr-x  1 root  wheel  26 Jun 26 00:41 /dev/dsp_out@ -> /dev/oss/oss_hdaudio0/pcm0
```

Just wish I could do it with the standard kernel. :\


----------



## dndlnx (Jun 27, 2012)

Any idea why the Intel HDA driver in OSSv4 picks it up, and not snd_hda? 

Anyone? :\


----------

