Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1959651yba; Sun, 21 Apr 2019 20:00:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjM4NNTbacvvL1ucl0r4OyF7LJ95JPjM2ZUTuWe3xgCxenT/UtS8ZZEdr2wZLZjmXjyBP2 X-Received: by 2002:a17:902:8f88:: with SMTP id z8mr10411644plo.54.1555902030032; Sun, 21 Apr 2019 20:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555902030; cv=none; d=google.com; s=arc-20160816; b=nw4KMXGOmO/1ii1AZn1hknRKQ8y6ZmLCv30LZjfsO/GVOvlAezXwX3FOxigbJQSbmw pUUg8rwF9mvtUAgqqvpxmwpHN59g7QFEobD6Tlnm3H7hjy5sFQYntAR29jPmY/wETuUP W6beCWYscDMcl4wDTBTS7pjS2WSEMfqRgfl6hCfJT4ol1JnSuvyYGwYYS/e37LqZrNWf +y8aG/aNXTrTIMyXxVVEiZJyS5/ujEuQLoblifdVXiIrMFdNaHLVnkQ8EFouVrEBvfRH C1txTF5oAzsFdZbRFMYwpRM9xE5tUC8UW9mlURF5txDkl0oBU09/+6Rpqc8hKJM61pGV GhVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=44t5V0Va2hRnLgBaCtoI5tEHwfneD2rckQNHjjpXMhg=; b=xBX8wrAlcvT+e6TUymp7/edVHpsvm2LBI7j1gI/sm6NTEXsKfM1g1z1ay1sEbouXQ2 0Sgx3fd7H/M3UqL6qzCo4+SkTadw/jFubV0e83Vtm+g2BIqqCDJ4HQXZ26yj9tbZaQUu 9pISq+ZqW6QgVRySWGSyFT966So7KdsxT1+S40z8+UQpDFc0Os4X0tPboVGXiRm0FUsc lKrmet0dCZk1o2UCzpQEA6JtPuWVKB0UCc+cBOvfmD2RRU4VQBU4rgHEqQurT2byA+/g 8QhJe80+WmIo584fqQpfe6n846cAHZgnB8VBksW0HBUzTEb/BXAUb+8R8P4WvV9gj0SZ wuqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cHZTd83F; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m32si12397243pld.309.2019.04.21.20.00.02; Sun, 21 Apr 2019 20:00:30 -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=@gmail.com header.s=20161025 header.b=cHZTd83F; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726552AbfDVCtY (ORCPT + 99 others); Sun, 21 Apr 2019 22:49:24 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:42895 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbfDVCtY (ORCPT ); Sun, 21 Apr 2019 22:49:24 -0400 Received: by mail-pl1-f194.google.com with SMTP id x15so766188pln.9 for ; Sun, 21 Apr 2019 19:49:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=44t5V0Va2hRnLgBaCtoI5tEHwfneD2rckQNHjjpXMhg=; b=cHZTd83Fw7HdPvqNJXw8/4Jq+Wpb37fiJO1sNRwpw3KRZKJA1yzudr5pyIEFyzxfOI AvbQP51dtZ2Rt5am5m8id7y12s3fjclxCgil5XopAPX9oufM17K5PStZ8Krw+P+Z/NuS d4I1jm7cMDg/s/azMKZIRJlchPqGP7Ssp7JqS7eVEtJmR0rnzcHYLjYXSK9Noma57d64 DP6J8wuxSATbrDMWRoic62g2okOlNEae9VA7dniddKP+rvsEft9y/BXPNZhLoaZJO9Bz Je32fxTCoaB9ZZGfjhOHW/jCU1JQp7D77ZnMn1J9ENbfRCxsF4v15TySOdJBSZoretH2 guFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=44t5V0Va2hRnLgBaCtoI5tEHwfneD2rckQNHjjpXMhg=; b=JNUMeXABfFfsifXi+NGmfRWx3TI27TUE+U16UZTYfmY3hTvbk6ZjyPq6rlf/eruDKx BzgZvz00zh5X2FZ7ogQmIPAVuv1olXf+NsF4PCctZX/lscYBBPiaHxSFWnjqIn6xIpHq c2squvVMW5wMhDK831sMgebZgNAVIJljlLXQ2lDnieVmXiTmdz+fB/7La2YuI112GKuA JyeA92Z/PmS/FngANbUt3QHU/LpJXeeDTgQJ35HU4YlsziQvo++RgURCUUn7Hw+lnCjd hwIV9MLv9KsnJ2ofi/eJ0kxgPwgN2A/AYhxpPONp167ByKc7RUIEhy/BB1GXDzw4vw7D og0g== X-Gm-Message-State: APjAAAVSpSmUpAHPvRAPJGG6Fi0NWuYvSqk4vL0dsGiGs/sqplQHzFIE hrIO2BLN1cZu9mQrwy/sgRE= X-Received: by 2002:a17:902:6bc2:: with SMTP id m2mr17751238plt.194.1555901363343; Sun, 21 Apr 2019 19:49:23 -0700 (PDT) Received: from Asurada (c-98-248-47-108.hsd1.ca.comcast.net. [98.248.47.108]) by smtp.gmail.com with ESMTPSA id n5sm12727190pgp.80.2019.04.21.19.49.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2019 19:49:22 -0700 (PDT) Date: Sun, 21 Apr 2019 19:49:16 -0700 From: Nicolin Chen To: "S.j. Wang" Cc: "timur@kernel.org" , "Xiubo.Lee@gmail.com" , "festevam@gmail.com" , "broonie@kernel.org" , "alsa-devel@alsa-project.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V5 1/3] ASoC: fsl_asrc: Fix the issue about unsupported rate Message-ID: <20190422024915.GA9768@Asurada> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 22, 2019 at 02:32:32AM +0000, S.j. Wang wrote: > When the output sample rate is [8kHz, 30kHz], the limitation > of the supported ratio range is (1/24, 8). In the driver Should be [1/24, 8]. Otherwise, Acked-by: Nicolin Chen Thanks > we use (8kHz, 30kHz) instead of [8kHz, 30kHz]. > So this patch is to fix this issue and the potential rounding > issue with divider. > > Fixes: fff6e03c7b65 ("ASoC: fsl_asrc: add support for 8-30kHz > output sample rate") > Cc: > Signed-off-by: Shengjiu Wang > --- > sound/soc/fsl/fsl_asrc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c > index 0b937924d2e4..ea035c12a325 100644 > --- a/sound/soc/fsl/fsl_asrc.c > +++ b/sound/soc/fsl/fsl_asrc.c > @@ -282,8 +282,8 @@ static int fsl_asrc_config_pair(struct fsl_asrc_pair *pair) > return -EINVAL; > } > > - if ((outrate > 8000 && outrate < 30000) && > - (outrate/inrate > 24 || inrate/outrate > 8)) { > + if ((outrate >= 8000 && outrate <= 30000) && > + (outrate > 24 * inrate || inrate > 8 * outrate)) { > pair_err("exceed supported ratio range [1/24, 8] for \ > inrate/outrate: %d/%d\n", inrate, outrate); > return -EINVAL; > -- > 1.9.1 >