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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 A034CC433DB for ; Mon, 15 Feb 2021 12:03: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 77E1764E37 for ; Mon, 15 Feb 2021 12:03:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 77E1764E37 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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 E2568851; Mon, 15 Feb 2021 13:02:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E2568851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1613390598; bh=17TOl8pnr8rg/2goWVgaN4zZWXokZYPs1t4T/i2FgsE=; h=Subject:From:To:References:Date:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WhhaGkmWVqo8NvoCpX2K657DQxpYSjXGw/eX9B7XepBPKOlfU0Poe5cTPc5esp5W3 Bj5f2g9MVxiDEcABigB4I/y/yq9P1j8IxAW0nKaZT4ksqr6IRoi3uYo0egFd7riEmk BJpACnr3n9XGB/RjlUwap3pxY3k0//T+6jDkqC+A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4D6C0F8020B; Mon, 15 Feb 2021 13:02:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C8785F80258; Mon, 15 Feb 2021 13:02:25 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 58B83F80089 for ; Mon, 15 Feb 2021 13:02:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58B83F80089 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="XqaLkhGl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613390541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tIpTTn+tMQG4DMdNMX67EVWkjkIOLI+bV07HRWJJXzo=; b=XqaLkhGlRGPF5ptHjYJvuwqaDE6DmXY08lbNxm35nE36C6Szlmvb7KjOIKA77lqyo25zdE zM5sufXrPC7KTYJnBcjnQ+Syy693jo8dGJ9/G8mNqdFcykiV8YisqzM2bKioiEdxvaS4sc xhyfPX/ewxiJAxpBCg4lJb2IaaJNB/o= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-228-lXxqPtgZPlWiuYF3HsexwQ-1; Mon, 15 Feb 2021 07:02:19 -0500 X-MC-Unique: lXxqPtgZPlWiuYF3HsexwQ-1 Received: by mail-ej1-f71.google.com with SMTP id hx26so4126116ejc.3 for ; Mon, 15 Feb 2021 04:02:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tIpTTn+tMQG4DMdNMX67EVWkjkIOLI+bV07HRWJJXzo=; b=RZdHiWUHiUU7ACcbErz8MZAx4T641xoqeINd+7ZQ9lw6p664fzL2ScEZ1ersWtrqFC 3UKaBTiLdkG8Et86i2zWXsoQEsY5CnUoXKCNFv6Zhc9jZ9CYI0bro/sVRA8D40fei3g0 oUqq0TAqhxNiHGv5lwF+CvM77cyLkSx2/VGwfns73gjq5yscPOY8/XtgOs3ve7Wh0Hwj iY60BvqceWs7uScEXg+l3GEvQiTOkQyt7veGCZ0X30IT/KcDw1XTui37k40ojIr6fGD2 j9Os3BkTxQjZv4id9LkxV/kvHTyw635mIKSoBNolGkqadDIYLjH4VQz6i4weAyqtQFTi rJOQ== X-Gm-Message-State: AOAM532F8H5v0zPODdhoZI1fKKQvlKeE3C20t/TRGvMxaJsI3FQUm1Ol 3Q5nrVB/G8BgqTKEH8xrpikGF97yRr04zCuIwJcx0C+IkpkAp5MM2Bm0GOAJkpnRoer7wtsyWBD 4UkbZ7Ekqxn3jKWhXNNnoB1s= X-Received: by 2002:a50:ec12:: with SMTP id g18mr5160012edr.293.1613390538512; Mon, 15 Feb 2021 04:02:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyODHcEadCS+IBBH8DhgQljnphsE8Gtlm6LpwrdZLBkeB+RedhDjkMR3DJQ4Is5eIwEmLIQtg== X-Received: by 2002:a50:ec12:: with SMTP id g18mr5159990edr.293.1613390538331; Mon, 15 Feb 2021 04:02:18 -0800 (PST) Received: from x1.localdomain (2001-1c00-0c1e-bf00-1054-9d19-e0f0-8214.cable.dynamic.v6.ziggo.nl. [2001:1c00:c1e:bf00:1054:9d19:e0f0:8214]) by smtp.gmail.com with ESMTPSA id z65sm9864984ede.80.2021.02.15.04.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Feb 2021 04:02:17 -0800 (PST) Subject: Re: [PATCH 0/5] ALSA: control - add generic LED trigger code From: Hans de Goede To: Jaroslav Kysela , ALSA development References: <20210211111400.1131020-1-perex@perex.cz> Message-ID: Date: Mon, 15 Feb 2021 13:02:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Cc: Takashi Iwai , Perry Yuan 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" Hi, On 2/12/21 9:31 PM, Hans de Goede wrote: > On 2/11/21 12:13 PM, Jaroslav Kysela wrote: >> The sound driver implementation is really easy: >> >> 1) call snd_ctl_led_request() when control LED layer should be >> automatically activated >> / it calls module_request("snd-ctl-led") on demand / >> 2) mark all related kcontrols with >> SNDRV_CTL_ELEM_ACCESS_SPK_LED or >> SNDRV_CTL_ELEM_ACCESS_MIC_LED > > So I've been running some tests with this,combined with writing > UCM profiles for hw volume control, for some Intel Bay- and > CherryTrail devices using Intel's Low Power Engine (LPE) for audio, > which uses the ASoC framework. > > My work / experiments for this are progressing a bit slower then I > would like, but that is not the fault of this patch-set, but rather > an issue with hw-volume control mapping, see below for details. > > Leaving the ASoC implementation details aside, this patch-set > works quite nicely to get the speaker mute-LED to work. I've spend some more time this weekend playing with this and I've also added mic MUTE LED support for the ASoC rt5672 codec driver now using this. I will post a RFC patch series with the ASoC rt5672 codec driver LED support soon, as adding an extra use-case for this will hopefully help with reviewing this. FWIW there were some challenges, but those were not related to the driver API this patch set adds. The driver API works well for ASoC codec drivers. Regards, Hans p.s. One open issue is the lockdep issue which I reported in my previous email.