DM365 McBSP I2S Playback Problem

Hi,

I am working with DM365 processor and we have interfaced one audio codec in i2s mode. I am operating DM365 as Master.

I am working with 2.6.37 kernel.

I have received the audio driver from the vendor and i have developed the required machine driver.

when i test the code with aplay.

i am seeing that the i2s starts and immediately calls shutdown.

the AUDIO FORMAT i configured is

#define AUDIO_FORMAT (SND_SOC_DAIFMT_I2S | \
                SND_SOC_DAIFMT_CBS_CFS)

Could anyone help me in finding what i am doing wrong.

Please find the log below.

root@dm365:~# aplay -v test.wav

davinci_i2s_startup
Playing WAVE 'test.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
 davinci_i2s_set_dai_fmt 

 davinci_i2s_hw_params
 
 davinci_i2s_prepare
 davinci_mcbsp_stop
 
 toggle_clock
 
davinci_i2s_trigger
davinci_mcbsp_start
toggle_clock

Plug PCM: Route conversion PCM (sformat=S16_LE)
  Transformation table:
    0 <- 0
    1 <- 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 1
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 8
  buffer_size  : 16000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
Slave: Hardware PCM card 0 'DaVinci DM365 Garuda' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 8000
  exact rate   : 8000 (8000/1)
  msbits       : 16
  buffer_size  : 16000
  period_size  : 1000
  period_time  : 125000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 1000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 2097152000
  appl_ptr     : 0
  hw_ptr       : 0

 davinci_i2s_trigger
 davinci_mcbsp_stop
 toggle_clock
 davinci_i2s_shutdown
 davinci_mcbsp_stop
 toggle_clock

 

Thank you, Sreedhar.