Raspberry Pi I2S to SPDIF Hat

Discussion in 'Digital: DACs, USB converters, decrapifiers' started by Michael Kelly, Apr 30, 2016.

  1. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    That timing sounds good. I have the printed circuit boards in hand, but have not built up a unit yet. That will likely happen in the next couple of weeks. That will give me some time to test the other functionality, then receive your unit to test the I2S over HDMI. Note that we could also make another adapter using RJ 45 if that is more popular. Anyone care to chime in?

    Michael
     
  2. damaged-goods

    damaged-goods Acquaintance

    Joined:
    Feb 8, 2017
    Likes Received:
    77
    Trophy Points:
    28
    Location:
    Europe
    Metrum Acoustics, Holo Audio and Audio GD use HDMI and are all pretty popular.

    I'd love to get a HDMI board for my Holo Cyan.
     
  3. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    Do they publish the pinouts for their HDMI interface? Do you have that for your unit?

    Michael
     
  4. damaged-goods

    damaged-goods Acquaintance

    Joined:
    Feb 8, 2017
    Likes Received:
    77
    Trophy Points:
    28
    Location:
    Europe
  5. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
  6. haywood

    haywood Friend

    Pyrate
    Joined:
    Oct 22, 2015
    Likes Received:
    763
    Trophy Points:
    93
    Nice idea. I think you’d have better reception with AES, BNC & RCA rather than AES, RCA & optical for this market though. If it’s a size issue the BNC connector the competition uses is much smaller than the one on the 502dac.
     
  7. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:

    That is an interesting take. I certainly can take a look at that in the next revision, if more people chime in with the same feedback. One thing we could do is what we did on the 502 DAC, which is to mount a BNC and supply a BNC/RCA adapter.

    Michael
     
  8. lehmanhill

    lehmanhill Almost "Made"

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    545
    Trophy Points:
    93
    Location:
    Home of Jiffy Mix
    A correction if I may. Metrum uses RJ45 for their i2s. In fact, they essentially use a Cat 5 cable for i2s between their Ambre and Pavane or Onyx dac. Obviously, no standard, but using RJ45 lets them have a module that is a direct swap between USB and i2s. The pinout is in the link, I hope it works.

    https://www.dropbox.com/s/2z8m0ycgyeom4a0/Metrum RJ45.tiff?dl=0

    Just curious. Is the 8 pin header reclocked? I'm guessing no.

    Speaking of pin outs, is this correct for that 8 pin header?
    M = master clock
    B = bit clock
    W = word clock
    D = data
    G = ground

    By the way, an isolated (transformer, not galvanic) i2s hat would be interesting for me. I recently bought a Metrum Onyx with i2s input. I hope to do some testing from the 502DAC, and if it works, I will consider my own isolator board and the Allo Kali. Note that the Kali which is a copy of Ian's reclocker, both of which use clock control of low jitter flip-flops for single digit RMS jitter. That's something that a WM8804 or any chip can't match.

    Going back to galvanic isolators, I read some articles on how they work and the amount of data manipulation is scary. Frequency shifting, capacitor isolators, amplifying, filtering. It makes me wonder how good the data integrity really is. I prefer a simple transformer any day. At least I can understand it.

    Overall, I agree that optical is a lower priority for me. I think both BNC and RCA SPDIF are more popular, even in more expensive dacs, than AES balanced, but AES is ahead of optical.
     
    Last edited: Dec 14, 2018
  9. solarflight

    solarflight New

    Contributor
    Joined:
    Oct 26, 2017
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    Brussels
    I’m looking/investigating for optical. Due to contemplating on te ecdesigns mos16 dac.
     
  10. HumanFly

    HumanFly Acquaintance

    Joined:
    Jul 23, 2017
    Likes Received:
    93
    Trophy Points:
    28
    Location:
    Netherlands
    My guess would also be that if you aim at users that are willing to spend more, adding a AES (xlr out) and a coax and/or BNC would be the way to go. A real AES out would also be unique as far as I know so it could be a strong selling point.
    But I don`t want to pretend I have deep insights into the workings of the audiomarket so it is safe to ignore this post.
     
  11. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    Pinout is
    1 - 3.3V
    2 - I2C Clock
    3 - I2C Data
    4 - Ground
    5 - I2S Master Clock
    6 - I2S Bit Clock
    7 - I2S Left/Right (Word) Clock
    8 - I2S Data

    Michael
     
  12. earnmyturns

    earnmyturns Smartest friend

    Pyrate
    Joined:
    Sep 25, 2016
    Likes Received:
    3,218
    Trophy Points:
    113
    Location:
    Palo Alto
    Home Page:
    A few months I tried to build a Metrum Ambre RJ-45 to Holo Spring HDMI connector, never got it to work properly even though I had all the supposed correct pinouts at hand. I may have goofed, but I tested continuity and absence of shorts, everything seemed to agree with the pinouts and still it did not work. Eventually gave up because I had an Onyx loaner and ended up preferring it to the Holo Spring in my system. I'm just noting this as a warning to amateurs like me, I2S is a bit of a pain with the lack of standard connectors and pinouts.
     
  13. HumanFly

    HumanFly Acquaintance

    Joined:
    Jul 23, 2017
    Likes Received:
    93
    Trophy Points:
    28
    Location:
    Netherlands
    Do you need drivers for I2s? Or could you just use any os(like Volumio)and get the correct i2s output?
     
  14. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
     
  15. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:

    You just run the same drivers as always. Then you can pick up the I2S signals from the header. Just remember they are raw signals without any electrical protection. And they have a limited drive capability so you don’t want to run a long cable.

    We only use them to monitor the signals, so I cannot tell you how successful you would be attaching other devices to those pins.

    Michael
     
  16. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:

    Also note that the clocks come from the PCM5122 while the data comes from the pi.

    Michael
     
  17. lehmanhill

    lehmanhill Almost "Made"

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    545
    Trophy Points:
    93
    Location:
    Home of Jiffy Mix
    Now that is good news!!

    I tried feeding i2s to a Metrum Onyx directly from the RPi3. In that case, I got no output. Maybe Michael can confirm what is going on when you connect to the i2s output of the RPi. My assumption is that the RPi needs a software driver to send the information to the pins and needs some sort of matching response from the dac. Is that right?

    When I drove the Onyx from the i2s header on the 502 DAC, I got music, although I know understand that I used way, way too long a cable, so the sound wasn't good. A shorter cable is in the works.

    My assumption is that the 502 DAC and the RPi communicated as normal, so the data was available at the i2s header.
     
  18. lehmanhill

    lehmanhill Almost "Made"

    Contributor
    Joined:
    May 3, 2018
    Likes Received:
    545
    Trophy Points:
    93
    Location:
    Home of Jiffy Mix
    On the topic of a premium audio shield, I wonder what you guys think of these ideas.

    1. SPDIF is a pretty good format, so the improvement I think would give the best premium result is the lowest possible jitter, even if we stay with SPDIF/AES balanced. The WM8805 has an inherent jitter of 50 ps rms which is good. Ian's reclocker and Allo Sig use a flip flop transistor output controlled by the clock to get the jitter down to about 4 ps rms. It seems like you could still use most of the 502 DAC, but add a flip flop output to reduce jitter to the minimum.

    By the way, I really prefer the Pulse transformers used in the 502 DAC over the capacitive galvanic isolation used elsewhere. The capacitive approach uses lots of frequency shifting, filtering, and general messing around with the data that seems to me would be at a higher risk for introducing problems.

    2. i2S output to minimize data conversion from i2s to SDPIF/AES and back to i2s. Scott Kramer's experiments with i2s suggest that you would need a very short cable run for a successful i2s output. Maybe a couple of inches. See link.

    https://superbestaudiofriends.org/i...ade-balanced-dac-pre.5181/page-11#post-241364

    If there were a premium Pi2Designs digital transport with an i2s output, I think there would need to be effort to have a stronger output drive to allow a little longer cable. But then, I don't know what other issues would come with a longer cable. Remember that i2s was designed to be internal to a digital product, not a transport between two separate devices.

    Even though I am one of the few that own an i2s input capable DAC, I'm not sure there is enough benefit and enough i2s DACs out there at this point for it to be worth going down the i2s path.

    What do you guys think?
     
  19. haywood

    haywood Friend

    Pyrate
    Joined:
    Oct 22, 2015
    Likes Received:
    763
    Trophy Points:
    93
    The jitter specs seem to be the same for 8804/8805 but obviously there must be some difference in the designs. Using flip-flops to reduce jitter further would at the least look good on a spec sheet but seems like a substantial redesign.
     
  20. Michael Kelly

    Michael Kelly MOT: Pi 2 Design

    Pyrate
    Joined:
    Apr 22, 2016
    Likes Received:
    4,112
    Trophy Points:
    113
    Location:
    Rhode Island, USA
    Home Page:
    The Raspberry PI can provide all the I2S clocks, but they are not very good due the fact that the PI internal clock is not an exact multiple of the audio frame rate. Luckily the Pi can be set to accept external clocks. This allows us to create exact clocks for 44.1Khz and 48Khz based frame rates. On the 502DAC this is done by the PCM5122 and the two very low jitter NDK oscillators. We also bypass the WM8804 internal clocking circuitry and this reduces the clock jitter to below 1.5ps. No flip-flop or re-clocking is needed.

    As for drive strength, the I2S header on the 502DAC was put there for test only. Not to drive other devices off-board.

    Regards,
    Michael
     

Share This Page