alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* ASoC: Hiding unused CODEC mixer widgets in the machine driver
@ 2010-08-06  0:18 Stuart Longland
  2010-08-06 11:19 ` Mark Brown
  0 siblings, 1 reply; 6+ messages in thread
From: Stuart Longland @ 2010-08-06  0:18 UTC (permalink / raw)
  To: alsa-devel@alsa-project.org; +Cc: tiwai, lrg, broonie

Hi all,

Work has continued on the TLV320AIC3204 CODEC driver, and there have
been a number of fixes since the last patch was published.  However,
this CODEC is a rather complicated beast to drive, some may find the
controls a little unweildy, and as such, I was wondering if the machine
driver could be used to abstract this for a given target?

It's no use abstracting this in the CODEC, because some may want to
access the functionality I'm trying to hide.

The CODEC we're using has three line inputs; which may be treated as
either three mono differential inputs, or three stereo single-ended
inputs.  There are also a couple of common-mode sources that may be
connected.  The resistances connecting these is selectable; 10k, 20k or
40k... and as such, it's possible to do some hardware mixing of the
sources inside the CODEC.

At the moment I have each of the inputs to the ADC's PGA ("MICPGA"),
with one control for each possible path... There are two ADCs, so two
PGAs... and the inputs can be connected to either the negative or
positive terminal of the PGA in many cases.  That leads to a large
number of controls (the following is from amixer):

Simple mixer control 'Left MICPGA+ Output Mixer IN1L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Left MICPGA+ Output Mixer IN1R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Left MICPGA+ Output Mixer IN2L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Left MICPGA+ Output Mixer IN3L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: '10k'
Simple mixer control 'Left MICPGA- Output Mixer CM1L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Left MICPGA- Output Mixer CM2L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Left MICPGA- Output Mixer IN2R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Left MICPGA- Output Mixer IN3R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: '10k'
[...]
Simple mixer control 'Right MICPGA+ Output Mixer IN1R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: '10k'
Simple mixer control 'Right MICPGA+ Output Mixer IN2L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Right MICPGA+ Output Mixer IN2R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Right MICPGA+ Output Mixer IN3R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: '10k'
Simple mixer control 'Right MICPGA- Output Mixer CM1R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Right MICPGA- Output Mixer CM2R',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: 'not-connected'
Simple mixer control 'Right MICPGA- Output Mixer IN1L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: '10k'
Simple mixer control 'Right MICPGA- Output Mixer IN3L',0
  Capabilities: enum
  Items: 'not-connected' '10k' '20k' '40k'
  Item0: '10k'

These controls are useful to a machine driver for implementing controls,
but they're not that friendly to an end user.  I was wondering if it was
possible to hide these controls from the userland, but expose them to
the machine driver to be presented to the user in a more meaningful
manner.  (i.e. we can have just simple mute switches for IN1 and IN3,
labelling them "handset" and "internal mic" in our device).

Or would I be better defining these controls in the machine driver?

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)      .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'
http://dev.gentoo.org/~redhatter             :.'

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

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

end of thread, other threads:[~2010-08-08  9:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06  0:18 ASoC: Hiding unused CODEC mixer widgets in the machine driver Stuart Longland
2010-08-06 11:19 ` Mark Brown
2010-08-06 11:34   ` Liam Girdwood
2010-08-06 11:42     ` Use Case Manager Test Drive [Was: Re: ASoC: Hiding unused CODEC mixer widgets in the machine driver] Liam Girdwood
2010-08-07 23:07       ` Stuart Longland
2010-08-08  9:25         ` Liam Girdwood

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