RaspyFi - Topic: I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/ Simple:Press Version 5.2.6 npejcic on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1487 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1487 Hello,

I saw this post on dyiaudio forums, but it's complex (I2S FIFO KIT) from my point of view. Yes, it's best quality, maybe we say it's audiophile project. I'am trying to create HiFi sounding with minimal hardware.

On this link I share project files (not yet created web page, sorry):
http://www.epraktikum.iz.rs/te.....RaspyHiFi/

This is image of prototype PCB:
http://www.epraktikum.iz.rs/te.....I2SDAC.jpg

SCH of this design is on this link:
http://www.epraktikum.iz.rs/te.....rry_v2.pdf

This is zero-prototype design with externall WM8740 DAC board:
http://www.epraktikum.iz.rs/te.....pEPDAC.jpg

This files is preliminary, not final.... We are still working on this ... because it work Ok for some DAC-s, but for some don't.

Regards,
Nebojsa

]]>
Tue, 15 Oct 2013 19:03:22 +0200
GhostMM on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1482 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1482 Hello,
I read a lot about building the best possible dac, i want a pcm1704 dac, which seems the best choice, even better than the sabre dac. I looking for some diy project because they are cheap compare to commercial one, the pcm1704 is very expansive (75-100$ one chip) and you need 4 for one balanced dac...

I want to use a raspberry as a music player for my network, first i think i will connect it to a dac with usb, so i need something like the wavio board to convert usb to i2s in my dac. After i understand that raspberry have an i2s outpout by reading the diyaudio forum, i found a very interesting topic :

http://www.diyaudio.com/forums.....r-297.html

They use some board to purify the jitter from i2s : fifo + an isolator board + a clock with two oscillator. They also made an I2s to PCM board to use with the multibit dac (like pcm1704) but you can also use the 3 board i speak before with any dac, include ESS Sabre, they even build a special clock for this dac. A member already use it with his pi, it's looks very promising !

]]>
Mon, 14 Oct 2013 22:15:34 +0200
npejcic on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1347 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1347

Torsten Jaekel said
I see, makes sense to generate SCK as generic DAC interface.
What about to use a CPLD?

Good Idea, but I am not familiar with CPLD, so I use microcontroller. PIC32MX have very flexible PLL for audio purposes.
http://ww1.microchip.com/downl.....61168E.pdf
on Page 94 you can see a details about REFLCKO which I use.

Torsten Jaekel said
I am not familiar with all the other DACs. Is there a requirement to have SCK as N-times BCK (e.g. to derive the doubled clock)? I would assume SCK should be quite in sync with BCK and should have quite low jitter. If the I2S signal BCK is generated by a MCU (e.g. PIC) and using it as clock master to generate SCK - will it have too much jitter?

Hm, good question. After analyse of couple popular DAC (Wolfson, ESS, AK....) I think that is jitter (frequency drift) is trouble, but not necessary phase offset! This is not 100% sure, but my opinion. From WM8740 page 12 I found this "The WM8740 is tollerant on asynchronous bit clock jitter. The internal signal processing resynchronises to the external LRCIN once then phase difference when clock between bit clock and the system clock exceeds".
Also from AK4396 datasheet "MCLK should be synchronized with LRCK but the phase is not critical".

Torsten Jaekel said
Personally, I would use an FPGA (or CPLD) and re-generate the I2S signal: feed the I2S signals through a small "FIFO" (or sample with faster clock) and clock it out with an SCK coming from a XTAL OSC (with higher freq., e.g. 4x max. BCK).
There might be this SRC4192 which works fine for me on my FPGA (upsampling, converting master to slave etc.,). But on Raspberry Pi it does not work, I would think the PRi I2S has too much jitter (it sounds crazy).

SRC4192 is interesting.

After some trouble with my PCB (PIC is generating MCLK freq) i have suspicions is RPI I2S jitter-ing? So maybe this is issue :( I must investigate further.

Torsten Jaekel said
The problem I see: if you select a DAC which needs SCK, it might need high accuracy (low jitter) and every DAC can be a bit different. It might end up in high quality XTAL just to support the worst case DAC.
And at the end: running I2S on Raspberry Pi, in background, with GUI etc. will not make use of all the effort because I saw several times that the I2S Linux driver (and Alsa) can stall sometimes, generate package drops (due to FIFO and INT not fast enough handled by OS). All the effort reasonable? (for a USB sound card I could imagine but for a heavy OS centric platform like RPi without Real Time guarantee, highly dependent on which player you will use ...?)
Best regards
Torsten

I work on testing major and mass present DAC by myself to decide if my PCB and MCLK FreqGen work Ok.
And you are right. No GUI, and minimize processes, like in RaspyFi is good approach. Idea is to use SBC only for HiFi use.
So I barely wait for I2S implementation in RaspyFi :)

For testing in my firm we more than 20-days we listen internet radio (44.1kHz) under Raspiban (non-overclocked), wired LAN connection, and I never noticed any gleach. This is not issue with USB DAC-s. I have very often crackling.

Thank you for productive conversation.

Regards,
Nebojsa

]]>
Wed, 02 Oct 2013 14:35:02 +0200
Torsten Jaekel on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1343 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1343 I see, makes sense to generate SCK as generic DAC interface.
What about to use a CPLD?

I am not familiar with all the other DACs. Is there a requirement to have SCK as N-times BCK (e.g. to derive the doubled clock)? I would assume SCK should be quite in sync with BCK and should have quite low jitter. If the I2S signal BCK is generated by a MCU (e.g. PIC) and using it as clock master to generate SCK - will it have too much jitter?
Personally, I would use an FPGA (or CPLD) and re-generate the I2S signal: feed the I2S signals through a small "FIFO" (or sample with faster clock) and clock it out with an SCK coming from a XTAL OSC (with higher freq., e.g. 4x max. BCK).
There might be this SRC4192 which works fine for me on my FPGA (upsampling, converting master to slave etc.,). But on Raspberry Pi it does not work, I would think the PRi I2S has too much jitter (it sounds crazy).
The problem I see: if you select a DAC which needs SCK, it might need high accuracy (low jitter) and every DAC can be a bit different. It might end up in high quality XTAL just to support the worst case DAC.
And at the end: running I2S on Raspberry Pi, in background, with GUI etc. will not make use of all the effort because I saw several times that the I2S Linux driver (and Alsa) can stall sometimes, generate package drops (due to FIFO and INT not fast enough handled by OS). All the effort reasonable? (for a USB sound card I could imagine but for a heavy OS centric platform like RPi without Real Time guarantee, highly dependent on which player you will use ...?)

Best regards
Torsten

npejcic said

Hello,
Thank you for suggestion.
Yes, this is true for PCM1794A, and another PCM5101A with Autodetect fs. But I try to do more universal Raspy I2S expansion board. So I must use External Clock. So I decided to try with PIC solution. Another approach is PLL1708 or PLL1707, but this is anther story. For now I have good result, with TWO different PIC firmwares. (one for WM8727, and another for WM8740). I work to optimize firmware to be ONE for all DACs, no mater if it have auto fs or not.
I'm satisfied with WM8740, sound very good, and have more tolerance on MCLK jitter. WM8727 sound modes, but is very compact and cheap. (Far better than generic Raspy PWM-dac).
PCB with WM8727 in ruff calculation, only material, cost less than 20$
I'm wait in next 10-15 days to arrive AK4396 and ES9023 so I will test this hi-end DAC-s.
ES9018 is priced, so for now I don't have way to test this DAC :(
Regards,
Nebojsa

]]>
Tue, 01 Oct 2013 19:27:06 +0200
npejcic on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1340 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1340 Hello,

Thank you for suggestion.

Yes, this is true for PCM1794A, and another PCM5101A with Autodetect fs. But I try to do more universal Raspy I2S expansion board. So I must use External Clock. So I decided to try with PIC solution. Another approach is PLL1708 or PLL1707, but this is anther story. For now I have good result, with TWO different PIC firmwares. (one for WM8727, and another for WM8740). I work to optimize firmware to be ONE for all DACs, no mater if it have auto fs or not.

I'm satisfied with WM8740, sound very good, and have more tolerance on MCLK jitter. WM8727 sound modes, but is very compact and cheap. (Far better than generic Raspy PWM-dac).

PCB with WM8727 in ruff calculation, only material, cost less than 20$

I'm wait in next 10-15 days to arrive AK4396 and ES9023 so I will test this hi-end DAC-s.

ES9018 is priced, so for now I don't have way to test this DAC :(

Regards,
Nebojsa

]]>
Mon, 30 Sep 2013 23:58:25 +0200
tjaekel on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1339 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1339 Hi npejcic,
I had similar issue with PCM1794A: it needs an SCK, in addition to BCK, LRCK and DATA (it is a slave device). RPi I2S does not generate SCK.
But I have figured out: PCM1794A has a "self-recognition" feature (mentioned in datasheet): based on BCK it would be able to determine the sample freq., e.g. 48KHz, 96KHz etc.
Just: this DAC in I2S mode supports only and always 24bit samples (otherwise, for 16bit the Right Justified is needed).
And: I have tried and it works: connect SCK with BCK (e.g. via a jumper). It generates the SCK properly, the DAC is running. No need for a complicated logic to generate SCK. I would assume it has to be anyway a synchronous clock: SCK in sync with BCK, not a free running clock or derived with a remarkable phase offset.

Best regards
Torsten

npejcic said

Hello to all,
In past month I do experiments on I2S and various DAC-s. (Most Wolfson, and wait to arrive AK4396 in next days....)
For now I use Raspbian and Koalo I2S library. It's work mostly Ok.
I made my I2S and MCLK generator on non-usual way. I try to make max universal PCB for Raspberry Pi, and it's based on PIC32MX120F032B-I/SS which scan LRCK frequency and generate adequate MCLK frequency. On same PCB I put WM8727 low-budget DAC for entry-level users. And off course I put I2S+MCLK+I2C port for hi-end users to put DAC board.
PIC can automatic scan LRCK frequency and generate all frequencies for 128fs to 768fs, and for 32kHz, 44.1kHz, 48kHz, 96kHz and 192kHz. All diy-er can easy modify firmware to set any frequency.
For 10 days of using this I2S board I have very low interruption and glitch in comparing to USB DACs (PCM2704 and EL-D07 USB with CM108AH).
I will publish all hardware, PIC firmware and PCB project files soon.... I will put info on this forum.....
Thanks to RaspyFi people (Mike, ACX, Orion...) for excellent HiFi OS, Koalo for I2S library and in next months we try to implement I2S to be more than excellent RaspyFi HiFi OS :) :)
P.S. I have one strange trouble with MCLK clock signal and hard work on resolving this issue. If I set MCLK on exact frequency which need for DAC, I have bad sound, if I set with minor offset it work Ok and depends on which DAC I used (WM8740 or WM8727). Also Koalo library work Ok for 44.1kHz Flacs, 96kHz but not on 32kHz and 192kHz. Next is to modify source library for correction.

]]>
Mon, 30 Sep 2013 21:20:24 +0200
npejcic on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1329 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1329 Hello,

This is picture of final prototype PCB, I wait this board from PCB manufacturing, to test it in full. In zero prototype PCB is without metallization and don't have GND planes. Should work better that zero prototype.
http://www.epraktikum.iz.rs/te.....2SPlay.png

Regards,
Nebojsa

]]>
Sun, 29 Sep 2013 20:45:04 +0200
npejcic on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1326 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1326 Hello to all,

In past month I do experiments on I2S and various DAC-s. (Most Wolfson, and wait to arrive AK4396 in next days....)
For now I use Raspbian and Koalo I2S library. It's work mostly Ok.

I made my I2S and MCLK generator on non-usual way. I try to make max universal PCB for Raspberry Pi, and it's based on PIC32MX120F032B-I/SS which scan LRCK frequency and generate adequate MCLK frequency. On same PCB I put WM8727 low-budget DAC for entry-level users. And off course I put I2S+MCLK+I2C port for hi-end users to put DAC board.

PIC can automatic scan LRCK frequency and generate all frequencies for 128fs to 768fs, and for 32kHz, 44.1kHz, 48kHz, 96kHz and 192kHz. All diy-er can easy modify firmware to set any frequency.

For 10 days of using this I2S board I have very low interruption and glitch in comparing to USB DACs (PCM2704 and EL-D07 USB with CM108AH).

I will publish all hardware, PIC firmware and PCB project files soon.... I will put info on this forum.....

Thanks to RaspyFi people (Mike, ACX, Orion...) for excellent HiFi OS, Koalo for I2S library and in next months we try to implement I2S to be more than excellent RaspyFi HiFi OS :) :)

P.S. I have one strange trouble with MCLK clock signal and hard work on resolving this issue. If I set MCLK on exact frequency which need for DAC, I have bad sound, if I set with minor offset it work Ok and depends on which DAC I used (WM8740 or WM8727). Also Koalo library work Ok for 44.1kHz Flacs, 96kHz but not on 32kHz and 192kHz. Next is to modify source library for correction.

]]>
Sun, 29 Sep 2013 20:15:35 +0200
tjaekel on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1313 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1313

Ronaldo said

admin said
Hi Ronaldo,
you should add an external clock to get ESS9023 working via I2s on PI. We are about to test this clever solution
http://www.tjaekel.com/T-DAC/raspi.html
This is on paper the best solution available as of now, hope we'll have more news soon!

Well that looks good, but it looks like I have to build it myself - sure to end in failure! How much does it cost?
The HiFimeDIY one says you can order an oscillator with it (27 Mhz). Is that what you mean by an external clock?

I am looking for a partner to let it solder (and manufacture). As private person, I can only offer the design files, maybe a PCB.
But the parts and to assemble would be (still) a DIY.
If you ask about the costs: 70 USD (w/o LDOs, use your PSU), 120 USD (w/ LDOs, just transformer needed), excl. PCB.
I think <= 100 USD for parts is a reasonable target (ordering in lager lots), 130 - 150 USD as professional manufacturing.

Regards
Torsten

]]>
Sun, 29 Sep 2013 04:34:54 +0200
Ronaldo on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1180 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1180

admin said

Hi Ronaldo,
you should add an external clock to get ESS9023 working via I2s on PI. We are about to test this clever solution
http://www.tjaekel.com/T-DAC/raspi.html
This is on paper the best solution available as of now, hope we'll have more news soon!

Well that looks good, but it looks like I have to build it myself - sure to end in failure! How much does it cost?

The HiFimeDIY one says you can order an oscillator with it (27 Mhz). Is that what you mean by an external clock?

]]>
Fri, 20 Sep 2013 19:03:39 +0200
admin on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1178 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1178 Hi Ronaldo,
you should add an external clock to get ESS9023 working via I2s on PI. We are about to test this clever solution

http://www.tjaekel.com/T-DAC/raspi.html

This is on paper the best solution available as of now, hope we'll have more news soon!

]]>
Fri, 20 Sep 2013 14:50:50 +0200
Ronaldo on I2S & Raspberry Pi http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1177 Everything else http://www.raspyfi.com/forum/everything-else/i2s-raspberry-pi/#p1177 I don't know much about Linux or DACs, but obviously, like many on here, I'm looking for a cheap way to get the best sound quality from the Pi.

I've read that I2S gives good sound quality and the Pi is blessed with an I2S output.

Here's one guy's efforts at getting it to work, but it's very involved (compiling the kernal etc):

http://www.noiseisgood.co.nz/?p=365

But HifimeDIY do a cheap (14 Euro) ES9023 DAC board here:

http://hifimediy.com/index.php.....uct_id=127

Could this cheap board be attached to the Pi and got to work (relatively) easily?

]]>
Fri, 20 Sep 2013 14:41:45 +0200