Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1979632yba; Sun, 21 Apr 2019 20:33:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrfP4W3LTZ6At5SvJt9nqCeCZFbBosfQ+JTBN9/0+bjh97bMWr77ofSwv5SLx0LH9JKiQN X-Received: by 2002:a17:902:280a:: with SMTP id e10mr18189078plb.244.1555904015460; Sun, 21 Apr 2019 20:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555904015; cv=none; d=google.com; s=arc-20160816; b=Ala566MPg/NIOkOQhhMgkDflVdmFQ5xiqNUjSghnpWAzuU14GTEBnGU8iz7B6299dW wy+PJO3DyBHXiLIWXWNxYaUWNwMkmXfrWm6d+q0MqKhGxc1I7pxV6p0bAYhMgDS7LFIM RwC6oeE9t+sfFEYf9zr8bn2YdjjEm7OoOwCZ4aqvA4OneWvw1VT6VioN5NDo46LlZgo3 iNUepcvfp+a4EfDwbHjV7g75VeslsO1NjNj7qJjqqtYGk5AjCByBA7yWQ4otkAoBZMPl M009x7Hvn8uINklo0JGBJfEmg7IjGkqszJm3GKQtwNpVFZnF5XxOvErSfd04bkbJwb+m DRHA== 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=Z+sDPrkVShQ3SV/eZUAJkyobdgecsoIqwEYrWD1W76s=; b=lS/eiH/ZAxrGi+txvc80wS/4llYzrOb5ElWuDzm3epFWl5aeDfHxbB1NVV9UjyskE1 pRvAW95HdRQR2mx8jNzDsryuwXJm5FPFiW2+VVCJ4YKdImeD4caygRmkdE6SWdbu77F7 xek6GkYLD9G3Fg8NzYzI5YWz9AmSc6iRjnxAMgJ7av2wilWZdGXc3Q8N0ks3AztrQWmV ew95A+0rcby82Cx5ZgPn1IOOpU1/Uop3yL3WkRGmok6mvP0LuZJ63FnOt6BWl0+lSS7d smtRU35CgotwA3ych235+m158FwZ6PD2Y0bcH1TfnhZuLl2u0UAYQl7MfFgdX5kipVf/ gX1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZSDGbhJy; 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 s4si7079254pgp.158.2019.04.21.20.33.19; Sun, 21 Apr 2019 20:33:35 -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=ZSDGbhJy; 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 S1726525AbfDVDXT (ORCPT + 99 others); Sun, 21 Apr 2019 23:23:19 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35653 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbfDVDXT (ORCPT ); Sun, 21 Apr 2019 23:23:19 -0400 Received: by mail-pf1-f195.google.com with SMTP id t21so5053411pfh.2 for ; Sun, 21 Apr 2019 20:23:18 -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=Z+sDPrkVShQ3SV/eZUAJkyobdgecsoIqwEYrWD1W76s=; b=ZSDGbhJyxjWrjtlzjZrWNtPSJeDJho5p6X5BJZM350JlqZy4knfTvU9nhjIcRHOgEH jSad+pL4r37wVD7oj0XFgaQ3LttHOwtjJCnTHYswfRMBBO0SFeYsPoLz8aq+GuwPukYY BdZSrQyguCMqUG8lES6qRjkmHQkZLhTY/YMSsh4ZAv5ObkDQAA37osl0S+Ed8VM48Gx0 gkrEO+zhW22L9/+phghX6ji3t5vmtdr+zmi2pHZ3Z7nNbmfAHUAyowvK9UtWNKGvJAqW XxkHoALIf//QtKINl7MWbIrwCoar7m+/5t0ohfmZsz47hDiLQIvh4usuo6L1PT8G+fZC PizA== 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=Z+sDPrkVShQ3SV/eZUAJkyobdgecsoIqwEYrWD1W76s=; b=GZztU526PpFXyq/GPiN+uNVtLFWlbKhf12yv84d9VKmevUyjG5r7/Jk33oOBpNX7ac KybDqI2Cl8zBvpPTdes68sRT7GxM4CswOC86JWlB8pa+1HVtIrtsAg3BeO4JbPpSkyVq xJN6CpIreU4wQsqF6ouGEKh24xi7Auycz7y3zJ7ifWO/G5NYoV7d4nSzEgIqG2crW37y I+9xHHzyyyUwcb0cYD+BpQZ+0xWn8gmAF48JlKnqVGyxlKjO3+ZWPbbLN3/RvK2zXAU7 TUoczdrviXDLfxbFW1qxyblm6swNJFPgUbes3aUeEO/DNE3fGjfk1HDsE5GECahSCbOs xmpg== X-Gm-Message-State: APjAAAVG1kxOYv8hnHE/LDbcFz+RLrZitCZ91KXs9O6CgXkVgH1hwqN/ xMqHyHmUHe8yQeLbCGwoltQ= X-Received: by 2002:a63:5560:: with SMTP id f32mr16971001pgm.334.1555903398132; Sun, 21 Apr 2019 20:23:18 -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 b16sm15530733pfo.168.2019.04.21.20.23.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2019 20:23:17 -0700 (PDT) Date: Sun, 21 Apr 2019 20:23:11 -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 2/3] ASoC: fsl_asrc: replace the process_option table with function Message-ID: <20190422032310.GA8300@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 03:15:34AM +0000, S.j. Wang wrote: > Hi > > > > > > > On Mon, Apr 22, 2019 at 02:32:35AM +0000, S.j. Wang wrote: > > > When we want to support more sample rate, for example 12kHz/24kHz > > we > > > need update the process_option table, if we want to support more > > > sample rate next time, the table need to be updated again. which is > > > not flexible. > > > > > > We got a function fsl_asrc_sel_proc to replace the table, which can > > > give the pre-processing and post-processing options according to the > > > sample rate. > > > > > > Signed-off-by: Shengjiu Wang > > > > A couple of more small comments. > > > > And please add this when you resend: > > Acked-by: Nicolin Chen > > > > > + * Unsupport cases: Tsout > 8.125 * Tsin, Tsout > 16.125 * Tsin > > > > Since we have a ratio validation somewhere else, it's okay to drop this line - > > - it may confuse people since the function no longer checks these > > unsupported cases. > > I add this for may be in the future we forget the limitation. Just for a reminder. Okay. Let's use something more practical like: +* Make sure to exclude following unsupported cases before calling the function: +* 1) outrate > 8.125 * inrate +* 2) outrate > 16.125 * inrate