All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 4/4] ASoC: firmware core: Add core support to create and destroy firmware components.
Date: Wed, 21 Nov 2012 09:43:58 +0900	[thread overview]
Message-ID: <20121121004356.GC4673@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <50AB9E56.5050509@ti.com>


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

On Tue, Nov 20, 2012 at 03:14:30PM +0000, Liam Girdwood wrote:
> On 20/11/12 03:27, Mark Brown wrote:

> >With coefficeints we have been moving towards a model where we just
> >expose them as binary controls rather than doing the enumeration thing.

> For ABE we have different coefficients tied to each enumerated EQU
> kcontrol setting and just configure the ABE coefficient depending on
> the kcontrol value. We load the coefficients and EQU kcontrol at the
> same time since it's enumerated text strings are coupled to the
> coefficients.

So, the text strings for coefficients were what drivers used to be using 

> We need to store on file, either an array of strings or an array of
> u32 values for the enumerated kcontrols (based on soc_enum). This
> gives us a fixed size file entry which is easy to read, write and
> count. But maybe I'm missing something from your question...

The issue is that when we have the u32 array we also need the strings to
be able to present the control - I would suggest just having the format
always include both the numbers and the strings so we don't need to
worry about the special case where the numbers are 0, 1, 2...  or
matching things up if the idea is that we have two separate records.

> >>+	dev_info(sfw->dev, "ASoC: no handler specified for ext widget %s\n",
> >>+		w->name);
> >>+	return 0;

> >Shouldn't this be returning an error?  The same is true for a bunch of
> >other functions.  Or shouild it be a dev_dbg()?

> It should probably have a comment. This is an optional callback to
> component drivers in case they want to use set the widgets private
> data at widget init time.

In that case the log message should definitely be dev_dbg().

> >This one is going to be especially bad for example.

> >>+	if (se->dvalues)
> >>+		kfree(se->dvalues);
> >>+	else {

> >Braces on both sides if they're needed on one.

> The last three points are personal taste, I don't mind too much so
> I'll change them ;)

They're all kernel coding style rules (the issue with breaking log
messages is a particular bugbear of Linus IIRC, rmk also gets very
upset).

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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



  reply	other threads:[~2012-11-21  0:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 18:12 [PATCH 1/4] ASoC: firmware: Add support for FW based kcontrols Liam Girdwood
2012-11-19 18:12 ` [PATCH 2/4] ASoC: firmware: Add support for FW based widgets Liam Girdwood
2012-11-20  2:16   ` Mark Brown
2012-11-19 18:12 ` [PATCH 3/4] ASoC: firmware core: Add core support for dynamic kcontrols and widgets Liam Girdwood
2012-11-20  2:36   ` Mark Brown
2012-11-20 12:19     ` Liam Girdwood
2012-11-19 18:12 ` [PATCH 4/4] ASoC: firmware core: Add core support to create and destroy firmware components Liam Girdwood
2012-11-19 18:46   ` Takashi Iwai
2012-11-20 12:03     ` Liam Girdwood
2012-11-20 12:05       ` Takashi Iwai
2012-11-21  0:30       ` Mark Brown
2012-11-21  6:43         ` Takashi Iwai
2012-11-21  6:49           ` Mark Brown
2012-11-20  3:27   ` Mark Brown
2012-11-20 15:14     ` Liam Girdwood
2012-11-21  0:43       ` Mark Brown [this message]
2012-11-21 10:21         ` Liam Girdwood
2012-11-21 10:37           ` Mark Brown
2012-11-21 11:16             ` Liam Girdwood
2012-11-21 11:52               ` Mark Brown
2012-11-19 18:36 ` [PATCH 1/4] ASoC: firmware: Add support for FW based kcontrols Takashi Iwai
2012-11-29 12:08   ` Liam Girdwood
2012-11-29 15:15     ` Takashi Iwai
2012-11-29 15:51       ` Liam Girdwood
2012-11-29 16:01         ` Liam Girdwood
2012-11-29 17:35           ` Takashi Iwai
2012-11-29 17:39             ` Liam Girdwood
2012-11-20  2:11 ` 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=20121121004356.GC4673@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.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.