From patchwork Wed Feb 10 10:20:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 61632 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2553039lbl; Wed, 10 Feb 2016 02:20:29 -0800 (PST) X-Received: by 10.98.17.28 with SMTP id z28mr44258334pfi.38.1455099627020; Wed, 10 Feb 2016 02:20:27 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n88si4206278pfb.139.2016.02.10.02.20.26; Wed, 10 Feb 2016 02:20:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757419AbcBJKUU (ORCPT + 7 others); Wed, 10 Feb 2016 05:20:20 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:34416 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757879AbcBJKUO (ORCPT ); Wed, 10 Feb 2016 05:20:14 -0500 Received: by mail-wm0-f45.google.com with SMTP id 128so20139720wmz.1 for ; Wed, 10 Feb 2016 02:20:14 -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=S5pKUL1Ie/HstN1gGGY1Zl4nLNLOAUGKjuzTw1hp/921HXIzZkycl3bOuBnIT43IsL 7CTRdggPb91wKZtpr4zaVQg3i16SXnQAHyunuTsG4kqJwWl4i0QnmsofuXIUqglSgyIw JF+PqJmFnlqFmBQXDz8LXg30juHGAlPeaeO5k= 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=fCKFPhoMZYjDkhSCVwYkqF0hzg4Wc/JmGg+tkA7qxiLjDDxhDnJ8B/dp1QI27YSrgL FOn8x7D+cwDiY2SGyMgMcZ/N2X/PGJNoI72vb5BO51gmA033qlEo1uz+7dB+Zp9TkmuJ 09O4ev7GWoVPrq80mGXS32fptEkWtKa03ImVOx/WRv1xL/cqgOTL/tpEYzJqGuhqqO1F 7BT80cllwsphNk2AxOo7mons5b62uXiwqq8E4qMP1TJVVQFJAv/IB3L4LT0QkwcWZjvI BsEGeo6MX7wLVbmPZRh6nXCRgtB+eUGYv8A/iyo3V3jrIgy8VJb5o3w/g9Zr/g+m2krk tHCA== X-Gm-Message-State: AG10YOSCNFt92GHeMNuL2UZAbM44N+wp13bmq/WKABgQJf952HNPkbLrWuvzU9yksXCtgIEO X-Received: by 10.194.171.226 with SMTP id ax2mr1959638wjc.177.1455099613536; Wed, 10 Feb 2016 02:20:13 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id i2sm2227559wjx.42.2016.02.10.02.20.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Feb 2016 02:20:13 -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 v1 14/14] ASoC: qcom: apq8016-sbc: add mic support Date: Wed, 10 Feb 2016 10:20:10 +0000 Message-Id: <1455099610-955-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455099418-311-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1455099418-311-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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");