From: Adam Jiang <jiang.adam@gmail.com>
To: Alsa-devel@alsa-project.org
Subject: Re: How to implement capture_switch control?
Date: Thu, 23 Jun 2011 10:52:14 +0900 [thread overview]
Message-ID: <BANLkTikJPorHs8JeAZmn3RpmXFA4s1asYA@mail.gmail.com> (raw)
In-Reply-To: <20110622130644.GG23666@sirena.org.uk>
2011/6/22 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Wed, Jun 22, 2011 at 04:56:26PM +0900, Adam Jiang wrote:
>> 2011/6/21 Mark Brown <broonie@opensource.wolfsonmicro.com>:
>> > On Mon, Jun 20, 2011 at 04:15:38PM +0900, Adam Jiang wrote:
>
>> > If the hardware does not physically support mute then this should be
>> > emulated in software. ?In the case of the WM8903 the device does not
>> > have a specific capture mute control, though extremely low gains are
>> > supported for the Capture Volume control which function as a mute so
>> > you could also set minimum Capture Volume.
>
>> I got the idea about software emulation for mute. Would you please
>> point me to an example about device/driver where hardware capture
>> switch is supported?
>
> grep "Capture Switch" sound/soc/codecs/*.c
>
I got wm8904 as an example. In the driver of wm8904, there is a
control defined as
SOC_DOUBLE_R("Capture Switch", WM8904_ANALOGUE_LEFT_INPUT_0,
WM8904_ANALOGUE_RIGHT_INPUT_0, 7, 1, 0),
And, there is also its peer in wm8903 defined as
SOC_SINGLE("Left Input PGA Switch", WM8903_ANALOGUE_LEFT_INPUT_0,
7, 1, 1),
I checked their datasheet and I found there is no difference between
the registers of ANALOGUE_LEFT_INPUT_0. Both of them have one bit for
mute/unmute analog input path. Comparing SOC_SINGLE and SOC_DOUBLE
macro, one snd_soc_control structure is missing in former. What is
exactly the difference between the two definitions. Is there any docs
to describe how could I use these macros in soc.h?
prev parent reply other threads:[~2011-06-23 1:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-20 7:15 How to implement capture_switch control? Adam Jiang
2011-06-21 1:51 ` Mark Brown
2011-06-22 7:56 ` Adam Jiang
2011-06-22 13:06 ` Mark Brown
2011-06-23 1:52 ` Adam Jiang [this message]
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=BANLkTikJPorHs8JeAZmn3RpmXFA4s1asYA@mail.gmail.com \
--to=jiang.adam@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox