devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: codecs: add support for TAS5720 digital amplifier
@ 2016-03-18 23:27 Andreas Dannenberg
  2016-03-18 23:27 ` [PATCH 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings Andreas Dannenberg
  2016-03-18 23:27 ` [PATCH 2/2] ASoC: codecs: add support for TAS5720 digital amplifier Andreas Dannenberg
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Dannenberg @ 2016-03-18 23:27 UTC (permalink / raw)
  To: alsa-devel, devicetree
  Cc: Mark Rutland, Pawel Moll, Liam Girdwood, linux-kernel,
	Ian Campbell, Takashi Iwai, Rob Herring, Mark Brown, Kumar Gala,
	Andreas Dannenberg

Driver for TI's TAS5720L/M digital audio amplifiers. The driver should be
pretty standard except the optional interrupt-based fault reporting.

Some background on the fault reporting since that might be a discussion of
interest. The code should have that documented rather well but I wanted to
bring it up right away. The TAS5720 devices can report conditions such as
over-current (short), over temp, and others that can be important to know in a
real-world system. However the device lacks a way to mask the generation of
fault interrupts except by shutting it down, which can lead to cases where the
device generates SAIF-fault host interrupts every 300us! This is clearly a lot
of overhead to be thrown at the SoC (and my bench testing has demonstrated
that) so after trying different things to tame this behavior I ended up
implementing method to disable/enable the interrupts in the driver itself in
combination with rate-limiting the processing of those events.  The fact of
processing interrupts in a threaded fashion (IRQF_ONESHOT) alone was not enough
under certain conditions to prevent the SoC from not being able to get to all
interrupts even with an empty threaded handler, and it would freeze and
eventually the Kernel would disable the interrupt ("no one cared").

The scheme currently implemented seems to work reliably cycling different audio
files over hours also forcing error conditions. But if anybody has a "cleaner"
idea how to rate-limit IRQs on a very low level (currently done in the IRQ
handler function) I'm absolutely open to suggestions. This all may not be an
issue at all when using a faster/lower-latency SoC than what I'm using
(BeagleBone Black) but the fact that IRQF_ONESHOT alone was not enough to
prevent the system to be brought to its knees (again, even with an empty
threaded handler) was a bit of a surprise to me.

--
Andreas Dannenberg
Texas Instruments Inc

Andreas Dannenberg (2):
  ASoC: codecs: add TA5720 digital amplifier DT bindings
  ASoC: codecs: add support for TAS5720 digital amplifier

 .../devicetree/bindings/sound/tas5720.txt          |  37 ++
 sound/soc/codecs/Kconfig                           |  10 +
 sound/soc/codecs/Makefile                          |   2 +
 sound/soc/codecs/tas5720.c                         | 733 +++++++++++++++++++++
 sound/soc/codecs/tas5720.h                         |  90 +++
 5 files changed, 872 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/tas5720.txt
 create mode 100644 sound/soc/codecs/tas5720.c
 create mode 100644 sound/soc/codecs/tas5720.h

-- 
2.6.4

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

end of thread, other threads:[~2016-03-21 14:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18 23:27 [PATCH 0/2] ASoC: codecs: add support for TAS5720 digital amplifier Andreas Dannenberg
2016-03-18 23:27 ` [PATCH 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings Andreas Dannenberg
     [not found]   ` <1458343678-4086-2-git-send-email-dannenberg-l0cyMroinI0@public.gmane.org>
2016-03-21 12:45     ` Rob Herring
2016-03-21 14:06       ` Andreas Dannenberg
2016-03-18 23:27 ` [PATCH 2/2] ASoC: codecs: add support for TAS5720 digital amplifier Andreas Dannenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).