From patchwork Thu Feb 11 12:18:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 61752 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp155331lbl; Thu, 11 Feb 2016 04:18:57 -0800 (PST) X-Received: by 10.66.185.225 with SMTP id ff1mr65394357pac.97.1455193137241; Thu, 11 Feb 2016 04:18:57 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3si12300425pfo.227.2016.02.11.04.18.56; Thu, 11 Feb 2016 04:18:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753232AbcBKMSv (ORCPT + 30 others); Thu, 11 Feb 2016 07:18:51 -0500 Received: from mail-wm0-f41.google.com ([74.125.82.41]:35441 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753113AbcBKMSs (ORCPT ); Thu, 11 Feb 2016 07:18:48 -0500 Received: by mail-wm0-f41.google.com with SMTP id c200so70417108wme.0 for ; Thu, 11 Feb 2016 04:18:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4s4bU27LJhcjhBUG4Z1EbHqYEJb2CRzJ8pgyM5ES7K8=; b=d5Ru5s9fwIHRBxH0qhHbe8A7De1IwAuWFIoBmpjXl2BNGAf2ZLjfx8H2QYz8inl4KW W1UH0BtQrPt5XBaWtqZ/9K3yVPV8sd98O0px9uuiwX7qqZbCqD6Ifd9VhXVwXh+YJ7UI f2U8US6WojrKNU3w1lNflTbSGCz26RLmnnkZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4s4bU27LJhcjhBUG4Z1EbHqYEJb2CRzJ8pgyM5ES7K8=; b=kZCbXbFtl/bAU75kR85yX13jEe1CgTlb/X5WbOp8XJn+9VoPnN0/iDazwp1bGIw0gf ZrIATGE/cDxuXSmnU4UyYY0JrdcvFoCUmALpQl4DmpMWWnUfPoRbIwgegWh/3LoinznS g5zIv39zee8hbgJg5WEhLsja6EBGNq6sJXpw6elGVSkJlbJWrEy62fJyTisCArXu/HTe K+z0Yi6xVIrDAFAM+6rT9u0pk9WbezwMbsWPQhS5r8S2FuyYX88wa12qMQ4HdGJopU0R a4vQp6S3/yD0LLs3OCtu7c1ETGlMa5AEKOeBtPrXH8fcb5KYi+NgAMsKytcv3PDE1fl5 AN8A== X-Gm-Message-State: AG10YOS0q7fQaBLVTY++TNvkiq3/RzniCqQsGkRThhVRdD5+OX/9CYRrWssVrrVIvY9v71mY X-Received: by 10.194.84.34 with SMTP id v2mr42540057wjy.175.1455193127831; Thu, 11 Feb 2016 04:18:47 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id m67sm26572843wma.10.2016.02.11.04.18.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 04:18:47 -0800 (PST) From: Srinivas Kandagatla To: Patrick Lai , alsa-devel@alsa-project.org, Mark Brown Cc: Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, kwestfie@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v3 14/14] ASoC: qcom: apq8016-sbc: add mic support Date: Thu, 11 Feb 2016 12:18:45 +0000 Message-Id: <1455193125-2066-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455193007-1481-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1455193007-1481-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch add mic support on apq8016-sbc board aka db410c. Tested it with headset mic. Signed-off-by: Srinivas Kandagatla Acked-by: Kenneth Westfield --- sound/soc/qcom/apq8016_sbc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 1efdf00..1289543 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -30,6 +30,7 @@ struct apq8016_sbc_data { struct snd_soc_dai_link dai_link[]; /* dynamically allocated */ }; +#define MIC_CTRL_TER_WS_SLAVE_SEL BIT(21) #define MIC_CTRL_QUA_WS_SLAVE_SEL_10 BIT(17) #define MIC_CTRL_TLMM_SCLK_EN BIT(1) #define SPKR_CTL_PRI_WS_SLAVE_SEL_11 (BIT(17) | BIT(16)) @@ -53,6 +54,12 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) MIC_CTRL_TLMM_SCLK_EN, pdata->mic_iomux); break; + case MI2S_TERTIARY: + writel(readl(pdata->mic_iomux) | MIC_CTRL_TER_WS_SLAVE_SEL | + MIC_CTRL_TLMM_SCLK_EN, + pdata->mic_iomux); + + break; default: dev_err(card->dev, "unsupported cpu dai configuration\n"); @@ -126,9 +133,6 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) } link->platform_of_node = link->cpu_of_node; - /* For now we only support playback */ - link->playback_only = true; - ret = of_property_read_string(np, "link-name", &link->name); if (ret) { dev_err(card->dev, "error getting codec dai_link name\n");