TAC5112 Codec, basic driver (+free to a good home)

houtson

Well-known member
I'm looking for a new codec to use in custom designs of musical effects. I've been using the WM8731 for a while but it's now obsolete and a bit more difficult to find.

I need something that I can get easily, stocked at JLCPCB for assembly and ideally with an ADC that is a bit less noisy than I have found the WM8731.

I've started playing around with the TI TAC5112, it's well spec'd, relatively cheap, pin and register compatible with the better spec'd (but more expensive) TAC5212. It looks like a real next generation chip compared to what I'm used to.

I've built a small basic board to evaluate it and hacked together a basic driver (with some AI help so likely some errors remaining). I have it up and running with the Teensy 4 now using i2s - initial impression is sounds good and I'll get it on a scope in the coming days.

If anyone has had any experience with this family of codec, good or bad, it'd be great to hear. Have you been using any of the more advanced features (the biquad filtering) or the PurePath Console?

I've got one spare populated board, if anyone in the UK would like it for experimentation let me know and I'll post it foc - only condition is that you make some use of it.

Cheers, Paul
TAC5112.jpg
 

Attachments

  • BasicPassthrough.ino
    6.4 KB · Views: 24
  • control_TAC5112.h
    21.5 KB · Views: 33
  • control_TAC5112.cpp
    24.9 KB · Views: 30
  • TAC5112 Eval Schematic.pdf
    99.2 KB · Views: 61
I did a bit of work on the TAC5212, courtesy of another forum member who may yet comment :) We got it working in TDM mode, and started getting the PDM mic inputs* working though not with 100% success. It's all gone a bit quiet - I think Real Life intervened. We didn't use the Purepath Console: that appears to need TI approval as a proper developer, and a £300 motherboard, just to get started. Nor did we get as far as messing with the internal filters.

Happy to help out, if you don't get a better offer, though my definition of "making some use" would probably be to collaborate on getting stuff working, then putting it in a box along with other audio stuff until a suitable application appears ... which might be never! I suppose I can always post the remains back to you after we've had our fun. I am in the UK.

*these use the GPxx pins, which it looks as if you haven't tracked :(
 
Hi h4yn0nnym0u5e,

I did see the other thread on the TAC5212 and TDM, for me I'm just looking for a single codec, probably just stereo in and stereo out.

I sent off a request for approval with TI, let's see what they say. I'm not planning on buying their eval board but I thought might be able to use the tools either directly or cut and paste the i2c while I play about with it.

Did you try the filters - if so any views on latency?

On the GPxx pins, I just tracked one of them (GPIO01), I threw the board together on 2 layers and was running out of track space to keep it the way I wanted it on a breadboard. I couldn't really think what I'd use them for (I think MCLK but anything else..)

Cheers, Paul
 
No, didn't try the filters, so no idea about the latency, and the data sheet doesn't seem to say anything about it.

The GPxx pins can be set up to provide clock and receive data from PDM microphones, plus a bunch of other stuff including simple I/O. As it's an audio board I'd probably have gone for 4-layer anyway, so tracking them out to pads or pins would have been easier.

I take your point about designing what you want. I tend to go overboard on making evaluation / first pass boards as flexible as possible, so I can try out various options without re-spinning the board.
 
Hi guys. I am in a similar situation as my small stock of WM8731 is running out in a few months. The TAC5112 looks promising, so wondering how you are getting on with it, any surprises yet?

A few detailed questions:
- No I2S MCLK needed then?
- Do you care about connecting thermal pad to gnd? I assume this would be driving production cost (never had qfn's in my design so far)
- Do you think a dedicated power supply is needed or can I get away with using the Teensy 3.3V with decent filtering?

Best/Daniel
 
Hi @MrCanvas,
I'm getting on okay with it. I've been spending time interfacing it to a pi pico for something that doesn't need the power of a teensy, that's where most of my effort has been lately.
One difference to the WM8731 is that the TAC 5112 doesn't have a PGA so any gain needs to be done digitally. I think it's got enough headroom to manage that, I'm building an effect using which will have a variety of different sources plugged into to it so having to think about the input/front end. I haven't used the built in biquad filters yet but plan to. Also, TI rejected my application for access to the Purepath Console mentioned above but there is a decent amount of documentation in the datasheet and application notes.
No MCLK needed as you noted for I2S.
I connected the thermal pad to ground (I think you need to, the supply voltages are referenced to it), I use jlcpcb for production and this was not an issue or a cost driver. The actual codec bought through jlc was $6 - not cheap but not that expensive.
On power supply, I guess depending on what performance you're looking for will drive that, its very low power. I'm planing a separate supply for the analogue supply.
The other codec that I was looking at was the TLV320AIC3254 which is a bit cheaper, in the end I went with the TAC5112 because of the headline specs.
Cheers, Paul
 
Thanks @houtson, appreciate the comments. I see JLC still has some TAC's in stock so will give it a go.

Also looked at the TLV320 for a while but was concerned that it was from an old family of components. I find codec choices to be among the most difficult when it comes to ic's as it is hard to estimate what will be popular (= in stock).
 
Hey everyone,

I've been working with this chip family for a while now. In fact, I've been designing an ecosystem that I hope will bring creativity and joy to musicians and tinkerers alike. It started as a digital audio mixer, and it's grown from there.

t-dsp-bench-prototype.jpg


I just open-sourced its first component. It's a TAC5212 module that might be useful to you all. It's designed to be daisy-chained with a 20-pin ribbon or custom backplane, and the analog IO is ready to hook directly to your choice of jacks and connectors. The project comes with a KiCad footprint so you can drop it into your own design. I will also supply some sample backplanes that I've worked on as well as a library of jacks and ports you can use in your designs. I have a few backplanes, but one in particular that I think will be a good development platform with all the basic analog and digital IO for use with Teensy, ESP32, headphones, microphones, onboard mics, etc. The TAC5212 module itself is a compact 4-layer board with dedicated analog power, all GPxx pins broken out, TVS protection, and ferrite filtering.


You can view and use the full KiCad project, gerbers, interactive BOM, and schematic. Everything you need to build or modify it. This has been a big part of my life and I'm happy to share it here with the community. I look forward to seeing what you build.

Cheers,
Jay
 
Last edited:
Hi Jay, looks very impressive!

Is there a driver or library that works with Teensy?
 
Hello @DD4WH,

In addition to the driver here provided by @houtson, @h4yn0nnym0u5e and I had worked on a driver and we got basic functionality working. He has a sample board. Also, I have tests for midi, led, spdif, usb, tdm, i2s, etc. It could use some cleanup/refactoring before it's PR-ready.

Are we still submitting pull requests to the Teensy Audio Library? There are 61 open requests.

Jay
 
Jay, thanks a lot for the information! Sorry, obviously I misinterpreted the thread: I was not aware that the two codecs share the same library base. I was asking because I am looking for a codec board for two future projects: a mic array (4-8 mics, PDM mics) and a stereo board (very low noise, 2 analog electret mics). Thank you for all your work!
 
Yes the TAC5212 does "up to 4 pulse density modulation (PDM) digital microphone interface with a high-performance decimation filter" as specified in the datasheet. I am not aware of a driver for that. Good luck!
 
@DD4WH

I mocked up a T-DSP Mic Array Module that should cover your use case.

The design uses two TAC5212 codec modules:
• TAC5212 #1: 4 PDM mics (2 per data line via SELECT pin)
• TAC5212 #2: 2 PDM mics + 2 Knowles SPM0687LR5H-1 analog MEMS mics on the differential inputs

The 6 PDM mics sit in a circular array (50mm diameter, ~26mm spacing) for beamforming, while the 2 analog MEMS mics are positioned as a stereo pair in the center for low-noise stereo capture — 70dB SNR, 130dB AOP.

The board has a Teensy 4.1 footprint for standalone operation and a T-DSP expansion header for integration with the Desktop Pro or other mainboards.

Very hacked together, but the concept is there: https://github.com/t-dsp/t-dsp_mic_array_module

1771245010355.png


1771246116032.png


Let me know what you think.

Jay
 

Attachments

  • 1771246060889.png
    1771246060889.png
    57 KB · Views: 4
Last edited:
@JayShoe
Wow, I am really impressed! ... and also a little embarassed to see you do that much of development work just because I mentioned "two future projects" I was thinking about in a forum post . . . thank you for all your hard work!

However, I feel overwhelmed with such a complex hardware project and I think it is well above my capabilities, both in hardware (designing 8-layer custom PCBs from your design) and software (getting PDM to work with the TAC5212). And it is also that my spare time for this kind of hobby is rather limited.

So, thank you once again!
 
@DD4WH

No worries! I've been toying with these concepts for years and have kept many of my ideas close to the chest. I've already built a test module with PDM (with help from @h4yn0nnym0u5e), so I had a lot of the pieces in place and was able to mock this up quickly. The goal was to show how easy it is to spin up a prototype when we all have the building blocks at our fingertips. I've committed to sharing everything because I think building on top of this could be a lot of fun.

I plan to build more prototypes in the coming weeks. My budget (time and money) got crushed on this project and progress stalled for a while, but eventually I'd love to run group builds and possibly a Kickstarter with finished products. A shared platform like this, combined with AI-assisted code generation, could be a really exciting space to work in.

Here is the code labeled "PDM Working" that @h4yn0nnym0u5e contributed. He noted it worked with one mic but not two, and the board I provided him had some errors.
 

Attachments

  • main[1].cpp
    16.2 KB · Views: 0
  • PDMworking[1].ino
    6.5 KB · Views: 1
Back
Top