C2 and I²S in slave mode

Post Reply
User avatar
HeinrichG
Posts: 46
Joined: Wed Jul 05, 2017 11:19 pm
languages_spoken: english, german
ODROIDs: C2
Location: Germany
Contact:

C2 and I²S in slave mode

Unread post by HeinrichG » Mon Aug 28, 2017 4:28 am

Hello together,

in my project C2 have to run in I²S slave mode. That mean, C2 get LRCLK and SCLK from external IC and streams the audio data convenient to those clocks...

It is possible?

If not, how can I solve this problem?

Many thanks :)
Regards,
Heinrich

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: C2 and I²S in slave mode

Unread post by odroid » Mon Aug 28, 2017 11:48 pm

AFAIK, S905 SoC I2S port doesn't support the slave mode.
I have no idea how to overcome the hardware limitation.

User avatar
HeinrichG
Posts: 46
Joined: Wed Jul 05, 2017 11:19 pm
languages_spoken: english, german
ODROIDs: C2
Location: Germany
Contact:

Re: C2 and I²S in slave mode

Unread post by HeinrichG » Tue Aug 29, 2017 12:59 am

It's really not good, if it's true :(
Regards,
Heinrich

User avatar
HeinrichG
Posts: 46
Joined: Wed Jul 05, 2017 11:19 pm
languages_spoken: english, german
ODROIDs: C2
Location: Germany
Contact:

Re: C2 and I²S in slave mode

Unread post by HeinrichG » Sun Sep 03, 2017 3:26 am

Which sample rate (like 44.1 or 48 kHz) is I2S able to play and how I can set it?
Regards,
Heinrich

User avatar
HeinrichG
Posts: 46
Joined: Wed Jul 05, 2017 11:19 pm
languages_spoken: english, german
ODROIDs: C2
Location: Germany
Contact:

Re: C2 and I²S in slave mode

Unread post by HeinrichG » Wed Sep 06, 2017 6:50 pm

Hello guys,

I've found a solution for my slave / master problem: just use a sample rate converter!
Configuration like this:
- input port as slave
- output port as slave
- no master clock Input (that means just bit clock and frame clock are connected)
- word length on output depends on input port configuration of the DAC orwhatecer

As sample rate converter I'll use SRC4190 or CS8421 :)
Regards,
Heinrich

best_odroidfreak
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english
Contact:

Re: C2 and I²S in slave mode

Unread post by best_odroidfreak » Fri Sep 08, 2017 4:17 am

HeinrichG wrote:Hello guys,

I've found a solution for my slave / master problem: just use a sample rate converter!
Configuration like this:
- input port as slave
- output port as slave
- no master clock Input (that means just bit clock and frame clock are connected)
- word length on output depends on input port configuration of the DAC orwhatecer

As sample rate converter I'll use SRC4190 or CS8421 :)
Please explain, are you use SRC4190 (CS8421) placed on additional board?

User avatar
HeinrichG
Posts: 46
Joined: Wed Jul 05, 2017 11:19 pm
languages_spoken: english, german
ODROIDs: C2
Location: Germany
Contact:

Re: C2 and I²S in slave mode

Unread post by HeinrichG » Fri Sep 08, 2017 6:57 pm

My problem is, I've got a synchronous bus, the clock is generated by the master of this bus. My device is a slave, that means, the device recovers clock from the bus and i2s interface of this device is master,so provides bit clock and frame clock (are outputs).

Odroid C2 provides an i2s master interface too, bit clock and frame clock are outputs, a slave mode is not possible.

How to fix this? Use SRC. A SRC have got input and output, can be an upsampler or downsampler or just connect to master interfaces. Input of SRC is connected to C2, as slave, bit clock and frame clock are inputs, data is input too. The output of SRC is connected to the bus transceiver, bit clock and frame clock of bus transceiver are outputs and data is input. It is like bus transceiver says to SRC "I provide you both clocks and you give me the data fitting this both clocks".

On my board I will use SRC4192, is a high-end version of SRC4190.
Regards,
Heinrich

best_odroidfreak
Posts: 364
Joined: Wed May 04, 2016 1:07 am
languages_spoken: english
Contact:

Re: C2 and I²S in slave mode

Unread post by best_odroidfreak » Fri Sep 08, 2017 10:03 pm

HeinrichG wrote:My problem is, I've got a synchronous bus, the clock is generated by the master of this bus. My device is a slave, that means, the device recovers clock from the bus and i2s interface of this device is master,so provides bit clock and frame clock (are outputs).

Odroid C2 provides an i2s master interface too, bit clock and frame clock are outputs, a slave mode is not possible.

How to fix this? Use SRC. A SRC have got input and output, can be an upsampler or downsampler or just connect to master interfaces. Input of SRC is connected to C2, as slave, bit clock and frame clock are inputs, data is input too. The output of SRC is connected to the bus transceiver, bit clock and frame clock of bus transceiver are outputs and data is input. It is like bus transceiver says to SRC "I provide you both clocks and you give me the data fitting this both clocks".

On my board I will use SRC4192, is a high-end version of SRC4190.
Very interesting! Can you download some photos?

User avatar
HeinrichG
Posts: 46
Joined: Wed Jul 05, 2017 11:19 pm
languages_spoken: english, german
ODROIDs: C2
Location: Germany
Contact:

Re: C2 and I²S in slave mode

Unread post by HeinrichG » Fri Sep 08, 2017 10:30 pm

If I've get the pcb, I'll post some photos.
Regards,
Heinrich

Alex_twn
Posts: 3
Joined: Thu Oct 05, 2017 1:16 pm
languages_spoken: english
ODROIDs: Odroid C2
Contact:

Re: C2 and I²S in slave mode

Unread post by Alex_twn » Thu Oct 05, 2017 1:28 pm

Hello,
I am using an Odroid C2 in a high end network player that I am building. DAC is based on PCM1794A.
Two options there, ASRC is a valid one or also using an asynchronous FIFO with two separated clock domains.
I am experimenting both in a FPGA.
For information some photos and a description of my on-going project there => http://www.homecinema-fr.com/forum/diy- ... 80995.html (sorry for the French), I'll provide more information when everything is completed.

User avatar
odroid
Site Admin
Posts: 29380
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Contact:

Re: C2 and I²S in slave mode

Unread post by odroid » Thu Oct 05, 2017 6:50 pm

Alex_twn wrote:Hello,
I am using an Odroid C2 in a high end network player that I am building. DAC is based on PCM1794A.
Two options there, ASRC is a valid one or also using an asynchronous FIFO with two separated clock domains.
I am experimenting both in a FPGA.
For information some photos and a description of my on-going project there => http://www.homecinema-fr.com/forum/diy- ... 80995.html (sorry for the French), I'll provide more information when everything is completed.
Very interesting professional project :o

Alex_twn
Posts: 3
Joined: Thu Oct 05, 2017 1:16 pm
languages_spoken: english
ODROIDs: Odroid C2
Contact:

Re: C2 and I²S in slave mode

Unread post by Alex_twn » Sat Jan 20, 2018 8:40 pm

Hello,

I finished the implementation of the asynchronous FIFO and it sounds fantastic :)
Now I have a DAC connected to my C2 running volumio with the FIFO allowing precision recklocking to remove jitter and isolation.
I need to find how Volumio can export the sampling frequency of the music it is currently playing.
If anyone has an idea how to do that...

Thanks.

User avatar
gkkpch
Posts: 269
Joined: Mon Feb 25, 2013 11:47 pm
languages_spoken: english, dutch, german
ODROIDs: Odroid-C1+, Odroid-C1+ HiFi shield, Odroid-C1, Odroid-X2
Location: Switzerland
Contact:

Re: C2 and I²S in slave mode

Unread post by gkkpch » Wed Jan 31, 2018 7:08 pm

Volumio can't, as it is using the mpc command to control mpd. mpc does not have a command for your requirement.
But you could try this thread for more info on how you could do it by polling /proc/asound yourself.

-- Gé --

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 1 guest