Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2049392ybg; Thu, 30 Jul 2020 09:08:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNvzsvQT1lMvWDHS7aNuRXKJV4ddecww1L1wCrDMQ1lLo7/rVjGlpS2Bl1Ets+Y2993KDM X-Received: by 2002:a50:fd8d:: with SMTP id o13mr3435556edt.313.1596125281744; Thu, 30 Jul 2020 09:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596125281; cv=none; d=google.com; s=arc-20160816; b=k0QqR4r0LDIoUneeCjUhltRl1ju2lUY+MuqHEZtXAnfMjx/cj8ugFHuUYB8bdfTv7I 5P6tRavF4VYSNRDOoXZnUPyyr+Hi07cZM6pWDUgdQl/SQUmhpXeqibJY3UBUA6MuHr09 DQ73E8ApXYvfh8aznaDRqD201Q/5KT7l9dSiyqMeGed9NPI86JzeIW4J8peCrqhNY0LY OIk3tBIRQy52i8G24oyziNLt2W0cPv02f45hh5YSGkHGaBIN6P6/8RAEr7ucueMOzR8H 1zn1BQO/XFisneWXrC4sw0bQu8qFlmg0Tdo3gJi1fIlm0buf9CVNA6GEUoBX+8GofTGo kujQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=ebBWEck5HMPDyjfgUFgiEIHagBpcZwPpYXX76/zqY0I=; b=t4BB3QPqyKtK3ZQ+X+SHbLstQUhV077BF8URaOsIKgFnVc0BUcDVsyNZrga5hkeO3D /+A3wkbVWFYdAlFI2Sut3RkXIVJrBGHWqfLVOqezIsEPDiK5/R3otNjqTL35MNDLkrgf g+0VPkTTgOseT1ce+BbLhCpUMIP8NLUfe1NSJkss7a7Yh8unYJMJ6hW9ICKnljQAy7pL Hc+sRKWZDuTMJKCXeQViwIkAS9fGywgcE4EoLWXiOmfkXKESpgY7zFv4/0eauJW3skzr H6FjP78lJVLzd86PNNiCu1951aDtWoxTaD0BJr0kn5D/dRcnY+8f63OoPPgy8I17Ur10 xrWg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y26si3569394edr.390.2020.07.30.09.07.39; Thu, 30 Jul 2020 09:08:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729761AbgG3QGp (ORCPT + 99 others); Thu, 30 Jul 2020 12:06:45 -0400 Received: from mga17.intel.com ([192.55.52.151]:40777 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729091AbgG3QGo (ORCPT ); Thu, 30 Jul 2020 12:06:44 -0400 IronPort-SDR: HIB19okkwdv0B++yF+hBK/S8PzwWnQwWp/VL4KMkkpLe4XOSmh30ic9BQPgkvQrgwZ5+6lfQaR Y836zFFNgyzQ== X-IronPort-AV: E=McAfee;i="6000,8403,9698"; a="131696622" X-IronPort-AV: E=Sophos;i="5.75,415,1589266800"; d="scan'208";a="131696622" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2020 09:06:27 -0700 IronPort-SDR: ejShz7BMEPqgf95S0ALom3X9wqT/C/PZYI1PT1rAVp8F+2RgVitq7bjfhUSjl7ou61cA1T0jin 8WcinSlwiMvQ== X-IronPort-AV: E=Sophos;i="5.75,415,1589266800"; d="scan'208";a="465308149" Received: from jrwang2-mobl.amr.corp.intel.com (HELO [10.212.82.25]) ([10.212.82.25]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2020 09:06:25 -0700 Subject: Re: [PATCH] ASoC: core: restore dpcm flags semantics To: Jerome Brunet , Mark Brown , Liam Girdwood Cc: alsa-devel@alsa-project.org, Stephan Gerhold , Kevin Hilman , linux-kernel@vger.kernel.org, zhangn1985@outlook.com, linux-amlogic@lists.infradead.org References: <20200723180533.220312-1-pierre-louis.bossart@linux.intel.com> <20200729154639.1983854-1-jbrunet@baylibre.com> <2ad13f95-434d-376a-bc38-b209623b461e@linux.intel.com> <1jft998jbe.fsf@starbuckisacylon.baylibre.com> From: Pierre-Louis Bossart Message-ID: <936d6e37-0ad0-b0d7-814a-1ace12087746@linux.intel.com> Date: Thu, 30 Jul 2020 11:06:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <1jft998jbe.fsf@starbuckisacylon.baylibre.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/20 4:04 AM, Jerome Brunet wrote: > > On Wed 29 Jul 2020 at 17:56, Pierre-Louis Bossart wrote: > >> On 7/29/20 10:46 AM, Jerome Brunet wrote: >>> commit b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks') >>> changed dpcm_playback and dpcm_capture semantic by throwing an error if >>> these flags are not aligned with DAIs capabilities on the link. >>> >>> The former semantic did not force the flags and DAI caps to be aligned. >>> The flag previously allowed card drivers to disable a stream direction on >>> a link (whether or not such feature is deemed useful). >>> >>> With change ('ASoC: core: use less strict tests for dailink capabilities') >>> an error is thrown if the flags and and the DAI caps are not aligned. Those >>> parameters were not meant to aligned initially. No technical reason was >>> given about why cards should now be considered "broken" in such condition >>> is not met, or why it should be considered to be an improvement to enforce >>> that. >>> >>> Forcing the flags to be aligned with DAI caps just make the information >>> the flag carry redundant with DAI caps, breaking a few cards along the way. >>> >>> This change drops the added error conditions and restore the initial flag >>> semantics. >> >> or rather lack thereof. > > Again, why ? All there is so far is your personal preference. no facts. What would be the meaning/purpose of a dailink with .dpcm_capture set, with only dais that support playback only? What would be the meaning/purpose of a dailink with .capture_only set, but with a dai that supports playback? What happens if none of these flags are set? What happens when all these flags are set? No one seems to know, so my suggestion is to align first on consistent configurations, then see what can be removed. > * What we had gave capabilities to the link, independent of the DAI > components. ASoC just computes the intersection of all that to > determine which direction needs to be enabled. Seems rather simple > and straight forward. that's what my last patch did, and when there is no intersection it complains. Please clarify what you expect when there is no overlap between dai and dailink capabilities. Keep in mind that we have a mix of hard-codec configuration and DT-created ones, your case is not the general one. > * It worked for every user of DPCM so a far. Not completely true, when Morimoto-san added snd_soc_dai_stream_valid() it exposed tons of cases where the information on direction was not provided in a reliable at the DAI level. I will assert that we are still finding out cases with broken DAI configurations, and as a result we will also find broken dailink configurations. Your picture of DPCM as a perfectly functional system that I broke is a distortion of reality. The reality is that we have to work in steps, first make sure all DAIs are properly described, then work on the dailinks and optimize at a later point. we will need warnings to find out what the problem cases are, and move slowly.