[alsa-devel] AK4671 pin sharing
I'm interested in adding some functionalities to ak4671 codec driver (currently hosted in for-2.6.33 branch). The driver has support for single ended inputs/outputs only, but the actual hardware supports full-differential mode as well. However, the chip doesn't have separate pins for the differential input/outputs, but instead the same pins used in single-ended mode can be reconfigured and reused.
For example: LIN1 and RIN1 inputs (single-ended) can become IN1+/- (differential input), LIN2/RIN2 -> IN2+/-, etc. Similarly for outputs, LOUT1 and ROUT1 (single-ended) can become Mono Receiver RCP/RCN (BTL output), LOUT3/ROUT3 can become Mono Line Output LOP/LON (full-differential). Changing the function of a pin also modifies the audio map:
- Mic Amp Left Mux allow to choose between LIN1, LIN2, LIN3 and LIN4, when pins are configured as single-ended inputs. However, if they are as differential inputs, then the options of Mic Amp Left Mux becomes only IN1+/- and IN3+/-. Similarly for Mic Amp Right Mux: IN2+/- and IN4+/-. - For outputs, single-ended stereo outputs LOUT1/ROUT1, LOUT2/ROUT2 and LOUT3/ROUT3 have separate analog mixers for each channel. But when the output pins work as RCP/RCN or LOP/LON, the output is mono and then each output has a single analog mixer.
My concerns are: - When inputs/outputs are single-ended, then they have its own widgets, i.e.: SND_SOC_DAPM_INPUT("LIN1") SND_SOC_DAPM_INPUT("RIN1") But when they are switched to full-differential mode, they cannot have a separate widget anymore but a single widget instead: SND_SOC_DAPM_INPUT("IN1+/-") Then, it makes me think that input/output widgets cannot be reused in above case. I guess that having the three widgets at the same time is not a safe choice either. - Audio map changes depending on the mode of inputs or outputs, I don't know how the SoC codec driver could handle that.
Any suggestion on what to do in above scenarios?
Thanks, -Misa
On Wed, Nov 25, 2009 at 11:44:47AM -0600, Misael Lopez wrote:
full-differential mode as well. However, the chip doesn't have separate pins for the differential input/outputs, but instead the same pins used in single-ended mode can be reconfigured and reused.
This is a common arrangement.
(full-differential). Changing the function of a pin also modifies the audio map:
My concerns are:
- When inputs/outputs are single-ended, then they have its own widgets, i.e.:
- Audio map changes depending on the mode of inputs or outputs, I don't know how the SoC codec driver could handle that.
Any suggestion on what to do in above scenarios?
The WM8993 has similar routing changes when in fully differential mode. It uses platform data to configure the mode and registers different widgets depending on the configuration.
participants (2)
-
Mark Brown
-
Misael Lopez