From patchwork Wed Dec 18 17:24:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 182019 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp946936ile; Wed, 18 Dec 2019 09:24:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyJV4f15GCMo2JM3noV85Bty7jHZWvo9t95WZUgGSNprgqW0lDJNNQnnsQBBtFI+H3OxqNQ X-Received: by 2002:a05:6830:1208:: with SMTP id r8mr3750689otp.105.1576689878412; Wed, 18 Dec 2019 09:24:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576689878; cv=none; d=google.com; s=arc-20160816; b=FaHUp8nPjUEfbnCtvo2NtpP79lvSWo2SPH4C7qz3vjCdI+rBMmDATsyTSSUr+UQyRT 12ddVX8vYXrU8P1t6hH/QIfgcGQ1yMzDcTNkeg4mxiYzrcOPJecoox0wsN991uXqoxSg Q1AKqMNrCMRxTZQbQ/LozuA2fBIm9hyFoJB6cHESQjpPhLUCW5YHzF9k4rsUV0Cz1OUR ftpr0H7hLTQleXNwP4itWcTqbFDi4Me1EOdzFXAjvEpx/ah1bb9c5Fzyj77UvRF1cd4b 4HT8bPUWkd7hLb21JnjCzSmQzGxi58s2eLEmc9+4B9GtL8Xy+GKqE0HTtSoVAJJ5+bni XS5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ed5DlqEWvxMQUQebFWG7u2PHMS/9BBAGCyGgvqZnXFo=; b=EW6QAKDkfkvYYMKakENOQS5SUfgUv+oOYr3z2jore/Mt4rshJxFzRSwUrVSyQXSGgx e4Rj9OoSAlY/UCprJjJEbgukaoL+vKEIGzJpdkl1gGQ+kTXgzQCcYiJVOtULc19T/6YP DCHXSJPWjolm2AYiAI/JAhowgjKAHumBPPl8bOXPbunwRF/a1u/a2ghzV8Y6BE9fQm7C dhViBttHWK1n+W9fNu+4u3L5b9YPkgzY06k7lmqBNoL+Vqje+yXg65eTwvFzpidMKpGM tLCCFhlbZ3diMpDBNOQXWyOk+yAQWa3t1yqZDkyyEE1Ji6yxGi6CB9AnCAS0TwbB6kAP va5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=KiZx8uNr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w131si1641243oie.47.2019.12.18.09.24.38; Wed, 18 Dec 2019 09:24:38 -0800 (PST) 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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=KiZx8uNr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727474AbfLRRYh (ORCPT + 27 others); Wed, 18 Dec 2019 12:24:37 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38977 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727323AbfLRRYe (ORCPT ); Wed, 18 Dec 2019 12:24:34 -0500 Received: by mail-wm1-f67.google.com with SMTP id 20so2686299wmj.4 for ; Wed, 18 Dec 2019 09:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ed5DlqEWvxMQUQebFWG7u2PHMS/9BBAGCyGgvqZnXFo=; b=KiZx8uNrDxyr1CKrK3b3Awr2DIit9WJR7AcPGhvWh+Ke9RMBBmd6WxOoHo+tvd/q/U Vd88yOfuR+PmI8SIyl1Rq1yi0jopIL3Co9YOI4tOZ1xevV68SYk/Hv+F+zMeal3Dud7u FQE7uWelTZ2p/qj9Egevpr/DMohozAfSke97hCvCLczo8NzvXK0u2EilAijqxpLG5xOx yrKwR331SHgQhKO8GJEXHNt0szTAsSQKs3f+xhkQkJ9vEbdSfnFhF0E2u5uiUq4HXoHj a/5wUgK4r4F+MYvViijY3zW4dVF3vo75atXvOjboq7yx41hWoqaC4peqLJC5a41rRCb/ 5XeA== 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:mime-version:content-transfer-encoding; bh=ed5DlqEWvxMQUQebFWG7u2PHMS/9BBAGCyGgvqZnXFo=; b=cSGGyW6y2PuO7TPFI5772OjuFyAx5JC7q2fkqRyPBYKaNVUJAutaeyP7p9WGyo0wm2 HTTmUOrzUdCvBuR+nq5vd6rYou41B5W0MGG9uLfU5qM6MK4p2uRY01vN8UHz5XA1wP/q 3uRPJPvduzfgERF7X43K4RBzqHsf0pSPfAlN7zu+7b0xFXzjBr/fSs5CEZmYSIzYTo8b O+0jmxYozeiKyPRx3wWOvitfsmGv7o5xKkwoTcwJX26vO2ddwCT3Lks0YbfLBGvbRkGf HFCW4PRn5uERhQjWdIUaNQi7Li8lDd2ypwEHjM7Ql/9HvAy6FJEVNWUf9h6eoM/xupgL AKBw== X-Gm-Message-State: APjAAAUZ7NYeRAShYl6jjjftgiZ+jvZDhcVvqwjPx9rpbljhhuEe+iwM eRz0VFFQw1XTyS3PWlWDDIjreQ== X-Received: by 2002:a1c:9814:: with SMTP id a20mr4437299wme.94.1576689872845; Wed, 18 Dec 2019 09:24:32 -0800 (PST) Received: from localhost.localdomain (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.googlemail.com with ESMTPSA id 4sm2883231wmg.22.2019.12.18.09.24.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 09:24:32 -0800 (PST) From: Jerome Brunet To: Mark Brown , Liam Girdwood Cc: Jerome Brunet , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, Kevin Hilman Subject: [PATCH 4/4] ASoC: meson: axg-fifo: relax period size constraints Date: Wed, 18 Dec 2019 18:24:20 +0100 Message-Id: <20191218172420.1199117-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191218172420.1199117-1-jbrunet@baylibre.com> References: <20191218172420.1199117-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the fifo depths and thresholds are properly in the axg-fifo driver, we can relax the constraints on period. As long as the period is a multiple of the fifo burst size (8 bytes) things should be OK. Signed-off-by: Jerome Brunet --- sound/soc/meson/axg-fifo.c | 8 ++++---- sound/soc/meson/axg-fifo.h | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) -- 2.23.0 diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c index c2742a02d866..c12b0d5e8ebf 100644 --- a/sound/soc/meson/axg-fifo.c +++ b/sound/soc/meson/axg-fifo.c @@ -34,7 +34,7 @@ static struct snd_pcm_hardware axg_fifo_hw = { .rate_max = 192000, .channels_min = 1, .channels_max = AXG_FIFO_CH_MAX, - .period_bytes_min = AXG_FIFO_MIN_DEPTH, + .period_bytes_min = AXG_FIFO_BURST, .period_bytes_max = UINT_MAX, .periods_min = 2, .periods_max = UINT_MAX, @@ -227,17 +227,17 @@ int axg_fifo_pcm_open(struct snd_soc_component *component, /* * Make sure the buffer and period size are multiple of the FIFO - * minimum depth size + * burst */ ret = snd_pcm_hw_constraint_step(ss->runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, - AXG_FIFO_MIN_DEPTH); + AXG_FIFO_BURST); if (ret) return ret; ret = snd_pcm_hw_constraint_step(ss->runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, - AXG_FIFO_MIN_DEPTH); + AXG_FIFO_BURST); if (ret) return ret; diff --git a/sound/soc/meson/axg-fifo.h b/sound/soc/meson/axg-fifo.h index 521b54e98fd3..b63acd723c87 100644 --- a/sound/soc/meson/axg-fifo.h +++ b/sound/soc/meson/axg-fifo.h @@ -31,8 +31,6 @@ struct snd_soc_pcm_runtime; SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) #define AXG_FIFO_BURST 8 -#define AXG_FIFO_MIN_CNT 64 -#define AXG_FIFO_MIN_DEPTH (AXG_FIFO_BURST * AXG_FIFO_MIN_CNT) #define FIFO_INT_ADDR_FINISH BIT(0) #define FIFO_INT_ADDR_INT BIT(1)