Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

Left and Right audio mix in MIC in

$
0
0

Hi, 

I'm developing on OMAP-L137 EVM.  That EVM have AIC3106

I test the sample code of  aic3106_loop_linein.c  and aic3106_loop_micin.c.

I check the source.  It just forward  Line In to Line Out , or forward MIC in to Line Out.

For Line In to Line Out, it work correctly.   Left audio go to left audio out. Right audio go to right audio out.

For MIC in to Line Out,  there is some trouble.   Left and right audio  are mixed.

It sound like : 

Right audio out   =  40% left audio in + 60 right audio in

Left audio out   =  40% left audio in + 60 right audio in

I check the sample ,  Left and right are not mixed.

Is there hardware problem /  schematic error in OMAP-L137 EVM ?

///*** Sample Code about left , right audio****///   

EVMOMAPL137_AIC3106_rset( 15, 0x17 ); // 15 Left ADC PGA Gain <- [Mute=OFF][Gain=8.5dB]
EVMOMAPL137_AIC3106_rset( 16, 0x17 ); // 16 Right ADC PGA Gain <- [Mute=OFF][Gain=8.5dB]
EVMOMAPL137_AIC3106_rset( 17, 0x0F ); // 17 MIC3L/R to Left ADC <- [MIC3L=0dBGain][MIC3R=NotConnect]
EVMOMAPL137_AIC3106_rset( 18, 0xF0 ); // 18 MIC3L/R to Right ADC <- [MIC3L=NotConnect][MIC3R=0dBGain]
EVMOMAPL137_AIC3106_rset( 19, 0x7C ); // 19 LINE1L to Left ADC <- [SingleEnd][NotConnect][Power=ON][SoftStep=OncePerFS]
EVMOMAPL137_AIC3106_rset( 22, 0x7C ); // 22 LINE1R to Right ADC <- [SingleEnd][NotConnect][Power=ON][SoftStep=OncePerFS]

/* Play Tone */
for ( sec = 0 ; sec < 500 ; sec++ ){
  for ( msec = 0 ; msec < 1000 ; msec++ ){
    for ( sample = 0 ; sample < 48 ; sample++ ){
      /* Read then write the left sample */
      while ( ! ( MCASP1_SRCTL0 & 0x20 ) );
      sample_data = MCASP1_RBUF0_32BIT;
      while ( ! ( MCASP1_SRCTL5 & 0x10 ) );
      MCASP1_XBUF5_32BIT = sample_data;

      /* Read then write the left sample */
      while ( ! ( MCASP1_SRCTL0 & 0x20 ) );
      sample_data = MCASP1_RBUF0_32BIT;
      while ( ! ( MCASP1_SRCTL5 & 0x10 ) );
      MCASP1_XBUF5_32BIT = sample_data;
      }
    }
}


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>