[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190802172756.GC5387@sirena.org.uk>
Date: Fri, 2 Aug 2019 18:27:56 +0100
From: Mark Brown <broonie@...nel.org>
To: Thomas Preston <thomas.preston@...ethink.co.uk>
Cc: Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org,
alsa-devel@...a-project.org,
Charles Keepax <ckeepax@...nsource.cirrus.com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Kirill Marinushkin <kmarinushkin@...dec.tech>,
Liam Girdwood <lgirdwood@...il.com>,
Marco Felsch <m.felsch@...gutronix.de>,
Annaliese McDermond <nh6z@...z.net>,
Takashi Iwai <tiwai@...e.com>,
Paul Cercueil <paul@...pouillou.net>,
Vinod Koul <vkoul@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Jerome Brunet <jbrunet@...libre.com>,
linux-kernel@...r.kernel.org,
Cheng-Yi Chiang <cychiang@...omium.org>
Subject: Re: [alsa-devel] [PATCH v2 3/3] ASoC: TDA7802: Add turn-on
diagnostic routine
On Fri, Aug 02, 2019 at 03:51:09PM +0100, Thomas Preston wrote:
> On 02/08/2019 12:10, Mark Brown wrote:
> > You can use a read only control for the readback, or just have it be
> > triggered by overwriting the readback value. You can cache the result.
> Keeping the trigger and result together like that would be better I think,
> although the routine isn't supposed to run mid way through playback. If
> we're mid playback the debugfs routine has to turn off AMP_ON, take the
> device back to a known state, run diagnostics, then restore. Which causes
> a gap in the audible sound.
Whatever method is used to do the triggering can always return -EBUSY
when you someone tries to do so during playback.
> >> Kirill Marinushkin mentioned this in the first review [0], it just didn't
> >> really sink in until now!
> > You could do that too, yeah. Depends on what this is diagnosing and if
> > that'd be useful.
> The diagnostic status bits describe situations such as:
> - open load (no speaker connected)
> - short to GND
> - short to VCC
> - etc
> The intention is to test if all the speakers are connected. So, one might
> have a self test which runs the diagnostic and verifies it outputs:
...
> I think the module parameter method is more appropriate for a
> "Turn-on diagnostic", even though I don't really like grepping dmesg
> for the result. I'll go ahead and implement that unless anyone has a
> particular preference for the kcontrol-trigger.
Right. It's not ideal for use in production systems for example but
perhaps fine for support techs or whoever. Up to you anyway.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists