From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
Sebastian Hesselbarth <sebastian.hesselbarth@googlemail.com>,
Rabeeh Khoury <rabeeh@solid-run.com>,
linux-arm-kernel@lists.infradead.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Liam Girdwood <lrg@ti.com>,
Arnaud Patard <arnaud.patard@rtp-net.org>
Subject: Re: [PATCH 0/10] Kirkwood ASoC drivers fixes and improvements
Date: Fri, 23 Nov 2012 10:36:26 +0900 [thread overview]
Message-ID: <20121123013625.GA4385@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20121122140614.GA26930@n2100.arm.linux.org.uk>
[-- Attachment #1.1: Type: text/plain, Size: 3110 bytes --]
On Thu, Nov 22, 2012 at 02:06:14PM +0000, Russell King - ARM Linux wrote:
> Instead, a DT description will just declare there to be one I2S device
> with its relevant resources.
Yes, this is exactly the sort of thing all the existing platforms
using DT are doing in their ASoC drivers - there's normally some
grouping or sharing at the hardware level that doesn't map exactly onto
Linux models. We're already at the point you're trying to get to here.
> Such a description is _inherently_ incompatible with ASoC as long as
> ASoC insists that there is this artificial distinction.
> What Mark is telling me is that he requires yet more board files to
> spring up under sound/soc/ which create these artificial platform
> devices. Not only does that go against the direction which we're heading
What I said was that you should just register everything from the DT
nodes that describe the hardware and not create dummy devices in the DT
for the Linux internals. The drivers instantiated from DT should take
care of mapping the hardware into Linux, instantiating everything they
need to from code. The approach the existing drivers in mainline are
taking is to register multiple ASoC functions from a single device model
device which seems like the logical approach to doing the mapping to me.
Some of the remarks you've made on IRC and code you've pointed me at
suggest that you have formed the impression that there needs to be a 1:1
mapping between device model devices and ASoC function drivers. This is
not the case. A driver for a device model device can register as many
different ASoC functions of whatever type it sees fit from a single
device model device.
> on ARM (at Linus' insistance) to get rid of board files, but it perpetuates
> this silly idea that every audio interface should be split up whether
> there's a distinction there or not.
I'm not entirely convinced that modelling different areas of
functionality with different ops structures (which is essentially what
is happening here) is a massive design flaw.
> We need to have solutions which do not require artificial breakup of
> drivers; we need solutions where hardware can be described by DT and
> that DT description be used by the kernel with the minimum of code.
> What we don't need are yet more board files appearing in some other
> random part of the kernel tree.
This is the current situation, none of the existing DT using platforms
have had any need to do that. Nothing about Kirkwood audio seems to be
at all unusual here.
We *do* have board files for the linkage between the various components
since (as discussed previously ad nauseum) a lot of embedded audio
hardware is interesting enough to warrant having a driver itself. There
has been some work on generic drivers for simpler systems which should
be useful and can be built on, though we do need the problems with the
clock framework availability to be addressed (both getting it available
on all platforms and ensuring that the platforms with custom frameworks
move to the genric one). These drivers are separate to the issue you
are discussing.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/10] Kirkwood ASoC drivers fixes and improvements
Date: Fri, 23 Nov 2012 10:36:26 +0900 [thread overview]
Message-ID: <20121123013625.GA4385@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <20121122140614.GA26930@n2100.arm.linux.org.uk>
On Thu, Nov 22, 2012 at 02:06:14PM +0000, Russell King - ARM Linux wrote:
> Instead, a DT description will just declare there to be one I2S device
> with its relevant resources.
Yes, this is exactly the sort of thing all the existing platforms
using DT are doing in their ASoC drivers - there's normally some
grouping or sharing at the hardware level that doesn't map exactly onto
Linux models. We're already at the point you're trying to get to here.
> Such a description is _inherently_ incompatible with ASoC as long as
> ASoC insists that there is this artificial distinction.
> What Mark is telling me is that he requires yet more board files to
> spring up under sound/soc/ which create these artificial platform
> devices. Not only does that go against the direction which we're heading
What I said was that you should just register everything from the DT
nodes that describe the hardware and not create dummy devices in the DT
for the Linux internals. The drivers instantiated from DT should take
care of mapping the hardware into Linux, instantiating everything they
need to from code. The approach the existing drivers in mainline are
taking is to register multiple ASoC functions from a single device model
device which seems like the logical approach to doing the mapping to me.
Some of the remarks you've made on IRC and code you've pointed me at
suggest that you have formed the impression that there needs to be a 1:1
mapping between device model devices and ASoC function drivers. This is
not the case. A driver for a device model device can register as many
different ASoC functions of whatever type it sees fit from a single
device model device.
> on ARM (at Linus' insistance) to get rid of board files, but it perpetuates
> this silly idea that every audio interface should be split up whether
> there's a distinction there or not.
I'm not entirely convinced that modelling different areas of
functionality with different ops structures (which is essentially what
is happening here) is a massive design flaw.
> We need to have solutions which do not require artificial breakup of
> drivers; we need solutions where hardware can be described by DT and
> that DT description be used by the kernel with the minimum of code.
> What we don't need are yet more board files appearing in some other
> random part of the kernel tree.
This is the current situation, none of the existing DT using platforms
have had any need to do that. Nothing about Kirkwood audio seems to be
at all unusual here.
We *do* have board files for the linkage between the various components
since (as discussed previously ad nauseum) a lot of embedded audio
hardware is interesting enough to warrant having a driver itself. There
has been some work on generic drivers for simpler systems which should
be useful and can be built on, though we do need the problems with the
clock framework availability to be addressed (both getting it available
on all platforms and ensuring that the platforms with custom frameworks
move to the genric one). These drivers are separate to the issue you
are discussing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20121123/c35b8c7f/attachment.sig>
next prev parent reply other threads:[~2012-11-23 1:36 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-20 12:17 [PATCH 0/10] Kirkwood ASoC drivers fixes and improvements Russell King - ARM Linux
2012-11-20 12:17 ` [PATCH 01/10] ASoC: kirkwood-dma: fix use of virt_to_phys() Russell King
2012-11-20 12:18 ` [PATCH 02/10] ASoC: kirkwood-dma: don't ignore other irq causes on error Russell King
2012-11-20 12:18 ` [PATCH 03/10] ASoC: kirkwood-i2s: fix DCO lock detection Russell King
2012-11-20 12:18 ` [PATCH 04/10] ASoC: kirkwood-i2s: fix DMA underruns Russell King
2012-11-20 12:19 ` [PATCH 05/10] ASoC: kirkwood-i2s: more pause-mode fixes Russell King
2012-11-20 12:19 ` [PATCH 06/10] ASoC: kirkwood-i2s: use devm_* APIs Russell King
2012-11-20 12:19 ` [PATCH 07/10] ASoC: kirkwood-i2s: better handling of play/record control registers Russell King
2012-11-20 12:20 ` [PATCH 08/10] ASoC: kirkwood-dma: remove restriction on sample rates Russell King
2012-11-20 12:20 ` [PATCH 09/10] ASoC: kirkwood-i2s: add support for external clock rates Russell King
2012-11-20 12:20 ` [PATCH 0/10] Kirkwood ASoC drivers fixes and improvements Russell King - ARM Linux
2012-11-22 14:06 ` Russell King - ARM Linux
2012-11-22 14:06 ` Russell King - ARM Linux
2012-11-23 1:36 ` Mark Brown [this message]
2012-11-23 1:36 ` Mark Brown
[not found] ` <87ip8xodv1.fsf@lebrac.rtp-net.org>
2012-11-23 1:38 ` Mark Brown
2012-11-20 12:20 ` [PATCH 10/10] ASoC: kirkwood-dma: remove channel restrictions Russell King
2012-11-21 1:40 ` [PATCH 0/10] Kirkwood ASoC drivers fixes and improvements Mark Brown
2012-11-21 9:41 ` Russell King - ARM Linux
2012-11-21 9:47 ` Mark Brown
2012-11-21 9:59 ` Takashi Iwai
2012-11-21 10:01 ` Mark Brown
2012-11-21 10:05 ` Russell King - ARM Linux
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=20121123013625.GA4385@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.patard@rtp-net.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=lrg@ti.com \
--cc=rabeeh@solid-run.com \
--cc=sebastian.hesselbarth@googlemail.com \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.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.