[alsa-devel] [PATCH 5/9] ASoC: TWL4030: Add PreDriv outupt mux and volume controls
Peter Ujfalusi
peter.ujfalusi at nokia.com
Tue Nov 25 11:51:46 CET 2008
On Monday 24 November 2008 16:50:31 ext Mark Brown wrote:
> On Mon, Nov 24, 2008 at 04:19:18PM +0200, Peter Ujfalusi wrote:
> > On Monday 24 November 2008 15:48:09 ext Mark Brown wrote:
> > Do you have a pointer, where should I look for existing code?
>
> At least WM8990 and WM8903 do this with separate controls. Most of the
> drivers should be fine to look at for examples, it's just that this was
> done for some of the older drivers and it's never been worth changing
> them.
I'll take a look.
> Oh, ick. There's a couple of ways I can think of to represent that to
> DAPM. One would be to have a simple mixer with switches for everything
> and an extended event on the mixer which returns an error if multiple
> DAC inputs are enabled. The other is to have the DAC selection be a
> custom mux like you've got and feed that into the mixer unconditionally.
> The voice input should certainly be a separate control here.
Not sure that I understand these, but I'll try to get the 'other' way
implemented.
> > On the side not: the voice path at the moment not in use -> the codec has
> > to be in different mode to have the voice path enabled. But then lot's of
> > things will behave differently.
>
> Could you go into more detail about these modes? Sounds like it could
> get tricky...
Let's see... I might be the wrong person for this, but in short.
TWL can operate in two modes:
Option 1: two RX and TX stereo paths (four channel RX and four channel TX)
Option 2: Voice uplink (sterreo) and downlink (mono) +
one RX and TX stereo paths (two channel RX and two channel TX).
At the moment the driver supports the Option 1. Adding the support for Option 2
is tricky, since I have not seen a HW which can support it. The SW support
can be added, but at least I can not verify, that it is working...
On the Option 1 side: in order to use all four channel the TDM support is
needed for twl4030 and for omap-mcbsp. Actually this is my long term plan...
This is one of the reasons to have as flexible routing and control for TWL as
possible.
When the Option 1 is ready, I think in theory it should not be that hard to
add support for the Option 2. Couple of new DAC, mixers, muxes, interconnects..
Hmm, after reading it back: probably this will just cause more confusion ;)
> > Initially I did not wanted to spread these controls - to make it simple
> > for myself, but I might separate the voice and DAC mux selections (separated
> > enable for voice and mux the DACL/Rs selection).
>
> Yes, that does sound like the best approach.
>
--
Péter
More information about the Alsa-devel
mailing list