All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Andreas Dannenberg <dannenberg@ti.com>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: codecs: add support for TAS5720 digital amplifier
Date: Sat, 2 Apr 2016 09:21:33 -0700	[thread overview]
Message-ID: <20160402162133.GA2350@sirena.org.uk> (raw)
In-Reply-To: <20160401211402.GA26370@borg.dal.design.ti.com>

[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]

On Fri, Apr 01, 2016 at 04:14:02PM -0500, Andreas Dannenberg wrote:
> On Wed, Mar 30, 2016 at 08:38:53AM -0700, Mark Brown wrote:

> > It sounds like this feature is unusably broken...  possibly you could do
> > something in the mute handler but it seems that anything you try to do
> > to use this feature is going to be both fragile and disruptive to the
> > system.

> Agreed, this is not the first time this has come up :( Btw in my quest
> for a solution one of my earlier implementations actually hooked into
> the MUTE handler, but while this worked keeping the TA5720 in shutdown
> most of the time it did not completely solve the interrupt-overrun issue
> (the TAS5720 would still generate SAIF errors for brief periods,
> dead-locking my SoC even with an empty threaded handler). I was also
> concerned that hooking such parasitic code into a MUTE handler would be
> a bit of an abuse and not make me may friends here.

I think this feature is so broken that any attempt to use it is going to
cause problems.  Even if you somehow manage to make something that holds
together in your test system I'm not convinced it's going to be safe for
other users.

> > What is the value in implementing it?

> There is a strong request from one rather large customer to have
> interrupt-driven fault handling. I did have an early implementation of
> the driver that polled for errors (except SAIF) at the beginning and the
> end of the audio playback but this was not good enough.

I really think this is something that the user needs to carry out of
tree, it seems clear that that enbling interrupts is very disruptive.

> But thinking about this some more, what if I do not actually use the
> interrupt signal, but rather during playback use a timer that fires
> every let's say 1s to check the TAS5720 fault register? This way one

That's fine, some other drivers do this for things that don't have
interrupts or don't have usable interrupts.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Andreas Dannenberg <dannenberg@ti.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	Pawel Moll <pawel.moll@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	linux-kernel@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Kumar Gala <galak@codeaurora.org>
Subject: Re: [PATCH v2 2/2] ASoC: codecs: add support for TAS5720 digital amplifier
Date: Sat, 2 Apr 2016 09:21:33 -0700	[thread overview]
Message-ID: <20160402162133.GA2350@sirena.org.uk> (raw)
In-Reply-To: <20160401211402.GA26370@borg.dal.design.ti.com>


[-- Attachment #1.1: Type: text/plain, Size: 1944 bytes --]

On Fri, Apr 01, 2016 at 04:14:02PM -0500, Andreas Dannenberg wrote:
> On Wed, Mar 30, 2016 at 08:38:53AM -0700, Mark Brown wrote:

> > It sounds like this feature is unusably broken...  possibly you could do
> > something in the mute handler but it seems that anything you try to do
> > to use this feature is going to be both fragile and disruptive to the
> > system.

> Agreed, this is not the first time this has come up :( Btw in my quest
> for a solution one of my earlier implementations actually hooked into
> the MUTE handler, but while this worked keeping the TA5720 in shutdown
> most of the time it did not completely solve the interrupt-overrun issue
> (the TAS5720 would still generate SAIF errors for brief periods,
> dead-locking my SoC even with an empty threaded handler). I was also
> concerned that hooking such parasitic code into a MUTE handler would be
> a bit of an abuse and not make me may friends here.

I think this feature is so broken that any attempt to use it is going to
cause problems.  Even if you somehow manage to make something that holds
together in your test system I'm not convinced it's going to be safe for
other users.

> > What is the value in implementing it?

> There is a strong request from one rather large customer to have
> interrupt-driven fault handling. I did have an early implementation of
> the driver that polled for errors (except SAIF) at the beginning and the
> end of the audio playback but this was not good enough.

I really think this is something that the user needs to carry out of
tree, it seems clear that that enbling interrupts is very disruptive.

> But thinking about this some more, what if I do not actually use the
> interrupt signal, but rather during playback use a timer that fires
> every let's say 1s to check the TAS5720 fault register? This way one

That's fine, some other drivers do this for things that don't have
interrupts or don't have usable interrupts.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2016-04-02 16:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 17:08 [PATCH v2 0/2] ASoC: codecs: add support for TAS5720 digital amplifier Andreas Dannenberg
2016-03-21 17:08 ` Andreas Dannenberg
2016-03-21 17:08 ` [PATCH v2 1/2] ASoC: codecs: add TA5720 digital amplifier DT bindings Andreas Dannenberg
2016-03-21 17:08   ` Andreas Dannenberg
2016-03-23 14:55   ` Rob Herring
2016-03-23 14:55     ` Rob Herring
2016-03-21 17:08 ` [PATCH v2 2/2] ASoC: codecs: add support for TAS5720 digital amplifier Andreas Dannenberg
2016-03-21 17:08   ` Andreas Dannenberg
2016-03-28 19:01   ` Mark Brown
2016-03-30  2:53     ` Andreas Dannenberg
2016-03-30  2:53       ` Andreas Dannenberg
2016-03-30 15:38       ` Mark Brown
2016-03-30 15:38         ` Mark Brown
2016-04-01 21:14         ` Andreas Dannenberg
2016-04-01 21:14           ` Andreas Dannenberg
2016-04-02 16:21           ` Mark Brown [this message]
2016-04-02 16:21             ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160402162133.GA2350@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=dannenberg@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.