All of lore.kernel.org
 help / color / mirror / Atom feed
* Driver for audio power amplifier ICs?
@ 2015-10-01  8:49 Rick Mann
  2015-10-01  9:04 ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Mann @ 2015-10-01  8:49 UTC (permalink / raw)
  To: alsa-devel

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.

Thanks!

-- 
Rick Mann
rmann@latencyzero.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Driver for audio power amplifier ICs?
  2015-10-01  8:49 Driver for audio power amplifier ICs? Rick Mann
@ 2015-10-01  9:04 ` Lars-Peter Clausen
  2015-10-01  9:08   ` Rick Mann
  0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2015-10-01  9:04 UTC (permalink / raw)
  To: Rick Mann, alsa-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Driver for audio power amplifier ICs?
  2015-10-01  9:04 ` Lars-Peter Clausen
@ 2015-10-01  9:08   ` Rick Mann
  2015-10-01 10:20     ` Lars-Peter Clausen
  0 siblings, 1 reply; 4+ messages in thread
From: Rick Mann @ 2015-10-01  9:08 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: alsa-devel



> On Oct 1, 2015, at 02:04 , Lars-Peter Clausen <lars@metafoo.de> wrote:
> 
> 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.

Thanks, Lars, great! I'll take a look at those.

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

In this case I think that can all be done in the Device Tree, no?

-- 
Rick Mann
rmann@latencyzero.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Driver for audio power amplifier ICs?
  2015-10-01  9:08   ` Rick Mann
@ 2015-10-01 10:20     ` Lars-Peter Clausen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars-Peter Clausen @ 2015-10-01 10:20 UTC (permalink / raw)
  To: Rick Mann; +Cc: alsa-devel

On 10/01/2015 11:08 AM, Rick Mann wrote:
> 
>> The connections between the CODEC and the amplifier need to be specified in
>> the board driver.
> 
> In this case I think that can all be done in the Device Tree, no?

Probably, depends on the exact setup.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-01 10:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01  8:49 Driver for audio power amplifier ICs? Rick Mann
2015-10-01  9:04 ` Lars-Peter Clausen
2015-10-01  9:08   ` Rick Mann
2015-10-01 10:20     ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.