Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp12062996ybi; Fri, 26 Jul 2019 04:11:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0Y5vuzp9nUvUc41ju2M0PkEMphJDupTUUvBqLc2h5qQh+6N4/r+mUEX3Ix+MmX2W5WA0l X-Received: by 2002:a63:6f81:: with SMTP id k123mr92679803pgc.12.1564139489245; Fri, 26 Jul 2019 04:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564139489; cv=none; d=google.com; s=arc-20160816; b=0HDi3jE4mFYEIjq8CwMFKdBp17U1j6mho+6qE+7v+9fRZJjciUc4wQWHUYKG7ZSB0O WCCn5rFkIfownO6uk1ZoH35tNNkP9K89eNcq4DgrRucIuDk6TDg0omXKxY86jPp3hNB3 8+jHN6FRPAroG0NzE4S+1XxYjnV8+wNLl/cez2eiLOyozqFnBaItoNlMcpUZ8uiomndA 942Ujfy+CC7ST7TsnQxvTuNnJakJeqQz39JgPaR0+Vx2wV1Gx3vXjZU6r2QD3fNbbw6u uRAVqMZbkXJOFqFJRLKitb9pI/ipZ/c0zy4gPjtDgusWukUPMZtg2IiiFjBeh/qn6Qn9 HI1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Ebym6aqajv4ogHj0nUB6l+NHbEULXz8/lMkXk/kwZ4M=; b=oYWiSzRCxM8SqKbC+Q9/ugczzbQcPJjahmrKRiuigNLp+bG9N59hk9qFCrXHDWIwQW 3jCuiZrXHuHdtPDM9wrXxRdhMoQniJeUrCA+TyKnIRX7IRB89Mw5tls0wnMpWQG4hP6g BaZ9J6yxclav/tQ2CZtkP6QMPJ8Tnj9XLDatkQUp0JtamsrK1Z774DerNi3Z/F0Dg99z bbQEQmyI366cTSd/vVZrrkjsHHEObAjmRlSEL7canP2phAMrBYFj0sANxzJDj55a1cAh QFsmRCcxaFpD6fOjHrIfAiOE2cNU3o5wnFPkaktlNNassj5wZgTntLuP3Yh6SSTBfk/R lMRw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m32si20632634pld.438.2019.07.26.04.11.14; Fri, 26 Jul 2019 04:11:29 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726709AbfGZLHo (ORCPT + 99 others); Fri, 26 Jul 2019 07:07:44 -0400 Received: from mga18.intel.com ([134.134.136.126]:42586 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfGZLHo (ORCPT ); Fri, 26 Jul 2019 07:07:44 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2019 04:07:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,310,1559545200"; d="scan'208";a="175562578" Received: from crojewsk-mobl1.ger.corp.intel.com (HELO [10.251.89.116]) ([10.251.89.116]) by orsmga006.jf.intel.com with ESMTP; 26 Jul 2019 04:07:37 -0700 Subject: Re: [RFC PATCH 27/40] soundwire: Add Intel resource management algorithm To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Sanyog Kale References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> <20190725234032.21152-28-pierre-louis.bossart@linux.intel.com> From: Cezary Rojewski Message-ID: <869edbf2-1fdd-6b21-818f-20c39c013c11@intel.com> Date: Fri, 26 Jul 2019 13:07:35 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190725234032.21152-28-pierre-louis.bossart@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-07-26 01:40, Pierre-Louis Bossart wrote: > This algorithm computes bus parameters like clock frequency, frame > shape and port transport parameters based on active stream(s) running > on the bus. > > This implementation is optimal for Intel platforms. Developers can > also implement their own .compute_params() callback for specific > resource management algorithm. > > Credits: this patch is based on an earlier internal contribution by > Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. All hard-coded > values were removed from the initial contribution to use BIOS > information instead. > > FIXME: remove checkpatch report > WARNING: Reusing the krealloc arg is almost always a bug > + group->rates = krealloc(group->rates, > > Signed-off-by: Pierre-Louis Bossart Could you specify the requirements and limitations for this algorithm? Last year I written calc for Linux based on Windows (please don't burn me here) equivalent though said requirements/ limitiations might have changed and nothing is valid any longer. I remember that some parts of specification overcomplicated the calculator and due to actual, realtime usecases it could be greatly simplified (that's why I mention that my work is probably no longer valid). However, these details would help me in reviewing your implementation and providing suggestions. And yes, "Frame shape calculator" probably suits this better. Though this might be just a preference thingy : )