Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1967278ybv; Fri, 21 Feb 2020 06:31:53 -0800 (PST) X-Google-Smtp-Source: APXvYqyB5L1U6FJIiBHFR18Yovi9puMmB3GZfonRVZnaYt8u/ZIs4+KIyUN9j9D72EB9Isw9xzlh X-Received: by 2002:aca:b1d5:: with SMTP id a204mr2189279oif.82.1582295513446; Fri, 21 Feb 2020 06:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582295513; cv=none; d=google.com; s=arc-20160816; b=sscdOF6cWN62xaTwtXSSHmuJysr+ZkdoHzTZo1+fk5xrSWPbPTEhWQ8rMB9EgzJ/kl gAMuxD4nKhVdSUkKjWKJaOZ9zMNEoD9mpK3waLMKS6DyATEg8Mds7xCBcz1A8gaEbQKQ xBE2QLJL0kZZ6A8sPwkgby0tK467m7egzraTIQNUuqy7ZIWVkcsT898oprN1RvpmhmqQ /PjgAqKdgS6ZBqZ6Xir9pRypNDI7P6paWh/p8iW6184cXerlrKt17V6ByTS4HE56Ync2 L7NAHqKAcZ2DNHmfljqfUodw3p5EDmujQAW+K3KZfQMW0eM5LNghjyVlJco4Etj6D3+P U8Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Ii2FU53gxBnbRqvrbMjLj3GOVXtejYjy/v1iyuD+MP8=; b=x5gJ2+nYaxrnOP+VbeoVqPGih8ySal3um7MrysmfMuB+McfO8Gzpi56LjIqJ8LzjXo zC7P7R+SBIlFSNlByNoh20UCXSwZt0jXKa4GReqI3R5J0SDzPUZ0pxgH3JLSarzIDSjZ i+403yyWwz69srMGYQr6PmNIXWw7JXsuFgwO9uE8yGPXOnLTVG70OHao3PvAZeGQNp/E wI/ghwv7ZlHRjAqLslptjmK57xms+zInQVhW+aikIy6UD0LkXi9Xyh/vmiQlqkb3xpvW ka+JEnxN4QFARZ0UkGxy20+EHTaGOxkzhiMZQDtjPsUEEOsh+/UWoIuSXosgkdGvLp/U 55NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=goEbRFoI; 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=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14si818837oid.102.2020.02.21.06.31.41; Fri, 21 Feb 2020 06:31:53 -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=@nvidia.com header.s=n1 header.b=goEbRFoI; 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=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728804AbgBUObM (ORCPT + 99 others); Fri, 21 Feb 2020 09:31:12 -0500 Received: from hqnvemgate24.nvidia.com ([216.228.121.143]:13884 "EHLO hqnvemgate24.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728068AbgBUObM (ORCPT ); Fri, 21 Feb 2020 09:31:12 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 21 Feb 2020 06:29:58 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 21 Feb 2020 06:31:11 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 21 Feb 2020 06:31:11 -0800 Received: from [10.21.133.51] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 21 Feb 2020 14:31:07 +0000 Subject: Re: [PATCH v3 03/10] ASoC: tegra: add Tegra210 based DMIC driver To: Mark Brown , Sameer Pujar CC: , , , , , , , , , , , , , , , References: <1582180492-25297-1-git-send-email-spujar@nvidia.com> <1582180492-25297-4-git-send-email-spujar@nvidia.com> <20200221130005.GD5546@sirena.org.uk> From: Jon Hunter Message-ID: <316ce0d5-318d-0533-ef06-bd7e8672f893@nvidia.com> Date: Fri, 21 Feb 2020 14:31:05 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200221130005.GD5546@sirena.org.uk> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1582295398; bh=Ii2FU53gxBnbRqvrbMjLj3GOVXtejYjy/v1iyuD+MP8=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=goEbRFoIBBxyJcX7uUg+O3y3ialsPS2BhhIdSG+PMqy/jzg3qcJr4jSjnDUgktNhN 0HMt1u0Cou33Sg1w5vG96Apvi3i59DVCCWQeADi8BdBRjSFldcGhf5GaoowpbRlB7B azp2fKoZ9qBcj1jefWii8s+8RcbMoYb+xU7R9Ar7+7GEZvg7nFo9/shcynm4qCbilI qhrgOd5wYI/zvViDPhH3Z2p5q+9BtUiOXig8mubW93E4mG+bgZ+x50yA7pf6I5dwoZ UKElyundJcSXSPGoORNjZV80p/NtA/NXJAuJ6RcnDVttOH9FCrSmo4LtzD76ANi36x jI7K6IoobDD8A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21/02/2020 13:00, Mark Brown wrote: > On Thu, Feb 20, 2020 at 12:04:45PM +0530, Sameer Pujar wrote: > >> +++ b/sound/soc/tegra/tegra210_dmic.c >> @@ -0,0 +1,515 @@ >> +// SPDX-License-Identifier: GPL-2.0-only >> +/* >> + * tegra210_dmic.c - Tegra210 DMIC driver >> + * >> + * Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. > > Please make the entire comment a C++ one so things look more > intentional. > >> + /* Below enables all filters - DCR, LP and SC */ >> + { TEGRA210_DMIC_DBG_CTRL, 0xe }, > > So this isn't the hardware default? > >> + srate = params_rate(params); >> + if (dmic->srate_override) >> + srate = dmic->srate_override; > > How does this work for userspace? If we just ignore the sample rate we > were asked for I'd expect that the application would get upset. Tegra has a hardware sample rate converter (though driver not yet upstream or part of this initial series) and if using the sample-rate converter, then the actual rate captured by the DMIC interface could be different from the resulting sample-rate. So we want a way to indicate to the DMIC it is capturing at rate X, while the resulting sample-rate is Y. I am not sure if there is a better way to do this? Ideally, the DMIC would query the rate from the upstream MUX it is connected to, but I am not sure if there is a way to do that. So right now it is a manual process and the user has to configure these which are not ideal. Cheers Jon -- nvpublic