From patchwork Mon Feb 1 17:29:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 8181871 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E55369F1C0 for ; Mon, 1 Feb 2016 17:30:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C471201FA for ; Mon, 1 Feb 2016 17:30:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2D5432021F for ; Mon, 1 Feb 2016 17:30:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754790AbcBAR35 (ORCPT ); Mon, 1 Feb 2016 12:29:57 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36199 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754761AbcBAR3u (ORCPT ); Mon, 1 Feb 2016 12:29:50 -0500 Received: by mail-wm0-f53.google.com with SMTP id p63so81576196wmp.1 for ; Mon, 01 Feb 2016 09:29:49 -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=NuVXu+/SZnYtFveMeIeFA7ZBB+FuuIuhThsoqYfFouo=; b=WYSYwBhIKGFHvILp5iX5gGnl7c6+aEqEvH8Bo2SMlmBL3eE77HyxeEOMAhGoR+/IjV TfOci5LIyJiQHNc7MgBTcSjth6O1W0Gl+Elidg/0vuXfuZgbY1DGIQcYN47TOnnKRZmg wQ3VcCj0Du6HSAVyn9lg09zyHF8WppKzszQD4= 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=NuVXu+/SZnYtFveMeIeFA7ZBB+FuuIuhThsoqYfFouo=; b=g/T6Dk7XbTFzUJu9GKPuH3MOE4e5eTfdojPLC3B4PfJDHzdsjTMefR4pAj5C9hXUBO DLe9tNq5ElJCptZVWN6tN3NlJP0Sa8bHseh1eQoweTmefAu+3omZ2cNkjzd9A+Wv8aAz cCcY4Xc7DcymrIur7RH7bRXMvS5qT2Sx6zemR0VVekQ+1kYRreQiziPxUzJE9FlvTR5O 7rFTxmEjaSyPL0hArSZb4XTy9l8QURKpONwZhx8IIc0US/WQi1lOw3IHVuK8nhVMHrEj bnyn0Ies2chmMqurjVcDHjTa9aK94mCxlSgP3k+/Fm5PYyjM5msDZDdBHLK67q+7MYkR mPnA== X-Gm-Message-State: AG10YOQwHkIqPkGaaiqkuF3GHHqVhwEHBh566eqdMdeDEcVS/N/lQFOOqq6zXl2rYNHB05x/ X-Received: by 10.194.175.233 with SMTP id cd9mr24295369wjc.115.1454347789123; Mon, 01 Feb 2016 09:29:49 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id jc7sm15664286wjb.33.2016.02.01.09.29.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 09:29:48 -0800 (PST) From: Srinivas Kandagatla To: Patrick Lai , alsa-devel@alsa-project.org Cc: Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC 14/15] ASoC: qcom: apq8016-sbc: add mic support Date: Mon, 1 Feb 2016 17:29:46 +0000 Message-Id: <1454347786-11044-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454347622-9970-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1454347622-9970-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 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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");