Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2035055ybh; Tue, 14 Jul 2020 13:55:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqT4HVCY8fAfvahUSyyIdNhJOluhbHB/Zpe5R1qKGpHU6Kco8UyRanK1WlOa/6ag//wubB X-Received: by 2002:a17:906:4f16:: with SMTP id t22mr6094836eju.179.1594760141471; Tue, 14 Jul 2020 13:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594760141; cv=none; d=google.com; s=arc-20160816; b=zM1eGDjReTvGBZ3PdTG+YsBHX4++E3UZtosnO7eZU98Eg16U4xMRKlOwOGufleWpcw 92bSya/euL2J+0msf362fN9CAZFarDbUg5DwMgBEJkJKEzYZ94u+hqQuco7ZUFSevUug HR+ZQKUL5jE51W444FBrX+v7OaKBSaTZEmObcAcXP4HnE35fvSeCtgi0k5odbS7DOxDF 9A0/yDTUueaCZunN2KdXoTcAp00RIoJyJqGqv+ZZVrDTWH2TnKUxbtoYO3F3Y8AYvzPL iIXWrWGgMRQLg3QkxFs/U9OBL2tXGTAd32KCxzBuGcwdZyHwWgL0g+viffmjatU+eGBO +YFg== 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=xc9LWzDOKXS+ptBDNm2XPIAMDBTbm1M4WRBHaQH5FR8=; b=ll3hRLz/C4KBqFadFqv12/a4Rx2REdvMXYIz06myRiWnKC6+z04yy9yAs2JoGbuJc5 WMFNrwicW7WdgO1DnYP3+FIO7Krz1k0bUFsNRjej8BanRFDJpkbcMCDrcgtB4Tt4WAZF 48J4eBO1hMHYDR479tnY6iTDiOuugcsTV2RVmLUeKvxc1COJXX3JLN2S8TbDbQEV/zKM HUEJMoNslpDMi+6NMQstMv/qi7Fja48z4+UD0ZuSohl+/V9nOIm1VBbLQHfG/phBenCg IE2mykFr3coOMti1zcJ9EIo0qN7agMSZzv3/xz3Dz3n5Ay+KFa5R/9cAFALxLSFJ2WKA wM7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Brx1k54T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id o1si11280525edq.365.2020.07.14.13.55.16; Tue, 14 Jul 2020 13:55:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Brx1k54T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727931AbgGNUvN (ORCPT + 99 others); Tue, 14 Jul 2020 16:51:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726442AbgGNUvM (ORCPT ); Tue, 14 Jul 2020 16:51:12 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA32C061755 for ; Tue, 14 Jul 2020 13:51:12 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id k5so2235339pjg.3 for ; Tue, 14 Jul 2020 13:51:12 -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=xc9LWzDOKXS+ptBDNm2XPIAMDBTbm1M4WRBHaQH5FR8=; b=Brx1k54T6yHFWb/2X8L1OQE3az9QDKKYU1Duv8KOMrAQ+M4SJgaGsXLrp8XtrwgjYu hmtLTd5usxFXaQe5+XTthKKgvt5nSR+0yjhUhxY9KI+R+kUJlP7Z8yFvXyBGkknER5H3 +HQpE4iymvg5dJ5zjEb3C2G/dg0GzjxVu2NjuUdgpEU1WT0gJ35f1a+++DdhP89Dd4V4 2aJ5CHplHYPon1hvuXDNWcPyzINcBh0NxXfGMklD/7Vp4KzjykYtQ2RIF6EKiFDpNlQq 2VD/Ey26RItC6eTx+Kp0z/EHwRD5/AyjwCV0dBY6VhEYkFL4vQE2pqqMt0j42m4tk7Fq yKOQ== 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=xc9LWzDOKXS+ptBDNm2XPIAMDBTbm1M4WRBHaQH5FR8=; b=DMXRrw92/RNUehIvJKnBJaIdHYsl297cLH8mgUQz+bqW5O8wBvlMLwLWg1RD3nNMnZ 3ean0yyekumbEnVTQNXuh5BHzTEzjuVPMrMgyJpeW/lESFy1SC80oD7h9X47Jpfnskuc iYdZ6BK2NjliUm5FdC9SYD6td68swxg5HOXZMaPLbo8aw5iEy0ZsHJIFCHXN+tfBNwMO f0Yf1XzlRBR1ChzGZ3xcj+9PSSRBaWYwmdOiUfdY+ukGNSR9A0eawDVnhDxhSFqumuqz qNuuqL4rhCiV1jvZlCXR0uCHFDR0uZknsPKGEJic48MPSuraQ21WSSA8tT6T6IfYDc9u FjoA== X-Gm-Message-State: AOAM530KhpJo+M5hiyD1D8ctxKYndn1S9acvHcaBq3EEXkju+hUmLYxX xp0IkmI5BgbATymuD+IkoIM= X-Received: by 2002:a17:90b:94f:: with SMTP id dw15mr6644250pjb.199.1594759871930; Tue, 14 Jul 2020 13:51:11 -0700 (PDT) Received: from Asurada-Nvidia (searspoint.nvidia.com. [216.228.112.21]) by smtp.gmail.com with ESMTPSA id m31sm3608860pjb.52.2020.07.14.13.51.11 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 14 Jul 2020 13:51:11 -0700 (PDT) Date: Tue, 14 Jul 2020 13:50:50 -0700 From: Nicolin Chen To: Mark Brown Cc: Arnaud Ferraris , alsa-devel@alsa-project.org, Timur Tabi , Xiubo Li , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Rob Herring , kernel@collabora.com, Fabio Estevam Subject: Re: [PATCH 0/4] ASoC: fsl_asrc: allow selecting arbitrary clocks Message-ID: <20200714205050.GB10501@Asurada-Nvidia> References: <20200702142235.235869-1-arnaud.ferraris@collabora.com> <20200702184226.GA23935@Asurada-Nvidia> <3f39a0bb-a766-f646-28b3-a51cf9983c6b@collabora.com> <3fea8912-63df-ff27-0c29-6284a85107ab@collabora.com> <20200714201544.GA10501@Asurada-Nvidia> <20200714202753.GM4900@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200714202753.GM4900@sirena.org.uk> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On Tue, Jul 14, 2020 at 09:27:53PM +0100, Mark Brown wrote: > On Tue, Jul 14, 2020 at 01:15:45PM -0700, Nicolin Chen wrote: > > On Tue, Jul 14, 2020 at 06:20:32PM +0200, Arnaud Ferraris wrote: > > > > Here's some background about my use case: the i.MX6 board acts as a > > > Bluetooth proxy between a phone and a headset. It has 2 Bluetooth > > > modules (one for each connected device), with audio connected to SSI1 & > > > SSI2. Audio sample rate can be either 8 or 16kHz, and bclk can be either > > > 512 or 1024kHz, all depending of the capabilities of the headset and phone. > > > In our case we want SSI2 to be the input clock to the ASRC and SSI1 the > > > output clock, but there is no way to force that with auto-selection: > > > both clocks are multiples of both 8k and 16k, so the algorithm will > > > always select the SSI1 clock. > > > Anything wrong with ASRC selecting SSI1 clock for both cases? The > > driver calculates the divisors based on the given clock rate, so > > the final internal rate should be the same. If there's a problem, > > I feel that's a separate bug. > > The nominal rate might be the same but if they're in different clock > domains then the actual rates might be different (hence the desire for > an ASRC I guess). I can see the system wanting to choose one clock or > the other on the basis of some system specific property (quality of the > clock sources, tolerances of the devices involved or something) though > it's a rather fun edge case configuration :/ . Thanks for the input. Fox i.MX6, I don't feel it would be that drastically different though. And both SSI1 and SSI2 can simply select the same root clock source to avoid that happen. Yet, in case that we need to support such an edge case, what's a relatively common practice to allow system select the clock source now?