Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp584158imm; Wed, 6 Jun 2018 02:36:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJo44VnEhUuZiCM/l+hF2Km4bSnAHU1Y8+qCquFAwHNmUhCp4S4M23RkK9fJNKUeTgHODDQ X-Received: by 2002:a62:a21b:: with SMTP id m27-v6mr1716160pff.248.1528277773307; Wed, 06 Jun 2018 02:36:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528277773; cv=none; d=google.com; s=arc-20160816; b=rBGhXZ6Q3cNBxDrBfBL/JqytvIP3IyEj2Z8Dbo4IJeBrQMi2T5pXaB63CmgLlFOz4X iVaeJRQkjG3eIXKEnt2YQJP+qWA2+CoJQZdBVhYG2UNh4ofpJNoSX0nPm9ZjVifX3sZu a/zjL1pC6fPC8hzg5PO5jICAsgyj2MlHqWvVLk4TCgc8kZFFN2JsvWm6BeYMaeMCs4pm quc6p8tPyPJIqLK97lsfyFLl2X/7VeWTex9iSIEGX5CBVVKCvw3YIlrg7ySUO6r3DLxZ qwcc+P1Jl3ePpEdgC2ky+SJF0oV1y05e8qYla61dymZvQsYPt+NKNGCsYKsDg+Z/j21r zrFw== 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:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=ccXfd0NEx3FvgpWT+D+ALpia8DbbqYAOJi64UHJ+XvQ=; b=Vw8c/d7903FcP/IvHKVh9CqOaTIXfm6A5ZBJoBSPn2F3VKf3jU6Tyqiy5i5/oj29zP Zok9GPKPokah77Vm+4JzcYpRUOGx1zgrdGHLkKPIfMgDxErRnh4BbH2ejK2sz60HCDH4 4n2FY2I4p65DnUlNabgeb9aQRs6jKgoquOtBa76zWxPuhpF9962jnSjU1YMH1ktxxHWo PEn2/sv8EPcqSUvt18KrqkxnlyDa7GZ+FawVyPJpOXw041sEI7fttv8yBK+tYX0KLgmU 3bHn1djuTW+H4wzutyxV7UyxfrRw74PBqHZh0V+tqgvMe5UDnWPVugZhtgg4UjfB8Cow EVDw== 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 t13-v6si27812903pgs.242.2018.06.06.02.35.59; Wed, 06 Jun 2018 02:36:13 -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 S932472AbeFFJe0 (ORCPT + 99 others); Wed, 6 Jun 2018 05:34:26 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:43694 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932381AbeFFJeY (ORCPT ); Wed, 6 Jun 2018 05:34:24 -0400 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w569SSSi015429; Wed, 6 Jun 2018 11:31:52 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2jd6h7nm4k-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 06 Jun 2018 11:31:52 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7EFB134; Wed, 6 Jun 2018 09:31:47 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag3node1.st.com [10.75.127.7]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0A5BE258D; Wed, 6 Jun 2018 09:31:47 +0000 (GMT) Received: from [10.201.23.162] (10.75.127.51) by SFHDAG3NODE1.st.com (10.75.127.7) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 6 Jun 2018 11:31:45 +0200 Subject: Re: [alsa-devel] [PATCH 0/3] ASoC: stm32: sai: add support of iec958 controls To: Takashi Iwai 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" References: <1520958428-10930-1-git-send-email-olivier.moysan@st.com> <20180417111733.GG8973@sirena.org.uk> <2ae6c5b6-872a-9aaa-6ca4-e29adb7c8bc0@st.com> From: Arnaud Pouliquen Openpgp: preference=signencrypt Autocrypt: addr=arnaud.pouliquen@st.com; prefer-encrypt=mutual; keydata= xsFNBFZu+HIBEAC/bt4pnj18oKkUw40q1IXSPeDFOuuznWgFbjFS6Mrb8axwtnxeYicv0WAL rWhlhQ6W2TfKDJtkDygkfaZw7Nlsj57zXrzjVXuy4Vkezxtg7kvSLYItQAE8YFSOrBTL58Yd d5cAFz/9WbWGRf0o9MxFavvGQ9zkfHVd+Ytw6dJNP4DUys9260BoxKZZMaevxobh5Hnram6M gVBYGMuJf5tmkXD/FhxjWEZ5q8pCfqZTlN9IZn7S8d0tyFL7+nkeYldA2DdVplfXXieEEURQ aBjcZ7ZTrzu1X/1RrH1tIQE7dclxk5pr2xY8osNePmxSoi+4DJzpZeQ32U4wAyZ8Hs0i50rS Vx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Xy3cTKrEY9H5PC+DRJ1j3nbodC3o6 peWAlfCXVtErSQ17QzNydFDOysL1GIVn0+XY7X4Bq+KpVmhQOloEX5/At4FlhOpsv9AQ30rZ 3F5lo6FG1EqLIvg4FnMJldDmszZRv0bR0RM9Ag71J9bgwHEn8uS2vafuL1hOazZ0eAo7Oyup 2VNRC7Inbc+irY1qXSjmq3ZrD3SSZVa+LhYfijFYuEgKjs4s+Dvk/xVL0JYWbKkpGWRz5M82 Pj7co6u8pTEReGBYSVUBHx7GF1e3L/IMZZMquggEsixD8CYMOzahCEZ7UUwD5LKxRfmBWBgK 36tfTyducLyZtGB3mbJYfWeI7aiFgYsd5ehov6OIBlOz5iOshd97+wbbmziYEp6jWMIMX+Em zqSvS5ETZydayO5JBbw7fFBd1nGVYk1WL6Ll72g+iEnqgIckMtxey1TgfT7GhPkR7hl54ZAe 8mOik8I/F6EW8XyQAA2P Message-ID: Date: Wed, 6 Jun 2018 11:31:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG5NODE2.st.com (10.75.127.14) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-06_03:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/05/2018 08:29 PM, Takashi Iwai wrote: > 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. Sorry i can't figure out your point. I suppose that you speak about the snd_pcm_iec958_params. what would be a more conventional API? > > Moreover, this is only for your driver, ATM.  It is also compatible with the sound/sti driver, even if we does not propose patch yet. We also plan to propose an implementation, for the HDMI_codec that would need to export a control to allow none-audio mode. >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.  it is linked to the control, as not possible in existing implementation (rate and width are get from hwparam or runtime). But no problem we can split it in a separate patch. Also, the new function doesn't create the > "XXX Mask" controls.  And the byte comparison should be replaced with > memcmp(), etc, etc. Yes mask are missing, can be added. For the rest could you comment directly in code? i suppose that you want to replace the for loops by memcmp, memcpy... > > 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. Not simple to clean up the other drivers as this control is a PCM control, that is mainly implemented as a mixer or card control. This means that it should be registered on the pcm_new in CPU DAI or in the DAI codec, to be able to bind it to the PCM device. Inpact is not straigthforward as this could generate regression on driver. For now We can add the clean up on the sti driver based on this helper, and we are working on the HDMI_codec, we could also use this helper to export the control.... So if you estimate that it is interesting to purchase on this helper we can try to come back with a patch set that implements the helper for the 3 drivers. The other option, is that we drop the helpers, and implement the control directly in our drivers. Please just tell us if we should continue to propose the helpers or not. Thanks, Arnaud > > > thanks, > > Takashi