Generic I2s output from Raspberry 2 B?

Build/modify/repair equipment and improve systems performance by yourself

Generic I2s output from Raspberry 2 B?

Postby elmarhe » 28 Sep 2015, 16:48

Hi everybody,
in my office I have a quite nice-sounding digital amp (http://www.qlshifi.com/en/wzcapi/qa100.htm), that among other things is equipped with a I2s input (RJ 45). The input is described as follows:
1 - LRCK
2 - GND
3 - DATA
4 - GND
5 - BCK
6 - GND
7 - MCLK
8 - GND

Since I get the impression that I2s is quite a superior way of transmitting audio data and the Pi is generally able to output that, I would like to try implementing that.
What I have done so far, is to crimp a RJ45 plug according to the setup on the QLS: 5 pins connected, with only one GND at 8 (randomly chosen).
My plan is to connect these pins to GPIO according to this scheme Image.
Doing this, I ran into 2 problems:
1. The Pi does not output a Master-Clock (MCLK). Is that a real problem? Some DACs etc. do not seem to need this. What to do with pin 7 then? Ground it? Leave it open?
2. What do I tell my Pi about the audio-interface? The config-file has entries for hifiberry and iqaudio products - can I use one of these entries?

Additional question: Can I possibly fry either the pi or my amp if I experiment too freely with this?

I am sorry if these questions may sound a bit simple to all of you specialists. I am a very avid audio/hifi-person, but a near-complete newbie in Linux/Raspberry.

Thanks for your input and best regards,

Elmar
elmarhe
 
Posts: 8
Joined: 20 Aug 2015, 18:36

Re: Generic I2s output from Raspberry 2 B?

Postby jazzaj » 29 Sep 2015, 10:16

Hi elmarhe,

I tried to connect my external Audio-gd dac (rj45) with a PI2 via GPIO i2s without success. Same thing with my Odroid C1+.
I'm pretty sure that my connections are good (Kingwa from Audio-gd agree with my schema) and I'm asking if the problem is a software problem. But my knowledge in Linux and electronic is too poor to investigate more.
Odroid C1+ (/regulated linear PSU) > Audio-gd NFB-1 (with Amanero384 combo) > Audio-gd Precision 2 > Triangle Lyrr 222
User avatar
jazzaj
 
Posts: 47
Joined: 23 Apr 2015, 20:49

Re: Generic I2s output from Raspberry 2 B?

Postby hondagx35 » 29 Sep 2015, 12:52

Hi elmarhe and jazzaj,

it should work in theory.
It should be relatively save to try this out.
You can try the hifiberry and iqaudio drivers.
I have two diy dacs (TDA1543 / PCM5102) and they are working both on my PI2.

MCLK has to be left unconected.

Frank
User avatar
hondagx35
 
Posts: 3041
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Generic I2s output from Raspberry 2 B?

Postby elmarhe » 29 Sep 2015, 18:30

Hi Frank, hi Jazzaj,

thanks for your input. I am a bit embarrassed, though, that I did not discover your previous posts on the other thread - sorry!

But, anyway: Setting the device to hifiberry did it for me (almost). Since I have the newer Pi I had assumed, that the Hifiberry + would be correct for my device - obviously I was wrong in that respect.
Now HifiBerry I2s DAC shows up as an audio output in my MPD configuration and everything seems quite fine - apart from one strange phenomenon: I only get one channel. What's even stranger: Turning everything off and on again most of the time switches that channel, so sometimes only the left speaker works, then next time only the right one.
This does not seem to be a problem of the amp, since the the optical input works normally and a few days ago my USb to I2s adaptor did not exhibit that problem as well.
I am confused ...
Any ideas, anyone?
elmarhe
 
Posts: 8
Joined: 20 Aug 2015, 18:36

Re: Generic I2s output from Raspberry 2 B?

Postby elmarhe » 29 Sep 2015, 20:31

Addendum: The amp definitely works fine - I just tested it with my old USB - I2s adaptor.
So this leaves some issue with the Pi, but what could that be ...?
elmarhe
 
Posts: 8
Joined: 20 Aug 2015, 18:36

Re: Generic I2s output from Raspberry 2 B?

Postby jazzaj » 29 Sep 2015, 20:40

Hi all,

Hum... something strange :
In QA100, RJ45 pin 1 is LRCK and pin 3 is DATA.
In Audio-gd, RJ45 pin 1 is DATA and pin 3 is LRCK.
Other pins are the same with both DACs.
:oops:

I got a mono issue with my odroid too. But apparently a different problem : when I switch between PCM file and DSD file, DSD plays mono (right channel each time). I need to pause then unpause the player to get the stereo back.
Last edited by jazzaj on 30 Sep 2015, 12:40, edited 1 time in total.
Odroid C1+ (/regulated linear PSU) > Audio-gd NFB-1 (with Amanero384 combo) > Audio-gd Precision 2 > Triangle Lyrr 222
User avatar
jazzaj
 
Posts: 47
Joined: 23 Apr 2015, 20:49

Re: Generic I2s output from Raspberry 2 B?

Postby elmarhe » 29 Sep 2015, 23:52

Wow, you really took a thorough look at these posts, Jazzaj! I am impressed.
So I just tried switching pins 1 and 3 - just on the off chance that they might have mis-labeled my amp. No luck though: With these pins exchanged I do not get any sound at all.
That's a pity, since what is coming out of the one channel sounds really promising ...
elmarhe
 
Posts: 8
Joined: 20 Aug 2015, 18:36

Re: Generic I2s output from Raspberry 2 B?

Postby jazzaj » 30 Sep 2015, 12:09

Well... I tried to invert pins 1 and 3 without success :(

@Frank : there is no more config.txt for the Odroid ? To enable i2s DAC you just have to uncomment the right line in boot.ini ?
Odroid C1+ (/regulated linear PSU) > Audio-gd NFB-1 (with Amanero384 combo) > Audio-gd Precision 2 > Triangle Lyrr 222
User avatar
jazzaj
 
Posts: 47
Joined: 23 Apr 2015, 20:49

Re: Generic I2s output from Raspberry 2 B?

Postby hondagx35 » 30 Sep 2015, 13:47

Hi jazzaj,

there is no more config.txt for the Odroid ? To enable i2s DAC you just have to uncomment the right line in boot.ini ?

Yes.

I think it has to do with the different I2S protocols.
- left justified
- right justified
- standard I2S

I have to check what protocol RP and Odroid use, maybe it doesn't fit to your dac.

Frank
User avatar
hondagx35
 
Posts: 3041
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Generic I2s output from Raspberry 2 B?

Postby elmarhe » 30 Sep 2015, 18:33

Hmm, this seems to be more of a problem than I thought ...
I am still interested in a solution if it should come up, but as a backup I will simply order a SPDIF-soundcard for the Pi.

Could anyone (Frank, maybe ...) point me to a source of information about I2s in combination with Raspberry Pi. It seems like quite a complex subject and I do not know anything about it.
elmarhe
 
Posts: 8
Joined: 20 Aug 2015, 18:36

support RuneAudio Donate with PayPal

Next

Return to DIY and tweaks

Who is online

Users browsing this forum: No registered users and 1 guest