alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* Mixer control appears twice in alsamixer
@ 2015-09-11  7:49 James Cameron
  2015-09-11  8:39 ` Clemens Ladisch
  0 siblings, 1 reply; 2+ messages in thread
From: James Cameron @ 2015-09-11  7:49 UTC (permalink / raw)
  To: alsa-devel

G'day,

I've a mixer control for "Analog Mic Boost" which appears twice in
alsamixer --view all, and once in amixer.  How do I cause it to appear
only once in alsamixer?

amixer shows both Playback and Capture channels for the control:

--

Simple mixer control 'Analog Mic Boost',0
  Capabilities: volume volume-joined
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 8
  Mono: 8 [100%]

--

The control is declared with:

/* {0, +20, +24, +30, +35, +40, +44, +50, +52}dB */
static unsigned int mic_bst_tlv[] = {
	TLV_DB_RANGE_HEAD(7),
	0, 0, TLV_DB_SCALE_ITEM(0, 0, 0),
	1, 1, TLV_DB_SCALE_ITEM(2000, 0, 0),
	2, 2, TLV_DB_SCALE_ITEM(2400, 0, 0),
	3, 5, TLV_DB_SCALE_ITEM(3000, 500, 0),
	6, 6, TLV_DB_SCALE_ITEM(4400, 0, 0),
	7, 7, TLV_DB_SCALE_ITEM(5000, 0, 0),
	8, 8, TLV_DB_SCALE_ITEM(5200, 0, 0),
};

static const struct snd_kcontrol_new rt5631_snd_controls[] = {
...
	SOC_SINGLE_TLV("Analog Mic Boost", RT5631_MIC_CTRL_2,
		       RT5631_MIC1_BOOST_SHIFT, 8, 0, mic_bst_tlv),
...
}

I'm working on alc5631/rt5631 in a local branch of either 3.0 or 3.5
for the OLPC XO-1.75 and XO-4.  But the declaration seems no different
in 4.2, apart from the name of the control.

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/sound/soc/codecs/rt5631.c?id=refs/tags/v4.2#n176

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/sound/soc/codecs/rt5631.c?id=refs/tags/v4.2#n233

-- 
James Cameron
http://quozl.linux.org.au/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Mixer control appears twice in alsamixer
  2015-09-11  7:49 Mixer control appears twice in alsamixer James Cameron
@ 2015-09-11  8:39 ` Clemens Ladisch
  0 siblings, 0 replies; 2+ messages in thread
From: Clemens Ladisch @ 2015-09-11  8:39 UTC (permalink / raw)
  To: James Cameron, alsa-devel

James Cameron wrote:
> I've a mixer control for "Analog Mic Boost" which appears twice in
> alsamixer --view all, and once in amixer.

This control's name specifies that it applies to both directions:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/sound/alsa/ControlNames.txt
(Apparently, most SoC drivers do not care about alsamixer.)

However, it should not appear twice.  This appears to be a bug in alsamixer.

> How do I cause it to appear only once in alsamixer?

Append " Capture Volume".


Regards,
Clemens

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-11  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11  7:49 Mixer control appears twice in alsamixer James Cameron
2015-09-11  8:39 ` Clemens Ladisch

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).