Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1959653yba; Sun, 21 Apr 2019 20:00:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCwKQNJgHjxAComVnwNLOcwQZfQ5a4MxuytgCqgOlbVfEyFV9RbTm6WF2rqOlnN632sQ2g X-Received: by 2002:a62:b411:: with SMTP id h17mr17888125pfn.61.1555902030031; 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=ITmbxLotD37kYu6ib+w+vh3R5DoExR3wgmj8e9owBW0hf498y8B+0JVBni51FtzmV1 vipq2IAGSpkrxRFzun5PmUFIcuoHfnoJqeFeL6CxUNadtiEMr4xja6Tw8IGqdm6Xx2V9 /tAatuoNYJG6t9DImON09h1N5n4DhuHhN2lslVGz+b8nnngJjvA0/CdTn16T71zdyjh0 YXJMx+qqWhHBsbn+5+YwoqWoEGK8tOOP3Qg8GClxr10NXgnbZUjsILUOreS4dvdkQKHp n47y3bgImVbHFju3zsfV+tkDvYugQYJzacDmeWeIgjSJNlDSYvEzzzqmvOIP4O1YugBP Lisw== 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=fGJoT5iB3bTc4LGaAwtIuRxmdPfiW9i6PCIuaqVn52U=; b=HkJ6okOeDUzZzIJ16ogsoKlNtGc6eimOSc4bpT/K8piJmxTVqKncViCzu9NsoqycJw X4osxoQW2uWE5AOXEWvPp+z9NhkCBWr3AO9aUItHxBuCuZSBrQgWWs+pzXYSUIz+4WtN 8pUmOn1kqRu9ishIDuGH8mJ+1ymlIcOGcD2G8I1ZL/LYo8a7vvhtmikW8q0yxZTVlDnH ipC4oFbByK74QE6kwF2OW9TW773+3xRmxOClASuthVBZnVVgNVzKf5Cf4o5m+DydNHjp 6jHDFiuOp/Npnds9p2KzBCQd2lVf2POK1zu1kROvE5mCtgP7gH1NTZ8x1DHuziObEg9c m1wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="otc2/zJt"; 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 t17si12286680pfe.250.2019.04.21.20.00.11; 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="otc2/zJt"; 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 S1726394AbfDVC5Z (ORCPT + 99 others); Sun, 21 Apr 2019 22:57:25 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:43233 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbfDVC5Y (ORCPT ); Sun, 21 Apr 2019 22:57:24 -0400 Received: by mail-pl1-f195.google.com with SMTP id n8so5113307plp.10 for ; Sun, 21 Apr 2019 19:57:24 -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=fGJoT5iB3bTc4LGaAwtIuRxmdPfiW9i6PCIuaqVn52U=; b=otc2/zJtPE0IMHOpA6/YsVhEgmLq1Lk+8YDlDwTaIx6wvy/pma9tCX6qYfBUJnvhFO QsRZ180OuByZxxtUFm5P0tZxuxrF/bl6aqkOTI4sjXB7fHcnu4Fk2id53oYfi0JH2J6P s0F1L4upKQmZ1gK7I0VqViPXpdDjVTpaNUPmK3LziFLjIkZ8jVhf/tcVND8DBTKgNoam E5RQ+Gwc+41/dqnCcJhsek8ctu0TAtp8b+kyvVaWwx2Q0ipgkevadNdLTexHB9w5XyHT Vg2OZ/MJ9uR2ZYd2FU7swkmMJ4G92yB1897g+c1H+AryRDEpx5oc9+W0fhXCSKobUa/l CrNg== 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=fGJoT5iB3bTc4LGaAwtIuRxmdPfiW9i6PCIuaqVn52U=; b=QT64BmwEu/3SNeQOxVVMtLvRQ1TihJ6cM4lEpS0Q6eR+7gm4Lg16PfNy7hr2RQS3EH LeUAt4w5zoMQHwdi2b70VpTDxLnktmDLMj8lO+Q0yMNX8t31YWFmmBaA9xUgaS56hW0Y eUKirBwHZ8SnEcW+o0lTYKFThkyczwj7JZOKHVPagLq26GjJr08MOj9fbgHSsZI/33Bj aE7rZxBNGq/AKkDHCne7JqH4jlk0b/GqV0TjoAHFes44uL73qc+Bb5egktwbOSGp4G9q Yf+6/IS3zNbd2zkOWhOV4CQsXnTaUyi6bW7cLN23/D3J/wUDFBH6rLXykZmihcs5vO3J PiTg== X-Gm-Message-State: APjAAAXnQmr/lk1sOMjh5fK5NT3hJP+7WxIqyqzhlDp8OnJVTJzsmU6c NGi1ckEFlnkz1QuW8m3gv0E= X-Received: by 2002:a17:902:20c9:: with SMTP id v9mr17760317plg.239.1555901844050; Sun, 21 Apr 2019 19:57:24 -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 f2sm17202364pgc.30.2019.04.21.19.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Apr 2019 19:57:23 -0700 (PDT) Date: Sun, 21 Apr 2019 19:57:19 -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: <20190422025715.GB9768@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: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. > +static int fsl_asrc_sel_proc(int inrate, int outrate, I think "void" type should be just fine as we made sure there is no unsupported cases running in this function.