From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE23CC433EF for ; Thu, 2 Dec 2021 15:47:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE0BF2782; Thu, 2 Dec 2021 16:46:29 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE0BF2782 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1638460040; bh=EUeJI6dMwRnClkBvMiAzWK99HUkrl05V3r0TX/jpRAE=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=O1kUmNIMJf4Nbod5Bh0FiOxKqHfWi+OYlG7WXiFTpFuSBGONsE9jHdIkD+Iur1yuC uNuiJMzcY/9tbEkHK5UATv7FMdtek7dxFapsQiLGjZNSsJ/r8ebPLs9fOoIvj8o8nO ZVDlQh4la1sTI31Yxy9r2NUTcp0YOl5ln8g43C2E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8554CF80290; Thu, 2 Dec 2021 16:46:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 31838F802A0; Thu, 2 Dec 2021 16:46:28 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AAA67F800CE for ; Thu, 2 Dec 2021 16:46:16 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AAA67F800CE Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gytHnQHr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="hTU7K0Im" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id F28B31FD39; Thu, 2 Dec 2021 15:46:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1638459975; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bKhfppyvh/LcJ4q+Pty4DHkRYHKMaMrbzx0RY/Bb/Xw=; b=gytHnQHrEq+XxOueghJvvekK6D61ZyFQKdh9VoT+/PRhBPrnIFBm8dRom3HT7rWyojHtQl co3TZ0n2Ow6GnWltJpFAiCc3gotSs2Do0SYnzBUelQfKseDoN6vZY7eN2AWX3fBD1/lyR/ xT/TCE6QJTk6E8JPzZ4e9v9J8Nn+Yfs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1638459975; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bKhfppyvh/LcJ4q+Pty4DHkRYHKMaMrbzx0RY/Bb/Xw=; b=hTU7K0ImPcIVuGcbN8UT7Ls3krDkuwV95kyNP43qST9fAIBl44vk/CvwevBRLUZSSM973m g5PtTG8mH7LMtOBg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id E8DD6A3B8D; Thu, 2 Dec 2021 15:46:15 +0000 (UTC) Date: Thu, 02 Dec 2021 16:46:15 +0100 Message-ID: From: Takashi Iwai To: Alan Young Subject: Re: [PATCH] ALSA: ctl: Fix copy of updated id with element read/write In-Reply-To: <20211202150607.543389-1-consult.awy@gmail.com> References: <20211202150607.543389-1-consult.awy@gmail.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=US-ASCII Cc: alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, 02 Dec 2021 16:06:07 +0100, Alan Young wrote: > > When control_compat.c:copy_ctl_value_to_user() is used, by > ctl_elem_read_user() & ctl_elem_write_user(), it must also copy back the > snd_ctl_elem_id value that may have been updated (filled in) by the call > to snd_ctl_elem_read/snd_ctl_elem_write(). > > This matches the functionality provided by snd_ctl_elem_read_user() and > snd_ctl_elem_write_user(), via snd_ctl_build_ioff(). > > Without this, and without making additional calls to snd_ctl_info() > which are unnecessary when using the non-compat calls, a userspace > application will not know the numid value for the element and > consequently will not be able to use the poll/read interface on the > control file to determine which elements have updates. > > Signed-off-by: Alan Young Thanks, applied (with Cc to stable). Takashi