The current Linux audio driver code in sound/arm/mxc-alsa-pmic.c routes stereo audio output from /dev/dsp (device 0) over stream 0 to SSI2 which is connected to the PMIC's stereo codec. Audio input on /dev/dsp is taken from the PMIC's voice codec over SSI1 and stream 1. The mono output - exposed through /dev/adsp (device 1) - is routed through stream 2 and SSI1 to the PMIC's voice codec.
In our application we would like to route both audio input and output from "/dev/dsp" (device 0) to the PMIC voice codec, and the stereo output from "/dev/adsp" (device 1) to the PMIC stereo DAC. In order to achieve that I would like to re-reoute output stream 0 for device 0 over snd_mxc_pmic_playback_mono to SSI1, and output stream 2 for device 1 over snd_mxc_pmic_playback_stereo to SSI2.
Looking through the code sound/arm/mxc-alsa-pmic.c it should be possible, and I have modified the code such that wherever there is a if(stream_id ==0) I have swapped it to 2 and vice verce. Not surprisingly, this simplistic approach does not work. There seem to be many pitfalls prompting questions:
1. Is it possible to use SSI1 in full duplex mode, mone voice output and mono voice input?
2. Is it sufficient to check all instances where the stream_id is checked?
3. What about the network mode in configure_ssi_tx depending on the channels?
4. What avout setting up the PMIC channels in set_pmic_channels ?
5. What about configuring the codecs in configure_codec ?
6. How do I have to program the output device using set_mixer_output_device ?
Many thanks for your help,