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: Re: [RFC][PATCH 0/x] ASoC: replace platform to component
Date: Wed, 21 Jun 2017 04:32:30 +0000	[thread overview]
Message-ID: <87r2ye6k4p.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87efuf9z8u.wl%kuninori.morimoto.gx@renesas.com>


Hi Mark, Lars-Peter

> 1st Note is that it is still using rtd->platform_com style.

It is still using this "rtd->xxx" style, but we should expand it.
I'm thinking that we can connect each component to rtd by using list
and we can get it by "driver" (or something).
Then, we can add new snd_soc_lookup_runtime() function for it.
But, what do you think ?

	- rtd->platform_com = component;
	+ list_add(component->rtd_list, rtd->list_head);

	- struct device *dev = rtd->platform_com->dev;
	+ struct snd_soc_component *component = snd_soc_lookup_runtime(rtd, driver);
	+ struct device *dev = component->dev;

struct snd_soc_component *snd_soc_lookup_runtime(rtd, driver)
{
	...
	list_for_each_entry(component, &rtd->list_head, xxx) {
		if (driver == component->driver)
			return component;
	}

	return NULL;
}


Best regards
---
Kuninori Morimoto

  parent reply	other threads:[~2017-06-21  4:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20  2:25 [RFC][PATCH 0/x] ASoC: replace platform to component Kuninori Morimoto
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 ` Kuninori Morimoto [this message]
2017-06-21 16:15   ` [RFC][PATCH 0/x] ASoC: replace platform to component 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=87r2ye6k4p.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.