Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1328810rdb; Wed, 6 Dec 2023 16:00:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFgW5PbUgFVVV6oj+HvswbXETLIH+IsW5Lw6+ZJTnHAgs+k7A4pp9TIX2VjhvmlDyvPd3mk X-Received: by 2002:aca:1b10:0:b0:3b8:4585:b39b with SMTP id b16-20020aca1b10000000b003b84585b39bmr1644118oib.5.1701907222241; Wed, 06 Dec 2023 16:00:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907222; cv=none; d=google.com; s=arc-20160816; b=lDG9duzYkF2csP535a8A72zmvYhUuNL36q0XAl3yLqrck/gJxc9heXozODvEmkooBU AYMx+RSqOyjhoVUptBJwx0x9gGR6moWtMPyXE7QEDGH1dYiTUbI2QKdeBbCSdosIkzrL mM25/CflEoL5j6s3mE+UqMISCxKmunUtBoXNxf8wrXEd7CoslitnMqRTrEmXZNfoWWXD uhmuExisAVWJ7Cv3j7AKZBI/sBuk0fppJ+73EmjIAjrJktRkKYYXWYwJ5THb++4hyC+9 RIlqSAvXk7ZyhB6J+JI1iymCMou7MazJTSyvYrUDQMBtiK6gs43sVolXnUKT35imtCUU ImEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=RY6alORs8d8ayRt3d8Y6CgPxn1DRzS+XEMvpbm5vyXI=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=aKCjEkqHJHudfUZfIn1Ql7IHRHRSjs0WskpnggUJbEVJjkZr5GX9ovSn7yj/zRG6BI VbFr0SBRrPlGWgvSiNEMNyHXyjbeVyv/N0qN9zQLpmyyRbToz0MsqBfD/oPuX7xOvMby OcJRm3wz5cHMvQxcCcE/LagJ/lFKIfhCT4qJpR4JaiNEHi7pHbtd1DTAC4X2n785zG+0 ZVyC2TBCtaK4mGrPkF/9R0W2ba6FlbjpmyV/RnlZuqSNYRJz4G6VODbzOaNNP6bbmX/U MbJAjZ7iExGq1tre1zfe8TXrrHR4T9yuv0L2gW0C4z6oG2sG2qJlvRuMLj/lDDvh4kq5 h1dw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id j8-20020a63ec08000000b005c603f06562si103352pgh.333.2023.12.06.16.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:00:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B11B280D44C7; Wed, 6 Dec 2023 16:00:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232338AbjLGAAE (ORCPT + 99 others); Wed, 6 Dec 2023 19:00:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231135AbjLFX77 (ORCPT ); Wed, 6 Dec 2023 18:59:59 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 735861A5 for ; Wed, 6 Dec 2023 16:00:05 -0800 (PST) Received: from fedori.lan (51b690cd.dsl.pool.telekom.hu [::ffff:81.182.144.205]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 00000000000716BB.0000000065710B01.00118FFE; Thu, 07 Dec 2023 01:00:01 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles Subject: [PATCH 00/16] ALSA: hda/tas2781: Add tas2563 support Date: Thu, 7 Dec 2023 00:59:41 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 16:00:16 -0800 (PST) The tas2781-hda driver can be modified to support tas2563 as well. Before knowing this information, I created another series for a new driver. https://lore.kernel.org/lkml/cover.1701733441.git.soyer@irl.hu/ This series now extends tas2781-hda, addresses differences and fixes various bugs. The tas2563 is a smart amplifier. Similar to tas2562 but with DSP. Some Lenovo laptops have it to drive the bass speakers. By default, it is in software shutdown state. To make the DSP work it needs a firmware and some calibration data. The latter can be read from the EFI in Lenovo laptops. For the correct configuration it needs additional register data. It captured after running the Windows driver. The firmware can be extracted as TAS2563Firmware.bin from the Windows driver with innoextract. https://download.lenovo.com/consumer/mobiles/h5yd037fbfyy7kd0.exe The driver will search for it as TAS2XXX3870.bin with the 14ARB7. The captured registers extracted with TI's regtool: https://github.com/soyersoyer/tas2563rca/raw/main/INT8866RCA2.bin Gergo Koteles (16): ASoC: tas2781: add support for fw version 0x0503 ALSA: hda/tas2781: leave hda_component in usable state ASoC: tas2781: disable regmap regcache ALSA: hda/tas2781: handle missing calibration data ALSA: hda/tas2781: fix typos in comment ASoC: tas2781: add ptrs to calibration functions ALSA: hda/tas2781: load_calibration just load ASoC: tas2781: add configurable global_addr ALSA: hda/tas2781: add TAS2563 support for 14ARB7 ASoC: tas2781: check negative indexes ASoC: tas2781: use 0 as default prog/conf index ASoC: tas2781: move set_drv_data outside tasdevice_init ALSA: hda/tas2781: remove sound controls in unbind ALSA: hda/tas2781: call cleaner functions only once ALSA: hda/tas2781: reset the amp before component_add ALSA: hda/tas2781: configure the amp after firmware load include/sound/tas2781.h | 8 + sound/pci/hda/tas2781_hda_i2c.c | 364 +++++++++++++++++++----------- sound/soc/codecs/tas2781-comlib.c | 23 +- sound/soc/codecs/tas2781-fmwlib.c | 11 +- sound/soc/codecs/tas2781-i2c.c | 2 + 5 files changed, 270 insertions(+), 138 deletions(-) base-commit: ffc253263a1375a65fa6c9f62a893e9767fbebfa -- 2.43.0