On Mon, Oct 20, 2008 at 12:54:00PM +0530, naveen krishna ch wrote:
I have a driver now at a palce where i can play back with stereo headset and
record through line in cable.
I need some understanding of how can i give support for selecting output and input sources.
I have understood the way it is done in ALSA but i feel the sane should not be used in ALSA SOC frame work.
Normally this would be done through the standard ALSA APIs from user space. Depending on what exactly you wish to control in the hardware this would either be done using the standard controls provided by the codec driver or by defining additional controls for your machine in the machine driver. Several existing machine drivers such as the tosa driver in sound/soc/pxa/tosa.c implement the second approach.
Often the software running on the device will have several standard usage scenarios and change between them by restoring ALSA state files with alsactl. You may also find the scenario API here:
http://opensource.wolfsonmicro.com/node/14
useful.