From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752657AbdBCH3m (ORCPT ); Fri, 3 Feb 2017 02:29:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:33829 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbdBCH3l (ORCPT ); Fri, 3 Feb 2017 02:29:41 -0500 Date: Fri, 03 Feb 2017 08:29:38 +0100 Message-ID: From: Takashi Iwai To: "Satendra Singh Thakur" Cc: , , , , , Subject: Re: [RFC v2] [ALSA][CONTROL] 1. Added 2 ioctls for reading/writing values of multiple controls in one go (at once) 2. Restructured the code for read/write of a single control In-Reply-To: <1486099688-8057-1-git-send-email-satendra.t@samsung.com> References: <1486099688-8057-1-git-send-email-satendra.t@samsung.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.1 (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=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 03 Feb 2017 06:28:08 +0100, Satendra Singh Thakur wrote: > > From: satendra singh thakur > > 1.Added 2 ioctls in alsa driver's control interface > -Added an ioctl to read values of multiple elements at once > -Added an ioctl to write values of multiple elements at once > -In the absence of above ioctls user needs to call N ioctls to > read/write value of N elements which requires N context switches > -Proposed ioctls will allow accessing N elements' values in a single > context switch > -Above mentioned ioctl will be useful for alsa utils such as amixer > which reads all controls of given sound card > 2. Restructured/Combined two functions snd_ctl_elem_read_user and > snd_ctl_elem_write_user into a single function snd_ctl_elem_rw_user > -These functions were having most of the code which was similar > to each other > -Thus, there was redundant/duplicate code which was removed > and a single function was formed/defined. > -Removed functions snd_ctl_elem_read_user and snd_ctl_elem_write_user > having redundant/duplicate code > 3. This is version 2 of RFC, here we combine previous 2 patches > submitted yesterday (02-Feb) with prefix [RFC] [ALSA][CONTROL] > -Fixed doxygen comments related warnings > -Fixed stack frame related warning > > Signed-off-by: Satendra Singh Thakur Thanks for the patch. But, could you answer to the question Clemens posted for v1 patch? Namely, do N-times context switching really matter? Does it give the severe performance issue? If we have a measured number, this thing is worth to consider. OTOH, without the actual measurement but "just because it must be better", it's no good reason for adding a new API/ABI. thanks, Takashi