From patchwork Mon Jul 27 14:58:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11687027 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0ADA6138C for ; Mon, 27 Jul 2020 15:03:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9339A206E7 for ; Mon, 27 Jul 2020 15:03:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ma2UtLqP"; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="twrtw3gi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9339A206E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 154C216A6; Mon, 27 Jul 2020 17:03:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 154C216A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595862227; bh=rA3Bzxer0lVR73NrgUjMWUxrv7U9bxXd7mAd26yx7fU=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Ma2UtLqPb1V2Ag+jLbG+9+bTJlnB24gePqXI68j6OqHX7nZ7bMsyrfgWnIC+kemS1 l4UXtNbiJycM4rRDBwW10PJyyxP4rlkoWCSIKVuoq5SJfOmkekL5zsxplRm2F56a5n 7qHWr4fKhrV7yGaWc/npa/bDderTU9aP5stdCifY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6288CF801F7; Mon, 27 Jul 2020 17:02:11 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0FBCCF80171; Mon, 27 Jul 2020 17:02:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FORGED_SPF_HELO,KHOP_HELO_FCRDNS,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2081.outbound.protection.outlook.com [40.107.244.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CC3FBF800AD for ; Mon, 27 Jul 2020 17:01:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC3FBF800AD Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="twrtw3gi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UZ5DrJE+FgebZ42XhzJbHHwzmI+UTINNLns2+vAn01Cz4EgeNJ3iDcLO5JrvKxe8q1Dv99WcqKa1kR0aGAFMM9Jxled6/uSAy7ULoD7mRGlV2Ae5Zo+5+iWdc4Net1dqMy7MC8buMQ5/30/pMdwbRvCdDCBu2Ss5ltcM4zHDk1MWO+YimMDMO3plGYnMS7FCS2dzhBxLJjC9d9xFdd/989+63S4kjcmJ0OhRhXpZkCOD+j3lEIRySqfrdXRAOy7N16cFXu7CtcCUtFyt2ZjyijkSqFF/277VpJXkk7MURWN6NgfaQVUlwGm+7WnkEdSPB96SYtCwE3sAs7sNO26FGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c+Bq6dBJaEwdEvTToJIyqtBNqxHpOJm5uLebIh7lLYw=; b=oUs5uZikQorcmAQLB382lxyknWlsxIAvrve/UgP2+ibG4alPgWPWiAq6D6oy9g67kJURkw2fRdMzkqD1zuRegDBRsMPcCWXHXhAAnlrSpeMGCpdp8tArCSAmK6Gf68NT6uoVDpulsnq55aj5IFCFXBGi6wiYkTxsqjl8in+pa2rD5j9jBbEDMPpeQIR5OMVTyzCreY0IwvJVaP7SMZfFkPd4CTTD092g8Vzz6eYebezmqK+Q+Of2i41b8ci62FLGw1n0jx92OdBsO7CXV7zkUO1H3yCAy5ENollagXDvrg8bnevltTBPA5OQt2vFaV6qtfynGc7VfDdc12scYeJqkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c+Bq6dBJaEwdEvTToJIyqtBNqxHpOJm5uLebIh7lLYw=; b=twrtw3gieS1FXaQn6lGpZFr6SdMMcbQlvIa9L5SVo2AJbIRdbfjBzfwcH80bOhL5IgllNttE747939BYFQzZBbpoM/i7Pse1bzGAZGQz925RREt7prWL9F77c/SfhotmjSYZsGyaN1GHg7CcQ6UYbpYq88WiM4kCbybyaayqXzc= Received: from BN1PR12CA0016.namprd12.prod.outlook.com (2603:10b6:408:e1::21) by DM6PR12MB3066.namprd12.prod.outlook.com (2603:10b6:5:11a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Mon, 27 Jul 2020 15:01:48 +0000 Received: from BN8NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e1:cafe::b4) by BN1PR12CA0016.outlook.office365.com (2603:10b6:408:e1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.21 via Frontend Transport; Mon, 27 Jul 2020 15:01:48 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by BN8NAM11FT012.mail.protection.outlook.com (10.13.177.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3216.10 via Frontend Transport; Mon, 27 Jul 2020 15:01:48 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:01:47 -0500 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:01:47 -0500 Received: from vishnu-All-Series.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 27 Jul 2020 10:01:43 -0500 From: Ravulapati Vishnu vardhan rao To: Subject: [PATCH 1/6] ASoC: amd: Renaming snd-soc-card structure and fields. Date: Mon, 27 Jul 2020 20:28:26 +0530 Message-ID: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b8a2f07a-d694-413a-e1e7-08d8323dfc71 X-MS-TrafficTypeDiagnostic: DM6PR12MB3066: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1169; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7SdzO4hGrdc/6SiQCUgdj/nSJhTe3IIVmNb0fhK5isL/iSNg1gdrm3AdgI3HebgnpswBgvya0X+Zk5+QtDr/6APT78uevDZq3NP41dW/A+WRpBLc7sBZBWx1C5T0UfdNzOzSrw9Vx3Pbg2BxwYQwEo7lH9U6FFoAbpzjqsPhy024AEl3/rD/cx9+7Qm1wcDWwfBrK/sGhRuxsrIgZwgkMkHQf6I49dn8WGC6EG+AO4kLqbdQirLqm3nKDx9kmi4kcwFXVvgZ4YXyrXFtxZD1EpmYbIuXkatQnOgHwcnk5YLg7UCok9hCMjXqKlCMH1SNJrBnt27/5iofZ4Jt9cC/35bjpiAjokY66b8OxZqHJ+Qsn82CW1fd23SF5SK059nWp/GzU/v8y4zMXx2ycnHuKr6AFDJGAL63lGFkQ5gjfrA= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB02.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(136003)(346002)(376002)(396003)(46966005)(5660300002)(8936002)(478600001)(47076004)(1076003)(109986005)(186003)(6666004)(2616005)(26005)(336012)(8676002)(426003)(81166007)(82740400003)(2906002)(356005)(7696005)(36756003)(70586007)(82310400002)(316002)(86362001)(70206006)(83380400001)(4326008)(54906003)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 15:01:48.2221 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b8a2f07a-d694-413a-e1e7-08d8323dfc71 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3066 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , open list , YueHaibing , Takashi Iwai , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Alexander.Deucher@amd.com, Akshu Agrawal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" As in future our machine driver supports multiple codecs So changing naming convention of snd_soc_card struct and its fields. Signed-off-by: Ravulapati Vishnu vardhan rao --- sound/soc/amd/acp3x-rt5682-max9836.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index 6009e444b858..8b5af064864f 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -290,7 +290,7 @@ static const struct snd_kcontrol_new acp3x_dmic_mux_control = SOC_DAPM_ENUM_EXT("DMIC Select Mux", acp3x_dmic_enum, dmic_get, dmic_set); -static const struct snd_soc_dapm_widget acp3x_widgets[] = { +static const struct snd_soc_dapm_widget acp3x_5682_widgets[] = { SND_SOC_DAPM_HP("Headphone Jack", NULL), SND_SOC_DAPM_SPK("Spk", NULL), SND_SOC_DAPM_MIC("Headset Mic", NULL), @@ -298,7 +298,7 @@ static const struct snd_soc_dapm_widget acp3x_widgets[] = { &acp3x_dmic_mux_control), }; -static const struct snd_soc_dapm_route acp3x_audio_route[] = { +static const struct snd_soc_dapm_route acp3x_5682_audio_route[] = { {"Headphone Jack", NULL, "HPOL"}, {"Headphone Jack", NULL, "HPOR"}, {"IN1P", NULL, "Headset Mic"}, @@ -307,23 +307,23 @@ static const struct snd_soc_dapm_route acp3x_audio_route[] = { {"Dmic Mux", "Rear Mic", "DMIC"}, }; -static const struct snd_kcontrol_new acp3x_mc_controls[] = { +static const struct snd_kcontrol_new acp3x_5682_mc_controls[] = { SOC_DAPM_PIN_SWITCH("Headphone Jack"), SOC_DAPM_PIN_SWITCH("Spk"), SOC_DAPM_PIN_SWITCH("Headset Mic"), }; -static struct snd_soc_card acp3x_card = { +static struct snd_soc_card acp3x_5682 = { .name = "acp3xalc5682m98357", .owner = THIS_MODULE, .dai_link = acp3x_dai_5682_98357, .num_links = ARRAY_SIZE(acp3x_dai_5682_98357), - .dapm_widgets = acp3x_widgets, - .num_dapm_widgets = ARRAY_SIZE(acp3x_widgets), - .dapm_routes = acp3x_audio_route, - .num_dapm_routes = ARRAY_SIZE(acp3x_audio_route), - .controls = acp3x_mc_controls, - .num_controls = ARRAY_SIZE(acp3x_mc_controls), + .dapm_widgets = acp3x_5682_widgets, + .num_dapm_widgets = ARRAY_SIZE(acp3x_5682_widgets), + .dapm_routes = acp3x_5682_audio_route, + .num_dapm_routes = ARRAY_SIZE(acp3x_5682_audio_route), + .controls = acp3x_5682_mc_controls, + .num_controls = ARRAY_SIZE(acp3x_5682_mc_controls), }; static int acp3x_probe(struct platform_device *pdev) @@ -336,8 +336,8 @@ static int acp3x_probe(struct platform_device *pdev) if (!machine) return -ENOMEM; - card = &acp3x_card; - acp3x_card.dev = &pdev->dev; + card = &acp3x_5682; + acp3x_5682.dev = &pdev->dev; platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine); @@ -348,11 +348,11 @@ static int acp3x_probe(struct platform_device *pdev) return PTR_ERR(dmic_sel); } - ret = devm_snd_soc_register_card(&pdev->dev, &acp3x_card); + ret = devm_snd_soc_register_card(&pdev->dev, &acp3x_5682); if (ret) { dev_err(&pdev->dev, "devm_snd_soc_register_card(%s) failed: %d\n", - acp3x_card.name, ret); + acp3x_5682.name, ret); return ret; } return 0; From patchwork Mon Jul 27 14:58:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11687025 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 33761138C for ; Mon, 27 Jul 2020 15:02:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 515DE206E7 for ; Mon, 27 Jul 2020 15:02:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="AyENoIP/"; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="yPbZWMuz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 515DE206E7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 78B631699; Mon, 27 Jul 2020 17:02:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78B631699 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595862174; bh=MNdxAKZpKt9LwXpkK2ee7SFKXgcUjTtdGsjy7496DM8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AyENoIP/TS1kAWgpPlqzkhG8wE34IUHKIJOSHk+t2Oefq4W/NLPyPUFvZxWnKPuvK lHFpicuU1lrj3MW8ECh08gWjdE8B3u3hE5Z7e9t5buZ3DkibMSAWR3nHHN+b+Ys9Hb sK3uHsYeut1TYzUDe8Z2i5FYSDPh77LI3zD5dJLk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C755CF8013C; Mon, 27 Jul 2020 17:02:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8E8E8F801D9; Mon, 27 Jul 2020 17:02:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FORGED_SPF_HELO,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2040.outbound.protection.outlook.com [40.107.237.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 89855F800DE for ; Mon, 27 Jul 2020 17:01:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 89855F800DE Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="yPbZWMuz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ETXPaEYKN6t9MF/O+HEWtfOGWCOFBvH+oCBsF/vPHYV89X99kdb1DL3WfYZP3zuDb8WiJvEnmOwsQII0qu9k9Ehvqrsbepn3NLkzgvlalEq6jhLd1AMyEb87UQr5mbgIE1Z7ZZ23U3Awm8j2EMogaiGmW5ywB4BNScbFyDVeIQ+1/XoRDjpJ/M0r3KNlg1w5VkcYcMh1SbHyyC1QpVpr5/N9daB8SCWbpwQEuRPL5OMXzK4a+hS+Bj8PsYVLM4Wl4HlFDBo6anMjB/ND3xdy62aJeMWvQ36Hg9X2b4w3ObjaEkl0p8CLA+Iu3RS7T+ek0u0wfVxIq+QoCQjKvNs9dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ZwsNUL5Rb+nSi3eiyrnNr7PnidSuPdIOwi32PL+Qjg=; b=QkpJHIZDgNz1DnpZAyrLbcZrqYloDI97yn+aeI78kwRu4R9fqGwSgsB2at4i+vCaLj9mSUgmvWqZvSCP9F8BgAlrsa1mci1sYgyUMFxfEGHjaO+dvpKIg/89Eo8NGVxc6HD4E4k9pHR9/t9NzhS3lfcd398Bw7L2YmHxZujKCpGACNMV0B0/NwWZK++rbebA6mkgLd8FkXtICuyqnyWoLySXi+vr+q354J4OXVr0Lek1S8gJtvziguA04dcTBWl7Dfvzgsffbmlg6S8O7sJ2ttClS0Yr9CkbJ4ls1VgnPQ/JC5sXgwyCZ7tCped+1/73e/5wirWl7xa5kgzFlCIE6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7ZwsNUL5Rb+nSi3eiyrnNr7PnidSuPdIOwi32PL+Qjg=; b=yPbZWMuzSNOv9804qgZhbku58YBu+gC1MrwuQL3PBVIeEsPzpnlkZXPMTKHjHfk1rd6/4KPbnGs08EV8bNrstvO2Tq0RBL/Zrbue5n6OnqFbBWjH6UbNgskbKcm/kBJrw55uCr+qbpqscyDRcboUKXuRqXFiGRpAzX5zcWJoivc= Received: from BN6PR14CA0025.namprd14.prod.outlook.com (2603:10b6:404:13f::11) by BN8PR12MB3074.namprd12.prod.outlook.com (2603:10b6:408:65::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Mon, 27 Jul 2020 15:01:55 +0000 Received: from BN8NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:404:13f:cafe::31) by BN6PR14CA0025.outlook.office365.com (2603:10b6:404:13f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20 via Frontend Transport; Mon, 27 Jul 2020 15:01:55 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by BN8NAM11FT026.mail.protection.outlook.com (10.13.177.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3216.10 via Frontend Transport; Mon, 27 Jul 2020 15:01:55 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:01:54 -0500 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:01:54 -0500 Received: from vishnu-All-Series.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 27 Jul 2020 10:01:50 -0500 From: Ravulapati Vishnu vardhan rao To: Subject: [PATCH 2/6] ASoC: amd: Passing card structure based on codec Date: Mon, 27 Jul 2020 20:28:27 +0530 Message-ID: <20200727145840.25142-2-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> References: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 24b97e88-4de1-4b0b-97f8-08d8323e0083 X-MS-TrafficTypeDiagnostic: BN8PR12MB3074: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D3XUFxjw/D0yWLXPORYCy7S+/00b89jwKm3NsFcSXdtJXv5PM0sXfptri3gt8O+GmaJtXpPqSseAbrxY0PQcYSPsz5lambcjAAWy0tyfPVUABs5vwoCBxlCooQd7ebHZ7VxmQhaX7cO0RD1vcOnbO2k4ohNoRKXsF0HBU+reRAZxzzfJD5eW/UlBYQpgdsR//zWSzIvqjWaU9c8haN7nkKf5KvaJH9+5Rfp5DSjq3/Zn9RSoidJ+igfJ9eShpQlUgJVzdeC8hIWPQDjVS8VxrgLcG8r/U8rjeDYT2xHz3uwhcTqRpy922Sg5Pu+mMOu+a5tYgeZB2KFZ8iKN4vJRNHFmhMEE4ha45+UBkhDyNA5rnr6YZjKp9K9MGcjn5JURDG0VeuLcqVu2BVbvWZWxHgDR2NW6OVGtNHXm38TOE+E= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB02.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(396003)(39860400002)(136003)(46966005)(8676002)(4326008)(6666004)(5660300002)(7696005)(109986005)(36756003)(316002)(186003)(2616005)(54906003)(83380400001)(1076003)(70586007)(82310400002)(81166007)(356005)(8936002)(426003)(478600001)(82740400003)(70206006)(86362001)(336012)(2906002)(47076004)(26005)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 15:01:55.0470 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 24b97e88-4de1-4b0b-97f8-08d8323e0083 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR12MB3074 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , open list , YueHaibing , Takashi Iwai , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Alexander.Deucher@amd.com, Akshu Agrawal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Passing specific snd_soc_card structure depending on the ACPI ID. In future we can add other IDs in the ACPI table and pass the structure. Signed-off-by: Ravulapati Vishnu vardhan rao Reported-by: kernel test robot --- sound/soc/amd/acp3x-rt5682-max9836.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index 8b5af064864f..1e446e4bab25 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -326,18 +326,32 @@ static struct snd_soc_card acp3x_5682 = { .num_controls = ARRAY_SIZE(acp3x_5682_mc_controls), }; +void *soc_is_rltk_max(struct device *dev) +{ + const struct acpi_device_id *match; + + match = acpi_match_device(dev->driver->acpi_match_table, dev); + if (!match) + return NULL; + return (void *)match->driver_data; +} + static int acp3x_probe(struct platform_device *pdev) { int ret; struct snd_soc_card *card; struct acp3x_platform_info *machine; + struct device *dev = &pdev->dev; + + card = (struct snd_soc_card *)soc_is_rltk_max(dev); + if (!card) + return -ENODEV; machine = devm_kzalloc(&pdev->dev, sizeof(*machine), GFP_KERNEL); if (!machine) return -ENOMEM; - card = &acp3x_5682; - acp3x_5682.dev = &pdev->dev; + card->dev = &pdev->dev; platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine); @@ -348,18 +362,18 @@ static int acp3x_probe(struct platform_device *pdev) return PTR_ERR(dmic_sel); } - ret = devm_snd_soc_register_card(&pdev->dev, &acp3x_5682); + ret = devm_snd_soc_register_card(&pdev->dev, card); if (ret) { dev_err(&pdev->dev, "devm_snd_soc_register_card(%s) failed: %d\n", - acp3x_5682.name, ret); + card->name, ret); return ret; } return 0; } static const struct acpi_device_id acp3x_audio_acpi_match[] = { - { "AMDI5682", 0 }, + { "AMDI5682", (unsigned long)&acp3x_5682}, {}, }; MODULE_DEVICE_TABLE(acpi, acp3x_audio_acpi_match); From patchwork Mon Jul 27 14:58:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11687031 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CCFA138C for ; Mon, 27 Jul 2020 15:04:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0E4820775 for ; Mon, 27 Jul 2020 15:04:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="VJ30ffBm"; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="kfjHsFhu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0E4820775 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8322016BB; Mon, 27 Jul 2020 17:03:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8322016BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595862277; bh=qhl1cyDLt5ilDwyY+19/3kR1qwHIuxQzuLJ5+lLQq8o=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VJ30ffBmOfEuyDck3sTnWO0BMKBfi3Mm+UAnWSy8BGh8OGmiuYQpKiNY8hwva1zoP iXEVkjiVH7iBeeto7nHDQBfh0eRLHVihcux4N45i2oWkW742LSMAG12G32KQINUW3F wiPuinr8AE1rFGnza+w0KUVijNyV8eOieMscZvWs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3F8FBF802C3; Mon, 27 Jul 2020 17:02:17 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id BCA9CF802BE; Mon, 27 Jul 2020 17:02:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FORGED_SPF_HELO,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2088.outbound.protection.outlook.com [40.107.92.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 27FBFF80171 for ; Mon, 27 Jul 2020 17:02:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 27FBFF80171 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="kfjHsFhu" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ODzNot2By2FWB81EDI0VXvuNtDZTEeMb5s5leyoPiWF4mpSxUVG6z2Ejz6JJlCJ8pR236Qwr/P09PVOywQQA2swwTchohixgt5UmLiCGZoQiA/YJobSCFo7jrYiMtwk1ggBDwTKizUKd/nqvuejm8Ep2tccf1QlEOt5cv8WF+/cif24Amll9MYucsEweQqQsKfSAnTS1bKtiDdszb149f5dgEEpILL0McnfyYOlasx97GGw1Svu/SgiR2/kgQCISgXE0MtmDuq3Q7DlGnZ9BMNQzCoijI/EylAZmFoByycPS3RZkJz9BbY2FMaBqHZkEKqhSaLUa7SWn0AgIVfg3bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b837BxrxehIucfYdqYaIUEsqCmkPkJnOzVY5zH8jEj4=; b=OiIUyEPcfycF503HOiaFIhzOfDrXPmynZx4Ti/752AuSvo2eZmoZkYPMMo5qgOocs7PfIOEkYo8PGx3gCnCWTou3ACCYIaotUCB3asQP/g0mBSDt9nUflCaadU7cJSyF2L89d3exbX2cKVLMSPtVEyzdLDkNk17THEiJs/s8tRFMGdEFOKc0roGiCKAvsOJcIvufFFYU52xzVmZ84uWXWZpi4CiZZNQO1SmM5cqcDlCQdM00+mvfBtH9zQcrl6CpwYT6Qgp6jy7CbDi+uEtL2LMD4pL4BXcCijyn4rDNEoCimwWyZ5wNpf9pEuUl2XGsbYTEInvwaunjJp/5pFWzuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=b837BxrxehIucfYdqYaIUEsqCmkPkJnOzVY5zH8jEj4=; b=kfjHsFhuhL+dPFnU1qWKdF2FJePegvTT9lk16PcyO15IXdL/NmEpdO7g/xsMFgB5r153EBr1/2RizrLmvZc0VNQh41bAZbPqcYZsOCAlYMn3x5lfBVWCoiKcNizaLPGEPher4qN95mWIaBBtJTBMRwfG5Jt0+9cClgsq9SpUEe0= Received: from BN6PR13CA0026.namprd13.prod.outlook.com (2603:10b6:404:13e::12) by BYAPR12MB2791.namprd12.prod.outlook.com (2603:10b6:a03:61::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.25; Mon, 27 Jul 2020 15:02:01 +0000 Received: from BN8NAM11FT016.eop-nam11.prod.protection.outlook.com (2603:10b6:404:13e:cafe::a9) by BN6PR13CA0026.outlook.office365.com (2603:10b6:404:13e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.10 via Frontend Transport; Mon, 27 Jul 2020 15:02:01 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by BN8NAM11FT016.mail.protection.outlook.com (10.13.176.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3216.10 via Frontend Transport; Mon, 27 Jul 2020 15:02:00 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:00 -0500 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:00 -0500 Received: from vishnu-All-Series.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 27 Jul 2020 10:01:55 -0500 From: Ravulapati Vishnu vardhan rao To: Subject: [PATCH 3/6] ASoC: amd: SND_SOC_RT5682_I2C does not build rt5682 Date: Mon, 27 Jul 2020 20:28:28 +0530 Message-ID: <20200727145840.25142-3-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> References: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c1b7f4a6-2327-426d-dd9e-08d8323e040d X-MS-TrafficTypeDiagnostic: BYAPR12MB2791: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aLh+83Qyb+LDXyxIujSu2MLB/4fGHv4EWwKFrFHTi8xjeCzOm4epce3j02AJoxW1Gule+KXevPOLqJI9dbNgASEEUYTF2HtcUlSiFgJwl9e64HV9jql/10rnoBdBz2qpyNOqIQTqOLoRlKHrhKvw44QHw/74RTBaxSjXQUkP6fchmMHVe/KLNqtEajnSNqPaIiWVtvd2hRvi+Gwv0q8YZcVz8rszT4UTM0vAd8Yb1iwyiUeYcbYOBaD8XgXAhRqSYZamPF6Pv4qrJHz1EUq7qJpV8nvQpP3S2ppyXGJoLIYFu1or45RZSsqxmioIv4BzUu/JYQEgg8sP3MjbGeOZumn0BxB9RWqDqVS5ae5g5OZRv4h9+jnWnaRklPVMElLTbIV/z2tOQZoRiIQuqRnJ9KJwVce63C09IbsmGxiYqT8= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB02.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(376002)(346002)(136003)(396003)(46966005)(2616005)(47076004)(109986005)(7416002)(8936002)(81166007)(5660300002)(4744005)(36756003)(82740400003)(316002)(336012)(426003)(54906003)(6666004)(70206006)(478600001)(70586007)(26005)(86362001)(8676002)(186003)(82310400002)(2906002)(356005)(7696005)(4326008)(83380400001)(1076003)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 15:02:00.9854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1b7f4a6-2327-426d-dd9e-08d8323e040d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT016.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2791 Cc: Pierre-Louis Bossart , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Arnd Bergmann , open list , YueHaibing , Takashi Iwai , Enric Balletbo i Serra , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Vijendar Mukunda , Alexander.Deucher@amd.com, Akshu Agrawal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" changing SND_SOC_RT5682_I2C to SND_SOC_RT5682 because, This flag which was previously set as SND_SOC_RT5682 used to build rt5682 codec driver but by changing into SND_SOC_RT5682_I2C is preventing to build rt5682 codec driver and machine driver fails to probe.So Reverting the changes. Signed-off-by: Ravulapati Vishnu vardhan rao --- sound/soc/amd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig index e37cf72f2bab..77ffdb41bee5 100644 --- a/sound/soc/amd/Kconfig +++ b/sound/soc/amd/Kconfig @@ -29,7 +29,7 @@ config SND_SOC_AMD_ACP3x config SND_SOC_AMD_RV_RT5682_MACH tristate "AMD RV support for RT5682" - select SND_SOC_RT5682_I2C + select SND_SOC_RT5682 select SND_SOC_MAX98357A select SND_SOC_CROS_EC_CODEC select I2C_CROS_EC_TUNNEL From patchwork Mon Jul 27 14:58:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11687033 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CFE01392 for ; Mon, 27 Jul 2020 15:05:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3297120656 for ; Mon, 27 Jul 2020 15:05:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="VFB1dq7W"; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="yGQErhdG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3297120656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C28E416A4; Mon, 27 Jul 2020 17:04:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C28E416A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595862322; bh=oaQfzEc5BOeLnSUPwpbfEsxNQ9uYw5WBmTgMCHqGQZ0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=VFB1dq7Ww5S2WtvN86DyvQS1aSCUJPOElJIIJIGDFtxmed+FMWI7hrB45P+ULZqpH IFYuPuyBEJPjifF3ursrL0VKKxxR79IL7j25iDmGkCc0durO6/38Wkrkbcw9bvxTz0 xufMvi1WxbTbF/L4WZdehe3h1W9p00Az5o8+CHB0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4B708F802DD; Mon, 27 Jul 2020 17:02:27 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id DCB73F802DF; Mon, 27 Jul 2020 17:02:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FORGED_SPF_HELO,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2042.outbound.protection.outlook.com [40.107.94.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id A4992F802DB for ; Mon, 27 Jul 2020 17:02:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A4992F802DB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="yGQErhdG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HLOZ/zJwoSJ6WE30kKIOU53c8OXQgdyM1LQLSAPB5o/bhfseAOZ4ZjSKaNXVSjanWjl5nsaXOmUtk/gWLGkCR9rJ73rE5BvsoFmcirDGynedF2CnqBV7Lf/ivEfC8ubOdHBuT61YfySoEnyaYT+6KqayZrok7Idwk9cW+vUcs/W19PiC4mlk39hVH5SkEsxI5uHEOmm3gdctsnEuuXM0vGuSKZeoZMUw+CbVTh4ETHu+SyiQBsUHgS9nFkTf+/4Njs9Sq4A+Z5x1V6Yc7HkmDzrk/GJ8EXoVcING25wtCYaa+U1y+vhb5saG3yInv5WrV2/DH/SldkLxiCHl2zDqYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pjpHPW4m4qtDpibv0qHdCBCVCb/Ry0z/U6zuWOCnkLc=; b=MXrFWUa8vB12C8WPxOeX54txr0CAfo3KIKjinT08YLDkUuj+N0T2qb0YtpxVmwHjccbwFfWDECi+voBhS4LcysRdDee+EYvorReVgDpa3Ef/J2HWukr9/w5m96uWYDHUdLqeiqIwHMNW3cQi05G6oNah30YzNL/1PQ8mwQ/y0lrYfYxrxBMdCLdPNjbJnCVVqKb/DHw70sw1t6jmO37VaS6sbEYUcAqNiAORbZWlY/mNfK/wTX1c8ke7s4DkFg0EBIsh5Ru1KWFdvhepihF1hrDubSFBJwZKBsTlZBWwnbnQ8OVsgn5jGtc1vpCasCMkmlUYVk+lFzi8w8FYO2PWYg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pjpHPW4m4qtDpibv0qHdCBCVCb/Ry0z/U6zuWOCnkLc=; b=yGQErhdGXZ/qyjYLz/EffWkb4xj8AbRHZGUdxbIe+eJtfkT2W8B9aniKrAEBms7gJD6RO4w35cN9LV/Kz7Y+LmpgwEeDVeJ5ZkoOJlm63saYDz3+8pYoBSf8qZzDdssRVoA59MRgBh+dBVpZzFOa6vZKyN3MZxQ/K2G+9qscSHk= Received: from DM5PR12CA0011.namprd12.prod.outlook.com (2603:10b6:4:1::21) by BN6PR12MB1826.namprd12.prod.outlook.com (2603:10b6:404:106::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Mon, 27 Jul 2020 15:02:09 +0000 Received: from DM6NAM11FT057.eop-nam11.prod.protection.outlook.com (2603:10b6:4:1:cafe::cc) by DM5PR12CA0011.outlook.office365.com (2603:10b6:4:1::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.22 via Frontend Transport; Mon, 27 Jul 2020 15:02:09 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB01.amd.com (165.204.84.17) by DM6NAM11FT057.mail.protection.outlook.com (10.13.172.252) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3216.10 via Frontend Transport; Mon, 27 Jul 2020 15:02:09 +0000 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:08 -0500 Received: from vishnu-All-Series.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 27 Jul 2020 10:02:04 -0500 From: Ravulapati Vishnu vardhan rao To: Subject: [PATCH 4/6] ASoC: amd: Adding support for ALC1015 codec in machine driver Date: Mon, 27 Jul 2020 20:28:29 +0530 Message-ID: <20200727145840.25142-4-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> References: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c2029c26-1794-48ae-a620-08d8323e091d X-MS-TrafficTypeDiagnostic: BN6PR12MB1826: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Q/Kkx92Etz9yppikYjxzuOo0p+LXE3YFC54BIjbKFnXaxNmNHAaopYAjmkZDw9f1xz77lX3151DC7xPQAg3xgNmKfQo6slcLkDXtvbV6D0hUrfRP3nlDpF3/FXbiBNcFYVLh1P6KiamuBckA0v0DDgd5HX4SxVW18CeXTr+bbVpZCTAhsvL9jtmFVQqoJM9NyAZf+gmToHtT9RFv3Njsal7TjztMSK7esWfZIMGFep553WC0DwfncMcTccud5ElSZXXCTIIxhJTzP+LSH1fiUYKl1reeJPXNzRGP0XiK/P5HK7voVwTsU1h2BpUiJUqtCBM1ZRm4d9zSPPTAbodH3RKex7dM2RBMPoPeyrpTnjz/nCmtJizFltkWyZD7E+Pfdl9lmLJ8Tzl5qLjCS2K+8YV5A5dGEyQB4J+nXt+zjc= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB01.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(396003)(376002)(136003)(346002)(39860400002)(46966005)(82310400002)(86362001)(83380400001)(82740400003)(47076004)(356005)(81166007)(336012)(426003)(2616005)(5660300002)(70206006)(36756003)(70586007)(1076003)(2906002)(316002)(109986005)(4326008)(54906003)(8676002)(186003)(6666004)(7696005)(26005)(7416002)(478600001)(8936002)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 15:02:09.4364 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c2029c26-1794-48ae-a620-08d8323e091d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB01.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT057.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1826 Cc: Pierre-Louis Bossart , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , Arnd Bergmann , open list , YueHaibing , Takashi Iwai , Enric Balletbo i Serra , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Vijendar Mukunda , Alexander.Deucher@amd.com, Akshu Agrawal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Adding support for ALC1015 RTK codec in machine driver. Passing specific card structure based on its ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao --- sound/soc/amd/Kconfig | 1 + sound/soc/amd/acp3x-rt5682-max9836.c | 63 ++++++++++++++++++++++++++-- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/Kconfig b/sound/soc/amd/Kconfig index 77ffdb41bee5..3e19995a74bc 100644 --- a/sound/soc/amd/Kconfig +++ b/sound/soc/amd/Kconfig @@ -30,6 +30,7 @@ config SND_SOC_AMD_ACP3x config SND_SOC_AMD_RV_RT5682_MACH tristate "AMD RV support for RT5682" select SND_SOC_RT5682 + select SND_SOC_RT1015 select SND_SOC_MAX98357A select SND_SOC_CROS_EC_CODEC select I2C_CROS_EC_TUNNEL diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index 1e446e4bab25..ac96ef70aafa 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -21,6 +21,7 @@ #include "raven/acp3x.h" #include "../codecs/rt5682.h" +#include "../codecs/rt1015.h" #define PCO_PLAT_CLK 48000000 #define RT5682_PLL_FREQ (48000 * 512) @@ -246,7 +247,18 @@ SND_SOC_DAILINK_DEF(cros_ec, SND_SOC_DAILINK_DEF(platform, DAILINK_COMP_ARRAY(COMP_PLATFORM("acp3x_rv_i2s_dma.0"))); -static struct snd_soc_dai_link acp3x_dai_5682_98357[] = { +static struct snd_soc_codec_conf rt1015_conf[] = { + { + .dlc = COMP_CODEC_CONF("i2c-10EC1015:00"), + .name_prefix = "Left", + }, + { + .dlc = COMP_CODEC_CONF("i2c-10EC1015:01"), + .name_prefix = "Right", + }, +}; + +static struct snd_soc_dai_link acp3x_dai[] = { { .name = "acp3x-5682-play", .stream_name = "Playback", @@ -316,8 +328,8 @@ static const struct snd_kcontrol_new acp3x_5682_mc_controls[] = { static struct snd_soc_card acp3x_5682 = { .name = "acp3xalc5682m98357", .owner = THIS_MODULE, - .dai_link = acp3x_dai_5682_98357, - .num_links = ARRAY_SIZE(acp3x_dai_5682_98357), + .dai_link = acp3x_dai, + .num_links = ARRAY_SIZE(acp3x_dai), .dapm_widgets = acp3x_5682_widgets, .num_dapm_widgets = ARRAY_SIZE(acp3x_5682_widgets), .dapm_routes = acp3x_5682_audio_route, @@ -326,6 +338,47 @@ static struct snd_soc_card acp3x_5682 = { .num_controls = ARRAY_SIZE(acp3x_5682_mc_controls), }; +static const struct snd_soc_dapm_widget acp3x_1015_widgets[] = { + SND_SOC_DAPM_HP("Headphone Jack", NULL), + SND_SOC_DAPM_MIC("Headset Mic", NULL), + SND_SOC_DAPM_MUX("Dmic Mux", SND_SOC_NOPM, 0, 0, + &acp3x_dmic_mux_control), + SND_SOC_DAPM_SPK("Left Spk", NULL), + SND_SOC_DAPM_SPK("Right Spk", NULL), +}; + +static const struct snd_soc_dapm_route acp3x_1015_route[] = { + {"Headphone Jack", NULL, "HPOL"}, + {"Headphone Jack", NULL, "HPOR"}, + {"IN1P", NULL, "Headset Mic"}, + {"Dmic Mux", "Front Mic", "DMIC"}, + {"Dmic Mux", "Rear Mic", "DMIC"}, + {"Left Spk", NULL, "Left SPO"}, + {"Right Spk", NULL, "Right SPO"}, +}; + +static const struct snd_kcontrol_new acp3x_mc_1015_controls[] = { + SOC_DAPM_PIN_SWITCH("Headphone Jack"), + SOC_DAPM_PIN_SWITCH("Headset Mic"), + SOC_DAPM_PIN_SWITCH("Left Spk"), + SOC_DAPM_PIN_SWITCH("Right Spk"), +}; + +static struct snd_soc_card acp3x_1015 = { + .name = "acp3xalc56821015", + .owner = THIS_MODULE, + .dai_link = acp3x_dai, + .num_links = ARRAY_SIZE(acp3x_dai), + .dapm_widgets = acp3x_1015_widgets, + .num_dapm_widgets = ARRAY_SIZE(acp3x_1015_widgets), + .dapm_routes = acp3x_1015_route, + .num_dapm_routes = ARRAY_SIZE(acp3x_1015_route), + .codec_conf = rt1015_conf, + .num_configs = ARRAY_SIZE(rt1015_conf), + .controls = acp3x_mc_1015_controls, + .num_controls = ARRAY_SIZE(acp3x_mc_1015_controls), +}; + void *soc_is_rltk_max(struct device *dev) { const struct acpi_device_id *match; @@ -374,6 +427,7 @@ static int acp3x_probe(struct platform_device *pdev) static const struct acpi_device_id acp3x_audio_acpi_match[] = { { "AMDI5682", (unsigned long)&acp3x_5682}, + { "AMDI1015", (unsigned long)&acp3x_1015}, {}, }; MODULE_DEVICE_TABLE(acpi, acp3x_audio_acpi_match); @@ -390,5 +444,6 @@ static struct platform_driver acp3x_audio = { module_platform_driver(acp3x_audio); MODULE_AUTHOR("akshu.agrawal@amd.com"); -MODULE_DESCRIPTION("ALC5682 & MAX98357 audio support"); +MODULE_AUTHOR("Vishnuvardhanrao.Ravulapati@amd.com"); +MODULE_DESCRIPTION("ALC5682 ALC1015 & MAX98357 audio support"); MODULE_LICENSE("GPL v2"); From patchwork Mon Jul 27 14:58:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11687035 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E81AD722 for ; Mon, 27 Jul 2020 15:05:38 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D01E2064B for ; Mon, 27 Jul 2020 15:05:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="mblYVlXx"; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="CopK7pqq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D01E2064B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE8DA16AE; Mon, 27 Jul 2020 17:04:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE8DA16AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595862336; bh=6S54hSr5B94xmlAuoAhGcDnhzD4R8pbh00pjI8DnPAE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mblYVlXx5A/1s7mEKyWkNXBLf7dQZigKwxG3UY/L91UuaP5V/00Us0x8mUQkmbBub ijy8yWAj/IKwSEBa3rWOY0noM1ivkgwseEyrLfOofAjdC14INr0LIvFarQZAUNQAuV S1Eov2zftGeM/6+3QMUpOnO8ItymDnCWl3oBizm0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E5AA6F802D2; Mon, 27 Jul 2020 17:02:31 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64780F802E3; Mon, 27 Jul 2020 17:02:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FORGED_SPF_HELO,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-eopbgr690058.outbound.protection.outlook.com [40.107.69.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9E52BF802D2 for ; Mon, 27 Jul 2020 17:02:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9E52BF802D2 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="CopK7pqq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VT8HUnMATqTkvbYivQSjtQ56cjprskB6ctD+oftQQsCBzKIeck2j0F+uxZv90c84WoLjODdwVuhc2meJU7gXPQSfs5TZd+UjA5eqE65lwql8rDYwnenn8W4/kQJ0uLc/wz3yfxAG53DkTt4le/KWnpMeC8qSOqr/XUEEPCgZEYubjZ/M+XTfHYYGHXTu00SR767vxTCnD99TCpxfTTO5gbX6Im7VJ/FYIVo4XaJxyF9cDgeSX8qfZH2FJgyad8/69JIdszvrLmzT4wfVx5LWw/cfXgGBlXEH5XQoO9CBpR6z9ODkXcjCNBRsIvwGIkswrP+SzEZezKlFTyyoVSxeqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qCl07lc7XRC5uQgg9x12rtUZ1ol8ER+YYH/hcAArfX4=; b=Sa1I9hhRkvCvEUyoFLeD55qMzNygcT5+BT3ykAo8PXK2cRhoGw9ZqhDU3UEN0IxZPNfhRqJ8iHdJf0VnA7ISHlZLmDJm9rngbIZ3wKHr7AJr83vuwsFpllfNF7Tudj3LvjdjH82nKG78K0LHEK5v7f2AcdssGSV1T2Lqg9Guynfmo86kn88n/58AhMJpyYRLrM0S8Zw0KG2WG/NjOwPCdBZoEhy/Mtvu2kXtA32f5SvQBv29UDyl1g9Ij5MVyRRBGgUZwX8asxKai9ZsGdZKmSSxv9IufQ5PyNxRJnSMDp8+udeI2dwcgSJ2RjLtxcvENhRblnkm9JEZtKl//QNs5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qCl07lc7XRC5uQgg9x12rtUZ1ol8ER+YYH/hcAArfX4=; b=CopK7pqqbl6f6KQxg+1rQF4wubo7Esxr5BXBoYObAWhYoWnNsyk0bDI2fzkqe8/WFOCZp8+pyDdAGcR9TFNT+If0otK8kvEMVTjJYVpVm1wYbGuSFw6GbFhx9/JvEGWiZKuWNbebatfU9ATaV0HvGOOC8mqcTyCyIis4xX1dQ2k= Received: from BN8PR04CA0057.namprd04.prod.outlook.com (2603:10b6:408:d4::31) by MN2PR12MB3341.namprd12.prod.outlook.com (2603:10b6:208:cb::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23; Mon, 27 Jul 2020 15:02:16 +0000 Received: from BN8NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:408:d4:cafe::84) by BN8PR04CA0057.outlook.office365.com (2603:10b6:408:d4::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.23 via Frontend Transport; Mon, 27 Jul 2020 15:02:16 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB02.amd.com (165.204.84.17) by BN8NAM11FT045.mail.protection.outlook.com (10.13.177.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3216.10 via Frontend Transport; Mon, 27 Jul 2020 15:02:16 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:15 -0500 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:15 -0500 Received: from vishnu-All-Series.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 27 Jul 2020 10:02:12 -0500 From: Ravulapati Vishnu vardhan rao To: Subject: [PATCH 5/6] ASoC: amd: Adding DAI LINK for rt1015 codec Date: Mon, 27 Jul 2020 20:28:30 +0530 Message-ID: <20200727145840.25142-5-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> References: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e05e2f1-e170-4f2a-2204-08d8323e0d16 X-MS-TrafficTypeDiagnostic: MN2PR12MB3341: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5Q3M2OlHbIjSo/7y1F7Yf/kgb1kCvKkmeBQRd8OxF2VlAkCNnnQZVzIOhdTztw+l/Ski54OjhavOvVfJzgV6gxehcEx4/5zCURkI3DWruYN9dUnwxzb32wKFgdQdhCZ8OECwN88rj1ZTYQuDH/7PbrRzL69j7ya63EjPeyP7adFSAhCz/Z8gaZyaa9GfmNfkjFjFj1mTPqpfjSyNLg/mudZorqqyeDGXURg7AGx9CVutGf/meUkSaY5JqHLDH+dcBHeoYV+W+Q0IQOYk+duZh4Ahh5iKCbMlWvQ7csWNnxPYeRjqotSNdHXUxIcrB8IZzzV2TGQ7dAVNMEkxd6NoijyP4PyZMhwbW9nkC8LT2yd92rI3l5nztFFan7QaZ/T4al4t+mgrmiaJLVVQ7a8GSbf6x8wXAJWlBc6/F5xiqrA= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB02.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(346002)(396003)(376002)(136003)(46966005)(8676002)(356005)(70206006)(82310400002)(109986005)(70586007)(2616005)(86362001)(7696005)(2906002)(83380400001)(5660300002)(8936002)(54906003)(186003)(336012)(47076004)(6666004)(316002)(82740400003)(36756003)(1076003)(26005)(426003)(478600001)(81166007)(4326008)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 15:02:16.1400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e05e2f1-e170-4f2a-2204-08d8323e0d16 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB02.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3341 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , open list , YueHaibing , Takashi Iwai , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Alexander.Deucher@amd.com, Akshu Agrawal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" DAI link support for RTK 1015 and providing the codec details depending on the snd_soc_card selected by ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao --- sound/soc/amd/acp3x-rt5682-max9836.c | 35 ++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index ac96ef70aafa..607205cb3a98 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -32,6 +32,12 @@ static struct clk *rt5682_dai_wclk; static struct clk *rt5682_dai_bclk; static struct gpio_desc *dmic_sel; +enum { + RT5682 = 0, + MAX, + EC, +}; + static int acp3x_5682_init(struct snd_soc_pcm_runtime *rtd) { int ret; @@ -241,6 +247,9 @@ SND_SOC_DAILINK_DEF(rt5682, DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5682:00", "rt5682-aif1"))); SND_SOC_DAILINK_DEF(max, DAILINK_COMP_ARRAY(COMP_CODEC("MX98357A:00", "HiFi"))); +SND_SOC_DAILINK_DEF(rt1015, + DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC1015:00", "rt1015-aif"), + COMP_CODEC("i2c-10EC1015:01", "rt1015-aif"))); SND_SOC_DAILINK_DEF(cros_ec, DAILINK_COMP_ARRAY(COMP_CODEC("GOOG0013:00", "EC Codec I2S RX"))); @@ -259,7 +268,7 @@ static struct snd_soc_codec_conf rt1015_conf[] = { }; static struct snd_soc_dai_link acp3x_dai[] = { - { + [RT5682] = { .name = "acp3x-5682-play", .stream_name = "Playback", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF @@ -270,16 +279,19 @@ static struct snd_soc_dai_link acp3x_dai[] = { .ops = &acp3x_5682_ops, SND_SOC_DAILINK_REG(acp3x_i2s, rt5682, platform), }, - { + [MAX] = { .name = "acp3x-max98357-play", .stream_name = "HiFi Playback", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF - | SND_SOC_DAIFMT_CBM_CFM, + | SND_SOC_DAIFMT_CBS_CFS, .dpcm_playback = 1, .ops = &acp3x_max_play_ops, - SND_SOC_DAILINK_REG(acp3x_bt, max, platform), + .cpus = acp3x_bt, + .num_cpus = ARRAY_SIZE(acp3x_bt), + .platforms = platform, + .num_platforms = ARRAY_SIZE(platform), }, - { + [EC] = { .name = "acp3x-ec-dmic0-capture", .stream_name = "Capture DMIC0", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF @@ -389,6 +401,18 @@ void *soc_is_rltk_max(struct device *dev) return (void *)match->driver_data; } +static void card_spk_dai_link_present(struct snd_soc_dai_link *links, + const char *card_name) +{ + if (!strcmp(card_name, "acp3xalc56821015")) { + links[1].codecs = rt1015; + links[1].num_codecs = ARRAY_SIZE(rt1015); + } else { + links[1].codecs = max; + links[1].num_codecs = ARRAY_SIZE(max); + } +} + static int acp3x_probe(struct platform_device *pdev) { int ret; @@ -404,6 +428,7 @@ static int acp3x_probe(struct platform_device *pdev) if (!machine) return -ENOMEM; + card_spk_dai_link_present(card->dai_link, card->name); card->dev = &pdev->dev; platform_set_drvdata(pdev, card); snd_soc_card_set_drvdata(card, machine); From patchwork Mon Jul 27 14:58:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "RAVULAPATI, VISHNU VARDHAN RAO" X-Patchwork-Id: 11687037 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5247C722 for ; Mon, 27 Jul 2020 15:06:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA34320672 for ; Mon, 27 Jul 2020 15:06:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="RgwmHC/I"; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="FyG759FY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA34320672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 63A7816A5; Mon, 27 Jul 2020 17:05:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 63A7816A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1595862379; bh=0JaIN/TliAfg4SEK+w/JhQt6QF8uQ7OY9xt+d7UFQcQ=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RgwmHC/IwEaUPzNsf/nvOu8lKZZQz0CmC3Rr1ytR9Vph2Ww/w4O6AOtcR0qDmgpnz 1HZNPHSjJvByiJRZdpdg/NmAIqkuTfgwL3S8fLmDF3RhVCdub8Cbzd3iD+SzeB0nya ZdPyyaGPlPveHQGi/p3ItRqmdOjNmaZGVK1JMXmA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 86753F802E8; Mon, 27 Jul 2020 17:02:34 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B2A16F802E9; Mon, 27 Jul 2020 17:02:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FORGED_SPF_HELO,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2055.outbound.protection.outlook.com [40.107.92.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5BD0AF802DF for ; Mon, 27 Jul 2020 17:02:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BD0AF802DF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="FyG759FY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EuLZwE9P6nTSgHoDNzzf550qLKw6bV1l1NC5bwa5mCFnTjXUmnUw4PCwo69TlArh/YwcNpwBFFu5O3whU1wF13b5U/FM1LYi9pZp8RzZCYJgNRSbNP84goV/NYr/P1b0pYQ9+46ZLmV/fFYdvbM91odyfUA7v5KaePvf3W3E+xcQfQJFm97pYQY+9zLQd08D/6MOpPumVm2ULaBsmcU3NPYuwA9owQK/2NEwbY9tMzvTqMJm9zGTMEMXDuDTr25tQJmBxoXgAdxG0c8jo3CPuiKAPVFzOraFmCT6qZlN2ZYLT/UelbGBoKSVbLvvC7r9Ujsce5vl91rEpocnwxekkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1Z69W1HJHA42WkakLTg/SvY0csaoMM4X2Wb6rlGNQdk=; b=njtxD06unOS+0WnIle7gKzBhTXuvW4NdwGeMrvfS9IBVfPMP7ZcORjthLaRXIEwrorohHnyxuJNvb6wqLfJQclnaTspc4fqq4DDAhmwNGhVyRIwvHJeBDfU3syiCI5t+MMLgn2CGrSzYnINFgIqN35cNtFKDBSAT9S+WD9fyFu7Es8sls3NE3NGEzkyxljQLVO5GHEnpvb/EbpHQ2V9w/UHlsSmE65Nw6mSZiAUsnptlXKse/dJAbDTa8T3vFbny0YUfF3bn6JqyBa73uwTNvo1jchgt1NG8JKKPY0gk4Vx2l7DN7T3LJiA43DnfUZOWnzR9PK+Rdj3RgtuALbPORg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=permerror action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1Z69W1HJHA42WkakLTg/SvY0csaoMM4X2Wb6rlGNQdk=; b=FyG759FYmjGEXhVszf2ALr4qP/dQYg6Zl+ZoebucvVFdgWMena6fN+T0BD4gAxCDXP080FROMQP3xoAg1kaPvTkjoqmIivoKoo2GfDs2L5jxBFW3Su+H7zH08Mib+HW4dRoCAcGSCNuI6j0+tUaDLAv662+0JxE0mUUTIz8beL0= Received: from DM3PR12CA0104.namprd12.prod.outlook.com (2603:10b6:0:55::24) by DM5PR12MB1753.namprd12.prod.outlook.com (2603:10b6:3:10d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.22; Mon, 27 Jul 2020 15:02:23 +0000 Received: from DM6NAM11FT012.eop-nam11.prod.protection.outlook.com (2603:10b6:0:55:cafe::7c) by DM3PR12CA0104.outlook.office365.com (2603:10b6:0:55::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.20 via Frontend Transport; Mon, 27 Jul 2020 15:02:23 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXMB01.amd.com (165.204.84.17) by DM6NAM11FT012.mail.protection.outlook.com (10.13.173.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3216.10 via Frontend Transport; Mon, 27 Jul 2020 15:02:22 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB01.amd.com (10.181.40.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:22 -0500 Received: from SATLEXMB02.amd.com (10.181.40.143) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 27 Jul 2020 10:02:22 -0500 Received: from vishnu-All-Series.amd.com (10.180.168.240) by SATLEXMB02.amd.com (10.181.40.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 27 Jul 2020 10:02:18 -0500 From: Ravulapati Vishnu vardhan rao To: Subject: [PATCH 6/6] ASoC: amd: Added hw_params support for ALC1015 Date: Mon, 27 Jul 2020 20:28:31 +0530 Message-ID: <20200727145840.25142-6-Vishnuvardhanrao.Ravulapati@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> References: <20200727145840.25142-1-Vishnuvardhanrao.Ravulapati@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95f03d3a-0976-4a52-0704-08d8323e112e X-MS-TrafficTypeDiagnostic: DM5PR12MB1753: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2449; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FIRskGAFzvjk/kXP85hgc/ZoNwI/oTx7MrkYCy3hCq2n9rjbRP4D/gN729zf+pGxqA9oHpLyLpf6uCpGzitcGGlyugTdVJvHY25ZXAKPVDkpgr5pumKwCrYPa3exXtcLAxFsxQsfK4s+ceGH5+XnlOKbfFVtU6s7/8kfoAdNklLDUIBp6/EHYEYRoFLx848XU/VDcMOszc9RiCYpQ7hPg7CrRR89GOvE68b0FDCTOSV2ohQJCsRXIvaJIN1rFCqJTbW7s32rNZ9/UJ93d+NZH5UJf26ZDKE/rFy9XDPI3Y3UOqe52qaeHuci2+dr/3HrmMk99DEHVn2pZ75tIAHh5sRm1w2guYw0n1k/6ItvCDTGPZfD+0tBCcEXnmS3XGvdfkvLjChnH69/Q1Z+aZVvsJEP7SANDsn6BLfmsCODczE= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SATLEXMB01.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(376002)(136003)(346002)(46966005)(82740400003)(4326008)(316002)(47076004)(478600001)(81166007)(109986005)(2906002)(8936002)(54906003)(2616005)(426003)(8676002)(83380400001)(70586007)(70206006)(6666004)(5660300002)(26005)(186003)(1076003)(7696005)(82310400002)(36756003)(356005)(336012)(86362001)(266003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2020 15:02:22.9685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95f03d3a-0976-4a52-0704-08d8323e112e X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB01.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT012.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1753 Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , Kuninori Morimoto , open list , YueHaibing , Takashi Iwai , Liam Girdwood , Ravulapati Vishnu vardhan rao , Mark Brown , Alexander.Deucher@amd.com, Akshu Agrawal X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Adding rt1015 hw_params which set Bit-clock ratio PLL and appropriate sys clk specific with RTK1015. Signed-off-by: Ravulapati Vishnu vardhan rao Reported-by: kernel test robot --- sound/soc/amd/acp3x-rt5682-max9836.c | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c index 607205cb3a98..bf635ae928ae 100644 --- a/sound/soc/amd/acp3x-rt5682-max9836.c +++ b/sound/soc/amd/acp3x-rt5682-max9836.c @@ -126,6 +126,44 @@ static int rt5682_clk_enable(struct snd_pcm_substream *substream) return ret; } +static int acp3x_1015_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params) +{ + struct snd_soc_pcm_runtime *rtd = substream->private_data; + struct snd_soc_dai *codec_dai; + int srate, i, ret; + + ret = 0; + srate = params_rate(params); + + for (i = 0; i < rtd->num_codecs; i++) { + if (strcmp(rtd->codec_dais[i]->name, "rt1015-aif")) + continue; + codec_dai = rtd->codec_dais[i]; + + ret = snd_soc_dai_set_bclk_ratio(codec_dai, 64); + if (ret < 0) { + dev_err(codec_dai->dev, + "codec_dai bclk ratio not set\n"); + return ret; + } + ret = snd_soc_dai_set_pll(codec_dai, 0, RT1015_PLL_S_BCLK, + 64 * srate, 256 * srate); + if (ret < 0) { + dev_err(codec_dai->dev, "codec_dai PLL not set\n"); + return ret; + } + ret = snd_soc_dai_set_sysclk(codec_dai, RT1015_SCLK_S_PLL, + 256 * srate, SND_SOC_CLOCK_IN); + if (ret < 0) { + dev_err(codec_dai->dev, + "codec_dai sys clock not set\n"); + return ret; + } + } + return ret; +} + static void rt5682_clk_disable(void) { clk_disable_unprepare(rt5682_dai_wclk); @@ -231,6 +269,7 @@ static const struct snd_soc_ops acp3x_5682_ops = { static const struct snd_soc_ops acp3x_max_play_ops = { .startup = acp3x_max_startup, .shutdown = rt5682_shutdown, + .hw_params = acp3x_1015_hw_params, }; static const struct snd_soc_ops acp3x_ec_cap0_ops = {