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 v2 08/11] ALSA: hda - macro to get default config device of pin widgets
Date: Fri,  2 Sep 2016 16:34:57 +0530	[thread overview]
Message-ID: <1472814300-5629-9-git-send-email-subhransu.s.prusty@intel.com> (raw)
In-Reply-To: <1472814300-5629-1-git-send-email-subhransu.s.prusty@intel.com>

In ASoC this easy macro can be used to identify the default
endpoint configuration and create DAPM endpoint widgets.

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

diff --git a/sound/hda/local.h b/sound/hda/local.h
index 9f89e85..41186ab 100644
--- a/sound/hda/local.h
+++ b/sound/hda/local.h
@@ -11,6 +11,9 @@
 #define get_pcaps(codec, nid) \
 	snd_hdac_read_parm(codec, nid, AC_PAR_PIN_CAP)
 
+#define get_defcfg_device(cfg) \
+	((cfg & AC_DEFCFG_DEVICE) >> AC_DEFCFG_DEVICE_SHIFT)
+
 static inline bool is_input_pin(struct hdac_device *codec, hda_nid_t nid)
 {
 	unsigned int pincap = get_pcaps(codec, nid);
-- 
1.9.1

  parent reply	other threads:[~2016-09-02 11:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 11:04 [PATCH v2 00/11] ASoC: hdac: Add hdac generic driver Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 01/11] ALSA: hdac: Add codec helper library Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 02/11] ALSA: hda - Add macro to test pin widget's input capability Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 03/11] ASoC: hdac: Add a generic hdac driver framework Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 04/11] ALSA: hdac: Move 'to_hda_ext_device' helper to core Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 05/11] ASoC: hdac: Create DAPM model for HDA widgets Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 06/11] ASoC: hdac: Build DAPM graph by querying through widget connection list Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 07/11] ASoC: hdac: Register widget event handlers Subhransu S. Prusty
2016-09-02 11:04 ` Subhransu S. Prusty [this message]
2016-09-02 11:04 ` [PATCH v2 09/11] ASoC: hdac: Export API to create machine controls Subhransu S. Prusty
2016-09-02 11:04 ` [PATCH v2 10/11] ALSA: hdac: Implement a match function Subhransu S. Prusty
2016-09-02 11:05 ` [PATCH v2 11/11] ASoC: hdac: Add coefficient init callback for RT286 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=1472814300-5629-9-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.