From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mateusz Gorski <mateusz.gorski@linux.intel.com>,
alsa-devel@alsa-project.org
Cc: cezary.rojewski@intel.com, tiwai@suse.com
Subject: Re: [PATCH 1/4] ASoC: Intel: Skylake: Change the order of machine device and platform registration
Date: Tue, 21 Apr 2020 15:49:17 -0500 [thread overview]
Message-ID: <bd0e8d65-74ea-8b17-9f92-ed980e265a1c@linux.intel.com> (raw)
In-Reply-To: <20200421202519.4008-2-mateusz.gorski@linux.intel.com>
On 4/21/20 3:25 PM, Mateusz Gorski wrote:
> Swap the order of machine device and platform device registration.
> This change ensures that even if the codec enumeration falls late - during
> the driver module or topology reload - i2s_dev field is always ready to
> be used.
Are you sure?
The platform device will register the DAIs that are used by the machine
driver, don't you have a risk of missing dependencies during the card
registration with this change?
Put differently, why do this now when the existing code has been
'working' for a number of years without needing such a change?
> Follow-up patch uses data from this field to create alternative topology
> name based on used machine device.
>
> Signed-off-by: Mateusz Gorski <mateusz.gorski@linux.intel.com>
> ---
> sound/soc/intel/skylake/skl.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
> index 63182bfd7941..8473eb13ea65 100644
> --- a/sound/soc/intel/skylake/skl.c
> +++ b/sound/soc/intel/skylake/skl.c
> @@ -819,16 +819,16 @@ static void skl_probe_work(struct work_struct *work)
> /* create codec instances */
> skl_codec_create(bus);
>
> - /* register platform dai and controls */
> - err = skl_platform_register(bus->dev);
> + err = skl_machine_device_register(skl);
> if (err < 0) {
> - dev_err(bus->dev, "platform register failed: %d\n", err);
> + dev_err(bus->dev, "machine register failed: %d\n", err);
> goto out_err;
> }
>
> - err = skl_machine_device_register(skl);
> + /* register platform dai and controls */
> + err = skl_platform_register(bus->dev);
> if (err < 0) {
> - dev_err(bus->dev, "machine register failed: %d\n", err);
> + dev_err(bus->dev, "platform register failed: %d\n", err);
> goto out_err;
> }
>
>
next prev parent reply other threads:[~2020-04-21 22:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 20:25 [PATCH 0/4] Add support for different DMIC configurations Mateusz Gorski
2020-04-21 20:25 ` [PATCH 1/4] ASoC: Intel: Skylake: Change the order of machine device and platform registration Mateusz Gorski
2020-04-21 20:49 ` Pierre-Louis Bossart [this message]
2020-04-22 12:03 ` Gorski, Mateusz
2020-04-21 20:25 ` [PATCH 2/4] ASoC: Intel: Skylake: Add alternative topology binary name Mateusz Gorski
2020-04-21 20:25 ` [PATCH 3/4] ASoC: Intel: Multiple I/O PCM format support for pipe Mateusz Gorski
2020-04-21 20:25 ` [PATCH 4/4] ASoC: Intel: Skylake: Automatic DMIC format configuration according to information from NHLT Mateusz Gorski
2020-04-21 20:55 ` Pierre-Louis Bossart
2020-04-22 12:04 ` Gorski, Mateusz
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=bd0e8d65-74ea-8b17-9f92-ed980e265a1c@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=cezary.rojewski@intel.com \
--cc=mateusz.gorski@linux.intel.com \
--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