SGTL5000 shortages

zachtos

Well-known member
This chip is not available ANYWHERE in the world in our searches anymore, 80+ weeks out. Do you think an alternate official i2s codec can be coded using this library? The TLV320 from Texas Instruments seems available and fairly popular.
 
Virtually all I2S chips work, as we're using the most common I2S format. You just need to make sure the chip is configured for slave mode, where it expects Teensy to transmit all the clocks.

If you only need output, PT8211 is also a pretty popular choice. It's incredibly cheap. If you do critical spectrum analysis the output isn't quite as good, but I really doubt most people could tell the difference listening to ordinary music, even with high quality headphones.
 
Do you have any tips on what I would need to modify to continue to use the mixer as shown below?

Code:
//////////////////////// Audio Setup ///////////////////////////
AudioPlaySdRaw           raw4;       //channel 4 playback
AudioPlaySdRaw           raw3;       //channel 4 playback
AudioPlaySdRaw           raw2;       //channel 4 playback
AudioPlaySdRaw           raw1;       //channel 4 playback
AudioMixer4              mixer1;         //combines up to 4 channels, can play even more if needed by more mixers
AudioOutputI2S           i2s;           
AudioConnection          patchCord1(raw4, 0, mixer1, 3);
AudioConnection          patchCord2(raw3, 0, mixer1, 2);
AudioConnection          patchCord3(raw2, 0, mixer1, 1);
AudioConnection          patchCord4(raw1, 0, mixer1, 0);
AudioConnection          patchCord5(mixer1, 0, i2s, 0);
AudioControlSGTL5000     sgtl5000;     //audio codec chip
///////////////////

AudioMemory(15);
sgtl5000.enable();
sgtl5000.lineOutLevel(29);
raw1.play();
///////////////////
 
The PCM5102A on small PCBs are ubiquitous and very good quality if you only require output.

Get rid of
Code:
AudioControlSGTL5000     sgtl5000;
and the objects, and it should work without further modification.
 
Last edited:
How about the TLV320AIC27 ? Although Digikey says they are obsolete, they are <$3 each and are available. I can design an audio PCB for this or some other coded IC if there's enough interest?
 
How about the TLV320AIC27 ?

Do you have the TLV320AIC27 datasheet? I clicked Digikey's datasheet link but it ends up at at TI's 404 page. Didn't try more substantial searching.

If you have the PDF, how about sharing it here? (if using "Quick Reply", click "Go Advanced" to get the full editor which lets you attach a file to your reply)
 
Can you give a link directly the actual PDF? (not that site's lame viewer) Or attach the PDF to a message here?

Maybe I should also explicitly state, rather than just imply, this also involves looking at the many files and figuring out which really is the proper datasheet to use designing an alternation audio shield for this chip (presumably the chip Rochester has 27K in stock). Personally, I'm quite busy right now with a revision of Teensy 4.1 to work around supply chain problems. More on that another time. Right now, if I'm going to look at a datasheet and write an opinion, I want the proper PDF as a single click, not a link to an annoying website with many copies, a lame viewer, and other time wasting junk. I really don't like that alldatasheet website.
 
Can you give a link directly the actual PDF? (not that site's lame viewer) Or attach the PDF to a message here?
...

@tedm: hopefully one of the PDF's on that page is the right chip ... I saw it was a mass of links and I'm not the one to pick the right one ...
 
Can you give a link directly the actual PDF? (not that site's lame viewer) Or attach the PDF to a message here?

Maybe I should also explicitly state, rather than just imply, this also involves looking at the many files and figuring out which really is the proper datasheet to use designing an alternation audio shield for this chip (presumably the chip Rochester has 27K in stock). Personally, I'm quite busy right now with a revision of Teensy 4.1 to work around supply chain problems. More on that another time. Right now, if I'm going to look at a datasheet and write an opinion, I want the proper PDF as a single click, not a link to an annoying website with many copies, a lame viewer, and other time wasting junk. I really don't like that alldatasheet website.


I think I was able to download from:
https://www.digchip.com/datasheets/parts/datasheet/477/TLV320AIC27CPFB-pdf.php

I was also able to download from the one that @defragster linked to... I clicked on the first one in the list, on the PDF. Which showed it up in the browser with their stuff on top... I then clicked on the download button in the browser window, which saved the PDF to disk.

Note The first link I believe game me one dated September 2000 and the other one from March 2000
 
Skimmed over the PDF. First impression is using this chip won't be easy. It uses a special TDM-like protocol which isn't (yet) supported by the audio library (and probably never will be).
 
VS1053 has a SPI interface meant for compressed data, not I2S meant for streaming uncompressed audio.

It certainly can work with Arduino libraries like the ones Adafruit publishes. But it doesn't work with the audio library.
 
Quick search on Digikey shows TLV320AIC23BPWR and TLV320AIC23BIPWR seem to be the TLV320 parts with the most inventory actually in stock at Digikey (not at surplus dealers like Rochester who tend to have old & obsolete parts). The datasheet link on Digikey's pages also works. ;)

https://www.digikey.com/en/products/detail/texas-instruments/TLV320AIC23BPWR/1678295

https://www.digikey.com/en/products/detail/texas-instruments/TLV320AIC23BIPWR/605494

I believe these 2 parts are pin compatible, probably the exact same chip with different temperature ratings.

This chip TLV320AIC23B chip is also functionally very similar to SGTL5000. Like SGTL5000 and most other feature-packed codec chips, it does seem to require configuration by I2C or SPI, so some code to configure it will need to be written. But once it's been configured in the proper mode (I2S slave mode) it should "just work" pretty much the same as SGTL5000.

You can buy TLV320AIC23B directly from TI's website. Registration is required. I believe you'll get a lower price than ordering from Digikey. Shipping might be higher, but it probably works out to cost less overall if you're buying any substantial quantity. If you're going to create a design around TLV320AIC23B, several minutes searching and learning how to buy on their site would be time well spent. I tried a search just now which shows they currently have 54,915 of the TLV320AIC23BPWR part in stock and 64,523 of the TLV320AIC23BIPWR part in stock, and also lower levels of stock available for all the other packages & temperature range versions of this part. The 28 pin package does seem to be the most popular and best stocked.


The other alternative which doesn't require any new code would be use of simpler ADC and DAC chips. These simple chips usually have 2 to 6 pins you connect high or low for configuration. They they "just work" with the audio library I2S objects, as long as you configured them to I2S slave mode. PCM1808 is a simple ADC chip which can work, and is in stock (and has generally been available).

https://www.digikey.com/en/products/detail/texas-instruments/PCM1808PWR/1573355

The PCM5102A DAC chip mentioned in msg #4 is also in stock, apparently with 2 part numbers having different temperature range.

https://www.digikey.com/en/products/detail/texas-instruments/PCM5102APW/3902495

https://www.digikey.com/en/products/detail/texas-instruments/PCM5102AQPWRQ1/4725759

Both of these chips are also available on cheap breakout boards which you can order from Aliexpress / Amazon / Ebay vendors.


But again, if you only want sound output, PT8211 is by far the cheapest good quality way. PJRC has these DIY kits in stock.

https://www.pjrc.com/store/pt8211_kit.html

PT8211 works directly with the audio library. But the format is not I2S, so you can't share the BCLK & LRCLK pins with another I2S chip (which is the way you would connect a ADC + DAC pair like PCM1808 and PCM5102A).

Buying actual PT8211 chips usually requires ordering directly from Chinese vendors on sites like Aliexpress or Alibaba. But the price is so low that you might as well just find a 100 piece listing and order some. For example, here's an Aliexpress listing for $12.74 to buy 100 PT8211 chips, and cheap (but slow) postal mail shipping.

https://www.aliexpress.com/item/2251801505232450.html

If this one is gone (they come and go frequently) you can find more by just searching "PT8211 100pcs".
 
Last edited:
I like the TLV320AIC23BPWR because a) it's available as an SOIC (PW package) which means that a PCB that can be self-assembled (by me) for prototypes. Once the bugs are ironed out, it can shift to VQFN (RHD package) for professional production and even BGA for masochists. b) It's made by TI and will probably be around for a while (this family is popular for automotive applications which extends their availability humongeously).

I have worked with a couple of the members of the TLV320xxx family before and have some I2C setup experience (another exercise in masochism) - I even have a $100+ development kit that allows the (clunky) TI app to be used for testing. I can work on the initial schematic / component / footprint creation later this week (starting Thursday) but, for now, give me your requirements here. If you look at this app sheet, at the slave config page (page 3), you'll see that the TLV320 family needs low-jitter MCLK, BCLK, and WCLK and these gave me problems in the past, can the Teensy be set up to generate these clocks with low jitter?

I think we should have an uncluttered PCB that is somewhat like the Rev D audio PCB but maybe without the SD card as I now have a Teensy 4.1 that includes the SD card and I think the SD on the 4.1 is QSPI which makes it way faster than the one on the Rev D board. It would include headphone output, maybe with a 3.5 mm jack socket but I'd prefer just header holes; I also have it in mind to develop a guitar pedal board that could a) fit in a standard aluminum box b) include position(s) for quadrature encoder(s), display, and 9V power handling - give me your thoughts.

After we have rough requirements for the board(s), I think we should start a new thread(s).

Ted
 
Last edited:
at the slave config page (page 3), you'll see that the TLV320 family needs low-jitter MCLK, BCLK, and WCLK and these gave me problems in the past, can the Teensy be set up to generate these clocks with low jitter?

Yes, Teensy automatically creates MCLK, BCLK and LRCLK when I2S is used.
 
Yes, Teensy automatically creates MCLK, BCLK and LRCLK when I2S is used.

Excellent. Now I recall, the problems I had were related to use with an audio Amp IC that had to run as a slave and there was a BT module in the mix that could run at 2 different clock rates so I had to create the WCLK from an external IC (I discovered an IC that generates all the clocks needed and can be switched).

The vision I have for the guitar-pedal-specific Teensy audio board is that it can take the standard ~ 1Vpp input signal centered on 4.5V and apply effects to it such as echo, reverb, chorus, distortion plus I thought of having a looper function too. The HP output might also be close to the 1Vpp needed for a guitar pedal. But that's all pretty advanced so let's start with a basic board with mic/line inputs and headphones/line outputs - for the guest audio book on a phone project that I got working recently, the TLV320AIC23 also has a sidetone function which would be a very nice feature to add.
 
Back
Top