All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Linux-ALSA <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@kernel.org>,
	Mylene Josserand <mylene.josserand@free-electrons.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: DAPM over two regmaps (and a mailbox)
Date: Tue, 20 Sep 2016 08:41:02 +0200	[thread overview]
Message-ID: <20160920064102.GY8719@lukather> (raw)
In-Reply-To: <CAGb2v65qARPr1cEL5oU6bsiwK61rFQx4Gma=Z0r8DK5WTBOnmA@mail.gmail.com>


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

Hi,

On Tue, Sep 20, 2016 at 08:32:50AM +0800, Chen-Yu Tsai wrote:
> On Tue, Sep 20, 2016 at 3:15 AM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi,
> >
> > On Mon, Sep 19, 2016 at 10:56:10PM +0800, Chen-Yu Tsai wrote:
> >> On Mon, Sep 19, 2016 at 7:34 PM, Maxime Ripard
> >> <maxime.ripard@free-electrons.com> wrote:
> >> > On Mon, Sep 19, 2016 at 12:12:47PM +0100, Mark Brown wrote:
> >> >> On Mon, Sep 19, 2016 at 12:54:19PM +0200, Maxime Ripard wrote:
> >> >>
> >> >> > That codec is mapped in memory, however, we have a bunch of DAPM
> >> >> > widgets that are mapped in a separate register space, that should
> >> >> > probably be exposed through a syscon (but isn't yet).
> >> >>
> >> >> Why not just represent those as a separate device?
> >> >
> >> > I don't know, this seems to be supplies to muxers, mixers, DACs, the
> >> > amplifier (and the amplifier volume too, even though that's not a
> >> > widget), and it looks really intertwinned, how would you separate
> >> > them?
> >>
> >> I asked Mark the same question a while ago. I was looking at the A31s
> >> codec, which is kind of a cross between A31 and A23.
> >
> > We're working on the A33, that has yet another setup from the A23..
> 
> Looks like the "analog control" bits are similar, if not completely
> the same. As described on page 221, the bits are accessed through a
> mapping mechanism in register 0x01f015c0.

Yes, we've seen that too.

> So the solution would likely be the same for A31s/A23/A33: a platform
> device/driver for that particular piece of hardware that registers a
> custom regmap and an ASoC component. This would be under the PRCM
> mfd. The main codec would list this (I think it's by name?) under
> it's aux_components.
>
> >> Mark recommended using aux devices. AFAIU the codec would just
> >> register the DAC and ADC widgets, the digital volume control, and
> >> whatever digital bits there are. The analog side would be done in a
> >> asoc component driver, which would register all the analog widgets
> >> and controls. You then tie them together at the card level.
> >
> > Ok. How would that work? Can you setup routes between widgets defined
> > in different components?
> 
> Indeed you can. I think that is what the ASoC card is for, to stitch
> up various components. Not sure if you can directly use widgets from
> aux components in the codec component driver though. I guess it depends
> on the probe/binding sequence.

I didn't know about the aux_devs, but yeah, it definitely looks like
the proper solution.

We'll work on that.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

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



  parent reply	other threads:[~2016-09-20 15:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 10:54 DAPM over two regmaps (and a mailbox) Maxime Ripard
2016-09-19 11:12 ` Mark Brown
2016-09-19 11:34   ` Maxime Ripard
2016-09-19 12:00     ` Mark Brown
2016-09-19 14:56     ` Chen-Yu Tsai
2016-09-19 19:15       ` Maxime Ripard
2016-09-20  0:32         ` Chen-Yu Tsai
2016-09-20  0:41           ` Chen-Yu Tsai
2016-09-20  6:41             ` Maxime Ripard
2016-09-20 15:54               ` Chen-Yu Tsai
2016-09-20  6:41           ` Maxime Ripard [this message]
2016-09-20 10:46           ` 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=20160920064102.GY8719@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=boris.brezillon@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=mylene.josserand@free-electrons.com \
    --cc=wens@csie.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.