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=-2.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 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 9FE1EC5DF63 for ; Wed, 6 Nov 2019 14:05:21 +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 92E3020663 for ; Wed, 6 Nov 2019 14:05:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="plH8kBcT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92E3020663 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 6FD281697; Wed, 6 Nov 2019 15:04:28 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6FD281697 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1573049118; bh=Y0LelRQ2dUpn2RAtV/oSdLVf6acemGHowy8yHig7VNY=; h=From:To:In-Reply-To:References:Date:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=plH8kBcTIMpIWuz1f6lOLSiKMYH/0HJ1lE9xn7ua3wLWdox5xjg+JPiQvcnDVlRZD HrIyF+7cpAJBjIpil8INc6yszxPJLDgRECTF6998VZDH37C+AaZuu1PFADFEl55qfj Q8NOo5k5BYlRwsW1yMCStyzPBtMgWwdM5f6WZxso= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0788BF80321; Wed, 6 Nov 2019 15:04:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 723ECF803D0; Wed, 6 Nov 2019 15:04:26 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 3E4F4F8015B for ; Wed, 6 Nov 2019 15:04:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3E4F4F8015B X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2019 06:04:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,275,1569308400"; d="scan'208";a="212779321" Received: from kekkonen.fi.intel.com ([10.237.72.156]) by fmsmga001.fm.intel.com with ESMTP; 06 Nov 2019 06:04:17 -0800 Message-ID: <1573048312.40545.9.camel@linux.intel.com> From: Jaska Uimonen To: Jaroslav Kysela , Kai Vehmanen In-Reply-To: <140d987f-280a-309a-d09c-fa4b210563db@perex.cz> References: <6dcc3e0d-0df5-90cf-220f-59253d3b5c7c@perex.cz> <140d987f-280a-309a-d09c-fa4b210563db@perex.cz> Date: Wed, 06 Nov 2019 15:51:52 +0200 Mime-Version: 1.0 X-Mailer: Evolution 3.24.6 (3.24.6-1.fc26) Cc: Takashi Iwai , ALSA development , Mark Brown Subject: Re: [alsa-devel] UCM extensions 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 2019-11-06 at 14:10 +0100, Jaroslav Kysela wrote: > Dne 06. 11. 19 v 12:50 Kai Vehmanen napsal(a): > > Hi Jaroslav, > > > > On Tue, 5 Nov 2019, Jaroslav Kysela wrote: > > > > > I make some internal ucm code cleanups in alsa-lib and added > > > three > > > major extensions to allow more complex configurations which we > > > require for the > > > SOF kernel driver. > > > > looks very good and pragmatic way to tackle some of the issues you > > hit > > with current UCM. > > > > E.g. the If block would be also sufficient to tackle the recent > > HDMI codec > > driver change (with a single UCM file) -- i.e. use existence of the > > hdac-hdmi driver controls to select which enable-sequences to run. > > Hmm, I > > like this better than trying to select a whole different UCM file > > based on > > which drivers are used. > > > > And same usage pattern can be applied to other mixer control name > > changes > > (like you already did for the HDA mic control). > > > > That of course leads to the question do we soon need mechanisms to > > choose between more than two conditions (e.g. if mixer controls > > have > > changed multiple times in recent kernels, so covering for this > > in UCM would need a Switch, If-Else, or similar). But yeah, one can > > always define another UCM, so keeping-it-simple might be the right > > choice here. > > I already implemented the nested If (so you may use another If in > the > True/False blocks). > > Also 'String' (equal, substring) and 'RegexMatch' conditions were > added. > > For the substitution, I added ${CardComponents}, too. The driver > might pass > another component description strings to the user space for a better > identification - there is snd_component_add() kernel function for > this. > > > > I added everything to keep the interface backward compatible, > > > so the > > > current applications should not observe any different behavior. > > > The > > > applications like pulseaudio should use the 'hw:CARD_INDEX' > > > specifier for the > > > open call in the future and snd_use_case_parse_ctl_elem_id() > > > helper for the > > > element control names. > > > > This sounds good as well. Some testing with common versions of > > e.g. Pulseaudio is probably in order to sanity check how this > > works. > > Yep, I will do more testing. > > Do you have any progress with the pulseaudio volume UCM extension? > Could you > send me a link to the repository again? Thank you. > If you mean the ucm hw volume support: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/189 This is my fixes on top of Arun's original patch. This is working pretty well for me, for example I have mute leds working in X1 with this. Unfortunately Pulseaudio community is pretty loaded with reviews, so no comments yet. My problem is also that some distributions are using pulseaudio v11.1 so backporting is little bit nasty... My personal branch if for some reason someone want's to test in v11.1: https://gitlab.freedesktop.org/juimonen/pulseaudio/tree/lenovo_test (This branch has also couple of backports to support automatic routing between profiles -> ucm use cases) br, Jaska > Jaroslav > > > > > Br, Kai > > > > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel