From: Timur Tabi <timur@freescale.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: dp@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org,
lrg@slimlogic.co.uk
Subject: Re: [PATCH] ASoC: cs4270: fix dynamic initialization of register cache
Date: Thu, 6 Jan 2011 14:24:11 -0600 [thread overview]
Message-ID: <4D2624EB.6060704@freescale.com> (raw)
In-Reply-To: <20110106201511.GA8018@opensource.wolfsonmicro.com>
Mark Brown wrote:
>> > + u8 reg_cache[CS4270_NUMREGS];
>> > + struct snd_soc_codec_driver codec_drv;
> Having a driver per device is pretty icky and off the top of my head I'd
> expect it to cause problems if there are two cs4270 in the system. It
> would be much nicer and more maintainable to avoid bodging around the
> API like this.
The problem is that I need a distinct default register cache for each CS4270 in
the system, so I don't know how to reconcile the idea that there is supposed to
be only one snd_soc_codec_driver for all devices.
What do I do if there are two CS4270s in a system, and they each have different
power-on default values for the registers? Granted, it's a contrived example,
but this could happen if the first CS4270 is a rev1 chip, and the second is a
rev2 chip.
And even if this example is contrived, it's conceivable that there can be codecs
where the power-on defaults are set by pin configuration. Perhaps codec #1 is
muted by default and codec #2 isn't.
--
Timur Tabi
Linux kernel developer at Freescale
next prev parent reply other threads:[~2011-01-06 20:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 18:52 [PATCH] ASoC: cs4270: fix dynamic initialization of register cache Timur Tabi
2011-01-06 20:15 ` Mark Brown
2011-01-06 20:24 ` Timur Tabi [this message]
2011-01-06 21:41 ` Mark Brown
2011-01-06 20:50 ` Timur Tabi
2011-01-06 21:31 ` Mark Brown
2011-01-06 21:35 ` Timur Tabi
2011-01-06 22:04 ` Mark Brown
2011-01-06 22:07 ` Timur Tabi
2011-01-06 22:31 ` 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=4D2624EB.6060704@freescale.com \
--to=timur@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dp@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/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).