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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86ECCC433EF for ; Fri, 20 May 2022 07:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346667AbiETHzS (ORCPT ); Fri, 20 May 2022 03:55:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241980AbiETHzQ (ORCPT ); Fri, 20 May 2022 03:55:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D32B14A26A for ; Fri, 20 May 2022 00:55:15 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id ED2461F9A2; Fri, 20 May 2022 07:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1653033313; 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=1e0cBZJ+4c9MhkTY/RLvyFL4APFdawq6AOt2sFnrDHQ=; b=m0pD9hTCZsIiQULBDWo3pYq4wC6qo9ZbmEPr8o4k+XM5RRZo19BdHgi6/5t3LpEopb4Vrv +swlm9nFKSgLNNHb8Sk5y1wVWPTzj8ACs+cwkQEIXh1U1xetXOoDk130BC+UoAN16zJjiF 2uTnUDQQF8wVSrh3AorKye7sE91bgjQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1653033313; 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=1e0cBZJ+4c9MhkTY/RLvyFL4APFdawq6AOt2sFnrDHQ=; b=u6MaCjnY2DHQQdwG9CK4vkVsjJyXpqGl5gzaX1RMeE1MhIItLl6rFaPWYuhycLgbtDVRIZ zf1wokZNR0yyvYCg== Received: from valkyrie.site.suse.de (unknown [10.163.18.242]) by relay2.suse.de (Postfix) with ESMTP id C66902C141; Fri, 20 May 2022 07:55:13 +0000 (UTC) Date: Fri, 20 May 2022 09:55:13 +0200 Message-ID: <87o7zsr63i.wl-tiwai@suse.de> From: Takashi Iwai To: Vitaly Rodionov Cc: Jaroslav Kysela , Takashi Iwai , Mark Brown , , , , Stefan Binding Subject: Re: [PATCH v3 01/17] ALSA: hda: hda_cs_dsp_ctl: Add Library to support CS_DSP ALSA controls In-Reply-To: <87pmk8r6bl.wl-tiwai@suse.de> References: <20220519174749.15459-1-vitalyr@opensource.cirrus.com> <20220519174749.15459-2-vitalyr@opensource.cirrus.com> <87pmk8r6bl.wl-tiwai@suse.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.8 Emacs/27 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 May 2022 09:50:22 +0200, Takashi Iwai wrote: > > On Thu, 19 May 2022 19:47:33 +0200, > Vitaly Rodionov wrote: > On Thu, 19 May 2022 19:47:33 +0200, > Vitaly Rodionov wrote: > > > > From: Stefan Binding > > > > The cs35l41 part contains a DSP which is able to run firmware. > > The cs_dsp library can be used to control the DSP. > > These controls can be exposed to userspace using ALSA controls. > > This library adds apis to be able to interface between > > cs_dsp and hda drivers and expose the relevant controls as > > ALSA controls. > > > > The apis to add and remove the controls start new threads when > > adding/removing controls since it is possible that setting an ALSA > > control would end up calling this api, which would then deadlock. > > Well, I still don't understand why the addition/deletion itself has to > be in a work. As far as I see, it's simple calls of snd_ctl_add() and > snd_ctl_remove_id(). > > And, if the problem is that you're calling snd_ctl_add() from another > control callback, it's rather the problem of the caller's side, not > here. IOW, the async implementation should be rather in the caller > side. Also, the description about the newly added controls is missing. It looks like a really special (non-standard) control that uses TLV for other purposes, and this must be mentioned somewhere. And, I wonder what happens with alsactl store/restore with those controls. Are TLV contents properly parsed there? thanks, Takashi