From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDD4DC6377A for ; Tue, 20 Jul 2021 15:44:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D82FF61165 for ; Tue, 20 Jul 2021 15:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242011AbhGTO6z (ORCPT ); Tue, 20 Jul 2021 10:58:55 -0400 Received: from mga01.intel.com ([192.55.52.88]:51153 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234579AbhGTOs4 (ORCPT ); Tue, 20 Jul 2021 10:48:56 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10050"; a="233040558" X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="233040558" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 08:29:01 -0700 X-IronPort-AV: E=Sophos;i="5.84,255,1620716400"; d="scan'208";a="462083552" Received: from aremenni-mobl.amr.corp.intel.com (HELO [10.209.130.10]) ([10.209.130.10]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 08:28:59 -0700 Subject: Re: [PATCH 1/3] ASoC: SOF: Parse fw/tplg filename from DT To: Daniel Baluta , Mark Brown Cc: Devicetree List , Linux-ALSA , Kai Vehmanen , Linux Kernel Mailing List , Daniel Baluta , Liam Girdwood , Rob Herring , Ranjani Sridharan , Takashi Iwai , Daniel Baluta References: <20210715141802.880911-1-daniel.baluta@oss.nxp.com> <20210715141802.880911-2-daniel.baluta@oss.nxp.com> <20210715143906.GD4590@sirena.org.uk> From: Pierre-Louis Bossart Message-ID: Date: Tue, 20 Jul 2021 10:28:57 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>> Introduce two DT properties in dsp node: >>>> * fw-filename, optional property giving the firmware filename >>>> (if this is missing fw filename is read from board description) >>>> * tplg-filename, mandatory giving the topology filename. >>> >>> These sound entirely like operating system configuration which I'd >>> expect to be inferred from the machine identification. What happens if >>> a system has multiple options for firmware files, or if the OS ships the >>> topology and firmware bundled up in a single image to avoid them getting >>> out of sync? What's the benefit of putting them in the DT? > > Can you help me with this, specifically for selecting topology name. > > I think I'm fine selecting a default value for SOF firmware name. It > looks like even > for Intel platforms there is no way of changing the firmware name. > > But how about selecting topology name? We have lots of audio scenarios > that can run on the exact same hardware: > - e.g > - Audio PCM playback + Post Processing > - Audio Compress playback > - Keyword detection > > > So, we need to use different topologies to select the scenario we want > to demonstrate. > > Would it be acceptable to add tplg_name as a module parameter? we already have a "tplg_path" module parameter which was intended to differentiate between product skews/versions using the same hardware and firmware version. A typical example would be an OEM using 'public' firmware + topology for basic audio support, distributed through sof-bin and packaged by distros, and 3rd-party/closed sources firmware modules in more advanced packages distributed separately by the OEM. In the latter case you do want the same path for firmware and topology, otherwise you'd have a risk of using a topology making references to a library not bundled in the firmware. There was an initial ask from Curtis to have the ability to override the firmware/topology names, but they've been able to work with the path parameters - set with udev rules for specific models. If you wanted to demonstrate 'scenarios', you could use the same approach? Two other points to reply to Mark: - we currently don't support 'shipping the topology and firmware bundled up in a single image to avoid them getting out of sync'. No idea how that might work. - if the machine driver is specified in DeviceTree, then the topology used is *required* to be aligned with the machine driver. The rules are that a topology may not make references to a BE dailink exposed in the machine driver, but conversely if the topology makes a reference to a BE dailink that is not exposed in the machine driver the topology parsing will fail. It's one of the current weaknesses of topology-based solutions, we have non-configurable hardware-related things that are described in topology but should really be described in platform firmware, be it ACPI or DT, and provided to the topology.