From patchwork Thu Jul 10 04:44:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Subhransu S. Prusty" X-Patchwork-Id: 4520711 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9CE55BEEAA for ; Thu, 10 Jul 2014 05:08:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D173D20351 for ; Thu, 10 Jul 2014 05:08:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 98A8E202B4 for ; Thu, 10 Jul 2014 05:08:28 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id BE41B2654CD; Thu, 10 Jul 2014 07:08:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7F6E4265262; Thu, 10 Jul 2014 07:06:47 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 761C6265259; Thu, 10 Jul 2014 07:06:45 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 7D8832651E4 for ; Thu, 10 Jul 2014 07:06:35 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 09 Jul 2014 22:06:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,636,1400050800"; d="scan'208";a="567715004" Received: from subhransu-udesk1.iind.intel.com ([10.223.96.40]) by fmsmga002.fm.intel.com with ESMTP; 09 Jul 2014 22:05:47 -0700 From: "Subhransu S. Prusty" To: alsa-devel@alsa-project.org Date: Thu, 10 Jul 2014 10:14:45 +0530 Message-Id: <1404967497-22537-2-git-send-email-subhransu.s.prusty@intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1404967497-22537-1-git-send-email-subhransu.s.prusty@intel.com> References: <1404967497-22537-1-git-send-email-subhransu.s.prusty@intel.com> Cc: vinod.koul@intel.com, broonie@kernel.org, "Subhransu S. Prusty" , lgirdwood@gmail.com, Lars-Peter Clausen Subject: [alsa-devel] [PATCH v2 01/13] ASoC: Export dapm_kcontrol_get_value X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP The DSP driver needs to know widget control value in its event handler for widgets like mixers. This is required in the subsequent patches Signed-off-by: Subhransu S. Prusty Signed-off-by: Vinod Koul --- include/sound/soc-dapm.h | 1 + sound/soc/soc-dapm.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index aac04ff84eea..6ae0a1952ad7 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h @@ -432,6 +432,7 @@ int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm, int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, const char *pin); void snd_soc_dapm_auto_nc_pins(struct snd_soc_card *card); +unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol); /* Mostly internal - should not normally be used */ void dapm_mark_io_dirty(struct snd_soc_dapm_context *dapm); diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 4bf08cffd1f1..31667e1d8879 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -326,12 +326,13 @@ static struct list_head *dapm_kcontrol_get_path_list( list_for_each_entry(path, dapm_kcontrol_get_path_list(kcontrol), \ list_kcontrol) -static unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol) +unsigned int dapm_kcontrol_get_value(const struct snd_kcontrol *kcontrol) { struct dapm_kcontrol_data *data = snd_kcontrol_chip(kcontrol); return data->value; } +EXPORT_SYMBOL_GPL(dapm_kcontrol_get_value); static bool dapm_kcontrol_set_value(const struct snd_kcontrol *kcontrol, unsigned int value)