Other Parts Discussed in Thread: TLV320AIC3120
Hello,
I'm using the TLV320AIC3120 as a microphone amplifier. I have D5 of register 29 on page 0 set so that the ADC data is looped back into the DAC, allowing the mic signal to get passed through all the digital processing before being routed out to the Class D amp.
Because of the close physical proximity of the microphone and the speaker in our application, some heavy filtering by the DAC Biquad filters is required. From CodecControl, I was able to manually set the filter parameters how I wanted them. My question for this post is - how do I properly set the registers to implement these filter settings so I can include it in my init file? It seems like there are some restrictions I'm unaware of.
For example, I clicked "record" in the command window as I manipulated the DAC filter settings. This allowed me to see exactly which commands were being sent...or so I thought. When I looked a little closer, I noticed the commands are basically identical even though I was adjusting two very different things.
The first adjustment I made was to set Fc on filter 3 to 1800Hz
The next adjustment was to set the gain to -12.
Here is what was recorded in the command window for both of those adjustments:
The only difference I see between those two commands is the very last line in both of them. It's either w 30 1 05 or w 30 1 07, which is the DAC Coefficient RAM Control register according to the datasheet.
Writing 0x05 sets bits D2 and D0, writing 0x07 sets bits D2, D1, and D0. Neither of those commands have anything to do with setting Fc to 1800Hz or setting the gain to -12. I thought those would be done in registers 22 through 31 on page 8.
The data in those registers matches the exported coefficients from the DAC filter window.
When I try to manually write to those registers through the command window, the output shows something different than what I entered.
The first command I entered was to change the current page to page 8, but the output in the command window shows me setting the page to page 0.
I tried writing my DAC Filter coefficients to registers 22 through 31 anyway, but CodecControl crashed.
I'd love some help getting my DAC Filter coefficients written to their correct registers. Thanks!