From patchwork Fri Apr 26 15:25:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 792697 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C935DC4345F for ; Fri, 26 Apr 2024 15:28:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4B108DF6; Fri, 26 Apr 2024 17:27:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4B108DF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1714145289; bh=F46Iv1zuto1wmnP8krweutl1d2vtjDUnvjUVa+cEXyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Teg9UhLP0SDT5a8kMs/trBGA0FuiYGNRfu7Y9m/qv2Dz9kuIhc2jwwA3x6y+nDJck D7TyC7C/dwdC1o7cDPxVpBQ2p+yqhifmMltm1QsOeysc5/mYt/6Y+LWQnmoIzfbC/8 HyxOsRWS7X/o5TQWG7lq41Et80TxZsJLahTbrbXY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF5CBF806AA; Fri, 26 Apr 2024 17:26:16 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id EC574F806B5; Fri, 26 Apr 2024 17:26:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 899F5F805F9; Fri, 26 Apr 2024 17:25:55 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 6800DF805BA for ; Fri, 26 Apr 2024 17:25:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6800DF805BA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=KZWVdRSh DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714145149; x=1745681149; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F46Iv1zuto1wmnP8krweutl1d2vtjDUnvjUVa+cEXyk=; b=KZWVdRShSF/UEQjIWFM+llZPBRvdEYfsQ9Zj9d5/QU2kWGTpx8sDx9Fv zJtUORzXUu84s1Jyn9pbXLFmziEujzBh00rqlQE6I/9muqccT4WPGO2bU xZvNtFENCRugsvfTBXOp4DYlLSjHaSiH6xHjCF20yBRGhuAqi7LGRsSGk lgyPDj491DMfhlnhTxwjXTnBqy0GZRPq/oxTbe3PO/LyXqziw4VntijZl DkFprJzs0aykVPIDkD6wdr+X9QFh9hurQPN2VK/kOA3o45zuGcRfxRRdQ Ro6ABXFobJc4/s5fPBAGmI110SFRadBei5vwPU77gGuKwX0qilFZA/P/y Q==; X-CSE-ConnectionGUID: r3VMwgLpQ7+rqb76raMELg== X-CSE-MsgGUID: tKUJDUjgTour2bKSlDLOVA== X-IronPort-AV: E=McAfee;i="6600,9927,11056"; a="21291312" X-IronPort-AV: E=Sophos;i="6.07,232,1708416000"; d="scan'208";a="21291312" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 08:25:45 -0700 X-CSE-ConnectionGUID: KT5Ik3KkQZ2dSsk+SMsOGA== X-CSE-MsgGUID: 8R787wyDQZib8uuBli9Xbg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,232,1708416000"; d="scan'208";a="30259563" Received: from atarkhan-mobl2.amr.corp.intel.com (HELO pbossart-mobl6.intel.com) ([10.212.33.33]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 08:25:44 -0700 From: Pierre-Louis Bossart To: linux-sound@vger.kernel.org Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, Brent Lu , Bard Liao , Pierre-Louis Bossart Subject: [PATCH 09/23] ASoC: Intel: sof_da7219: support MAX98357A on cml boards Date: Fri, 26 Apr 2024 10:25:15 -0500 Message-Id: <20240426152529.38345-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240426152529.38345-1-pierre-louis.bossart@linux.intel.com> References: <20240426152529.38345-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: D7ULXQMBIAPVV7JTND5ZPIX7KUHFIQYV X-Message-ID-Hash: D7ULXQMBIAPVV7JTND5ZPIX7KUHFIQYV X-MailFrom: pierre-louis.bossart@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Brent Lu For cml boards, MAX98357A speaker amplifier is supported by machine driver bxt_da7219_max98357a with sound card name cmlda7219max. Use same name for backward compatibility with existing devices on market. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_da7219.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/intel/boards/sof_da7219.c b/sound/soc/intel/boards/sof_da7219.c index 610b5a8e0860..ecb1d4b25ea6 100644 --- a/sound/soc/intel/boards/sof_da7219.c +++ b/sound/soc/intel/boards/sof_da7219.c @@ -339,6 +339,14 @@ static int audio_probe(struct platform_device *pdev) /* backward-compatible with existing devices */ switch (ctx->amp_type) { + case CODEC_MAX98357A: + card_name = devm_kstrdup(&pdev->dev, "cmlda7219max", + GFP_KERNEL); + if (!card_name) + return -ENOMEM; + + card_da7219.name = card_name; + break; case CODEC_MAX98390: card_name = devm_kstrdup(&pdev->dev, "cml_max98390_da7219",