Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2061309rwl; Sun, 26 Mar 2023 15:05:57 -0700 (PDT) X-Google-Smtp-Source: AKy350abJCEoU8l9J1kvGU5kw6smyn61XFVmOvkIIul18cNYDtLZPDht2pr7yNjiuD2fFK2X9Edk X-Received: by 2002:a17:903:11cf:b0:1a2:1c7:1c38 with SMTP id q15-20020a17090311cf00b001a201c71c38mr11366063plh.54.1679868357281; Sun, 26 Mar 2023 15:05:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679868357; cv=none; d=google.com; s=arc-20160816; b=QRshcoPKc9nZabnq1os8G8Twqh7/kmJrxI5sd2hJjiiDBO9MpHGbEXyitm5KngB5J/ x8wh0G9Fj3L5iVlkvJ/CM1QmeUfYZGj/t7l5uxvG+VL70tG5oh9LWuwHxmjl5IFoRriR tEylzTqyotHaHzBWKt25DEaOPlmFc45nX0cJScAu9jY/8D9xGVzUsYS7GrxfWMg4m6n2 fvlgBHPd58TVrwwbmfkAy7ZCgc9oLS1ReWfiPo7sg/sthdXdREIuUH7Z9spgR15FDRo2 MaJBtDO4aimR+UHUtZu2KQCiMfUT6rucB+yeb+KvJUPGAPvbvu+A0bpiq18/oMUAu1Iz V7Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8jPnc/mNq3d+a+FglCHgJpNdOZEFwd7wj5X3i1Idl2k=; b=0pkwjOkJeLR/BwPqx2ZwzCncL0GyBJQN0HZ/KkSJBnMVU1ojvwyn2Nw/cbGvMJ4FKv Yy0P6Y8vIJN+1ztYonXxNmGETN1+rHznYTK/U2Ll0H1cVeMVJK5+i6tQyS9puAq4FmjE CJSN+e94JnKTWLObcQpZw/nkdM2RA4V9ievmxL5FRLQIuUGDT2r3f8Dw4LyUui8yjhFG AhssGrvmEbxlTlu0ZZGV3nu+OdSkCcCe2JekpL9Y6lMBtLsN1IP23CSQRMGBsyzN4Oi9 Rl+xhrdr4BKa7h9AOR88SnbZwqo16T1uEMyHqIH9g1fHFLStq7acOYqn/3QAutdpMO0S H8qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gn++6Zvn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s12-20020a170902ea0c00b001960fd737b6si5839600plg.330.2023.03.26.15.05.46; Sun, 26 Mar 2023 15:05:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gn++6Zvn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjCZVtL (ORCPT + 99 others); Sun, 26 Mar 2023 17:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjCZVtK (ORCPT ); Sun, 26 Mar 2023 17:49:10 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF9C659E2 for ; Sun, 26 Mar 2023 14:49:08 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id q27so4266108oiw.0 for ; Sun, 26 Mar 2023 14:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679867348; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=8jPnc/mNq3d+a+FglCHgJpNdOZEFwd7wj5X3i1Idl2k=; b=gn++6ZvnWydiyQDWYLM37Su6Y8V5AelENXkUd1zfa//HNth0qxGvJN+a89bYW+xj5L bfX2CxHvmPzI2zOwDeKc1dQM5IlRAAon4lh/hb/Ol5TRreXiVsnui+aobUeYC6VqO517 R0C1He49n7ubWTQdzZzzP7Lo9HxJdKUSAEOXvw07XY4a8aCwNWHi/BAhEJjNQL2YPpbB FbWmvqiwqBh5hvinVOXCzxhDYBLMRskPTfgw4JpblnaEZu6TvpDhjHUVz+dI+ZJbqGhW ebahe6bV++hj8P476NOp7FQVOZqLIpHK5KhfvjAf7wJMUnGXywtNPmPQi9Ez5sUugn1j WEqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679867348; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8jPnc/mNq3d+a+FglCHgJpNdOZEFwd7wj5X3i1Idl2k=; b=ZsquQTm/6qHawf6r1dIt9AiCSlJZlc6fgJ0Auz/tReNueYJSVK2WhepcjqkOeJWhOK L/Oa2BXBmPdzqdMKc7dovAbX/Sj53lpwIF9hAC6Ux0UlxyjVTb+ro+Zn9sbUcKzPkOMd EZRXPo9Wjf2hrGoFy/+qDrgAjPpOumigqBQ9HJPCc577WunlpTXLDpb5IMD6JfrKnd5C SDxMOMAy76ZHYZxgptJYtYOXPhHde57BXLE2XlmhMQ8CqeGxTamSH96DD4tux1i0Vn1l C+zw/AIRz8Xb95PRrpiTcgtsKGqlgeaGkSEKbd3YEWhAI/BKmqhyxbk1CvI37qQ3fJxI LGjQ== X-Gm-Message-State: AO0yUKX0amqskDLS93p4fnZ8+ChCBq40gDkN1ERl+nDQi03//5kzafs2 T1nQTP0gOJPownxi+AQQzTs= X-Received: by 2002:a05:6808:6190:b0:384:23da:6e73 with SMTP id dn16-20020a056808619000b0038423da6e73mr3879432oib.47.1679867348216; Sun, 26 Mar 2023 14:49:08 -0700 (PDT) Received: from geday ([2804:7f2:8002:df06:a135:1d39:bf0c:2898]) by smtp.gmail.com with ESMTPSA id bl31-20020a056808309f00b00384a45d3106sm10418910oib.58.2023.03.26.14.49.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 14:49:07 -0700 (PDT) Date: Sun, 26 Mar 2023 18:49:08 -0300 From: Geraldo Nascimento To: Shenghao Ding <13916275206@139.com> Cc: broonie@kernel.org, lgirdwood@gmail.com, perex@perex.cz, pierre-louis.bossart@linux.intel.com, kevin-lu@ti.com, shenghao-ding@ti.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, x1077012@ti.com, peeyush@ti.com, navada@ti.com Subject: Re: [PATCH v7] ASoC: tas2781: Add tas2781 driver Message-ID: References: <20230326143419.11711-1-13916275206@139.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230326143419.11711-1-13916275206@139.com> X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shenghao, On Sun, Mar 26, 2023 at 10:34:19PM +0800, Shenghao Ding wrote: > +config SND_SOC_TAS2781 > + tristate "Texas Instruments TAS2781 speaker amplifier" > + depends on I2C > + select REGMAP_I2C > + select CRC8 > + help > + Enable support for Texas Instruments TAS2781 Smart Amplifier > + Digital input mono Class-D and DSP-inside audio power amplifiers. > + Note the TAS2781 driver implements a flexible and configurable > + algo coff setting, for one, two, even multiple TAS2781 chips. You changed coff->coefficient below as suggested by Pierre-Louis Bossart but you forgot to change it here, and this will surely perplex people when configuring the kernel. > + > config SND_SOC_TAS5086 > tristate "Texas Instruments TAS5086 speaker amplifier" > depends on I2C > diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile > index f1ca18f7946c..5559b9e9cc17 100644 > --- a/sound/soc/codecs/Makefile > +++ b/sound/soc/codecs/Makefile > @@ -262,6 +262,7 @@ snd-soc-tas5805m-objs := tas5805m.o > snd-soc-tas6424-objs := tas6424.o > snd-soc-tda7419-objs := tda7419.o > snd-soc-tas2770-objs := tas2770.o > +snd-soc-tas2781-objs := tas2781-i2c.o tas2781-dsp.o > snd-soc-tfa9879-objs := tfa9879.o > snd-soc-tfa989x-objs := tfa989x.o > snd-soc-tlv320adc3xxx-objs := tlv320adc3xxx.o > @@ -619,6 +620,7 @@ obj-$(CONFIG_SND_SOC_TAS2552) += snd-soc-tas2552.o > obj-$(CONFIG_SND_SOC_TAS2562) += snd-soc-tas2562.o > obj-$(CONFIG_SND_SOC_TAS2764) += snd-soc-tas2764.o > obj-$(CONFIG_SND_SOC_TAS2780) += snd-soc-tas2780.o > +obj-$(CONFIG_SND_SOC_TAS2781) += snd-soc-tas2781.o > obj-$(CONFIG_SND_SOC_TAS5086) += snd-soc-tas5086.o > obj-$(CONFIG_SND_SOC_TAS571X) += snd-soc-tas571x.o > obj-$(CONFIG_SND_SOC_TAS5720) += snd-soc-tas5720.o > diff --git a/sound/soc/codecs/tas2781-dsp.c b/sound/soc/codecs/tas2781-dsp.c > new file mode 100644 > index 000000000000..6a0e9fb5e20f > --- /dev/null > +++ b/sound/soc/codecs/tas2781-dsp.c > @@ -0,0 +1,2232 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// > +// ALSA SoC Texas Instruments TAS2781 Audio Smart Amplifier > +// > +// Copyright (C) 2022 - 2023 Texas Instruments Incorporated > +// https://www.ti.com > +// > +// The TAS2781 driver implements a flexible and configurable > +// algo coefficient setting for one, two, or even multiple > +// TAS2781 chips. Here it is OK. Thanks, Geraldo Nascimento