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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 865A8C433F5 for ; Fri, 5 Nov 2021 11:37:40 +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 0BE4161215 for ; Fri, 5 Nov 2021 11:37:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0BE4161215 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=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 DC606166D; Fri, 5 Nov 2021 12:36:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DC606166D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1636112257; bh=9euLi5td9qqUKbtFL109JxQohfkqj9CeDl83yQN/Dqo=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=H08eSq5qfVIjrkLzvDJif8eDoPBowFUtxZ8RRmTbrsexsk1WzlW62UK84o0z4g8qK IZ2aN1m73byQ0D8NjHtN83EgA9MMhWKXtSsWGHgWPBugzAYjOPkL5Fo2RAy9dlM4MK FUAfbiqHbSQj5sU+PPzaR9C0biSxd7ICETpvtp+A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 75D2FF80269; Fri, 5 Nov 2021 12:36:47 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0D6C2F8026A; Fri, 5 Nov 2021 12:36:45 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0537AF80224 for ; Fri, 5 Nov 2021 12:36:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0537AF80224 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Pe0tkuE0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WPybKAAK" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 60E771FD36; Fri, 5 Nov 2021 11:36:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1636112195; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QqevPg+kT+qmJef07+A/CZncg0GL4iBv89frIisU5Uk=; b=Pe0tkuE086LGlYx9ZbH+fBLJcfyEXlKNJ0UX4ff81YuAcQZ31E8q/bPc3q9pX9EwOy/1ls fSelYSBNopgt+2wgIPpGP1yZoowGC+892Fpn3b8wM52qF1MxgJsHPjTKss0FWHIdE6yPR+ 6Vwlhs6BFNdVGvyqpDbcvqQNn/UijKw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1636112195; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QqevPg+kT+qmJef07+A/CZncg0GL4iBv89frIisU5Uk=; b=WPybKAAK22madiSTVw7Un0yWqoXFc5WrG1rTERR13LiOERcjoPUAZ82J4Y6AOm3mY7BPKh g8q7BvosLNzLzjDQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 595602C154; Fri, 5 Nov 2021 11:36:35 +0000 (UTC) Date: Fri, 05 Nov 2021 12:36:35 +0100 Message-ID: From: Takashi Iwai To: Cezary Rojewski Subject: Re: [PATCH] ASoC: DAPM: Cover regression by kctl change notification fix In-Reply-To: References: <20211105090925.20575-1-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, Mark Brown , Yu-Hsuan Hsu 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 Fri, 05 Nov 2021 12:30:48 +0100, Cezary Rojewski wrote: > > On 2021-11-05 10:09 AM, Takashi Iwai wrote: > > The recent fix for DAPM to correct the kctl change notification by the > > commit 5af82c81b2c4 ("ASoC: DAPM: Fix missing kctl change > > notifications") caused other regressions since it changed the behavior > > of snd_soc_dapm_set_pin() that is called from several API functions. > > Formerly it returned always 0 for success, but now it returns 0 or 1. > > > > This patch addresses it, restoring the old behavior of > > snd_soc_dapm_set_pin() while keeping the fix in > > snd_soc_dapm_put_pin_switch(). > > > > Fixes: 5af82c81b2c4 ("ASoC: DAPM: Fix missing kctl change notifications") > > Reported-by: Yu-Hsuan Hsu > > Cc: > > Signed-off-by: Takashi Iwai > > Hello, > > From my research I've found very few places which actually check the > returned value of functions mentioned by you. And thus we could use > this opportunity to adjust the kcontrol-put behavior according to > documentation for all users without adding any additional functions > which are part of this patch. > > Board: > sound/soc/intel/boards/kbl_da7219_max98927.c > > seems to be the offending user. We could update its code instead, > leaving ASoC unchanged. What do you think? Well, if we're going to that direction, we have to update the documentation and properly mention about the positive return value. So the changes in ASoC core would be needed nevertheless. I find it good to keep the old existing behavior; those API functions are only for enabling/disabling, so returning 0 or a negative error is more natural than tri-state, less complex for callers. thanks, Takashi