From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
lgirdwood@gmail.com
Subject: Re: [PATCH v7 1/7] ASoC: Intel: mrfld: add the gain controls
Date: Thu, 25 Sep 2014 19:36:24 +0530 [thread overview]
Message-ID: <20140925140624.GY24663@intel.com> (raw)
In-Reply-To: <20140925142026.GS27755@sirena.org.uk>
[-- Attachment #1.1: Type: text/plain, Size: 1995 bytes --]
On Thu, Sep 25, 2014 at 03:20:26PM +0100, Mark Brown wrote:
> On Fri, Sep 19, 2014 at 04:46:02PM +0530, Subhransu S. Prusty wrote:
>
> > +/* Gain helper with min/max set */
> > +#define SST_GAIN(name, path_id, task_id, instance, gain_var) \
> > + SST_GAIN_KCONTROLS(name, "Gain", SST_GAIN_MIN_VALUE, SST_GAIN_MAX_VALUE, \
> > + SST_GAIN_TC_MIN, SST_GAIN_TC_MAX, \
>
> As far as I can tell from following the macros through this looks like
> it will create controls called "name Gain Volume" which doesn't seem
> excellent.
The convenstion we used was <pipeline identifer> and then module. So if gain
block is in media 0 input we refer to it as "media 0 in Gain Volume"
This helps to identify the module location and help in understanding control
by looking at the name
>
> > +#define SST_NUM_GAINS 36
> > +static struct sst_gain_value sst_gains[SST_NUM_GAINS];
>
> > +static const struct snd_kcontrol_new sst_gain_controls[] = {
> > + SST_GAIN("media0_in", SST_PATH_INDEX_MEDIA0_IN, SST_TASK_MMX, 0, &sst_gains[0]),
>
> This table is full of magic number references into the array...
>
> > + SST_GAIN("codec_out1", SST_PATH_INDEX_CODEC_OUT1, SST_TASK_SBA, 0, &sst_gains[23]),
> > + SST_GAIN("media_loop1_out", SST_PATH_INDEX_MEDIA_LOOP1_OUT, SST_TASK_SBA, 0, &sst_gains[30]),
>
> ...with holes in the array. This seems really error prone.
I will fix the holes here..
> > char params[0];
> > } __packed;
> > +/**** widget defines *****/
> > +
> > +#include <sound/soc.h>
> > +#include <sound/tlv.h>
> > +struct sst_ids {
>
> This is adding includes in the middle of the file (which isn't the usual
> kernel coding style) and is missing a blank lines. This sort of stuff
> is getting quite repetitive and hence annoying, especially the blank
> lines thing which comes up again and again and just makes everything
> even harder to read.
Sorry about this one, i will make sure this is fixed properly and not
repeated
--
~Vinod
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2014-09-25 14:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 11:16 [PATCH v7 0/7] Add mrfld DSP topology and widgets Subhransu S. Prusty
2014-09-19 11:16 ` [PATCH v7 1/7] ASoC: Intel: mrfld: add the gain controls Subhransu S. Prusty
2014-09-25 14:20 ` Mark Brown
2014-09-25 14:06 ` Vinod Koul [this message]
2014-09-19 11:16 ` [PATCH v7 2/7] ASoC: Intel: mfld-pcm: add control for powering up/down dsp Subhransu S. Prusty
2014-09-25 14:22 ` Mark Brown
2014-09-19 11:16 ` [PATCH v7 3/7] ASoC: Intel: mrfld: add DSP core controls Subhransu S. Prusty
2014-09-25 15:08 ` Mark Brown
2014-09-25 16:08 ` Vinod Koul
2014-09-27 11:13 ` Mark Brown
2014-09-29 6:00 ` Vinod Koul
2014-09-19 11:16 ` [PATCH v7 4/7] ASoC: Export dapm_kcontrol_get_value Subhransu S. Prusty
2014-10-02 18:13 ` Mark Brown
2014-09-19 11:16 ` [PATCH v7 5/7] ASoC: Intel: mrfld: add the DSP DAPM widgets Subhransu S. Prusty
2014-10-02 18:12 ` Mark Brown
2014-10-06 2:40 ` Vinod Koul
2014-10-06 2:44 ` Vinod Koul
2014-10-06 10:50 ` Mark Brown
2014-09-19 11:16 ` [PATCH v7 6/7] ASoC: Intel: mfld-pcm: add FE and BE ops Subhransu S. Prusty
2014-09-19 11:16 ` [PATCH v7 7/7] ASoC: Intel: mrfld: add the DSP mixers Subhransu S. Prusty
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=20140925140624.GY24663@intel.com \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=subhransu.s.prusty@intel.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.