From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mateusz Gorski <mateusz.gorski@linux.intel.com>,
alsa-devel@alsa-project.org
Cc: S@alsa-project.org, cezary.rojewski@intel.com,
broonie@kernel.org, Pavan K <pavan.k.s@intel.com>,
tiwai@suse.com
Subject: Re: [PATCH v4 2/3] ASoC: Intel: Multiple I/O PCM format support for pipe
Date: Fri, 24 Apr 2020 10:26:43 -0500 [thread overview]
Message-ID: <57f7b40e-a075-ce2f-917b-cf6f2a198f33@linux.intel.com> (raw)
In-Reply-To: <20200424132002.3850-3-mateusz.gorski@linux.intel.com>
> +static int skl_tplg_multi_config_set_get(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol, bool is_set)
> +{
> + struct snd_soc_component *component =
> + snd_soc_kcontrol_component(kcontrol);
> + struct hdac_bus *bus = snd_soc_component_get_drvdata(component);
> + struct skl_dev *skl = bus_to_skl(bus);
> + struct skl_pipeline *ppl;
> + struct skl_pipe *pipe = NULL;
> + struct soc_enum *ec = (struct soc_enum *)kcontrol->private_value;
> + u32 *pipe_id;
> +
> + if (!ec)
> + return -EINVAL;
> +
> + if (is_set && (ucontrol->value.enumerated.item[0] > ec->items))
> + return -EINVAL;
> +
> + pipe_id = ec->dobj.private;
> +
> + list_for_each_entry(ppl, &skl->ppl_list, node) {
> + if (ppl->pipe->ppl_id == *pipe_id) {
> + pipe = ppl->pipe;
> + break;
> + }
> + }
is there an alignment issue here or just a diff illusion?
> + if (!pipe)
> + return -EIO;
> +
> + if (is_set)
> + pipe->pipe_config_idx = ucontrol->value.enumerated.item[0];
> + else
> + ucontrol->value.enumerated.item[0] = pipe->pipe_config_idx;
> +
> + return 0;
> +}
> +
You also have a number of other alignment/style issues reported by
checkpatch.pl
---------------------------------------------------------------
0001-ASoC-Intel-Skylake-Add-alternative-topology-binary-n.patch
---------------------------------------------------------------
CHECK: Alignment should match open parenthesis
#41: FILE: sound/soc/intel/skylake/skl-topology.c:3572:
+ snprintf(alt_tplg_name, sizeof(alt_tplg_name), "%s-tplg.bin",
+ skl->mach->drv_name);
CHECK: Alignment should match open parenthesis
#43: FILE: sound/soc/intel/skylake/skl-topology.c:3574:
+ dev_info(bus->dev, "tplg fw %s load failed with %d, trying
alternative tplg name %s",
+ skl->tplg_name, ret, alt_tplg_name);
CHECK: Alignment should match open parenthesis
#50: FILE: sound/soc/intel/skylake/skl-topology.c:3581:
+ dev_info(bus->dev, "tplg %s failed with %d, falling back to dfw_sst.bin",
+ alt_tplg_name, ret);
--------------------------------------------------------------
0002-ASoC-Intel-Multiple-I-O-PCM-format-support-for-pipe.patch
--------------------------------------------------------------
CHECK: spaces preferred around that '+' (ctx:VxV)
#58: FILE: sound/soc/intel/skylake/skl-topology.c:597:
+ next_fmt = &pipe->configs[i+1].out_fmt;
^
CHECK: spaces preferred around that '+' (ctx:VxV)
#61: FILE: sound/soc/intel/skylake/skl-topology.c:600:
+ next_fmt = &pipe->configs[i+1].in_fmt;
^
CHECK: Alignment should match open parenthesis
#86: FILE: sound/soc/intel/skylake/skl-topology.c:640:
+ dev_dbg(skl->dev, "found pipe config idx:%d\n",
+ pipe->cur_config_idx);
CHECK: Alignment should match open parenthesis
#98: FILE: sound/soc/intel/skylake/skl-topology.c:1359:
+static int skl_tplg_multi_config_set_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol, bool is_set)
CHECK: Unnecessary parentheses around
'ucontrol->value.enumerated.item[0] > ec->items'
#112: FILE: sound/soc/intel/skylake/skl-topology.c:1373:
+ if (is_set && (ucontrol->value.enumerated.item[0] > ec->items))
CHECK: Alignment should match open parenthesis
#135: FILE: sound/soc/intel/skylake/skl-topology.c:1396:
+static int skl_tplg_multi_config_get(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
CHECK: Alignment should match open parenthesis
#141: FILE: sound/soc/intel/skylake/skl-topology.c:1402:
+static int skl_tplg_multi_config_set(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
---------------------------------------------------------------
0003-ASoC-Intel-Skylake-Automatic-DMIC-format-configurati.patch
---------------------------------------------------------------
CHECK: Alignment should match open parenthesis
#40: FILE: sound/soc/intel/skylake/skl-topology.c:1408:
+static int skl_tplg_multi_config_get_dmic(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
CHECK: Alignment should match open parenthesis
#46: FILE: sound/soc/intel/skylake/skl-topology.c:1414:
+static int skl_tplg_multi_config_set_dmic(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol)
CHECK: Alignment should match open parenthesis
#110: FILE: sound/soc/intel/skylake/skl-topology.c:3627:
+ if (dobj->type != SND_SOC_DOBJ_ENUM ||
+ dobj->control.kcontrol->put !=
next prev parent reply other threads:[~2020-04-24 15:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-24 13:19 [PATCH v4 0/3] Add support for different DMIC configurations Mateusz Gorski
2020-04-24 13:20 ` [PATCH v4 1/3] ASoC: Intel: Skylake: Add alternative topology binary name Mateusz Gorski
2020-04-24 13:20 ` [PATCH v4 2/3] ASoC: Intel: Multiple I/O PCM format support for pipe Mateusz Gorski
2020-04-24 15:26 ` Pierre-Louis Bossart [this message]
2020-04-27 11:14 ` Gorski, Mateusz
2020-04-24 13:20 ` [PATCH v4 3/3] ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT Mateusz Gorski
2020-04-24 14:52 ` [PATCH v4 0/3] Add support for different DMIC configurations Mark Brown
2020-04-27 11:14 ` Gorski, Mateusz
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=57f7b40e-a075-ce2f-917b-cf6f2a198f33@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=S@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=mateusz.gorski@linux.intel.com \
--cc=pavan.k.s@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox