From patchwork Thu Nov 27 15:01:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5396721 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C95CC11AC for ; Thu, 27 Nov 2014 15:02:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD4A3201EC for ; Thu, 27 Nov 2014 15:02:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 8098720145 for ; Thu, 27 Nov 2014 15:02:45 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 13BF126648A; Thu, 27 Nov 2014 16:02:44 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0CC472661A7; Thu, 27 Nov 2014 16:02:37 +0100 (CET) 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 1CDD82661DC; Thu, 27 Nov 2014 16:02:35 +0100 (CET) Received: from mail-qc0-f181.google.com (mail-qc0-f181.google.com [209.85.216.181]) by alsa0.perex.cz (Postfix) with ESMTP id 25C18266199 for ; Thu, 27 Nov 2014 16:02:24 +0100 (CET) Received: by mail-qc0-f181.google.com with SMTP id m20so3623661qcx.40 for ; Thu, 27 Nov 2014 07:02:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=NKOVsKnrPdQRkwAX/RClHVm6BCFKtQ6Nu8IDtIC9TQY=; b=Wn1DtphpmbB42qHxZXrj4p9oS0mnC/P7OIB3sS0EwBj36CBV7mGKe0vkLzxeU8Aq6s tVP+vFzVKR8GYcV+NBxLDT4r9HU0uKhAMI4XsABoSm5i/K921yIZKg6AptvgYhRU9pNy kgy4eQV9e/PPcIRwoQuWncJQnJdGMc/XRz6tyA79ftXqF2juNB2HKzyoOHWP7O1IXB/3 THlVZQWM4qXFI8DYKnB+0AIhEmVZuA38dDOYXA7sOcwgXMzxUgeTFfKYI3uBBbqVnkbq xckOdfObjiUlaX6xYeckOcHobl6tNLpB7ks5vJd0DfbBw8f4C3gIQvz3AXHfMBlrDSj5 u8IA== X-Received: by 10.224.122.15 with SMTP id j15mr44066820qar.68.1417100543138; Thu, 27 Nov 2014 07:02:23 -0800 (PST) Received: from localhost.localdomain ([201.82.52.106]) by mx.google.com with ESMTPSA id b17sm6728466qah.35.2014.11.27.07.02.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Nov 2014 07:02:22 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Thu, 27 Nov 2014 13:01:59 -0200 Message-Id: <1417100521-8483-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Fabio Estevam , alsa-devel@alsa-project.org, shawn.guo@linaro.org, craig.mcqueen@beamcommunications.com Subject: [alsa-devel] [PATCH 1/3] ASoC: mxs-sgtl5000: Remove MCLK restriction 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: Fabio Estevam According to the sgtl5000 datasheet the MCLK frequency range restriction of 8 to 27 MHz only applies when the PLL is used - synchronous SYS_MCLK input mode. mxs-sgtl5000 machine sets the codec as slave, and mx28 generates MCLK in the range of 256*fs, 384*fs or 512*fs, which is called asynchronous SYS_MCLK input. In asynchronous SYS_MCLK we cannot have the 8 to 27 MHz check because if we want to play a 8KHz sample rate track, with a MCLK of 8k * 512 = 4.096MHz the current check would return -EINVAL, which is not correct. Remove the 8 to 27MHz frequency check, since this only applies to the synchronous SYS_MCLK input case. Signed-off-by: Fabio Estevam --- sound/soc/mxs/mxs-sgtl5000.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index 7515cd4..6f1916b 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -49,13 +49,6 @@ static int mxs_sgtl5000_hw_params(struct snd_pcm_substream *substream, break; } - /* Sgtl5000 sysclk should be >= 8MHz and <= 27M */ - if (mclk < 8000000 || mclk > 27000000) { - dev_err(codec_dai->dev, "Invalid mclk frequency: %u.%03uMHz\n", - mclk / 1000000, mclk / 1000 % 1000); - return -EINVAL; - } - /* Set SGTL5000's SYSCLK (provided by SAIF MCLK) */ ret = snd_soc_dai_set_sysclk(codec_dai, SGTL5000_SYSCLK, mclk, 0); if (ret) {