From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
alsa-devel@alsa-project.org,
Mylene Josserand <mylene.josserand@free-electrons.com>,
Chen-Yu Tsai <wens@csie.org>
Subject: DAPM over two regmaps (and a mailbox)
Date: Mon, 19 Sep 2016 12:54:19 +0200 [thread overview]
Message-ID: <20160919105419.GK8719@lukather> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1718 bytes --]
Hi,
We've been working recently on a later SoC (Allwinner A33) with a
codec directly embedded into it, just like
sound/soc/sunxi/sun4i-codec.c, but this time using the usual i2s
controller we had, instead of a custom DAI.
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).
Those are apparently used to control the analog part of the codec,
including powering up the DAC, so it really feels like they should be
part of DAPM.
However, since we will obviously have a regmap for the main register
space of the codec, that leaves us with two regmaps that we need to
use, depending on the register we want to set, and DAPM doesn't really
seem to be able to handle that.
To make things worse, the register in the syscon behaves as a mailbox,
where you actually have to set in that register the address you want
to modify and the new value, in a single write. This also seem to
deviate from the usual DAPM access pattern.
I'm not really sure how to handle that properly. For now, we just did
those writes outside of DAPM, in the startup, shutdown and prepare
shutdowns. We could also have a meta-regmap, that would have custom
write and read functions, and depending on the register would turn to
our syscon, or do a writel.
Or we could try to make DAPM able to use different regmaps depending
on the register, but that seem do be very intrusive.
Do you have any suggestions or preferences on how to implement this
properly?
Thanks,
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 --]
next reply other threads:[~2016-09-19 10:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-19 10:54 Maxime Ripard [this message]
2016-09-19 11:12 ` DAPM over two regmaps (and a mailbox) 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
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=20160919105419.GK8719@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.