From patchwork Fri Apr 26 15:25:21 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: 792398 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 0BBCDC4345F for ; Fri, 26 Apr 2024 15:30: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 2E34420C0; Fri, 26 Apr 2024 17:29:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E34420C0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1714145408; bh=0lJ6K+KsQ4YP7eBhNs9PYkoJzLuliipAbc+xTk5UWBQ=; 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=SZsWTrDDtnI4D7s/M0X/G27++o3Re3PM9YP3oh7E+J1FYLx+CI65JMXZQCSOeUe5l FVQkoKbatylfKAGQK4QI7IOpZhwALoJ/6GvpTLLDrdKbS6DL4b8+Kn2prG2wXyoaxJ 56JG11pME0fluIGidmsJwMLC54QaPoGAZgWql9fo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1C0D7F8087A; Fri, 26 Apr 2024 17:26:39 +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 71886F80857; Fri, 26 Apr 2024 17:26:39 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A15CAF80672; Fri, 26 Apr 2024 17:26:08 +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 68316F805C9 for ; Fri, 26 Apr 2024 17:25:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 68316F805C9 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=J4Mre+nI DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714145153; x=1745681153; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0lJ6K+KsQ4YP7eBhNs9PYkoJzLuliipAbc+xTk5UWBQ=; b=J4Mre+nIltAtiTbyEO0//rrg73twEHHc6sjLw2vaS9UPl53TbprMcBa3 Z4pSBkLrlGjQNQ2l7a1zaBRmFtx5WbnCmW5HAdRcjS1wVIMqdXXzypCxc JA1bxex8Nm/5M3/52kP8kY9Z7Tvs41pevMCLMCVA47D1RFXF5/oWPAn3r kSwIm1dctVbz4Fz6XRhokgB4wJ/yAxyV1uyimSgpufcC7DXvGC9DttRCw 3c/HXDOd9SqcGvpX6MmTR1QCXdW8xCeGSGzqx1lZf6aCZvh6GM8xT7FrI H3kVJaUaJMAwGzxXendoInl70ptObg8fGyTJkptsD3F96fOs5HJj+N5e9 g==; X-CSE-ConnectionGUID: 0g4yyaneRJa3GXbpRGZq2w== X-CSE-MsgGUID: TsEKmLduQzG+92O3jUSzXQ== X-IronPort-AV: E=McAfee;i="6600,9927,11056"; a="21291339" X-IronPort-AV: E=Sophos;i="6.07,232,1708416000"; d="scan'208";a="21291339" 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:48 -0700 X-CSE-ConnectionGUID: nvC1Jzk0TsWGrkheGdkyfQ== X-CSE-MsgGUID: TiKvQZ5CSwOS/oROQRgHEw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,232,1708416000"; d="scan'208";a="30259590" 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:48 -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 15/23] ASoC: Intel: sof_rt5682: support MAX98357A on glk boards Date: Fri, 26 Apr 2024 10:25:21 -0500 Message-Id: <20240426152529.38345-16-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: Q6TJEAUIJLEP5BVFXU4VGZSJ4SEP4KOW X-Message-ID-Hash: Q6TJEAUIJLEP5BVFXU4VGZSJ4SEP4KOW 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 glk boards, MAX98357A speaker amplifier is supported by machine driver glk_rt5682_mx98357a with sound card name glkrt5682max. 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_rt5682.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 80ecf31c936a..efca7604040e 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -698,6 +698,20 @@ static int sof_audio_probe(struct platform_device *pdev) /* overwrite the DAI link order for GLK boards */ ctx->link_order_overwrite = GLK_LINK_ORDER; + + /* backward-compatible with existing devices */ + switch (ctx->amp_type) { + case CODEC_MAX98357A: + card_name = devm_kstrdup(&pdev->dev, "glkrt5682max", + GFP_KERNEL); + if (!card_name) + return -ENOMEM; + + sof_audio_card_rt5682.name = card_name; + break; + default: + break; + } } else if (soc_intel_is_cml()) { /* backward-compatible with existing devices */ switch (ctx->amp_type) {