[alsa-devel] Driver for audio power amplifier ICs?

Lars-Peter Clausen lars at metafoo.de
Thu Oct 1 11:04:02 CEST 2015


On 10/01/2015 10:49 AM, Rick Mann wrote:
> I've been working on this Beaglebone Black custom audio cape. It has a tlv320aic3104 codec (that I'm still trying to get working properly), and connected to its line outs is a tpa3140d2 analog 2x10W power amplifier. This chip has very little in the way of CPU interface, but it does have /shutdown and /fault lines.
> 
> I'm wondering how ALSA becomes aware of that chip, in order to enable it when it enables certain routes in the tlv320aic3104, and to inform application software if the /fault line asserts.
> 
> I don't mind writing a driver, if necessary, I just don't know where such a thing would fit. I also wonder what the device tree entries for the amp might look like.

Hi,

There are a couple of existing amplifier driver like e.g. max9877 or lm4857.
While those two examples have I2C control interface it is no problem to
implement a driver with just a GPIO control interface. Generally the input
and output pins of the amplifier should be modeled as DAPM widgets with a
widget for the amplifier function in between. You can use a callback
function for the amplifier widget to get notified when the amplifier needs
to be enabled and when not and can use this to control the GPIO.

The connections between the CODEC and the amplifier need to be specified in
the board driver.

- Lars



More information about the Alsa-devel mailing list