Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, Mark Brown <broonie@kernel.org>
Cc: "Cezary Rojewski" <cezary.rojewski@intel.com>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-sound@vger.kernel.org,
	"Łukasz Majczak" <lma@chromium.org>
Subject: Re: [PATCH 1/2] ASoC: Intel: avs: Add rt5514 machine board
Date: Mon, 30 Oct 2023 12:50:30 +0100	[thread overview]
Message-ID: <f431a348-6e32-4e19-be56-1373f9e65aee@linux.intel.com> (raw)
In-Reply-To: <db8fb570-0532-45d2-b0dd-adfb8727f258@kernel.org>

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 <amadeuszx.slawinski@linux.intel.com>
>> ---
>>   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.


  reply	other threads:[~2023-10-30 11:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 11:05 [PATCH 0/2] ASoC: Intel: avs: Add support for rt5514 codec Amadeusz Sławiński
2023-10-27 11:05 ` [PATCH 1/2] ASoC: Intel: avs: Add rt5514 machine board Amadeusz Sławiński
2023-10-28  8:46   ` Krzysztof Kozlowski
2023-10-30 11:50     ` Amadeusz Sławiński [this message]
2023-10-30 11:59       ` Krzysztof Kozlowski
2023-10-30 12:15         ` Amadeusz Sławiński
2023-10-30 12:46           ` Krzysztof Kozlowski
2023-10-27 11:05 ` [PATCH 2/2] " Amadeusz Sławiński
2023-10-27 22:54 ` [PATCH 0/2] ASoC: Intel: avs: Add support for rt5514 codec Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f431a348-6e32-4e19-be56-1373f9e65aee@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=krzk@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=lma@chromium.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox