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: 9845159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 60F0B6037F for ; Mon, 17 Jul 2017 13:55:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5203027CF9 for ; Mon, 17 Jul 2017 13:55:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46ADF28504; Mon, 17 Jul 2017 13:55:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EEFA28459 for ; Mon, 17 Jul 2017 13:55:27 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 29D63266EAB; Mon, 17 Jul 2017 15:54:42 +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 012C8266EA2; Mon, 17 Jul 2017 15:54:41 +0200 (CEST) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com [209.85.223.179]) by alsa0.perex.cz (Postfix) with ESMTP id D59CE266E91 for ; Mon, 17 Jul 2017 15:54:34 +0200 (CEST) Received: by mail-io0-f179.google.com with SMTP id h64so43372128iod.0 for ; Mon, 17 Jul 2017 06:54:34 -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=tlJ82NA2l6qp8X44qQtMX4bYjn5dEWekrPpEjxo1hb+AQ1kPIq29EhQU7hNqpL0ODH si2OXAF9QngVIZNeF9nQx2Yv4uNDB4IPr19voMnwEvR7jqAE0lUqr1310wQ3e2FN9Cc4 WUKO8KGcGrqFvIqYouljh69G62KRlLU6SOPfKiGEnyMhl/MHRPKmYxhwljldhPsrjyi9 5v56/EeHXphBUo/eCVGnT2NJlrwi+UqjwOc8P9u3fEJBQRp7A74xuE1HuyRLIPOpj1BZ lSjGzsHjNWETnWtqS5BTm/7c1idigxj4O041MvxQYU9onSju707ha4YWmnuXqbZ1569X K9aA== X-Gm-Message-State: AIVw111U7Axab0vn+yL532kKhFMidsPqwqEhKIOuv/2oMbnqUXAGx5fv ezLfRQ9NsBO1Z1tf 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 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> Cc: linux-kernel@vger.kernel.org, Patrick Lai , Srinivas Kandagatla , Takashi Iwai Subject: [alsa-devel] [PATCH 2/3] ASoC: qcom: apq8016-sbc: set default mclk rate 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 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(+) 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; }