From patchwork Mon Jul 17 13:54:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 107960 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp4594430obm; Mon, 17 Jul 2017 06:54:42 -0700 (PDT) X-Received: by 10.99.114.73 with SMTP id c9mr29803685pgn.267.1500299682549; Mon, 17 Jul 2017 06:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500299682; cv=none; d=google.com; s=arc-20160816; b=U2GdZn57PXZUAGU57nDwg6Nv2HP1YzLGVodN3y6q6+FZ20tI1ULmyt9fHNW94FLGVp ijEOMBmC+BnWSH4bwfqm3oqRCMoBnJ4/aG/DV2fvv1c56O+A1oj27Jl0khUH61mKZd5N 65NfZBLjJGnblhERbR28/wvp5lrNszeeSgugNLUUtrr8Zmb+Ly/GgZCrqzR9LJn4pwKk DKIJj1j+dxrCa2j66tHkoMER0e3ob2BVNrYVWx3Sos+cIwBmfaomBy4fKtcwt9EBF5TA z6mxNiKg8CVkEywD+P2TpGA8UY1dU1Ik+Erv3zf2ntwAkDpH5pf45ZxFseJAd4cDCSV5 TQQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=noHLrg0B0L5gQYYxd2vCEoVwGuMf5GJnS7EnbkZKdBM=; b=RN5pr6LDiB0ItesCSYBD7vlabniq3ikyPQwy2aoiDxujxiVg++v/FHK+p88EKt6dbO e0nL9U/rIe0/LTrW0mPAHHNVuTFRhK1z7r71I1DqYWZqT/9oE8RkAR6XS6JrAXJomvqi 2LsaLsRot4bE7PVk2OZkiRuqfdfPiuh2ft5+lKP6t1EUPmcM7yXqdEB3n9pN+IHEvNXh ZY/DaIWzwqXh4QqF6Eu3DXIzYuUauBIz1LuWGhsNp/Q1pRpK8NB7WIMe64asCZgg4wf8 zSBcRF+YWm3uO2CUqcHB7oP0Cijo6/HI6Df6kD7XhACz5ZK8CM6gVsQ5Vg4usTg7AhQ7 Ogag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.b=FCy9aCMw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w11si12539508pfl.184.2017.07.17.06.54.42; Mon, 17 Jul 2017 06:54:42 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.b=FCy9aCMw; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751385AbdGQNyi (ORCPT + 25 others); Mon, 17 Jul 2017 09:54:38 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:36522 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751358AbdGQNye (ORCPT ); Mon, 17 Jul 2017 09:54:34 -0400 Received: by mail-io0-f182.google.com with SMTP id z62so43462912ioi.3 for ; Mon, 17 Jul 2017 06:54:33 -0700 (PDT) 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=noHLrg0B0L5gQYYxd2vCEoVwGuMf5GJnS7EnbkZKdBM=; b=FCy9aCMw6Q6unE3M7WO8UfSSeiFsyXPfrdvaDimt0UOVUkXbqJ06Xg6xkcOxG1AfxN GPn5lG0M3nSRT60bxFtxLxA4htLWBsmkloCvOzBUF3TZ+4i/HmYU1v/Dx3A28qlddPXE kLR8NNiYMN6g1Lz930ndPKtwVb/Yj8umfi7vE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=noHLrg0B0L5gQYYxd2vCEoVwGuMf5GJnS7EnbkZKdBM=; b=LjzPYCPCKskZSl/VTGYKSoY2bqYQ6Rn3HKRJn9eV0Rt0e0/f2M87bL6+Wr3EkbJM2m VOFI2bXJXnO1lya9PnvvIME04SVmHP0buMAELFv5EufQ1lKCKcpkC90NaaaNVl5+MiGU V2ChHoM+guMVkNHpW8+pPmjHPTTeZRL4NMSsLHfU4iSlRJqoimrTqhtayT6Pg0PMOG+1 7N1BxzI9mvkQyPTLiC5knNxhwpRK8ATZqCVHsx8NlqQn1TY/bHhvH5qeFk7LshwrsVda 6Kduue8gHh5gyf0xJaxI5dsG5aqi+VEUuS6MTR7E+ZW6ArOlXla7B8yz/rDIxowvAIK7 ZcVg== X-Gm-Message-State: AIVw1110psy8ZWxhxUJzW1U0+TR5CeBhHNXrjkUjx7BV5mTvXlaAj9VN llk6oBcXds6yl521nhB91A== X-Received: by 10.107.133.84 with SMTP id h81mr21659972iod.230.1500299673516; Mon, 17 Jul 2017 06:54:33 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id 138sm5880561itw.10.2017.07.17.06.54.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 17 Jul 2017 06:54:33 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Mark Brown , Banajit Goswami , alsa-devel@alsa-project.org Cc: Jaroslav Kysela , Takashi Iwai , Patrick Lai , linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/3] ASoC: qcom: apq8016-sbc: set default mclk rate Date: Mon, 17 Jul 2017 15:54:09 +0200 Message-Id: <20170717135410.26812-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170717135410.26812-1-srinivas.kandagatla@linaro.org> References: <20170717135410.26812-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Srinivas Kandagatla MCLK for internal audio codec is expected to be at 9.6MHz by default. This patch adds support to 9.6MHz to make the default case possible. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/apq8016_sbc.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.11.0 diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index d084d7468299..1064c1b85c63 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -34,10 +34,12 @@ struct apq8016_sbc_data { #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)) +#define DEFAULT_MCLK_RATE 9600000 static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_dai *cpu_dai = rtd->cpu_dai; + struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_card *card = rtd->card; struct apq8016_sbc_data *pdata = snd_soc_card_get_drvdata(card); int rval = 0; @@ -68,6 +70,10 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) } + /* Set default mclk for internal codec */ + snd_soc_dai_set_sysclk(codec_dai, 0, DEFAULT_MCLK_RATE, + SND_SOC_CLOCK_IN); + return rval; }