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 5E778C433EF for ; Fri, 20 May 2022 08:08:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346804AbiETIIZ (ORCPT ); Fri, 20 May 2022 04:08:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235947AbiETIIT (ORCPT ); Fri, 20 May 2022 04:08:19 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A16488DDEA for ; Fri, 20 May 2022 01:08:18 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 57DAB21B90; Fri, 20 May 2022 08:08:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1653034097; 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=6aisJkQZmyWcJEYqaOIOicZJw3B1l30ihxIGmoJY4Yo=; b=xCkBp2WGW0DK9jDiTCoKo35Z1JeC3ANr8QlKto6Ea/VQl3T5Kcf+1jJeCY0906JTOqu2Mr QsxcCyBr/UvVxim1OwnhezDwOmt4KcX3JN/mwUbVbMxl5wT3TwJyAfduuxBDDe8Ikeo1Nt F3D10d1Til30mUop0ZF5Oc8/I+BtiTg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1653034097; 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=6aisJkQZmyWcJEYqaOIOicZJw3B1l30ihxIGmoJY4Yo=; b=RFDTc3FCID6ziAt/dntQrqJxWNTG5n29QEzx98MGavv6doCwmZm6VSmToVJyGz4WvJQTr8 7pcGfL0zdihXuHBA== Received: from valkyrie.site.suse.de (unknown [10.163.18.242]) by relay2.suse.de (Postfix) with ESMTP id 49F972C141; Fri, 20 May 2022 08:08:16 +0000 (UTC) Date: Fri, 20 May 2022 10:08:16 +0200 Message-ID: <87k0agr5hr.wl-tiwai@suse.de> From: Takashi Iwai To: Vitaly Rodionov Cc: Jaroslav Kysela , Takashi Iwai , Mark Brown , , , , Stefan Binding Subject: Re: [PATCH v3 16/17] ALSA: hda: cs35l41: Support Firmware switching and reloading In-Reply-To: <20220519174749.15459-17-vitalyr@opensource.cirrus.com> References: <20220519174749.15459-1-vitalyr@opensource.cirrus.com> <20220519174749.15459-17-vitalyr@opensource.cirrus.com> 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 Thu, 19 May 2022 19:47:48 +0200, Vitaly Rodionov wrote: > > From: Stefan Binding > > This is required to support CS35L41 calibration. > > By default, speaker protection firmware will be loaded, if > available. However, different firmware is required to run > the calibration sequence, so it is necessary to add support > to be able to unload, switch and reload firmware. > > This patch adds 2 ALSA Controls for each amp: > "DSP1 Firmware Load" > "DSP1 Firmware Type" > > "DSP1 Firmware Load" can be used to unload and > load the firmware. > "DSP1 Firmware Type" can be used to switch the > target firmware to be loaded by "DSP1 Firmware Load" Hmm. This essentially means that you can execute the firmware load and the whole DSP init / removal just by changing this control element value, right? The end-effect is too strong, IMO. The control element is available to all users who can access the sound device, and any malicious program may change it randomly thousands times per second. That is, it can easily lead to some weird issue, I'm afraid. thanks, Takashi