Build Thread for TPA BIII + Ian Async I2S FIFO + OPC NTD1 + Salas SSLV - Page 26 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Line Level

Digital Line Level DACs, Digital Crossovers, Equalizers, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 14th October 2012, 02:50 PM   #251
glt is offline glt  United States
diyAudio Member
 
Join Date: Oct 2004
Quote:
Originally Posted by hochopeper View Post
I believe that it should be possible to calculate it, I need to read the datasheet to give you better advice though. What I am thinking at the moment is to truncate the result from that register and then compare to a set of ranges and depending on the range it falls in it should be able to determine which fs is being used.


Also, what are the frequencies two clocks that you are using in the dual clock board at the moment?

I will dig up my copy of the datasheet tomorrow and if I have any ideas I'll let you know.
I repeated what you said :-). That is the way to do it.
__________________
www.hifiduino.wordpress.com
  Reply With Quote
Old 14th October 2012, 02:51 PM   #252
diyAudio Member
 
Join Date: Jul 2009
Quote:
Originally Posted by glt View Post
The "magic" number is just an integer value that will give the closest match to a floating point calculation. When I started doing this, I figure I would use integer operation rather than floating point because floating point operation is "slow" in the arduino.

But the "magic" number should still work with the new frequency by replacing 80000000 or 100000000 with the new master frequency from the FIFO. However, I can't think of any way to detect that the master frequency has changed unless indicated by the FIFO

But, one way you can do it locally is to determine the error in the sample rate calculation: if the error is "too large" compared to what it is expected, then you switch to the other frequency.

There is one more things: According to Dustin in this article: 6moons audio reviews: Wyred4Sound DAC2

" You can use the ASRC if you like - or not by simply clocking the XIN pin synchronously (at an integer multiple) to the BCLK. Then the ASRC drops itself out, reverting in this case to a more conventional method as the other DACs I'm aware of do."

I don't know what it means by "drops itself out", but if DAC determines that the signal is synchronous, it may choose to disable the ASRC and therefore the DPLL may be just "freewheeling" Check comment #4 in this post: Poor Manís Jitter Measurement H i F i D U I N O

Again I don't know exactly what is "freewheeling", but it could mean the DPLL is just "going all over the place". If this is the case, then you cannot calculate the sample rate.

Thanks for sharing all the work guys :-)
Thanks for your advice, If the value in the DPLLNum register is constant or only shift a little, it will not be difficult to find the magic number. I use the code below to print out the value in each register:

unsigned long sampleRate() {
myGLCD.setFont(SmallFont);
myGLCD.setColor(255, 255, 255);
DPLLNum=0;
// Reading the 4 registers of DPLL one byte at a time and stuffing into a single 32-bit number
DPLLNum|=readDPLL(31);
myGLCD.print("1",250,70);
myGLCD.printNumI(readDPLL(31),280,70);
DPLLNum<<=8;
DPLLNum|=readDPLL(30);
myGLCD.print("2",250,90);
myGLCD.printNumI(readDPLL(30),280,90);
DPLLNum<<=8;
DPLLNum|=readDPLL(29);
myGLCD.print("3",250,110);
myGLCD.printNumI(readDPLL(29),280,110);
DPLLNum<<=8;
DPLLNum|=readDPLL(28);
myGLCD.print("4",250,130);
myGLCD.printNumI(readDPLL(28),280,130);
// The following calculation supports 80 MHz oscillator

if (SPDIFValid){
DPLLNum*=20; // Calculate SR for SPDIF -100MHz part
DPLLNum/=859; // Calculate SR for SDPIF -100MHz part
myGLCD.print("SPDIF",280,200);
}
else { // Different calculation for SPDIF and I2S
DPLLNum*=4; // Calculate SR for I2S -100MHz part
DPLLNum/=10995; // Calculate SR for I2S -100MHz part
myGLCD.print("I2S ",280,200);
}
if(bypassOSF) // When OSF is bypassed, the magnitude of DPLL is reduced by a factor of 64
DPLLNum*=64;

// myGLCD.printNumI(DPLLNum, 280,70);
return DPLLNum;

All 4 registers are not showing a constant number.
DPLL(31) : 63 or 64
DPLL(30) : 0 or 055 or 255
DPLL(29) : 055 or 255
DPLL(28) : vary.
  Reply With Quote
Old 14th October 2012, 02:52 PM   #253
qusp is offline qusp  Australia
diyAudio Member
 
qusp's Avatar
 
Join Date: Oct 2009
Location: Brisbane, Australia
I interpret 'freewheeling' as in freewheeling on a pushbike, like when you are going down a hill and you cant pedal fast enough to get any purchase, but you are still going where you want to go, so you just sit there and the bearing spins with the wheel without you having to do any work.
  Reply With Quote
Old 14th October 2012, 03:10 PM   #254
qusp is offline qusp  Australia
diyAudio Member
 
qusp's Avatar
 
Join Date: Oct 2009
Location: Brisbane, Australia
hmm, maybe BCLK is going to be your best bet, using BCLK combined with the signals on J13 on fifo. pin 1 on J13 is the SILENCE indicator used to mute the dac during change of clocks, you could use this to signal a change and get arduino to look at BCK at that point, remembering the last value and comparing to it.

but then I should shut up at this point. coding is not on my list of skills
  Reply With Quote
Old 15th October 2012, 12:04 AM   #255
Bunpei is offline Bunpei  Japan
diyAudio Member
 
Join Date: Aug 2008
Quote:
Originally Posted by bigpandahk View Post
But Synchronize mode cause a new problem, Arduino can't display the correct clock frequency
It's a well-known issue among people those who apply a synchronous master clocking scheme.
ESS Sabre Reference DAC (8-channel)

My understandings are;
1. ES9018 does not know any absolute frequency of MCLK, BCLK.
2. DPLL number registers represent a ratio, BCLK/MCLK [in the case of I2S or DSD ] or fs/MCLK [S/PDIF] in the format of unsigned 32 bit integer.
3. The DPLL function is always on even when a synchronous MCLK is applied. However, almost no actual effective feedback adjustment appears in this case. This is described as "freewheeling" by Russ.
  Reply With Quote
Old 15th October 2012, 12:45 AM   #256
diyAudio Member
 
Join Date: Jul 2009
Quote:
Originally Posted by glt View Post
Yeah, I am most interested in this bug :-). The way it is currently programmed (as dimdim said) is that every input has independent settings for each function, and they are saved in eeprom. When you switch to another input, the settings are recalled from the eeprom and programmed into the registers. Granted, not all of the them would change, but it was easiest to just rewrite all the values into the registers everytime you change inputs.
Could you please point me to the section of code that store settings for individual input?
  Reply With Quote
Old 15th October 2012, 02:13 AM   #257
glt is offline glt  United States
diyAudio Member
 
Join Date: Oct 2004
Quote:
Originally Posted by bigpandahk View Post
Could you please point me to the section of code that store settings for individual input?
Look for EEPROM.write() and EEPROM.read()
__________________
www.hifiduino.wordpress.com
  Reply With Quote
Old 15th October 2012, 07:39 AM   #258
diyAudio Member
 
Join Date: Jul 2009
Quote:
Originally Posted by glt View Post
Look for EEPROM.write() and EEPROM.read()
Thanks, I thought that there are default settings for different inputs. Instead, the code memory the parameters for each input and recall them when selected.

I have to take out my previous "Bug fixing"
  Reply With Quote
Old 15th October 2012, 02:00 PM   #259
diyAudio Member
 
Join Date: Jul 2009
Quote:
Originally Posted by Bunpei View Post
It's a well-known issue among people those who apply a synchronous master clocking scheme.
ESS Sabre Reference DAC (8-channel)

My understandings are;
1. ES9018 does not know any absolute frequency of MCLK, BCLK.
2. DPLL number registers represent a ratio, BCLK/MCLK [in the case of I2S or DSD ] or fs/MCLK [S/PDIF] in the format of unsigned 32 bit integer.
3. The DPLL function is always on even when a synchronous MCLK is applied. However, almost no actual effective feedback adjustment appears in this case. This is described as "freewheeling" by Russ.
Thanks for the information, I am afraid the solution will be Ian adding this feature into the clock board!
  Reply With Quote
Old 4th November 2012, 03:44 PM   #260
diyAudio Member
 
Join Date: Jul 2009
After installed Ian's isolator board, the bass become much clear and powerful. I am waiting for the i8605 for the additional isolation on the I2C bus.
Today, receive the battery management board and will assemble it ASAP.
Unfortunately, my DAC has a new problem, actually it should be old issue but happen more frequent. When I used the Legato for couple of days, I found its temperature is abnormally high. Some resistors reach 75 deg. C after 20-30 minutes operation. I have raised this query in the TPA support forum but was told it is normal.
Now, I believe the high temperature already damage some component(s). Last month the Legato start to fail after couple hours, but now it can only survive for several minutes.
Both channels have no sound when fail, any suggestion to trace the problem? Please!!
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ian asynchronous I2S and S/PDIF FIFO KIT group buy iancanada Group Buys 1628 Today 08:01 AM
Asynchronous I2S FIFO project, an ultimate weapon to fight the jitter iancanada Digital Line Level 3313 10th July 2014 03:37 PM
FS Quanghao SSLV Salas design merlin el mago Swap Meet 12 17th August 2012 02:06 AM
F.S quanghao salas sslv 1.0 for buffalo dac. back Swap Meet 1 31st July 2012 02:32 AM
Simple FIFO to I2S CPLD, for MCU players / reclocking KOON3876 Digital Line Level 21 19th September 2008 04:00 PM


New To Site? Need Help?

All times are GMT. The time now is 06:47 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright ©1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2