[Letux-kernel] Audio Offset for handsfree speakers
H. Nikolaus Schaller
hns at goldelico.com
Wed Dec 29 11:10:19 CET 2021
> Am 28.12.2021 um 21:49 schrieb aTc <atc at k-n-p.org>:
> Should have posted this a few days ago,
no ned to hurry :)
> but reading through the docs about the trim/offset functionality gives me the feeling that it's not actually some hardware after the DAC adjusting the voltage, but an offset applied by the driver/ABE to the audio data before sending it off to the DAC, as part of the the normal processing it does (or doesn't in our case with the broken driver)
> from the audio spec pdf :
> The HS channels must be enabled by the following sequence to minimize click and pop:
> 1. Application companion reads offset data through I2C or PDM interface (register HSOTrim in Table 4-44)
> 2. Application companion subtracts offset from audio data
> (between interpolation filter and digital modulator)
> 3. Application companion send ICN data through PDM interface
> Which would explain why I'm not really seeing/hearing any changes.
Ah, ok. This explains a lot! The Audio Companion (aka AESS) is a DSP that processes audio data.
It can also read/write registers accessible through the register set and then take care of the values
during audio processing. Maybe the register bits are pre-initialized to a chip-specific value
that is laser etched or PROMmed into the individual twl6040. I vaguely remember that there was
such a mechanism.
Anyways having amixer controls for these registers may be a useful thing also in debugging.
So in consequence we should definitively set up a project to get ABE+AESS into a working shape
I think I have all the knowledge (but forgotten details and therefore need time to read into all the
materials that exist). Unfortunately it would need an impossible-to-estimate number of hours so that
I can't volunteer doing this. It is like an adventure where you don't know if it takes 10 years to get
home like Ulysses...
ED offered some funding in February on the pyra-kernel list but as a lump sum - which assumes
that the efforts needed can easily be estimated and the subcontractor takes 100% of the entrepreneurial
risks. I.e. no payment for several weeks of work if the goal can not be reached. For me the risk
was too high so I declined back then.
But that is something I think I should discuss privately with ED.
BR and best wishes for a better year 2022,
More information about the Letux-kernel