From mboxrd@z Thu Jan 1 00:00:00 1970 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 5CDC8C4332F for ; Mon, 30 Oct 2023 11:52:11 +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 98A47DEF; Mon, 30 Oct 2023 12:51:18 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 98A47DEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698666728; bh=Wf36bxPgVsxUy5j/UtNTilNJi30VLZXPAL0pSlxW5cM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=T+okshN+wwT5lCfTX4iuEXSMmeL979iCERESqkknXyo7NAMF2iTLS7fI0krhNrthS o8iMHy/mTp4rKTXPjKzOZlXvOOIyHx/v9mad1FTOqsfRE9UJPNu4fea997gw9I67dn dBjhepY+0RMn6oMqOjGU+81PdWQdC+CqXZi0z/dM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4A441F80166; Mon, 30 Oct 2023 12:50:49 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id AD05EF8016D; Mon, 30 Oct 2023 12:50:48 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A9B78F8016D; Mon, 30 Oct 2023 12:50:43 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (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 4ED29F800FA for ; Mon, 30 Oct 2023 12:50:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4ED29F800FA 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=c88Ex2cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698666639; x=1730202639; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Wf36bxPgVsxUy5j/UtNTilNJi30VLZXPAL0pSlxW5cM=; b=c88Ex2czwpl0leIkUE8bZHSyOE2uKMEElr/ncT/Bf/Gs9toqO1wJQpC7 Eiul3K1sCazIiuRwzSUjySY0oV/a8fB6Lpi3Qu4hbLpM5Q2Wxa5l/2pyf s5E87X9AMHPXzfPTP7EbujcaQhT0GMZ7z47SAdu6ZwNfuYUW+O/Qloy/a vI18QUIPLyYsde5RRvoA7gfRAkZVKMrsc8BT2+vlZhpMU9BB0lHtLXR7e Ob+hZerJycntL3UrnvNBsZkFyPicqpWIBcfyYgmIinVPHt1Bml5Cys8J7 GN7so2+bmrl5YqCngsOjkB2oAQEDHTvmSNf99/BLbou5EYd7cbBv8njgn A==; X-IronPort-AV: E=McAfee;i="6600,9927,10878"; a="385256800" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="385256800" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 04:50:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10878"; a="1007395006" X-IronPort-AV: E=Sophos;i="6.03,263,1694761200"; d="scan'208";a="1007395006" Received: from aslawinx-mobl.ger.corp.intel.com (HELO [10.94.0.91]) ([10.94.0.91]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Oct 2023 04:50:32 -0700 Message-ID: Date: Mon, 30 Oct 2023 12:50:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] ASoC: Intel: avs: Add rt5514 machine board Content-Language: en-US To: Krzysztof Kozlowski , Mark Brown Cc: Cezary Rojewski , Takashi Iwai , Jaroslav Kysela , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, =?UTF-8?Q?=C5=81ukasz_Majczak?= References: <20231027110537.2103712-1-amadeuszx.slawinski@linux.intel.com> <20231027110537.2103712-2-amadeuszx.slawinski@linux.intel.com> From: =?UTF-8?Q?Amadeusz_S=C5=82awi=C5=84ski?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID-Hash: 7FCNGEJMOJGH5PZXCLB2WGMO4MD5EZFS X-Message-ID-Hash: 7FCNGEJMOJGH5PZXCLB2WGMO4MD5EZFS X-MailFrom: amadeuszx.slawinski@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.8 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: On 10/28/2023 10:46 AM, Krzysztof Kozlowski wrote: > On 27/10/2023 13:05, Amadeusz Sławiński wrote: >> To support AVS-rt5514 configuration add machine board connecting AVS >> platform component driver with rt5514 codec one. >> >> Signed-off-by: Amadeusz Sławiński >> --- >> sound/soc/intel/avs/boards/Kconfig | 10 ++ >> sound/soc/intel/avs/boards/Makefile | 2 + >> sound/soc/intel/avs/boards/rt5514.c | 187 ++++++++++++++++++++++++++++ >> 3 files changed, 199 insertions(+) >> create mode 100644 sound/soc/intel/avs/boards/rt5514.c > > ... > >> + >> +static struct platform_driver avs_rt5514_driver = { >> + .probe = avs_rt5514_probe, >> + .driver = { >> + .name = "avs_rt5514", >> + .pm = &snd_soc_pm_ops, >> + }, >> +}; >> + >> +module_platform_driver(avs_rt5514_driver); >> + >> +MODULE_LICENSE("GPL"); >> +MODULE_ALIAS("platform:avs_rt5514"); > > You should not need MODULE_ALIAS() in normal cases. If you need it, > usually it means your device ID table is wrong. > In theory yes, in practice it is a bit more complicated, as we use the driver alias in sound/soc/intel/avs/board_selection.c in snd_soc_acpi_mach and they should match. For example for rt286, there is: # modinfo /lib/modules/6.4.0-rc3+/kernel/sound/soc/intel/avs/boards/snd-soc-avs-rt286.ko | grep 286 filename: /lib/modules/6.4.0-rc3+/kernel/sound/soc/intel/avs/boards/snd-soc-avs-rt286.ko alias: platform:avs_rt286 name: snd_soc_avs_rt286 as you can see platform_driver::driver::name is not matching the driver name. I've did quick test with removing alias and changing snd_soc_acpi_mach definition for one board and it didn't load. Now that you pointed it out I also lean towards trying to remove MODULE_ALIAS() from board drivers, but it will probably require some more investigation if we really want to do it and implementing it properly.