Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	"moderated list:SOUND" <alsa-devel@alsa-project.org>,
	open list <linux-kernel@vger.kernel.org>,
	Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Akshu Agrawal <akshu.agrawal@amd.com>,
	"Gustavo A. R. Silva" <garsilva@embeddedor.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Markus Elfring <elfring@users.sourceforge.net>
Subject: Re: [PATCH v2 1/3] ASoC: dwc: I2S Controller instance param added
Date: Wed, 18 Apr 2018 18:00:54 +0100	[thread overview]
Message-ID: <20180418170054.GK10061@sirena.org.uk> (raw)
In-Reply-To: <a6a4cf79-b7f7-a565-28a8-6205f8d13936@amd.com>


[-- Attachment #1.1: Type: text/plain, Size: 1723 bytes --]

On Wed, Apr 18, 2018 at 06:18:44PM +0530, Mukunda,Vijendar wrote:
> On Wednesday 18 April 2018 04:54 PM, Mark Brown wrote:
> > On Wed, Apr 18, 2018 at 04:34:52PM +0530, Vijendar Mukunda wrote:

> > > When multiple I2S controller instances created,
> > > i2s_instance parameter refers to i2s controller instance value.

> > You're missing the point here a bit - it's not just the defines for the
> > magic numbers that are the problem, it's the whole idea of passing
> > instance numbers around like this that's the big problem.  Whatever you

> In Audio Coprocessor (ACP), There are three I2S controllers can be
> configured/enabled.(I2S SP, I2S MICSP, BT I2S)
> Default enabled I2S controller instance is I2S SP instance.
> There is a requirement to enable BT I2S controller Instance along with
> I2S SP controller instance in one of our platforms Which has multiple codecs
> connected to each instance.

Describing how the system is wired up is the function of the machine
driver.  The individual drivers should just take configuration from the
machine driver.

> We have added one more parameter i2s instance to dwc platform data.
> So that AMDGPU ACP Driver will pass I2S controller instance value to dwc
> driver while creating device nodes for I2S Controllers.

This is not the way to do this - you can already get the struct device
for all the children from when they were instantiated, you should be
able to use this to reference them so you can bind the machine driver.
There's facilities for doing this (mostly serializing into dev_name() as
this was mostly used by board file based machines) which are already
used, if there's problems we should extend those rather than hacking
things into every single driver.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2018-04-18 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1524049494-19526-1-git-send-email-Vijendar.Mukunda@amd.com>
2018-04-18 11:04 ` [PATCH v2 1/3] ASoC: dwc: I2S Controller instance param added Vijendar Mukunda
2018-04-18 11:24   ` Mark Brown
2018-04-18 12:48     ` Mukunda,Vijendar
2018-04-18 17:00       ` Mark Brown [this message]
2018-04-18 11:04 ` [PATCH v2 2/3] ASoC: amd: dma driver changes for BT I2S instance Vijendar Mukunda
2018-04-19  0:27   ` Daniel Kurtz
2018-04-19  4:37     ` Mukunda,Vijendar
2018-04-18 11:04 ` [PATCH v2 3/3] ASoC: amd: enabling bt i2s config after acp reset Vijendar Mukunda

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=20180418170054.GK10061@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Jose.Abreu@synopsys.com \
    --cc=akshu.agrawal@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=elfring@users.sourceforge.net \
    --cc=garsilva@embeddedor.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=vijendar.mukunda@amd.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