From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vinod Koul Subject: Re: [PATCH v2 0/5] topology: Enhance support for private data Date: Tue, 19 Jul 2016 09:29:50 +0530 Message-ID: <20160719035950.GC9681@localhost> References: <578A2F73.8080508@sakamocchi.jp> <578C4352.1040804@linux.intel.com> <578C5057.7020708@sakamocchi.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id B557C265546 for ; Tue, 19 Jul 2016 05:52:37 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Lin, Mengdong" Cc: "alsa-devel@alsa-project.org" , Mengdong Lin , "tiwai@suse.de" , Takashi Sakamoto , "broonie@kernel.org" , "Girdwood, Liam R" , "Nc, Shreyas" List-Id: alsa-devel@alsa-project.org On Mon, Jul 18, 2016 at 03:06:24PM +0000, Lin, Mengdong wrote: > > > -----Original Message----- > > From: Takashi Sakamoto [mailto:o-takashi@sakamocchi.jp] > > Sent: Monday, July 18, 2016 11:43 AM > > > I know all of what you explained. Therefore, You misunderstand about my > > suggestion. > > > > What I suggested is to drop a support of SNDRV_CTL_ELEM_ACCESS_USER > > flag from current topology implementation in userspace library, because > > current implementation of ALSA SoC part doesn't support it. > > > > In ALSA SoC part, snd_ctl_new1() is called to add a control element set as a > > result of parsing binary blob generated by topology implementation. > > > > In snd_ctl_new1(), SNDRV_CTL_ELEM_ACCESS_USER flag is dropped, in these > > lines: > > http://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/core/c > > ontrol.c#n263 > > > > Totally, the flag cannot be supported by current implementation of topology > > in kernel. Thus, in userspace, we should drop this line to prevent users from > > confusions: > > http://git.alsa-project.org/?p=alsa-lib.git;a=blob;f=src/topology/ctl.c;h=b94 > > 8ac021ceecc116bc1087075743243e4b14055;hb=HEAD#l44 > > > > That's all what I mentioned. If something unclear, please tell it to me. > > Yes, you're right. snd_ctl_new1() dropped SNDRV_CTL_ELEM_ACCESS_USER flag. > I'll remove this from the topology user space tool to avoid confusion. Oh no, that won't be a good idea. We would like to specify the access for controls from topology. Some controls can be read only and some write only :) For example, any VU-meter controls should be read-only. Similarly if we have some user data being sent to some modules which can do do all fancy audio detection then these controls should be write-only. Yes it seems to be broken by this, but we should fix it rather than remove. -- ~Vinod