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,DKIM_SIGNED, DKIM_VALID,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 E4FA4C433ED for ; Thu, 8 Apr 2021 15:12:52 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B981C610D1 for ; Thu, 8 Apr 2021 15:12:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B981C610D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0E9721658; Thu, 8 Apr 2021 17:12:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0E9721658 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1617894770; bh=WPfZwbAIW+gejIiacxEDP1w8a+zBJ2IHbLjJtdLyuM0=; h=Subject:To:References:From:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TR1dBsvgqdogShhYG9/GcsIkERvhueMb041cNU1u8TfIrzCy0se97Ulf41lhtNTnE nfuaFHbU6TdlDWm5q6NZmbA7dXb+F6k8B3D9mkpTnLVXz6O5ky9KilDmyGs5Kkn/gU D9enIauxTqp8AQ2ZYaX1GYr0Ml8MztVu/ztfeU+c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7D228F8012F; Thu, 8 Apr 2021 17:11:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 13D8CF8020B; Thu, 8 Apr 2021 17:11:58 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B0F82F80162 for ; Thu, 8 Apr 2021 17:11:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B0F82F80162 IronPort-SDR: u7RtdXWknufT5bulbSMfKiLY/cIN7d95nzWqFM0oSOsneAjqv7nlmBAl9/7zEzaAu6s/XMtWYc NdkwhvDNhRoA== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="193602448" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="193602448" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 08:11:50 -0700 IronPort-SDR: EHJmmFj/myV72YBzic+jZzhq5DH1OLoYVGflYNyUJmAbCjIwg6SFO70gThWK0hnrscUztyG3NI 8vuqdJiQ0QdQ== X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="458861480" Received: from aslawinx-mobl.ger.corp.intel.com (HELO [10.237.12.105]) ([10.237.12.105]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 08:11:47 -0700 Subject: Re: [PATCH] ALSA: core - add more card sysfs entries To: Jaroslav Kysela , Mark Brown , Pierre-Louis Bossart References: <20210408094314.1322802-1-perex@perex.cz> <20210408103819.GA40407@workstation> <45acc908-3603-3479-9fb2-5206339a9ace@perex.cz> <20210408120502.GA4516@sirena.org.uk> <20210408144706.GK4516@sirena.org.uk> <9c758fde-cad7-8c9f-ac9d-61357ce2581e@perex.cz> From: =?UTF-8?Q?Amadeusz_S=c5=82awi=c5=84ski?= Message-ID: Date: Thu, 8 Apr 2021 17:11:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <9c758fde-cad7-8c9f-ac9d-61357ce2581e@perex.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: Takashi Iwai , Curtis Malainey , ALSA development X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On 4/8/2021 5:04 PM, Jaroslav Kysela wrote: > Dne 08. 04. 21 v 16:47 Mark Brown napsal(a): >> On Thu, Apr 08, 2021 at 09:12:57AM -0500, Pierre-Louis Bossart wrote: >>> On 4/8/21 8:18 AM, Takashi Iwai wrote: >> >>>> I guess the question here is how to identify the proper profile for a >>>> certain platform and how to get it passed over the whole system. >>>> Theoretically, the rename of the card name or mixer name strings could >>>> be done in user-space side, too (e.g. mapping in alsa-lib or >>>> whatever), so I don't think it mandatory to make them variable via >>>> sysfs, if it's meant only for the consistency reason. >> >>>> Didn't we discuss in the past about the possibility to store the >>>> profile name in the card component string? >> >>> Because of OEM or user customization, we will have multiple versions of >>> firmware and topology that will have to be enabled in specific setting. The >>> last thing we want is hard-coded rules in the kernel on which firmware >>> customization to use for which platform. >> >> ... >> >>> If the users wipes the OEM image and installs a standard distribution on the >>> same device, they would by default use the firmware generated from the SOF >>> main branch, without any differentiation and 3rd party IP. >> >>> So the point is: how do we expose this information to UCM? In the machine >>> driver where the card is created? There is zero information on what the >>> firmware/topology does. The information can only be extracted when the >>> topology is loaded when probing the SOF component driver. >> >> So what we're looking for here is a mechanism to tell userspace what >> firmware has been loaded? > > It's just a part of the issue with the proper runtime sound card > identification. But yes, the firmware can really change the created sound card > (controls, PCM devices, paramters for those devices). In this case, UCM should > pick another configuration. > > I'm looking for a straight solution here. > > Jaroslav > Wouldn't dsp_status from snd_hwdep already work here? The only thing which would need to be done is to connect it to ASoC card? And in userspace ask using hwdep interface for what is the loaded FW? Amadeusz