From: Ashish Chavan <ashish.chavan@kpitcummins.com>
To: alsa-devel@alsa-project.org
Subject: What is correct way to put conditional stuff in ASoC codec driver?
Date: Thu, 30 Jun 2011 18:16:30 +0530 [thread overview]
Message-ID: <1309437990.15931.67.camel@matrix> (raw)
Hi,
I am working on updating ASoC codec driver for Dialog's DA7210 codec
(sound/soc/codec/da7210.c). This update would be a major functionality update in
nature. In fact we already have a feature complete driver for this codec but
there are two main issues with that driver,
(1) It was developed(and tested) for a quite old kernel version (2.6.28)
(2) It was written in custom(non standard) way and not suitable for direct
submission to kernel
Our final goal is to pull in all missing features from this custom driver in to
existing mainline driver. I have already created few patches for basic functions
but I am bit confused at one point. Some of the features supported by this codec
have inter dependency, e.g. ALC can be used only if NOISE SUPRESSION is disabled.
So ideally, all controls related to ALC should be either disabled or not added at
all, if NOISE SUPRESSION to be used. There are few other features having similar
kind of dependency.
I just want to know what is the correct way to handle this in ASoC codec driver?
Looking at the existing codec drivers, it seems that having conditional defines
is not common here. As We just want to support static configuration of such
features, is it a good idea to add sub menu options in driver's Kconfig to
enable/disable such features and use them within code?
Any pointer(s) to existing code are most welcome.
Thanks,
-- Ashish
----------------------------------------------------------------------------
|| Linux Is User Friendly, It's Just Selective About Who It's Friends Are ||
----------------------------------------------------------------------------
next reply other threads:[~2011-06-30 12:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 12:46 Ashish Chavan [this message]
2011-06-30 16:37 ` What is correct way to put conditional stuff in ASoC codec driver? 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
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=1309437990.15931.67.camel@matrix \
--to=ashish.chavan@kpitcummins.com \
--cc=alsa-devel@alsa-project.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.