imx27: re-routing audio

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx27: re-routing audio

2,384 Views
peter_w
Contributor I
Hello,

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,
peter
0 Kudos
2 Replies

577 Views
soma
Contributor I
Interesting. First and foremost: I am using an iMX31, but I think this issue is somehow related.
 
I do currently have a similar problem. I want to route the output from /dev/dsp to SSI1 instead of SS2, which is used by default.
 
Are you sure that /dev/adsp is the stereo DAC and not the voice codec, since on the iMX31 it is (if I am not completely wrong) just the other way. Or is this defined by the stream number?
0 Kudos

577 Views
fabio_estevam
NXP Employee
NXP Employee
Regarding the MX31 question: the MX31 PDK development board does use SSI1 instead of SSI2. You can get its BSP at: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK&fpsp=1&tab=Design_Tools_Tab

(Click on MX31_PDK_LINUX_BSP )

Regards,

Fabio Estevam
0 Kudos