From: Vinod Koul <vinod.koul@intel.com>
To: Yong Zhi <yong.zhi@intel.com>
Cc: alsa-devel@alsa-project.org, srinivas.sripathi@intel.com,
yang.a.fang@intel.com, broonie@kernel.org,
sathya.prakash.m.r@intel.com, jeeja.kp@intel.com,
vedang.patel@intel.com
Subject: Re: [PATCH v2 1/3] ASoC: Intel: Skylake: Add api to retrieve dmic array info from nhlt
Date: Thu, 26 May 2016 10:53:00 +0530 [thread overview]
Message-ID: <20160526052259.GP2735@localhost> (raw)
In-Reply-To: <1464182357-1305-1-git-send-email-yong.zhi@intel.com>
On Wed, May 25, 2016 at 06:19:17AM -0700, Yong Zhi wrote:
> skylake can be configured with either both 2 and 4 channel DMIC
Skylake
> array, or 2 channel DMIC array only, this patch provides an API to
> retrieve the DMIC info from nhlt.
>
> *
> */
> #include "skl.h"
> +#include <linux/pci.h>
Typical convention is to have standard includes before local ones
> +int skl_get_dmic_geo(struct skl *skl)
> +{
> + struct nhlt_acpi_table *nhlt = (struct nhlt_acpi_table *)skl->nhlt;
> + struct nhlt_endpoint *epnt;
> + struct nhlt_dmic_array_config *cfg;
> + struct device *dev = &(skl->pci->dev);
i dont think braces are required..
> + unsigned int dmic_geo = 0;
> + u8 j;
> +
> + epnt = (struct nhlt_endpoint *)nhlt->desc;
> +
> + for (j = 0; j < nhlt->endpoint_count; j++) {
> + if (epnt->linktype == NHLT_LINK_DMIC) {
> + cfg = (struct nhlt_dmic_array_config *)
> + (epnt->config.caps);
> + switch (cfg->array_type) {
> + case NHLT_MIC_ARRAY_2CH_SMALL:
> + case NHLT_MIC_ARRAY_2CH_BIG:
> + dmic_geo |= MIC_ARRAY_2CH;
> + break;
empty line here please
> + case NHLT_MIC_ARRAY_4CH_1ST_GEOM:
> + case NHLT_MIC_ARRAY_4CH_L_SHAPED:
> + case NHLT_MIC_ARRAY_4CH_2ND_GEOM:
> + dmic_geo |= MIC_ARRAY_4CH;
> + break;
here too
--
~Vinod
next prev parent reply other threads:[~2016-05-26 5:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 15:58 [PATCH] ASoC: add api to retrieve dmic array info from coreboot nhlt Yong Zhi
2016-05-19 16:01 ` Mark Brown
2016-05-19 16:17 ` Zhi, Yong
2016-05-23 5:47 ` Vinod Koul
2016-05-23 17:01 ` Mark Brown
2016-05-25 13:19 ` [PATCH v2 1/3] ASoC: Intel: Skylake: Add api to retrieve dmic array info from nhlt Yong Zhi
2016-05-26 5:23 ` Vinod Koul [this message]
2016-05-27 4:30 ` [PATCH v3 1/5] " Yong Zhi
2016-05-30 3:35 ` Vinod Koul
2016-05-30 17:39 ` Applied "ASoC: Intel: Skylake: Add api to retrieve dmic array info from nhlt" to the asoc tree Mark Brown
2016-05-27 4:30 ` [PATCH v3 2/5] ASoC: Intel: boards: configure DMIC for machine sklnau8825max Yong Zhi
2016-05-30 17:16 ` Mark Brown
2016-05-27 4:30 ` [PATCH v3 3/5] ASoC: Intel: boards: configure DMIC for machine sklnau8825adi Yong Zhi
2016-05-27 4:31 ` [PATCH v3 4/5] ASoC: Intel: Skylake: Add channel constraints for refcap Yong Zhi
2016-05-27 4:31 ` [PATCH v3 5/5] ASoC: Intel: Skylake: Use refcap device for mono recording Yong Zhi
2016-05-31 15:22 ` [PATCH v4 1/2] ASoC: Intel: boards: configure DMIC for machine sklnau8825adi Yong Zhi
2016-05-31 17:45 ` Applied "ASoC: Intel: boards: configure DMIC for machine sklnau8825adi" to the asoc tree Mark Brown
2016-05-31 15:24 ` [PATCH v4 2/2] ASoC: Intel: boards: configure DMIC for machine sklnau8825max Yong Zhi
2016-05-31 17:45 ` Applied "ASoC: Intel: boards: configure DMIC for machine sklnau8825max" to the asoc tree Mark Brown
2016-05-25 13:19 ` [PATCH v2 2/3] ASoC: Intel: boards: configure DMIC for machine sklnau8825max Yong Zhi
2016-05-26 5:24 ` Vinod Koul
2016-05-25 13:19 ` [PATCH v2 3/3] ASoC: Intel: boards: configure DMIC for machine sklnau8825adi Yong Zhi
2016-05-26 5:25 ` Vinod Koul
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=20160526052259.GP2735@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jeeja.kp@intel.com \
--cc=sathya.prakash.m.r@intel.com \
--cc=srinivas.sripathi@intel.com \
--cc=vedang.patel@intel.com \
--cc=yang.a.fang@intel.com \
--cc=yong.zhi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).