Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp341107yba; Thu, 18 Apr 2019 02:06:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzsYnI7yniM5j3myC2L/LvWQblyUGFjB2Vr864XWOCRso20kQrUJwLGp9HRguefj602+hFl X-Received: by 2002:a62:14c3:: with SMTP id 186mr96111088pfu.21.1555578410916; Thu, 18 Apr 2019 02:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555578410; cv=none; d=google.com; s=arc-20160816; b=1JYaye6SunQQxOYTE5wZoHhFOH9OeygvSJWRrs5EYc7NhsU8vMp+q3ddLaIp2J4Ata YUsd/5XcpZIAuuyYQv7uMBWUWjP8qS4PqMSV2C92hXm2gFGmS5SyWTABUGjk+5W7mIcF itFDC9Ms4OPFmm4VkM+16Z/TITnKfLCkWbdzJ7EfMNGAgzuMd1QNpR6WpNYadLdXCR37 4Pp/2yvIko6bVhp0nC3Bbvimu9LbuejMH6Y6Gju+B+EaP9BfPKJxevjj5/15IZShn/L6 5txtkmYTItIO1gwTsK0kStP0l2a8jBrk0O+m0L5r49jxq7fVRMKNUVIwzLk7ockkbeN9 hiEg== 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=Mw07+ygDicv9TP/v0i5onh329mIidrytyEynXCO/hFo=; b=SKRbz6tkUvfX0cdN8TeN5+JhtTMlugVT9FfgPI7+urYZucRuoykFEbzBk+HLF3nBH1 j4Wtfm0H3227+Ha5Haduyd5NoSJTvgSIG1WEzbD10ymn5TD9cbarrxiAZDlmUbIIxUs9 RpgCv0HqJSya0TwCIrTg2xZSBudGjLaNS9bctv8XjhZNyKa6Tb4ORHiDr8W89DcNrA+q 9LE5Q0CD7+KZ6b8KJmGvo7BmUsHCMUhu2RYR1vuNu7hjhxZLWpwKMS17J+vz3KbU7+Sd i6MBRmLpH4F2V1qcMA4JFN3g6k7lWnRI3exzSB1urjOAAF52SRDj+O5wsfvTB6YrVVBr tivQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qhRPPknW; 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 a7si560702pgw.133.2019.04.18.02.06.35; Thu, 18 Apr 2019 02:06:50 -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=qhRPPknW; 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 S2388244AbfDRJFl (ORCPT + 99 others); Thu, 18 Apr 2019 05:05:41 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43314 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728093AbfDRJFl (ORCPT ); Thu, 18 Apr 2019 05:05:41 -0400 Received: by mail-pg1-f195.google.com with SMTP id z9so888963pgu.10 for ; Thu, 18 Apr 2019 02:05:41 -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=Mw07+ygDicv9TP/v0i5onh329mIidrytyEynXCO/hFo=; b=qhRPPknWeBW9G71Oe3gNvtJddZ65QlL8lnumFGTmHHg1WBSZM/drMc/yxvL5oAYWyC QTNAXxEVDimHvqsNaVkcZ5Te8Duqq32yCJIVSBwZSpQZ7QEI3YyKXK3FOigtrvqV5sYf ssA3ZvjcdOXSKEevXrGsjuJKaBWgsIbg6AkgDlNLeaI6vmwg3Xe5ivDUXeT9x/Pdwz7L mVCZyZhaJ/9HwFja6eKxJlvK6fX0o2x3r+4ibZdKVRguj01uvcTr/FToX1aVxoIvxx0O mWnMbFw0dABYojHQ/os0DxoSxO8cj/NhQ5BZgU39FvyQBM/EcT56I3FdgisyJinOBP/k IwOg== 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=Mw07+ygDicv9TP/v0i5onh329mIidrytyEynXCO/hFo=; b=bVW4lPK0QePBt1/9hQIdYJQRQJ8MEvpkPvIqEwPYV0IjcJyco/jn3kfj//xUCXuNm5 JwjhnGxwAIjBkxay9S2ib43Ao6mehUs5CWugY3iDNofr/vOcVsvS57DC1aZZ8MduGmUo uRNL222CMTMPnIn8RSd713WeHINEabmi08Z90PavGMDnbs0oEnj42DORrfFMDRoQ827F ZmuZkWwRTBRJvuD8UhAm7kptuDZNbBYJpa0lGj0NRk+jRlQHoOWQq0ja358a1HCgQqhp x6DeBWIYHrc+UeIhQYKo5BxTAOkGxuL2LrKPl/Ln6dG7JuUqcvFoGeT0MAFPmN+WFrRr Rqvg== X-Gm-Message-State: APjAAAV9pVBKFclMxX/TCN+Tdd0Pynst0nkCoHjwSKJk1zpCS1PYV8nZ 3l/jYwbY+7+DIratud6xdA5GxxQk X-Received: by 2002:a63:4c:: with SMTP id 73mr49571539pga.210.1555578340723; Thu, 18 Apr 2019 02:05:40 -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 q75sm2109865pfi.102.2019.04.18.02.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Apr 2019 02:05:40 -0700 (PDT) Date: Thu, 18 Apr 2019 02:05:35 -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 V3 1/2] ASoC: fsl_asrc: replace the process_option table with function Message-ID: <20190418090534.GB4028@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 Thu, Apr 18, 2019 at 08:50:48AM +0000, S.j. Wang wrote: > > And this is according to IMX6DQRM: > > Limited support for the case when output sampling rates is > > between 8kHz and 30kHz. The limitation is the supported ratio > > (Fsin/Fsout) range as between 1/24 to 8 > > > > This should cover your 8.125 condition already, even if having an outrate > > range between [8KHz, 30KHz] check, since an outrate above 30KHz will not > > have an inrate bigger than 8.125 times of it, given the maximum input rate > > is 192KHz. > > > > So I think that we can just drop that 8.125 condition from your change and > > there's no need to error out any more. > > > No, if outrate=8kHz, inrate > 88.2kHz, these cases are not supported. > This is not covered by > > if ((outrate > 8000 && outrate < 30000) && > (outrate/inrate > 24 || inrate/outrate > 8)) { Good catch. The range should be [8KHz, 30KHz] vs. (8KHz, 32KHz) in the code. Then I think the fix should be at both lines: - if ((outrate > 8000 && outrate < 30000) && - (outrate/inrate > 24 || inrate/outrate > 8)) { + if ((outrate >= 8000 && outrate =< 30000) && + (outrate > 24 * inrate || inrate > 8 * outrate)) { Overall, I think we should fix this instead of adding an extra one, since it is very likely saying the same thing.