From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Ashish Chavan <ashish.chavan@kpitcummins.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: What is correct way to put conditional stuff in ASoC codec driver?
Date: Mon, 4 Jul 2011 15:34:20 -0700 [thread overview]
Message-ID: <20110704223419.GA1030@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1309762610.15931.119.camel@matrix>
On Mon, Jul 04, 2011 at 12:26:50PM +0530, Ashish Chavan wrote:
> On Fri, 2011-07-01 at 21:47 +0530, Mark Brown wrote:
> > This requirement is actually fairly unusual, but there's plenty of
> > drivers with open coded controls for various reasons. Have you tried
> > looking at the existing drivers in mainline?
> Do you mean the requirement of having interdependent codec functionality
> is unusual? If yes, then it is something different that what I expected
Yes, or at least the need to actually worry about it is.
> and I need to do some homework before asking further questions. By
> "Homework" I roughly mean,
> (1) Going through data sheets of some of Wolfsons' codecs to find out if
> they have similar inter dependent functional blocks.
There should be no need to look at one particular vendor.
> (2) If something is found, have a detailed look at that codec's driver
> in mainline. Find out how these functions are handled.
I really don't understand the difficulties you are having here. There
are many examples of drivers implementing custom handling for controls
in the kernel, some of which do things that sound fairly similar to what
you're doing (though not exactly the same thing mostly).
> I haven't done this exercise yet, mainly because I assumed that my
> requirement is common and I could easily find a way to handle it from
> existing drivers or experts!
So when you looked at the drivers what did you see? I already told you
what you need to do:
| You'd need to implement custom controls for the relevant enables which
| check to see what is currently enabled and prevents enables if there
| are conflicts. You should do this dynamically and I'd expect that only
All you're doing is trying to restrict the values that can be set on a
control dynamically.
> In general, I have gone through some of the existing codec drivers in
> mainline to get a feel of them but couldn't find something that handles
> conditional part. May be I am missing something.
Please be more concrete about what you looked at and what you didn't
find which you were expecting. Any custom control should at least
include some bounds checking so it's very surprising you weren't able to
find any examples of how you could prevent the user setting invalid
settings.
next prev parent reply other threads:[~2011-07-04 22:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 12:46 What is correct way to put conditional stuff in ASoC codec driver? Ashish Chavan
2011-06-30 16:37 ` Mark Brown
2011-07-01 8:33 ` Ashish Chavan
2011-07-01 16:17 ` Mark Brown
2011-07-04 6:56 ` Ashish Chavan
2011-07-04 22:34 ` Mark Brown [this message]
2011-07-05 14:25 ` Ashish Chavan
2011-07-05 19:37 ` Mark Brown
2011-07-07 11:50 ` Ashish Chavan
2011-07-07 15:49 ` Mark Brown
2011-07-11 14:16 ` Ashish Chavan
2011-07-11 14:17 ` 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=20110704223419.GA1030@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=ashish.chavan@kpitcummins.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 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.