Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1319792lqo; Fri, 17 May 2024 20:36:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVzhLj+0KLCTsMfYy5kXUMxe9xwh3AOFtHYjOzXWdl9Lfi3UToTwd8aMeje6tglXqeXzlhTu8042EaG/h+b2sXiNiTEc5F0m3fCXET6Og== X-Google-Smtp-Source: AGHT+IEkxy/npxkAKU4RByYeJ87W5+EB+B0gGyXrA7cTHfKfLr4ScQcxaYXSmKwXZMtwmWrZVHIb X-Received: by 2002:ac2:5398:0:b0:523:54a2:3836 with SMTP id 2adb3069b0e04-52354a239d3mr10606907e87.33.1716003389965; Fri, 17 May 2024 20:36:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716003389; cv=pass; d=google.com; s=arc-20160816; b=GereRCbEiLdkXVmdebc/lXcvjbpBWkEVeVvhthDWdQog9kYFiNSoXCNzTww2/8sKAm W/05mSs4xIx7XIXpYNFoDx9nXG9Z9Rl+UF70MbR278rbHukV/viAeTVMQcdK1SCDLgFv 9lvqA2VMCmNW6puKZ+b5HqeZ4E83KdA9zvHq75sgnQJEhvcoIuqGbaSa4GyIUHZ/y8LW M6mSaUPeA8BJzn4RFzlO2xEhA7dZMDQTHlpRfriSH8QTcaDbTwEJ1R7zR2sAMBb+4hY/ 8QU5N6lBtrd/rVOnUfmdI8wXFBp8j/jg9F7ymFnqDvM4L1O7H3y3PaUwZ7XEFv6dm0wV 4v2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=aD9gzhys+SQu7Cf8GO3bNI4zQAxyzFqrA4h33Gc2N+0=; fh=LbI1/O6Q4yxzIQEU2CtdGTP2efrW4bEv3xF/AqZ/hf8=; b=DLnNcByq/PZrbPNcC+KbCPIVRdeupl/TTjfsyQoxh5x1njy+EmPJdSJDOka9YMJ5lF jL1FYXcx0fvuIUUc0wl6XcIZ9EbcY6Ou9XfnCwgdlFEbBjXpN9MD3f9CbQqKmJq9mOcH nLymIF5JEh6jdbQg764JHvc4BeocfhMycuqHLhYV9mssZ9a3K1we8nlo3VmfpFEBhifu SLjWKRAFkirB3ssHrx1T4bH1oS84ZyU5yj+EyPhyRiO4CcNKu6erXkZ6xeQrZd8JnE/v r+ZnYD0omPgshewA3LqJZFhTsYHl/Nj3Ebp65+r/jjBIWX76K1e9ZadhjVXqP7MxsN/q HRoQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="TAI54E/1"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-182766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5ced324683si248877366b.1016.2024.05.17.20.36.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 20:36:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="TAI54E/1"; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-182766-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 820C41F21E1F for ; Sat, 18 May 2024 03:36:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8ED526AA7; Sat, 18 May 2024 03:36:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="TAI54E/1" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96C811FBA for ; Sat, 18 May 2024 03:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716003381; cv=none; b=jVztz0DPZtRT8ST9vwUZOAqTxNojycl+fdz9i+qeSJLdnP6QXkCQCAwHB9jVRCTOdINyq0WFRdmKHpCZqjl8YW2pqaycbUZ5zUNC9cBgQxI0urNi2vlI/YecNoNuS8gxh/ggsyXtd29Mk+xoADHnMNV9Gatt4skCwg3VtjKXmYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716003381; c=relaxed/simple; bh=zQOI/zmzrQTsBpk04HK/DvBE+JoTssigUSzA84pspKY=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Glj6wR+xvrHLbRZTqfk3DkK1GG83zQqvZ9UZp07DLl/ykfdJu02rhGZrw86R//ZBHpUkqxfWKVfK96G9KykU1AbVj1O4hS+Q163YYrxozvJNlc9kC1Ue9htzIdKN8bcyJLJO+TF/JuuDOWzSDA/PffSTJlfjeN+nemI4JDMQBMM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=TAI54E/1; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44I3ZRpq016149; Fri, 17 May 2024 22:35:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716003327; bh=aD9gzhys+SQu7Cf8GO3bNI4zQAxyzFqrA4h33Gc2N+0=; h=From:To:CC:Subject:Date; b=TAI54E/1Tpyw6dQPCPjLLR60SVCUMd8g1T0lRce9sFIY0dIZ75XexRyqQaX/FTH31 68PHGr11lniv8DXnAJjLOF+eCKq1+Sqx5uVBEwrBPVv/qHBXEvSHytqxsxJ7+VsZrq 0CHlHrLEQfmUMRzNsVG6xdutdgd3SQ19NSKuKKNM= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44I3ZRUE004573 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 May 2024 22:35:27 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 17 May 2024 22:35:26 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 17 May 2024 22:35:26 -0500 Received: from LT5CG31242FY.dhcp.ti.com ([10.250.160.158]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44I3ZL6K084573; Fri, 17 May 2024 22:35:22 -0500 From: Shenghao Ding To: CC: , , , <13916275206@139.com>, , , , , , , , , Shenghao Ding Subject: [PATCH v1] ASoC: tas2552: Add TX path for capturing AUDIO-OUT data Date: Sat, 18 May 2024 11:35:15 +0800 Message-ID: <20240518033515.866-1-shenghao-ding@ti.com> X-Mailer: git-send-email 2.33.0.windows.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 TAS2552 is a Smartamp with I/V sense data, add TX path to support capturing I/V data. Fixes: 38803ce7b53b ("ASoC: codecs: tas*: merge .digital_mute() into .mute_stream()") Signed-off-by: Shenghao Ding --- v1: - Changed the copyright year to 2024 in the related files. - Add tx device in tas2552_dai. - Add Stream Domain Widgets for I/V capture - Add INPUT widget - Add I/V capture route --- sound/soc/codecs/tas2552.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 40f5f27e74c0..9fd3642b98b3 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -2,7 +2,8 @@ /* * tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier * - * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com + * Copyright (C) 2014 - 2024 Texas Instruments Incorporated - + * https://www.ti.com * * Author: Dan Murphy */ @@ -119,12 +120,14 @@ static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] = &tas2552_input_mux_control), SND_SOC_DAPM_AIF_IN("DAC IN", "DAC Playback", 0, SND_SOC_NOPM, 0, 0), + SND_SOC_DAPM_AIF_OUT("ASI OUT", "DAC Capture", 0, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_OUT_DRV("ClassD", TAS2552_CFG_2, 7, 0, NULL, 0), SND_SOC_DAPM_SUPPLY("PLL", TAS2552_CFG_2, 3, 0, NULL, 0), SND_SOC_DAPM_POST("Post Event", tas2552_post_event), - SND_SOC_DAPM_OUTPUT("OUT") + SND_SOC_DAPM_OUTPUT("OUT"), + SND_SOC_DAPM_INPUT("DMIC") }; static const struct snd_soc_dapm_route tas2552_audio_map[] = { @@ -134,6 +137,7 @@ static const struct snd_soc_dapm_route tas2552_audio_map[] = { {"ClassD", NULL, "Input selection"}, {"OUT", NULL, "ClassD"}, {"ClassD", NULL, "PLL"}, + {"ASI OUT", NULL, "DMIC"} }; #ifdef CONFIG_PM @@ -538,6 +542,13 @@ static struct snd_soc_dai_driver tas2552_dai[] = { .rates = SNDRV_PCM_RATE_8000_192000, .formats = TAS2552_FORMATS, }, + .capture = { + .stream_name = "Capture", + .channels_min = 2, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_192000, + .formats = TAS2552_FORMATS, + }, .ops = &tas2552_speaker_dai_ops, }, }; -- 2.34.1