This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

McASP receiving data on DM6467T

hi all:

     audio data and all the clk comes from fpga.

afsr/aclkr/ahclkr : 30.5k/1.9m/15.625m

channel =2;  // Sound_Attrs_STEREO_DEFAULT

each channel has 32bits/4byte.

 

  i checked my mcasp_configuration with CCS and it worked well.but when i use dvsdk_demo in linux,it only gets  noise.

So i generate some data(loop from 0x00 to 0xFF ) , dvsdk_demo only capture some of them.

after 'Sound_read(hSound, hInBuf)', i can  get 160 byte everytime throught 'Buffer_getNumBytesUsed(hInBuf)' and  save it to file. it show that i always lost 160byte between

2 capturing:

line  0:  CCCDCECFD0D1D2D3D4D5D6D7D8D9DADB
line  1:  DCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEB
line  2:  ECEDEEEFF0F1F2F3F4F5F6F7F8F9FAFB
line  3:  FCFDFEFF800102030405060708090A0B
line  4:  0C0D0E0F101112131415161718191A1B
line  5:  1C1D1E1F202122232425262728292A2B
line  6:  2C2D2E2F303132333435363738393A3B
line  7:  3C3D3E3F404142434445464748494A4B
line  8:  4C4D4E4F505152535455565758595A5B
line  9:  5C5D5E5F606162636465666768696A6B
line  a:  0C0D0E0F101112131415161718191A1B
line  b:  1C1D1E1F202122232425262728292A2B
line  c:  2C2D2E2F303132333435363738393A3B
line  d:  3C3D3E3F404142434445464748494A4B
line  e:  4C4D4E4F505152535455565758595A5B
line  f:    5C5D5E5F606162636465666768696A6B
line 10:  6C6D6E6F707172737475767778797A7B
line 11:  7C7D7E7F008182838485868788898A8B
line 12:  8C8D8E8F909192939495969798999A9B
line 13:  9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAAB
line 14:  4C4D4E4F505152535455565758595A5B
line 15:  5C5D5E5F606162636465666768696A6B
line 16:  6C6D6E6F707172737475767778797A7B
line 17:  7C7D7E7F008182838485868788898A8B
line 18:  8C8D8E8F909192939495969798999A9B
line 19:  9C9D9E9FA0A1A2A3A4A5A6A7A8A9AAAB
line 1a:  ACADAEAFB0B1B2B3B4B5B6B7B8B9BABB
line 1b:  BCBDBEBFC0C1C2C3C4C5C6C7C8C9CACB
line 1c:  CCCDCECFD0D1D2D3D4D5D6D7D8D9DADB
line 1d:  DCDDDEDFE0E1E2E3E4E5E6E7E8E9EAEB

i don't know whether there is some configuration relating with this.can anyone give some help?

 

oh, there is my mcasp reg value:

RMASK    =ffffffff
RFMT     =80f0
AFSRCTL  =110
ACLKRCTL =80
AHCLKRCTL=0
RTDM     =3
RINTCTL  =0
RCLKCHK  =fa000000
XMASK    =ffffffff
XFMT     =f0
AFSXCTL  =0
ACLKXCTL =c0
AHCLKXCTL=8000
XTDM     =0
XINTCTL  =0
XCLKCHK  =0
SRCTL0   =2
SRCTL1   =11
PFUNC    =0
PDIR     =2
DITCTL   =0
DLBCTL   =0
AMUTE    =0

 

 

  • those may make you confuse.so im try to make it simple and here also has some update.

    DMAI is worked with 16-bit data(SND_PCM_FORMAT_S16_LE in code). but i need 32bit data, so i change it to 'SND_PCM_FORMAT_S32_LE' in 'sound_alsa.c'.

    Then some data losed. does DMAI can deal with 32 bit audio data? and how to config dmai or demo in right way?

    btw:im sure mcasp's configuration is ok.

     

    Regards

  • problem solved.16bit->32bit only need to change ‘readSamples = Buffer_getSize(hBuf) / (2 * hSound->channels*2);’ in Sound_alsa.c