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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11C64C5DF61 for ; Thu, 7 Nov 2019 08:06:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D51AB206DF for ; Thu, 7 Nov 2019 08:06:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbfKGIG2 (ORCPT ); Thu, 7 Nov 2019 03:06:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:33676 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726791AbfKGIG2 (ORCPT ); Thu, 7 Nov 2019 03:06:28 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id D9519AE46; Thu, 7 Nov 2019 08:06:26 +0000 (UTC) Date: Thu, 07 Nov 2019 09:06:26 +0100 Message-ID: From: Takashi Iwai To: Andrew Gabbasov Cc: , , "Jaroslav Kysela" , Takashi Iwai , Timo Wischer Subject: Re: [PATCH v2 8/8] ALSA: aloop: Support runtime change of snd_timer via info interface In-Reply-To: <20191105143218.5948-9-andrew_gabbasov@mentor.com> References: <20191105143218.5948-1-andrew_gabbasov@mentor.com> <20191105143218.5948-2-andrew_gabbasov@mentor.com> <20191105143218.5948-3-andrew_gabbasov@mentor.com> <20191105143218.5948-4-andrew_gabbasov@mentor.com> <20191105143218.5948-5-andrew_gabbasov@mentor.com> <20191105143218.5948-6-andrew_gabbasov@mentor.com> <20191105143218.5948-7-andrew_gabbasov@mentor.com> <20191105143218.5948-8-andrew_gabbasov@mentor.com> <20191105143218.5948-9-andrew_gabbasov@mentor.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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 05 Nov 2019 15:32:18 +0100, Andrew Gabbasov wrote: > > Show and change sound card timer source with read-write info > file in proc filesystem. Initial string can still be set as > module parameter. > > The timer source string value can be changed at any time, > but it is latched by PCM substream open callback (the first one > for a particular cable). At this point it is actually used, that > is the string is parsed, and the timer is looked up and opened. > > The timer source is set for a loopback card (the same as initial > setting by module parameter), but every cable uses the value, > current at the moment of open. > > Setting the value to empty string switches the timer to jiffies. > > Signed-off-by: Andrew Gabbasov Unfortunately the whole code here are racy. It may lead to a crash or use-after-free easily. Some locking is needed definitely. thanks, Takashi