All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>, Lars-Peter <lars@metafoo.de>
Cc: Simon <horms@verge.net.au>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [RFC][PATCH 0/x] ASoC: replace platform to component
Date: Tue, 20 Jun 2017 02:25:32 +0000	[thread overview]
Message-ID: <87efuf9z8u.wl%kuninori.morimoto.gx@renesas.com> (raw)


Hi Mark, Lars-Peter

Now, we can replace "platform" to "component".
It will be large patch-set. To avoid many posting big-patch-set,
I will post few of then as example.

1) - 2) : prepare for last missing parts for replace
3) - 4) : example of replace patch
5)      : remove platform

Kuninori Morimoto (xx):
      1) ASoC: snd_soc_component_driver has snd_pcm_ops
      2) ASoC: snd_soc_component_driver has snd_compr_ops
      3) ASoC: replace platform to component on sh/rcar
      4) ASoC: replace platform to component on sst-xxx
      5) ASoC: remove platform related things

Big change of this replace are
 1) snd_soc_lookup_platform() will be snd_soc_lookup_component()
 2) debugfs_create_file("platform", xxx) will be debugfs_create_file("component", xxx)
 3) remove platform_list

1st Note is that it is still using rtd->platform_com style.
I guess it will be removed or replaced in the future, but it is not
this patch-set purpose.

2nd Note is that, as you can see, above example is merging few
components into 1 component.
Almost all cases, 1 component is for register DAI, 1 component is
for register platform. I think we can merge these into 1 component.

I have 1 concern. Current snd_soc_unregister_component() is checking
"dev" only. This means, 1 device : 1 component can only be correctly handled.
I don't know detail, but below case, maybe works.

	snd_soc_register_component(dev, driver_A);
	snd_soc_register_component(dev, driver_B);

	snd_soc_unregister_component(dev);
	snd_soc_unregister_component(dev);

I think we want to have "driver" parameter on unregister, like

	snd_soc_unregister_component(dev, driver_A);
	snd_soc_unregister_component(dev, driver_B);

For example, tegra sound driver is registering its component, and
snd_dmaengine_pcm_register() which register its component.
One headache is that snd_dmaengine_pcm_unregister() is using
snd_soc_lookup_platform() which will be replaced to
snd_soc_lookup_component(). And its parameter is only "dev".

We want to have below
	snd_soc_lookup_component(dev, driver);
	snd_soc_unregister_component(dev, driver);

Can I replace current unregister before "replace platform" patch set ?
(= many drivers are using it)

Best regards
---
Kuninori Morimoto

             reply	other threads:[~2017-06-20  2:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20  2:25 Kuninori Morimoto [this message]
2017-06-20  2:26 ` [RFC][PATCH 1/x] ASoC: snd_soc_component_driver has snd_pcm_ops Kuninori Morimoto
2017-06-20  2:27 ` [RFC][PATCH 2/x] ASoC: snd_soc_component_driver has snd_compr_ops Kuninori Morimoto
2017-06-20  2:27 ` [RFC][PATCH 3/x] ASoC: replace platform to component on sh/rcar Kuninori Morimoto
2017-06-20  2:27 ` [RFC][PATCH 4/x] ASoC: replace platform to component on sst-xxx Kuninori Morimoto
2017-06-20  2:28 ` [RFC][PATCH 5/x] ASoC: remove platform related things Kuninori Morimoto
2017-06-21  4:32 ` [RFC][PATCH 0/x] ASoC: replace platform to component Kuninori Morimoto
2017-06-21 16:15   ` Mark Brown
2017-06-22  1:01     ` Kuninori Morimoto

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=87efuf9z8u.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=horms@verge.net.au \
    --cc=lars@metafoo.de \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.