How to output audio via an optical connection (TOSLINK)?

I’ve switched my DAC/amp to optical, connected to the SPDIF out port on my computer. The device is powered externally with its own power supply.

The DAC is no longer detected, after toggling available inputs on the device and verifying cable connections:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [MateView]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Is there anything which can be done, aside from returning to the USB power or changing to the RCA connector?

Excerpted from kernel.org – hd-audio-codec:

… if you have a newer machine with a slightly different PCI SSID (or codec SSID) from the existing one, you may have a good chance to re-use the same model. You can pass the model option to specify the preset model instead of PCI (and codec-) SSID look-up.

What model option values are available depends on the codec chip. Check your codec chip from the codec proc file (see “Codec Proc-File” section below). It will show the vendor/product name of your codec chip. Then, see HD-Audio Codec-Specific Models file, the section of HD-audio driver. You can find a list of codecs and model options belonging to each codec. For example, for Realtek ALC262 codec chip, pass model=ultra for devices that are compatible with Samsung Q1 Ultra.

Thus, the first thing you can do for any brand-new, unsupported and non-working HD-audio hardware is to check HD-audio codec and several different model option values. If you have any luck, some of them might suit with your device well.

You can try booting your PC with snd_hda_intel.model=<something-from-the-above-link> on your kernel command line and then see if a SPDIF/IEC958 option shows up in the output of aplay -L.

I’ve noted the reply above.

from the manufacturer:

FAQ

Does a driver exist for MacOS or Linux systems?

You do not need a driver. The driver is already integrated in the operating system.

Implies that the device is… supported on Linux?

I’ll try with an RCA cable once I get one. USB doesn’t supply enough power.

I would say that answer is inaccurate. A driver for your PC’s sound card may or may not be integrated in the operating system. The answer depends on the exact model of the sound card that is in your PC. The question is irrelevant to the external device at the other end of the SPDIF link. The external device will just receive and decode the signal. It does not need to communicate back to the PC or whatever might be generating the signal.

To avoid confusion:

  • USB is a peripheral connection
  • Spdif is an audio connection

This means that the DAC will not be detected by the kernel via spdif, the only thing that should be detected is the optical-out on your computer.

If your DAC was connected via USB in the previous situation, my advice would be to go back to that. USB will also provide a digital / lossless signal with the same or better quality than spdif.

1 Like

This list shows that your OS has only detected the HDMI audio capabilities, there is no on-board sound chip listed.

To use the on-board audio connections of your mainboard, you need to make sure that your on-board sound chip is enabled in your BIOS. After that, it should be detected and you can select which output to use.

Also, as @litemotiv pointed out, SPDIF is basically a unidirectional audio sink. You can have your system send a digital audio signal to it but the OS will never know if or what kind of DAC is on the other end.

I had disabled the on-board audio in BIOS. After re-enabling:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [MateView]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC1220 Analog [ALC1220 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 1: ALC1220 Digital [ALC1220 Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
1 Like