lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160426172936.GE3217@sirena.org.uk>
Date:	Tue, 26 Apr 2016 18:29:36 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Andreas Dannenberg <dannenberg@...com>
Cc:	alsa-devel@...a-project.org, devicetree@...r.kernel.org,
	Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] ASoC: codecs: add support for TAS5720 digital
 amplifier

On Tue, Apr 26, 2016 at 11:22:40AM -0500, Andreas Dannenberg wrote:
> On Tue, Apr 26, 2016 at 04:43:13PM +0100, Mark Brown wrote:

> > If the driver doesn't do anything just remove the code.

> Well it's doing something which is making sure the nobody passes in a
> sample size that's not supported. Wouldn't we want to catch this?

Is the device actually going to mess up if someone sends it something
else or is it just going to ignore the extra bits (given that it's doing
autodetection anyway).

> > > +	if ((curr_fault & TAS5720_OCE) && !(tas5720->last_fault & TAS5720_OCE))
> > > +		dev_warn(dev, "The Class-D output stage has experienced an over current event\n");

> > "Class D over current".  The verbosity is making the line over long and
> > the phrasing is a bit unclear (and makes it seem less critical than it
> > really is).  These should probably be dev_crit() or somthing too, over
> > current and similar events on a speaker output are generally extremely
> > serious.

> The overlong line goes through checkpatch --strict and looks like an
> accepted practice to prevent breaking "grep" for example. The text is
> more or less from the datasheet to give people something they can
> cross-associate. But I can try to short this a bit.

It's not just the fact that it's wrapping round to the next line, it's
also the fact that it's very weakly phrased for something which might
reasonably indicate an actual fire risk.  I'm pretty sure people will
not struggle excessively to find the reference to over current in the
datasheet.

> conditions.  For the "over temp" error condition (which is actually
> really hard to create on the bench, I've to get the EVM up to like 150C
> and things start smelling a bit) this should probably be dev_crit() as

If the silicon is flagging an over temperature condition that tends to
indicate a catastrophic physical failure in the system, it is likely
that the speaker itself has failed or there's otherwise a short in the
speaker output path and potentially other physical damage especially in
smaller systems where you might find that for example there's thermal
damage to the case (and possibly even the user).

> well. And then, maybe leave the "DC error" as a warning, since it's less
> critical than the other two conditions. Thoughts?

If you're pushing DC through a speaker that will generally mean that you
will shortly see one or both of the over current and over temperature
errors, it's really not something they're designed for.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ