alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ola Lilja <ola.o.lilja@stericsson.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Liam Girdwood <lrg@ti.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH 13/16] ASoC: codecs: Add AB8500 codec-driver
Date: Mon, 19 Mar 2012 12:09:57 +0000	[thread overview]
Message-ID: <20120319120956.GA3130@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4F66E934.1060909@stericsson.com>


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

On Mon, Mar 19, 2012 at 09:07:16AM +0100, Ola Lilja wrote:
> On 03/17/2012 11:31 PM, Mark Brown wrote:

> > > We need to break chains on very specific positions to be able to
> > > affect only the parts intended. We also have switches (e.g. loopback)
> > > that is not belonging to a specific pin but is a brigde-switch in the
> > > middle of two chains, thus I don't think we can use what you suggest.

> > But if you have a control that actually does something then surely there
> > should be some interaction with the chip when it is changed?

> No, we don't want the control to do anything with the chip before
> playback/capture starts, but rather just indicate that a specific path
> is active, and then when the stream starts the chain gets complete and
> the widgets then do all interaction with the chip in the order that
> our HW requires. There is no bit that we can set prior to the
> execution of the DAPM-chain, without introducing clicks.

In the case of things that go external pins then I'd really expect the
existing solution with pin switches to work, in other cases something
else may be needed but we need to understand what you're trying to do.
The issues with internal paths may need something but please be more
concrete about what the actual register controls are and why you're
doing such unusual things.  The fact that you're using isolated switches
and there's no mixers involved is really surprisng.

> > One of the nice things about open source code is that it's always
> > possible to extend the core if required.

> OK, so do you want us to make it possible to have NOPM for a
> playback/capture-switch? Can you confirm that this is OK and that it
> is possible to accomplish without destroying any mechanism in how it
> works today?

I'm saying that if you're doing things within your driver that go trough
contortions or break the userspace interfaces because the frameworks
didn't support things then you should be fixing the frameworks rather
than doing whatever in the driver.  This sort of thing seems to be at
the root of several of the problems I'm seeing here, it's similar to all
the stuff you're doing with regulators.

> So, what you want is another device/driver pair where our current
> acc.det.-driver adds a driver to the device we add in the ASoC-driver?

I can't parse what you're saying here, sorry.

> We are thinking of modifying so that we put the Android-vibra-functionality in
> userspace, and then it can use vibra through the controls we provide in the
> ASoC-driver.

That'd obviously remove any kernel level problems.

> Regarding the regulators, I was under the impression that everything
> outside the actual codec, we could put in the machine-driver (which I
> think looks pretty good).  This would make a clear distinction between
> all codec-register-handling and usage of those external frameworks
> (regulators and clocks). I have started to move the code location of

No.  That's exactly the sort of stuff we don't want to see.  The fact
that the device needs power to operate isn't something that's specific
to a particular board, it's a property of the silicon.

> regulators/clocks into the codec-file and this results
> in that the machine-driver is basically empty of functionality and the
> codec-file is growing even bigger. Is this really what we want?

Yes, of course!  You need to get away from the idea that the only board
your device will ever be used on is the reference board, things that are
generic to the device should be supported by the device driver for the
device.  If there's a device driver for the part we shouldn't be in the
situation where any new system using the device needs to replicate basic
functionality needed to get the device working.

> I'm also not sure if you have seen that we actually do control ALL regulators
> and clocks via DAPM. The main power-regulator is controlled through a

I've not suggested that.  Look at how other drivers manage their power.

> You are right that a large part of this code is there because it is needed by
> external requirements, but it does not mean that DAPM is not controlling the
> regulators and clocks, just that there is another interface that can also turn
> on/off the power.

I'm not seeing any code in the driver which manages the regulators...

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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



  parent reply	other threads:[~2012-03-19 12:10 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 15:11 [PATCH 01/16] ASoC: core: Add multi reg control struct & macros Ola Lilja
2012-03-13 15:11 ` [PATCH 02/16] ASoC: core: Add 8bit multi reg control accessors Ola Lilja
2012-03-13 21:25   ` Mark Brown
2012-03-22 16:58     ` Kristoffer KARLSSON
2012-03-22 17:02       ` Mark Brown
2012-03-13 15:11 ` [PATCH 03/16] ASoC: core: Add range of " Ola Lilja
2012-03-13 21:23   ` Mark Brown
2012-03-13 15:11 ` [PATCH 04/16] ASoC: core: Add info accessor for mreg control Ola Lilja
2012-03-13 15:11 ` [PATCH 05/16] ASoC: core: Add strobe control Ola Lilja
2012-03-13 21:33   ` Mark Brown
2012-03-22 16:20     ` Kristoffer KARLSSON
2012-03-22 16:33       ` Mark Brown
2012-03-22 17:09         ` Kristoffer KARLSSON
2012-03-22 17:28           ` Mark Brown
2012-03-13 15:11 ` [PATCH 06/16] ASoC: core: Add macros for 8bit hwdep multi reg cntrl Ola Lilja
2012-03-13 21:36   ` Mark Brown
2012-03-13 15:11 ` [PATCH 07/16] ASoC: core: Add macro for hwdep range of regs control Ola Lilja
2012-03-13 15:11 ` [PATCH 08/16] ARM: ux500: Add DMA-channels for MSP Ola Lilja
2012-03-13 15:11 ` [PATCH 09/16] arm: ux500: Add audio-regulators Ola Lilja
2012-03-14 10:42   ` Linus Walleij
2012-03-13 15:11 ` [PATCH 10/16] arm: ux500: Add support for MSP I2S-devices Ola Lilja
2012-03-13 21:40   ` Mark Brown
2012-03-14  9:39     ` Linus Walleij
2012-03-14 11:44       ` Mark Brown
2012-03-13 15:11 ` [PATCH 11/16] ARM: ux500: Add placeholder for clk_set_parent Ola Lilja
2012-03-14 10:43   ` Linus Walleij
2012-03-13 15:11 ` [PATCH 14/16] ASoC: Ux500: Add platform-driver Ola Lilja
2012-03-13 22:48   ` Mark Brown
2012-03-14 10:50     ` Linus Walleij
2012-03-14 12:31       ` Mark Brown
2012-03-13 15:11 ` [PATCH 15/16] ASoC: Ux500: Activate the Ux500 ASoC-driver Ola Lilja
2012-03-13 15:11 ` [PATCH 16/16] ASoC: Ux500: Add machine-driver Ola Lilja
2012-03-13 23:03   ` Mark Brown
2012-03-13 21:39 ` [PATCH 01/16] ASoC: core: Add multi reg control struct & macros Mark Brown
2012-03-21 12:07   ` Kristoffer KARLSSON
2012-03-21 12:40     ` Mark Brown
2012-03-22 15:46       ` Kristoffer KARLSSON
2012-03-22 15:56         ` Mark Brown
     [not found] ` <1331651503-16917-13-git-send-email-ola.o.lilja@stericsson.com>
2012-03-13 22:11   ` [PATCH 12/16] ASoC: Ux500: Add MSP I2S-driver Mark Brown
     [not found] ` <1331651503-16917-14-git-send-email-ola.o.lilja@stericsson.com>
2012-03-13 22:45   ` [PATCH 13/16] ASoC: codecs: Add AB8500 codec-driver Mark Brown
2012-03-14 13:27     ` Ola LILJA2
2012-03-14 13:45       ` Mark Brown
2012-03-15 14:50         ` Ola Lilja
2012-03-15 15:29           ` Mark Brown
2012-03-16 13:09             ` Ola Lilja
2012-03-17 22:31               ` Mark Brown
2012-03-19  8:07                 ` Ola Lilja
2012-03-19  8:23                   ` Linus Walleij
2012-03-19 12:09                   ` Mark Brown [this message]
2012-03-19 14:54                     ` Ola Lilja
2012-03-19 15:43                       ` Mark Brown

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=20120319120956.GA3130@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linus.walleij@linaro.org \
    --cc=lrg@ti.com \
    --cc=ola.o.lilja@stericsson.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;
as well as URLs for NNTP newsgroup(s).