Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1439714pxv; Fri, 23 Jul 2021 08:21:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH86pq1qmwo+Kxgs5zfBIa3+6XqpIbABG0q7+z4JmGWvokmFYq1fG4gPI+PVCH1C4U+hpV X-Received: by 2002:a05:6e02:1947:: with SMTP id x7mr3986690ilu.85.1627053706624; Fri, 23 Jul 2021 08:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627053706; cv=none; d=google.com; s=arc-20160816; b=cOLl6GBerwvHXC10cmYGrmS9U0pfHAw/QpuBXEhQKMTKCTA2fTA1VBOWbFzOJcK7Io Igt1xuPez56mmP0ynT3gj5vJMpOpZJircT8CvyxziHoTLM35Ht4F4pZ13om2OfNNiDCG qPSojfTATjWYNa2P7QBUwbE0CJ1DoKgEpvp7mYDMAj8lXDKOpFbFQKMsi5OA9mkeFdA7 llz5OInetMgbJo07qTK9ggisvgoghmzDBztu41MlO0M+WWy+0qYO9GP4vWj3nEcHrYhW VYO1qP21kkyWT28MPY5JyZSZvGOnbKrXrtdaTGfXx08stUwlOnKVp4IRL5BpkR2vh/6S mbsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature; bh=4yHweakhnI2OyDgFaWWjfP9xK9RpLJ6y8bF2JOAWTWk=; b=tvco/Zct/rKCPKdhcDpZEmD/htDXSYgb1Oijr1ng8i8lEXNpuTNWj5POClMZ5xFj6i dnJVQ/Sb6JtfvNZvRnzwiCz/JwaHzyFn+Shflk0GWcolj88WrBPy5w4bGGCdHEoGxX/t nQpf0RuljKW/hkaPbqxfdnw67KmjiuPvYceX9i1jwj898+oYr5sfAG5GZhTd1AHj2yQj AL/y0HhLB28MR2DNnGTHpRs+N/GYtyn6gJEzR8Ixzf6WhUz34kkW1HbYYIbD6bog9ibM kz6MfCvVYLeyg5g4UuMSJMfsYWZwrGWNGJqzUhWZaOZMtHchzexryc560oAYjaPkoJCz eYuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=e7qlSIWj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si30505951ila.8.2021.07.23.08.21.33; Fri, 23 Jul 2021 08:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=e7qlSIWj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235552AbhGWOjF (ORCPT + 99 others); Fri, 23 Jul 2021 10:39:05 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:33020 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235548AbhGWOh2 (ORCPT ); Fri, 23 Jul 2021 10:37:28 -0400 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 16NEvULx009361; Fri, 23 Jul 2021 10:17:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=subject : from : to : cc : references : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=PODMain02222019; bh=4yHweakhnI2OyDgFaWWjfP9xK9RpLJ6y8bF2JOAWTWk=; b=e7qlSIWjx5i8QO3F0JCnvz/UDDUUJjq99ec9scrkQ5+edrs4MtnT7wOPiurFZdB/vWns HkOojQRRx6W0QcpsBvNpJLXPI4mngFpT9Ot+yPs0YZLCCPvLVHB0gpZZk68pW1apjJ/m lYx4a5tAxY6MHrs257EsKDlFCpV+svnBh/nqJlWMsUZS1BiNxfW+3ObNevGzoXm6GmPW O68FNVYn+mzjZxGz/7C5FqFKzmHtycvZ+C4wIdXt000j8HWqxRfRa41aJ5CoF7yl+tFA D4la6FKOIpPd/OdafZ8QVBrroxE+KtkupqHcUDqsAoZak6A7gAYngIYCcSRQOd6DAG8q uQ== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0a-001ae601.pphosted.com with ESMTP id 39ya2r9j9k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Fri, 23 Jul 2021 10:17:34 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Fri, 23 Jul 2021 16:17:32 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2242.4 via Frontend Transport; Fri, 23 Jul 2021 16:17:32 +0100 Received: from [10.0.2.15] (AUSNPC0LSNW1.ad.cirrus.com [198.61.65.17]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6A2CA45D; Fri, 23 Jul 2021 15:17:26 +0000 (UTC) Subject: Re: [PATCH] ASoC: dapm: Revert "use component prefix when checking widget names" From: Richard Fitzgerald To: Mark Brown , Pierre-Louis Bossart CC: , , , , , Lucas Tanure References: <20210703125034.24655-1-rf@opensource.cirrus.com> <20210705165041.GC4574@sirena.org.uk> Message-ID: <1952b7f0-3c0a-faa4-8a1b-1a8bc4fff473@opensource.cirrus.com> Date: Fri, 23 Jul 2021 16:17:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: GII0KmB3bBEliG1p-TJYD1Y4RICA2hMu X-Proofpoint-ORIG-GUID: GII0KmB3bBEliG1p-TJYD1Y4RICA2hMu X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 phishscore=0 impostorscore=0 malwarescore=0 mlxlogscore=957 suspectscore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107230092 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/07/2021 10:55, Richard Fitzgerald wrote: > On 05/07/2021 17:50, Mark Brown wrote: >> On Sat, Jul 03, 2021 at 01:50:34PM +0100, Richard Fitzgerald wrote: >> >>> That commit breaks all users of the snd_soc_component_*_pin() functions >>> because it results in the prefix being added twice. It also breaks code >>> that correctly uses the snd_soc_dapm_*_pin() functions. >> >>> Use the snd_soc_component_*_pin() functions if you want the component >>> prefix to be prepended automatically. >> >>> Use the raw snd_soc_dapm_*_pin() functions if the caller has the full >>> name that should be matched exactly. >> >> I'm not sure the analysis of which function to use when is correct or >> what we want here (though it will work ATM), though looking again more >> closely at the patch it doesn't look entirely right either.? The way >> this used to be done, and the way that older code will most likely >> assume things work, was that the DAPM functions would first try to match >> on the local DAPM context before falling back to doing a global match. >> This is what the fallback loop is intended to do, and the dapm functions >> are passing the "search other contexts" flag into dapm_find_widget(). >> >> I'd not expect the distinction you seem to expect between component and >> DAPM and we probably have a bunch of older drivers that aren't working >> correctly like the Realtek driver mentioned in the original fix.? I >> think what needs to happen is that dapm_find_widget() needs to be >> checking both the prefixed and non-prefixed names, and that the >> component stuff shouldn't need to bother and just be a convenience >> wrapper for users that happene to have a component to hand. >> Alternatively we need to do an audit of all the non-machine drivers to >> switch them to use the component functions exclusively (and possibly >> some of the machine drivers as well), most of the CODEC users look to be >> a small number of Wolfson/Cirrus ones. >> > > I don't mind if someone wants to change the core dapm functions if that > is generally useful, providing that it also updates all callers of those > functions to still work. > > Changing the behaviour of core code to fix the Realtek driver without > updating other callers of those functions is a problem. Just to point out this is breaking stuff right now. It's not just theoretical.