ΣSigmaStudio Ask AI Русский Log in

Where's the Linear Interpolator (ADAU1701)?

SigmaDSP & SigmaStudio KJBob Sep 8, 2016 00:00 23 replies Original on forum ↗
Subscribe
KJBob Question
Sep 8, 2016 00:00

A SigmaStudio project for a product we've been developing for awhile uses several Linear Interpolator blocks for linearizing gain controls and such, placed with an older version of SigmaStudio. One of them is shown below:

Funny thing is, I cannot find this block in the current Beta version. Although the wiki says it's still around:

Now, the closes thing I can find is an Index LUT with selectable integer / fractional input and output, which I suppose has replaced the Linear Interpolator. However, it lacks the Linear Interpolator's graph, and I'm not sure if it works the same way:

And so I'm wondering:

Is the Linear Interpolator still included and I'm just missing where it is?

If not, can I still leave this block in my existing projects (they load OK in version 3.13.1, but I have not tried compiling)?

Can the newly designed Index Lookup Table perform a similar function?

Other cores such as the -1761 and the -1452, still have the Linear Interpolator intact. What gives?

Thanks, Bob

linear_interpolator

79ebf03603d88dac39bd9fba9cbb187f.png
79ebf03603d88dac39bd9fba9cbb187f.png
79ebf03603d88dac39bd9fba9cbb187f.png-569x306.png
79ebf03603d88dac39bd9fba9cbb187f.png-569x306.png
e947b6f8d3372e5df0daea95ca698e84.png
e947b6f8d3372e5df0daea95ca698e84.png
e947b6f8d3372e5df0daea95ca698e84.png-550x457.png
e947b6f8d3372e5df0daea95ca698e84.png-550x457.png
7523fbff260b36914047345456f6b9c0.png
7523fbff260b36914047345456f6b9c0.png
7523fbff260b36914047345456f6b9c0.png-620x339.png
7523fbff260b36914047345456f6b9c0.png-620x339.png
a079989957e6fc8f437a45d83651d772.png
a079989957e6fc8f437a45d83651d772.png
a079989957e6fc8f437a45d83651d772.png-620x224.png
a079989957e6fc8f437a45d83651d772.png-620x224.png
Wilfrido Reply
Sep 9, 2016 00:00

Hello Bob,

I saw our log about this cell. It had a lot of issues that got fixed, including a multi channel capability. However, adding multi channel assembly code made it incompatible for the ADAU1701 core. A new implementation is required and a request in our software group has been issued.

Best regards,

Wilfrido.

KJBob Reply
Sep 9, 2016 00:00

Thanks, Wilfrido, I'll be looking for the replacement -1701 version of this highly useful function.

Bob

KJBob Reply
Feb 19, 2017 00:00

It's possible to duplicate the Linear Interpolator's function with two ordinary LUTs and some math. The example below "log-tapers" a linear volume pot with a modified dB (exponential) curve:

The pot setting at Aux ADC 3 goes from zero to 1.0 in 5.23 format. My log-taper curve has 10 segments -- thus the Aux ADC value is multiplied by integer 10 to scale it to a 0-10 integer to drive the LUTs. The LUT table index starts at 1, so 0-10 is really 1-11 -- thus we need 11 table positions.

The LUT table contents can be calculated with a spreadsheet as shown below:

Linear Gain = 10^(dB/20)

Slope = (D Linear Gain) / (D Aux ADC) -- for example, (D6-D5) / (A6-A5) These values go into LUT B

Step = Linear Gain - (Aux ADC * Slope) -- for example, D5 - (A5*E5) These values go into LUT A

Observe the absolute limit of -16.0 -- +15.999 for the table values (5.23 format) -- if any go out of range, scale everything down and add some gain outside.

The Linear Interpolator's advantage is shown above, right. It may not be worth the trouble for a simple volume pot, where an ordinary LUT of perhaps 30 -- 100 steps would provide enough resolution. But one of my applications needs about 1000 points of resolution, something only a linear interpolator can provide.

Best regards,

Bob

6327089698a94b022c0fe76ee650dddc.png
6327089698a94b022c0fe76ee650dddc.png
6327089698a94b022c0fe76ee650dddc.png-620x250.png
6327089698a94b022c0fe76ee650dddc.png-620x250.png
e0a9329fd1bf2b3dbd4dff0a81f084e6.png
e0a9329fd1bf2b3dbd4dff0a81f084e6.png
e0a9329fd1bf2b3dbd4dff0a81f084e6.png-368x311.png
e0a9329fd1bf2b3dbd4dff0a81f084e6.png-368x311.png
cd855496d79cbce48bdb96f4739696b1.png
cd855496d79cbce48bdb96f4739696b1.png
cd855496d79cbce48bdb96f4739696b1.png-350x277.png
cd855496d79cbce48bdb96f4739696b1.png-350x277.png
Artifex Reply
Apr 11, 2017 00:00

Hello Bob, how is it going with compiling your older projects with Linear Interpolator in newer versions of Sigma? Looks like I'm going to have same issue soon. BTW is the Linear Interpolator block still missing in latest versions? I'm still using 3.11...

Artifex Reply
Apr 12, 2017 00:00

Bob, thank you very much, LI fan club rocks))) eh, I wonder in your experience is there really something in those newer Sigmas, I specifically mean 3.13-14, that those who stick to 1701s would be after? Because as I said, after having installed 3.12 I found your post with exactly same attitude in mind, and then I went back to 3.11 and lost any intention to try anything newer, so I just wonder if I'm losing something...

KJBob Reply
Apr 12, 2017 00:00

Hello Artifex,

Like you I have found the Linear Interpolator extremely useful -- building it into applications ranging from a subwoofer phase control to curve-fitting a dB level meter. Here's what I know so far:

Support for the Linear Interpolator (LI) on Sigma100 (ADAU1701) ended after SigmaStudio version 3.11, and has not yet returned.

I have been able to copy and paste the LI from SigmaStudio 3.11 into projects made with later versions (at least as new as v. 3.13), and these projects compile fine.

These projects always operated properly until one day, we discovered that one of the channels of a prototype mixer was passing audio with its gain pot at zero. Problem was traced to that channel's LI which somehow became corrupted although identical to many others in this project. Deleting this LI and replacing it with one of its neighbors in the schematic fixed the problem. In view of the unspecified "lot of issues" that Wilfrido mentioned, I no longer felt comfortable using the dozens of Linear Interpolators inside six ADAU1701s that comprise this mixer.

With the mixer just weeks away from production, I panicked and spent a weekend coming up with the replacement shown above (substituting two ordinary lookups for each Linear Interpolator). We have completed our first production run of mixers with some already out in the field, and no reported problems.

Best regards,

Bob

KJBob Reply
Apr 12, 2017 00:00

Yes, the humble yet wonderfully useful ADAU1701. There's a reason (actually, lots of reasons) why it shows up so prominently in the Tag Index:

In fact, where we work we like the -1701 so much that we preferred to use six of them in our mixer, rather than for example, a ADAU1452 and a bunch of codecs.

Going through recent SigmaStudio Release Notes, I found nothing specifically applicable to ADAU1701 in version 3.14, and the following items in Version 3.13 (highlighted items are of particular interest to my own applications):

Enhancements in SigmaStudio 3.13 Release

 Log2 and Log10 is added for ADAU144X and ADAU170X, ADAU176X family of processors.

Bug Fixes in SigmaStudio 3.13 Release

 A bug in Index Selectable multiband filter which caused the SigmaStudio to crash is resolved.

 A bug in Standard Resolution compressor which caused the SigmaStudio to crash when changing expander ratio and input gain is resolved.

 Bug in transfer function for ‘Gain- No slew’ module is resolved.

 Bugs in real time display module are resolved.

 A Bug in loudness module which caused the step value not to be stored while saving is resolved.

 Zoom Shortcut bug is resolved. Delete ToolbarLayout.dat from (%APPDATA%/Analog Devices/SigmaStudio 3.13) for the shortcut to work.

In particular, the first item under Bug Fixes -- the fixed Index Selectable multiband filter -- forced me to update my mixer project to SigmaStudio 3.13 since I needed to use those filters. If nothing in the above list is of interest to you, then staying with version 3.11 shouldn't hurt. On the other hand, if some Version 3.13 features makes an upgrade desirable -- you could replace any Linear Interpolators in your project with standard lookup tables, of course with many stair-steps in lieu of the interpolation. Or you could try working in the substitute interpolator I have outlined above -- it uses more instructions than the original LI, but it works.

Best regards,

Bob

5bf8cc798a0624b85c6b256758889e21.png
5bf8cc798a0624b85c6b256758889e21.png
5bf8cc798a0624b85c6b256758889e21.png-338x273.png
5bf8cc798a0624b85c6b256758889e21.png-338x273.png
Artifex Reply
Apr 13, 2017 00:00

In fact, where we work we like the -1701 so much that we preferred to use six of them in our mixer, rather than for example, a ADAU1452 and a bunch of codecs.

Bob, now you've mentioned it I really can't stop myself) I mean, WHY?) Honestly, since the first time I've read about your mixer project which really inspires me on my quest for a multi-1701 sound processing "black box" (btw I've got schematics done and started ordering parts), I was wondering why you went this way. For a first timer like myself it's an obvious move, but... a mixer! Wouldn't it be a much better device with external ADCs/DACs and a more powerful DSP packed with more advanced SigmaStudio features?

ADIApproved Reply
Apr 13, 2017 00:00

I think Bob is old's school Anyway you don't dump an old girlfriend because you like someone else right?
Sorry, doesn't contribute to the topic.

KJBob Reply
Apr 14, 2017 00:00

Hello,

We could have built the mixer with, for example, one ADAU1452 and an appropriate number of AD1938 codecs to handle the ins and outs -- yet we found good reasons to use multiple ADAU1701s instead:

We're familiar with the -1701 from previous simpler projects (as Miguel said, "old school").

Booting a -1701 from uC needs only a few block writes -- we manually paste the compiled code into byte constants in the uC's C code to implement what the Capture Window shows for each -1701:

Booting a -1452 requires many writes (even more than shown below) -- not easy to code manually, and ADI's canonical method How do I create the microcontroller code to interface to my SigmaDSP? is just too convoluted.

We get better pricing on many -1701s than with fewer -1452s plus codecs.

The ADAU1701 has every SigmaStudio block needed -- I built more complex functions from basic blocks.

Best regards,

Bob

0624.2a5babb0ffa3808d39eee2535565ef21.png
0624.2a5babb0ffa3808d39eee2535565ef21.png
0624.2a5babb0ffa3808d39eee2535565ef21.png-591x103.png
0624.2a5babb0ffa3808d39eee2535565ef21.png-591x103.png
8468.79d2bb9dc5a004ebd092eeb64822e189.png
8468.79d2bb9dc5a004ebd092eeb64822e189.png
8468.79d2bb9dc5a004ebd092eeb64822e189.png-571x477.png
8468.79d2bb9dc5a004ebd092eeb64822e189.png-571x477.png
Artifex Reply
Apr 14, 2017 00:00

Yea, especially when she's your wife))) So! I wonder if you could do us 1701-ers a friendly favor and remind the guys in the software that we miss our LI so much) In fact, well, I perfectly understand that different engineers dwell in totally different realities, but anyway, making the LI multichannel is a good idea, but why remove the older version which suited people fine? Why not keep them both in the same toolbox tree entry? Look what you have done to Bob's weekend)))

And even more, we have another thread here which is frustratingly silent Looking For External LED Array Driver Why not give us back the External LED Array Driver block as well? Running a parallel interface over GPIO pins is tremendously cool! We need to get it work with shift registers! They will require some extra parts compared to the original idea with 6276, but they are going to be around for eternity. For example my project will greatly benefit if I could introduce full size level meters and not just "signal present / signal ok / turn that pot down now!" style - and I would really like to stay away from uCs as long as possible

I don't know, Bob, maybe you've already made it with simple blocks during another weekend of yours?)))

KJBob Reply
Apr 17, 2017 00:00

Hello,

Yes the 6276 shows as obsolete at Digi-Key's web site. Where I work that's code for, don't design this in (even though available through other channels). So we need to find another way. Surprisingly, our old friend the LM3914 Dot/bar Display Driver is still quite alive. Of course we could directly sense audio with an analog rectifier to drive a LM3914-based display. Yet, nowadays we can do better. For example, an automotive gas gauge isn't connected directly to the fuel float pot anymore -- instead, the signal is digitized, massaged, and converted back to PWM by the car's on-board computer. In turn this yields many advantages -- and we can do the same with the ADAU1701.

The arrangement shown below provides a PWM level output via one digital GPIO per channel. A simple lowpass filter (possibly, 22 K ohms and 2.2 uF) would convert each PWM signal to analog for driving its LM3914. With some cleverness you could even multiplex one LM3914 between the two channels, as was often done for RTA-like displays found in vintage consumer stuff. It doesn't get much simpler than this! The attached project runs on a ADAU1701MINIZ board. This was my first eval board -- and still a pleasure to work with.

Best regards,

Bob

14e88d9892d9877f144d95d1d6f620cc.png
14e88d9892d9877f144d95d1d6f620cc.png
14e88d9892d9877f144d95d1d6f620cc.png-620x201.png
14e88d9892d9877f144d95d1d6f620cc.png-620x201.png
KJBob Reply
Apr 17, 2017 00:00

Hello, Wilfrido,

Any status change to report on the Sigma 100 Linear Interpolator issue?

Best regards,

Bob

Artifex Reply
Apr 17, 2017 00:00

Bob, thanks a lot, that was really illuminating! Days like today I feel brighter future one step closer) Could you please explain how do you get the set of numbers in the Log Lookup Table which are then compared to a generator+1? So, eh, we can see here two kind of linear segments with some break?

I feel there needs to be a place where we set which LED corresponds to which signal level, so this is it, right? on top of everything I don't see any Log Lookup Table documentation anywhere...? sooo what are these 33 points exactly in terms of DBFS I wonder... and! why does point 24 have lesser value then point 23? And why are there 15 levels for 10 LEDs?

25c544ef3009c7915057e2bb1a01bb5c.png
25c544ef3009c7915057e2bb1a01bb5c.png
25c544ef3009c7915057e2bb1a01bb5c.png-620x321.png
25c544ef3009c7915057e2bb1a01bb5c.png-620x321.png
KJBob Reply
Apr 18, 2017 00:00

Hello,

The Log Lookup Table is a relatively new innovation, thus no "official" docs. Often, you'll find posts on this board where users have attempted to fill in where docs are lacking -- for the Log Lookup, see Is there any documentation for the ADAU170x's Log Lookup Table?

Ultimately, the decision for which LED(s) light is made within the LM3914 itself -- thus, the idea of the Log LUT is not so much to specify exactly each LED transition, but rather to shape the LED meter's linearity as desired -- straight linear, straight log, or something in between (a typical VU meter). The dip in output at point 24 was simply a goof on my part. I've been cramming these answers in at odd moments, and lately suffering from a profound depression which affects everything I do (sorry, TMI). Generally, the best way to come up with a LUT's contents is to define them mathematically on a spreadsheet (as you did above!), then directly paste these results into the LUT Table Editor.

BR,

Bob

Artifex Reply
Apr 20, 2017 00:00

I see! You've set an incredibly high standard of developer-to-developer attitude, Bob! I really wish all of us would comply one day) Thanks for your thorough explanations)

KJBob Reply
Jul 24, 2017 00:00

Guess what! The latest SigmaStudio beta release (version 3.15.2) has quietly returned the Linear Interpolator to its proper place in the ADAU1701 toolkit. Since this change is not even listed in the Release Notes, I'm wondering if this is the original LI or an improved version.

Artifex Reply
Nov 26, 2018 00:00

Hi Bob, hope you're doing fine and your spirits are high! I'm back to this old post with a question... Guess I'm just lazy to search properly but please bear with me. Do you happen to have a personal archive of previous versions of SigmaStudio? I wonder which is the most recent 32-bit version (that's important for me) that has our favourite LI? Could you please share a link? Hope it's not a huge crime against society)))

KJBob Reply
Nov 26, 2018 00:00

Hello Artifex,

After version 3.11, the LI went MIA until its restoration with version 3.15.3 By then support for x86 may have ended, so the latest 32 bit LI version could still be 3.11. Unfortunately, I don't have any 32 bit installs in my hoards. Unless someone at ADI has a stray copy lying around... You can try pasting a LI from any of your existing projects into a new project; this worked for me until I ran into the corruption problem described above -- which may actually be unrelated to the LI. If you don't mind some extra work and have some instructions to spare, you could always try the substitution I have also described earlier in this thread.

Artifex Reply
Nov 29, 2018 00:00

OK....... I see. So looks like it's still the golden 3.11 ,eh?) OK! If no one from ADI comments on this I'll still try posting one more "looking for a previous version" post (is it only me who finds it strange that there is no such thing as previous Sigma versions archive available for the mortals....?). At least now I know which version I'm looking for!

Artifex Reply
Nov 30, 2017 00:00

All hail the LI!)))

By the way my project has gone to the prototype stage! https://ic.pics.livejournal.com/arti_fx/1099128/33855/33855_original.jpg

Again my best regards to KJBob for inspiration and DaveThib for loads of patience with my stupid questions (more are coming)))

DaveThib Reply
Nov 30, 2017 00:00

Hello Bob,

Yes, I made the case for its importance in the toolbox. It is the original version unchanged. So do not grow the cell, instead just drop in another copy.

Dave T

KJBob Reply
Nov 30, 2017 00:00

Hello Dave,

Thanks for advocating for us -1701 fans! Glad to see the LI back. I'm still curious about what @Wilfrido meant by this comment, which appears to suggest that the Sigma 100 LI has more issues than just growing channels (highlight mine):

I saw our log about this cell. It had a lot of issues that got fixed, including a multi channel capability. However, adding multi channel assembly code made it incompatible for the ADAU1701 core. A new implementation is required and a request in our software group has been issued.

Best regards,

Bob