Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1259659imm; Tue, 5 Jun 2018 11:31:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKzskSFGChLAMsgm+BmZcjIypCCLdVH/gNP7FC6zMArAWPZQLG10mO2/L8kLgoph8Hig5iW X-Received: by 2002:a17:902:a703:: with SMTP id w3-v6mr28308351plq.111.1528223507090; Tue, 05 Jun 2018 11:31:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528223507; cv=none; d=google.com; s=arc-20160816; b=ZisBgZdilnMX9FxByyTac18GJ1RHf/liMi/K2aFctAAFgE0e00v1AL+BqhczQrM4iY bCBgElECmuwzU0QRdYNL6PFRQKmP9vqkbsGT1F8qNhp0QwuqNyO8YOwwwq9zhbWzVSsm 4aOpkNijXcyTlQKFzJPdm86vIpNoxl4t/UCGtYj1bAKiBeF9EXk4+BDz4ozEDABiKA/o 7BZrLYXivn/TtWzBQn35G8iDl5d6MtAf5C0AbGPtRU/ua/xH71VokNySXAT39+VhfRH5 Hhps4fNc99A2gbk7xLstG+N6zIrrKGUO/p13+yBpkXnvt6UiNlx3LwRWjoq9DxeijF2U 1rog== 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:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:arc-authentication-results; bh=bwO572aYf5sFZULRgE7YfZmtf+rD+mm5f5bvxV2eO40=; b=UdVEXF0tosqGkpyLg1MYjGi2i7Rwb0yHvJ5qcRe5BHX/mL0BVOmss+OO3e5rvIaTxu JjfFuQTbWZ5eUGhpB4GC/Rz/xpcrpq0yPldA2faJcP6+gS61Vych00wYU+1FjrdoEr90 UoJX4p5/8OvogfepfvoIGvzTcW+qr/vmCVJAoL8IM5T7KH731NT2sy1fcMA7eUFjyzxf 8YsPmoula0k+uI9CnCOVv77n1sj5gMJ8KLrQHcxgf9vPrHEqoFzzs0r4p+A8dk4R/2sx 6gmu2Spajs5Bk5BVaPdV2BgHgP3HB2Q5LQuc4/rsZybTqbwPLRaXQjGPeqO24IT/X7Z6 kSNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c18-v6si20456906pgf.301.2018.06.05.11.31.33; Tue, 05 Jun 2018 11:31:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751950AbeFES3m (ORCPT + 99 others); Tue, 5 Jun 2018 14:29:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:38395 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbeFES3k (ORCPT ); Tue, 5 Jun 2018 14:29:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 70C1FAC12; Tue, 5 Jun 2018 18:29:38 +0000 (UTC) Date: Tue, 05 Jun 2018 20:29:37 +0200 Message-ID: From: Takashi Iwai To: "Arnaud Pouliquen" Cc: "Mark Brown" , "Olivier MOYSAN" , "alsa-devel@alsa-project.org" , "mark.rutland@arm.com" , "rmk@arm.linux.org.uk" , "lgirdwood@gmail.com" , "mcoquelin.stm32@gmail.com" , "robh@kernel.org" , "linux-arm-kernel@lists.infradead.org" , "Alexandre TORGUE" , "Benjamin GAIGNARD" , "kernel@stlinux.com" , "jsarha@ti.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [alsa-devel] [PATCH 0/3] ASoC: stm32: sai: add support of iec958 controls In-Reply-To: <2ae6c5b6-872a-9aaa-6ca4-e29adb7c8bc0@st.com> References: <1520958428-10930-1-git-send-email-olivier.moysan@st.com> <20180417111733.GG8973@sirena.org.uk> <2ae6c5b6-872a-9aaa-6ca4-e29adb7c8bc0@st.com> 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=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Jun 2018 17:50:57 +0200, Arnaud Pouliquen wrote: > > Hi Takashi, > > On 04/17/2018 01:17 PM, Mark Brown wrote: > > On Tue, Apr 17, 2018 at 08:29:17AM +0000, Olivier MOYSAN wrote: > > > >> I guess the blocking patch in this patchset is the patch "add IEC958 > >> channel status control helper". This patch has been reviewed several > >> times, but did not get a ack so far. > >> If you think these helpers will not be merged, I will reintegrate the > >> corresponding code in stm driver. > >> Please let me know, if I need to prepare a v2 without helpers, or if we > >> can go further in the review of iec helpers patch ? > > > > I don't mind either way but you're right here, I'm waiting for Takashi > > to review the first patch.  I'd probably be OK with it just integrated > > into the driver if we have to go that way though. > > Gentlemen reminder for this patch set. We would appreciate to have your > feedback on iec helper. > From our point of view it could be useful to have a generic management > of the iec controls based on helpers instead of redefining them in DAIs. > Having the same behavior for these controls could be useful to ensure > coherence of the control management used by application (for instance > Gstreamer uses it to determine iec raw mode capability for iec61937 streams) Oh sorry for the late reply, I've totally overlooked the thread. And, another sorry: the patchset doesn't look convincing enough to me. First off, the provided API definition appears somewhat unconventional, the mixture of the ops, the static data and the dynamic data. Moreover, this is only for your driver, ATM. If it were an API that does clean up the already existing usages, I'd happily apply it. There are lots of drivers creating and controlling the IEC958 ctls even now. Also, the patchset requires more fine-tuning, in anyways. The changes in create_iec958_consumre() are basically irrelevant, should be split off as an individual fix. Also, the new function doesn't create the "XXX Mask" controls. And the byte comparison should be replaced with memcmp(), etc, etc. So, please proceed rather with the open codes for now. If you can provide a patch that cleans up the *multiple* driver codes, again, I'll happily take it. But it can be done anytime later, too. thanks, Takashi