# SPDIF - Sony/Philips Digital Interface



## Ferather (Nov 8, 2021)

Decided to post some info I found.

----

S/PDIF (tech-faq.com) - "Although the SPDIF protocol doesn’t specific a max resolution or data rate, the equipment which uses the SPDIF connectors has to determine the data rate..."
S/PDIF - Wikipedia - "...has no defined data rate. Instead, the data is sent using biphase mark code, which has either one or two transitions for every bit..."

Digital Data Digital Signal - NRZ (Non-Return-to-Zero), BMC (Biphase Mark Code).

S/PDIF - HwB (hardwarebook.info) - IEC 60958-3 specifies up to 768 kHz sampling frequency.
IEC-60958-3 | Digital audio interface - Part 3: Consumer applications - IEC 60958-3:2021.

--

Representing Formats for IEC 61937 Transmissions - Win32 apps | Microsoft Docs




Looks like I muddled aggregates with frame rates?

--




--

ES9028C2M_Datasheet_v0.5.pdf (esstech.com)



====

Even current HDMI-DP devices could be utilizing Toslink JIS F05 (the current one) or SMI for 'audio only':



* Correction SMI, not SMA.





119mbps, requiring just under 5k aggregate.


----------



## Ferather (Nov 11, 2021)

What Is an HDMI Audio Extractor? - The Home Theater DIY, the unit I am using is below.
I modified the EDID, but the defaults are listed below, notice 5.1 on toslink.






HDMI eARC: Supports biphase-mark encoding (source).


----------



## Ferather (Nov 15, 2021)

A little more research, and it turns out DisplayPort and HDMI (both latest) have 1536khz aggregate sample rate. Both can do 32 x 48khz (1536khz total).
DisplayPort and eARC specify a maximum audio bitrate of 37Mbps, I would guess that HDMI (no eARC) is the same, 37 Mbps.

192khz, 24bit x 8 = 36.864Mbps (1536khz) | 48khz, 24bit x 32 = 36.864Mbps (1536khz) | Same result (see here).
Toslink can do up to 125Mbps, and SPDIF has no limit (HDMI to Toslink can also be used).

----

Dolby TrueHD, max bitrate: 18 Mbps | DTS-HD MA, max bitrate: 24.5 Mbps.


----------



## Ferather (Dec 21, 2021)




----------



## Ferather (Jan 24, 2022)

https://www.techpowerup.com/forums/threads/dts-dch-driver-for-realtek-dts-x.279972/post-4684849

Additional notes, more than 2 channel PCM and encoded formats are 'optional' on HDMI.
If I made a bespoke audio format that ends up as 50mbps, I can only use SPDIF.

----

Bitstreaming:

I get the same results with my HDMI 2.0b extractor (HDMI to Toslink 2.0), as I do my Realtek SPDIF.
Currently I am waiting for a brand such as Logitech to produce a new unit with full support.

Note, with my extractor I can also receive 6 channel PCM via Toslink 2.0.

----

Audio Quality:

Given the PCM audio is within the range of the device, it depends on the device more.
Bad quality audio device > SPDIF or HDMI > Bad audio experience.


----------



## Ferather (Jan 27, 2022)

In terms of bitstreaming with Windows, DirectSound mode seems to be a legacy mode in most cases, Dolby Digital Live, and DTS Surround (aka, DTS Interactive, DTS Core).
EAC3 (Dolby Digital Plus), is transcoded to the lesser format AC3 (Dolby Digital Live), DTS HD MA and DTS HD HRA seems to be core only mode.

Even with the Photos app, I was unable to ever bitstream more than the above, and nil with Dolby TrueHD (no transcoding).
To get all formats, even with SPDIF use WASAPI exclusive, sometimes you may need 'event driven' mode.

====

Note to OEM's

If you are going to built a multichannel unit, for example 8 channels, make sure the SPDIF is fully supported in reflection, such as the right amount of aggregate samples.
For 8 channels at full support of 192k, the same as HDMI 2.0+: 1,536k, the device should have the correct circuits (chips) to support it on SPDIF-TOSLink.

It does not matter if Windows needs updates in this region, two direct devices correctly programmed (not PC's), will work as you make it.

Note, mobile devices can support TOSLink at full rate, using a dual purpose headphone 3.5mm and optical adapter (here).

----

Realtek ALC 889, Rev. 1.0 (2008), SPDIF, with a 6 channel processing (24bit/48K), to bypass the 2 channel PCM chip (final digital converter), we currently use encoders.
Don't mix the old standard for TOSLink, 3.1 mbps, where encoders where necessary for more than 2 channel PCM, for the current (125mbps).

The same device (ALC 889), will also bitstream the formats supported by the media player via WASAPI exclusive, same as HDMI.


----------



## Ferather (Jan 31, 2022)

Edgecore Networks (edge-core.com) - NRZ and PAM4

----



SMI Optical Interconnects | TTI, Inc.

====

Optical smart speakers, using power DAC's or similar, and standard PSU.


----------



## Ferather (Feb 1, 2022)

The same for conductive circuit, then there is also light speed vs electricity for response.

====

Here are some TOSLink headphone examples, In the past, I've owned ones that decode.

CL7400 Wireless Headphones with Optical Input
RS 175 RF Optical Wireless Headphone System


----------



## Ferather (Feb 11, 2022)




----------



## Ferather (Feb 12, 2022)

Ferather said:


> Optical smart speakers, using power DAC's or similar, and standard PSU.


It's also possible to have one single cable, with an optical inner core, for lossless audio signals, and then several layers of insulation and copper.
Since optical is immune to EMI-RFI, the same cable can carry the power, and, even additional layers for communication.


----------



## Ferather (Feb 18, 2022)

Today I had a discussion with a professional radio host, they where telling me about a few units they have with TOSLink optical.
Here is one that specifies consumer level, and 8 channels, although not at the full range, it does use 9.2mbps.



Here is a MADI card that supports 64 x 24bit 48k, using dual coaxial cables, its very possibly SPDIF professional level.
Not sure how this card works, but 1 stream of 64 x 24bit 48k requires 73.7mbps. Less than 125mbps.



----

SMI Optical Interconnects, next level consumer and end-user.


----------



## Ferather (Feb 27, 2022)

Given NRZ code and networking standards (both SPDIF and HDMI), lets quickly invent wireless SPDIF (given HDMI is SPDIF).

PCM > SPDIF > Wireless AC-Other  --------- Wireless AC-Other > SPDIF > PCM.

----

With fibre optic internet, I can ping servers in China at around 4-5 ms, my gaming monitor has a 2ms response, some are 5+ms.
If you have a 5ms response monitor, using fiber optic, I can send data to and then back from China, faster.



----

Funny side note, audio over HDMI Ethernet has more bandwidth than HDMI audio and HDMI eARC.

----

SPDIF Consumer:

Max channels: 15, Sample rates: 22.05/24/32/44.1/48/88.2/96/176.4/192k.
Bandwidth required: 15 x 192k, 69.12mbps.
Aggregate samples: 15 x 192k, 2880k

SPDIF Professional:

Max channels: Unlimited?, Sample rates: Set plus User defined.


Note: Consumer also has a 'don't care' mode for number of channels.

====

https://people.freebsd.org/~gonzo/arm/iMX6-HDMI.pdf < HDMI Transmitter | IEC 60958-5:2021 | IEC 61937-1 

====

Conversion of SPDIF to HDMI on Windows 10, with essentially an EDID override for SPDIF.
In my case the driver overrides the Windows detection for samples, but not channels.

Windows detects the sample rates and number of channels from the digital converter.





----

Bypassing the digital converter using a digital encoded format (passthrough).


----------



## Ferather (Mar 19, 2022)

I was tasked to setup a basic HDMI AV setup for someone, when I got the cables, I decided to go for optical, to get as close to TOSlink as possible.
The previous cables where high grade 1.4 cables with ethernet, the replacement optical cables are 2.1 optical transmission.

At one end of the HDMI cable is a optical transmitter, at the other end is a optical receiver, one direction.
I noticed an instant improvement to both audio and video compared to conductive.

FIBBR 8K HDMI Fiber Optic Cable, 48Gbps Ultra High Speed

----

The setup, with CEC is as follows:

Enigma 2, 4K STB >> Optical >> TV >> ARC Port (HDMI Audio Out) >> Optical >> Soundbar.


----------



## Ferather (Mar 20, 2022)

Forgot to post these, something I took note of when looking around at models and cables.


----------



## hugemon (May 17, 2022)

Oh, here I thought SPDIF connection only supports 2.0 PCM or DD/DTS compressed surround.

But the problem is, even if I somehow transmit, for example, Dolby-HD Atmos signal through optical to my receiver/soundbar, will the device support those format on optical?

I'm using your DTS DCH driver on my motherboard optical output to get DTS to my soundbar (my soundbar doesn't have eARC and my TV doesn't support DTS, and DD 5.1 give me horrendous latency) but I don't think my soundbar will support advanced formats on optical port.

If there is a way to edit supported formats on my SPDIF out on my realtek audio I'd love to test it out though. Or maybe I should test it out with HDMI-SPDIF audio extractor? (Editing EDID like you did so that it'll receive LPCM surround format?)


----------



## Ferather (May 17, 2022)

Hello, hugemon.

SPDIF, is only limited by the hardware that surrounds it, SPDIF has no finite bitrate or specifications in that way.
Its down to the OEM to understand it, and build a supporting product (see my post here).

HDMI is ultimately a connector for SPDIF, the HBR specifies it can do at least 25.5mbps, HDMI max is 37mbps.
In short, SPDIF is not the limiting factor, instead the hardware around it and the connector.

TOSLink audio can transfer up to 125mbps depending on the module and cable.

----

LPCM is uncompressed audio, whereas DTS-Dolby is compressed audio, and the receiver requires audio decoders.
The decoders convert back the compressed audio into (L)PCM, for final conversion to analogue (speakers).

If the receiver supports 5.1 LPCM (uncompressed), you will need HDMI (multichannel converter).

TOSLink setups tend to come with the 1983 standard (3.1mbps), 2 x LCPM or DTS-DDL.
The converter they add (which can be changed) only supports 2 channel.



			https://www.techpowerup.com/forums/attachments/alc-889-png.238145/
		




			https://www.techpowerup.com/forums/attachments/spdif-before-png.235519/
		



			https://www.techpowerup.com/forums/attachments/spdif-hdmi-png.235518/
		


----

Your receiver will need to have the relevant decoders, and also support them on TOSLink direct.

https://www.techpowerup.com/forums/threads/how-to-send-test-lossless-hdmi-spdif.285233/

----








						MediaFire
					

MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.




					www.mediafire.com
				



The preset is set to decode compressed audio into PCM, which is then enhanced by DTS:X (APO4).
It is then finally compressed to DTS Surround, so you get all format support with DTS.

As an addition, the driver supports 8 channel audio over 6 channels, rather than just 6 channels.
The additional 2 channels are played back between the front and rear (v. side).

Note: If I remember correctly (currently away from PC), for TrueHD bitstream with Potplayer,
Change the primary audio to WASAPI - exclusive, there is a bug.

DTS Surround: 6 channels, 48 kHz, 24 bit (Full HD).


----------



## SOAREVERSOR (May 18, 2022)

Ferather said:


> Hello, hugemon.
> 
> SPDIF, is only limited by the hardware that surrounds it, SPDIF has no finite bitrate or specifications in that way.
> Its down to the OEM to understand it, and build a supporting product (see my post here).
> ...



This is all good and correct!  However it leaves out the dumb obvious rule, go with the best connection you have!


----------



## Ferather (May 20, 2022)

Which will most likely be digital, either USB, or SPDIF based.


----------



## Palladium (May 20, 2022)

I still can't get over why SPDIF is designed not to be volume controllable by the source device.


----------



## Ferather (May 21, 2022)

It can do, considering a 125mbps module and cable, and NRZ standards (same as Ethernet, which can do many things at one time).
It's very possible to send one way commands, if the chips can differentiate between command and audio data.

Toshiba also released the SMI connector for SPDIF, which is 250mbps bi-directional.


----------



## Ferather (May 24, 2022)

https://www.techpowerup.com/forums/threads/spdif-sony-philips-digital-interface.288767/post-4669502 < PUDI, in basic form.

This allows OEM's to support any future changes via flashing, such as audio format support, other.

----

Digital Wireless SPDIF, using NRZ again but with wireless network connectivity, instead of TOSLink or HDMI.

PCM > SPDIF > Wireless AC-Other --------- Wireless AC-Other > SPDIF > PCM


----------



## Ferather (Jun 12, 2022)

https://www.soundonsound.com/glossary/adat-lightpipe (1990's), Legacy TOSLink 3.1mbps (1983).

Stepping to 9.2mbps would be the 90's, based on above (8 x 48k, 24b = 9216kbps).
In addition, even Realtek devices outputting 2x 192k are using 9.2mbps.

JIS F05 optical modules—TOTX1701(F) and TORX1701(F), 20-125mbps (2008+)

Audio Bit Rate and File Size Calculator


----------



## Ferather (Jul 30, 2022)

Based on information provided by Asus, HDA (HDAUDIO) has a bitrate limit of ~37mbps, GPU's and HDMI tech, the same as SPDIF, uses HDA, and therefor limited to ~37mbps.
SPDIF has no bitrate limits (limited by the hardware its built into, built with), and TOSLink can do up to 125mps with all format support (see post 1).

In short, the answer is yes both SPDIF and TOSLink can do everything HDMI can do (but better, non conductive), in terms of audio.


----------



## Ferather (Aug 6, 2022)

An idea I had based on the MADI above which uses 2 x coaxial cables (64 channels @ 24b-48k).
The above will do 18 x 192k @ 32 bit, and up to 96 x 48k @ 24bit, one TOSLink.

The total aggregate sample rate would be 3,456k @ 32b.


----------



## Ferather (Aug 16, 2022)

An idea based on HDMI audio extractors (mine will passthrough all formats to TOSLink, via EDID driver).



Here are some images of the user selected audio options with a normal SPDIF device.



After converting the SPDIF device to HDMI (after selecting supported formats).



Dolby Atmos over a SPDIF based device, with multichannel speaker setup.



HDMI extractor with EDID driver, can also output 6 channels PCM.


----------



## emanresu (Aug 18, 2022)

Any chance we could pursue 64bit virtual audio cables and such? Would 64bit work on SPDiF / HDMi ? I have found only one Windows software supporting it live, but I need virtual audio cables, 64bit enabled. 

Good job, thinking about the future


----------



## Ferather (Aug 18, 2022)

You mean supporting a 64 bit OS or 64 bit audio out? If 64 bit audio out, does that actually exist in mainstream?
No HDMI or SPDIF don't currently have 32 bit capability, although both can if updated.

SPDIF and HDMI both run on HDA, so if HDA cannot do 64 bit, then nor can anything attached to it.

----

TOSLink certainly has the bandwidth to do 64bit, @ 125mb max, but no supporting hardware.






----

You would need a replacement to HDA, that is also HDA compatible, maybe UDA, or parallel HDA.

Here you can see Realtek (Optical) and AMD (GPU, Monitor) are HDAUDIO (HDA).




----


----------



## emanresu (Aug 18, 2022)

Woopwoop! There's one software.. 
Must be Windows XP times (best Kernel sound / tob)
PM!


----------



## Ferather (Aug 18, 2022)

I updated my post a bit, the last image you can see the minimal circuiting (which is why SPDIF produces better sound) and the digital converters for SPDIF over TOSLink.
If you managed to get HDA to output 64bit audio, the DAC's (and other) on analogue need to support it, and the digital converters on digital.

The reason we use Dolby-DTS on SPDIF is because of the converters (and maybe other bits), else you get only 2 channel.
6 channel PCM is compressed (FX system) and the converter set to bitstream mode.

----

Please note, many drivers have software (APO's) on analogue, but not digital, comparisons will be far from fair.

----


----------



## emanresu (Aug 27, 2022)

Is there a way to get HDMI to support 88.2 and 176.4?

And which DTS Sound Unbound versions do you have stocked? 

If I have a particular version installed already, is there a way to .appx it "back" to being an installer?


----------



## Ferather (Aug 27, 2022)

Wrong thread for DTS talk, but for HDMI 88.2 - 176.4 needs to be supported by the receiver, monitor.

In some cases drivers can knock off support for some samples even though the hardware does it.


----------



## Ferather (Sep 12, 2022)

Digital audio sample rate converter: S/PDIF for N64, MV1C  << "_For optical output to work reliably at 192 kHz a 25 Mbps optical transmitter should be used_"

DTS-HD MA, max bitrate: 24.5 Mbit/s

----

Z-Systems OptiPatch+ | Pro Audio Solutions  <<  "_...for a total of 120 input channels and 120 output channels._"

Z-Sys Optipatch+ 15 Channel Digital Audio ADAT/TOSlink/SPDIF Detangler Router | PicClick
Z-Sys Optipatch+ 15 Channel Digital Audio ADAT/TOSlink/SPDIF Detangler Router | eBay

----

WM8805 | Cirrus Logic  |  CS8416 | Cirrus Logic

====



The newest consumer standard, capped by HDA:

15 x 96k = 1,440k total aggregates, achievable.
8 x 192k = 1,536k total aggregates, normal.


----------



## emanresu (Sep 12, 2022)

See ZonePlate (download works).
Can this aid you/us/light?



			Tobybear Productions
		


and






						VSTHost
					

VST Host Description



					www.hermannseib.com


----------



## Ferather (Sep 20, 2022)

Consumer level _programmable_ 15 channel SPDIF [2.0] transmitter, S/PDIF Transmitter (SPDIF_Tx) (infineon.com):




Now for OEM's to catch up. 15 x 96k @ 24b on any HDA device.


----------



## emanresu (Sep 20, 2022)

Yup


----------



## Ferather (Sep 23, 2022)

Anyone with a Wiki account please update, both officially out of date, do not reference consumer standard then not update to the current:

S/PDIF - Wikipedia | and | TOSLINK - Wikipedia

It's like referencing HDMI 1.0 standard limits for HDMI 2.0.

----

3.1 mbps (1983) || 9.2mbps (~2008) 'based on transmitter, 2x 192k @ 24b' || 125mbps (2008+) '~37mbps based on HDA limits, 15 x 96k @ 24b'

HDA and transmitter limits and are NOT SPDIF or TOSlink limits. Below we can see that parallel HDA still does hit the maximum.



Current consumer standard allows for 15 x 192k @ 24b, which is too much for HDA:


----------



## emanresu (Sep 23, 2022)

*Church bells ringing in the distance...*


----------



## Ferather (Sep 23, 2022)

Image updates (note, the digital converter in the first image is the transmitter-receiver, a chip):


----------

