All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, lgirdwood@gmail.com, patches.audio@intel.com,
	broonie@kernel.org, Vinod Koul <vinod.koul@intel.com>,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Subject: [PATCH v3 2/9] ALSA: hda - add helper to get channels from cap bits
Date: Thu, 14 Apr 2016 10:07:29 +0530	[thread overview]
Message-ID: <1460608656-8860-3-git-send-email-subhransu.s.prusty@intel.com> (raw)
In-Reply-To: <1460608656-8860-1-git-send-email-subhransu.s.prusty@intel.com>

This helper is copied from legacy hda driver.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/hda/local.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sound/hda/local.h b/sound/hda/local.h
index d692f41..0d5bb15 100644
--- a/sound/hda/local.h
+++ b/sound/hda/local.h
@@ -16,6 +16,16 @@ static inline int get_wcaps_type(unsigned int wcaps)
 	return (wcaps & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
 }
 
+static inline unsigned int get_wcaps_channels(u32 wcaps)
+{
+	unsigned int chans;
+
+	chans = (wcaps & AC_WCAP_CHAN_CNT_EXT) >> 13;
+	chans = (chans + 1) * 2;
+
+	return chans;
+}
+
 extern const struct attribute_group *hdac_dev_attr_groups[];
 int hda_widget_sysfs_init(struct hdac_device *codec);
 void hda_widget_sysfs_exit(struct hdac_device *codec);
-- 
1.9.1

  parent reply	other threads:[~2016-04-14  4:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-14  4:37 [PATCH v3 0/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-14  4:37 ` [PATCH v3 1/9] ASoC: hdac_hdmi: parse eld for channel map capability Subhransu S. Prusty
2016-04-14  4:37 ` Subhransu S. Prusty [this message]
2016-04-28 17:48   ` Applied "ALSA: hda - add helper to get channels from cap bits" to the asoc tree Mark Brown
2016-04-14  4:37 ` [PATCH v3 3/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-28 17:55   ` Applied "ASoC: hdac_hdmi: Add multichannel support" to the asoc tree Mark Brown
2016-04-14  4:37 ` [PATCH v3 4/9] ASoC: skl_rt286: Fix to support hdmi channel map support Subhransu S. Prusty
2016-04-14  4:37 ` [PATCH v3 5/9] ASoC: Intel: boards: Update skl_nau88l25_max98357a driver to support chmap Subhransu S. Prusty
2016-04-14  4:37 ` [PATCH v3 6/9] ASoC: Intel: boards: Update skl_nau88l25_ssm4567 " Subhransu S. Prusty
2016-04-14  4:37 ` [PATCH v3 7/9] ASoC: hdac_hdmi: Register chmap controls and ops Subhransu S. Prusty
2016-04-14  4:37 ` [PATCH v3 8/9] ASoC: Intel: Skylake: Add multichannel support for HDMI Subhransu S. Prusty
2016-04-14  4:37 ` [PATCH v3 9/9] ASoC: Intel: Skylake: Update channel map based on runtime params Subhransu S. Prusty
2016-04-26  4:49 ` [PATCH v3 0/9] ASoC: hdac_hdmi: Add multichannel support Subhransu S. Prusty
2016-04-26 11:09   ` Mark Brown
2016-04-26 11:47     ` Takashi Iwai
2016-04-26 11:54       ` 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=1460608656-8860-3-git-send-email-subhransu.s.prusty@intel.com \
    --to=subhransu.s.prusty@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@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.