LPC55S69 I2S Audio playback

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPC55S69 I2S Audio playback

跳至解决方案
1,173 次查看
ujwal_kumar_N_L
Contributor III

Hi, community 

I'm working on I2S for audio playback ,the SDK program fetches the data from SD card and send the data to codec .I'm not able to understand how the file is accessed and also the concept of PCM .

Problem:

1)Further moving on what are the concepts i need to learn as i am new to this audio processing .
2)I am suppose to use flash memory to access the data not SD card ,So tips regarding it .
3)what format the audio file should be ?

Board used :LPCXpresso55S69 .

SDK used :version  2.14.0.

 

Thank you and regards 
UJWAL KUMAR N L

@kerryzhou @Juan-Rodarte @jesseg @mikedoidge 

 

标签 (1)
0 项奖励
回复
1 解答
978 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The on-chip SRAM of LPC5569 is 320KB, if you have used 98% SRAM, I have to say there is not the other way to extend the SRAM. The LPC5569 does not support external SRAM or SDRAM.

Hope it can help you

BR

XiangJun Rong

 

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,125 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

let's answer your question one by one.

1)Further moving on what are the concepts i need to learn as i am new to this audio processing .

>>>As you know that the I2S of LPC5569 is connected to Codec, pls check the UM of Codec so that you can configure the I2S module to adapt to the Codec. Can you tell us the part number of Codec? we can help to have a check. for example 32 bits data format, 24 bits valid bits, 48ksps.


2)I am suppose to use flash memory to access the data not SD card ,So tips regarding it .

>>>>>It is okay to read PCM data from flash and write the data to transmitter register of I2S, the I2S will convert the data to bit stream to Codec.


3)what format the audio file should be ?

>>>>Pls check the UM of Codec

 

Hope it is helpful

BR

XiangJun Rong

 

0 项奖励
回复
1,114 次查看
ujwal_kumar_N_L
Contributor III

Thank you , @xiangjun_rong ,
The codec is WM8904,the sample rate is 48Khz ,16 bit data length .
1)Is there some driver file or code which i can refer so that i can open the PCM file .
2)How do i read data from the PCM file for audio ?
3)How about MP3 file how do I read MP3 ,is there any driver which can open MP3 and process the data to PCM .

Went through the User manual and understood the concept ,of I2S and codec .

Thank you and regards
UJWAL KUMAR N L

标记 (3)
0 项奖励
回复
1,103 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The SDK has example of I2S, which is i2s_interrupt_transfer. There is a music.h file in the example, which has PCM data.

For the MP3, the data in MP3 file is not PCM, it includes compressed PCM, you have to convert the compressed data to PCM vis software, which is called decoder.

Hope it can help you

BR

XiangJun Rong

 

 

xiangjun_rong_0-1695284175167.png

 

1,071 次查看
ujwal_kumar_N_L
Contributor III

Thank you for the reply ,

I was able to decode a audio message saying "hi".
This is the detail of the audio sample :-

Channels: 2
Sample width: 16bits
Sample rate: 48.0kHz
Frames number: 61800
Duration: 1.2875s
Frames bytes: 247200

i was able to convert the MP3 to PCM Raw data .i have also attached the file below .

Current concern is that the raw data is consuming 98% (Complete program including the main file and other files)of the SRAM almost 620KB.

I am also attaching the complete program below ,is the same SDK example of i2c_transfer_dma .i have only changed the music to this file .

1)are there any file/programs which i can use and make sure i can reduce this memory issue ?
2)i am planning to use a Flash memory to store this file ,can the external flash solve this memory issue ??

Main intension of the program is to play certain audio such as welcome, please be seated etc. ,the audio is prerecorded .can be converted to PCM data .Planning to store this data in External flash (W25Q64 Storage 64Mbit 8MByte Data Flash module SPI).Fetching data from this flash and playing audio to speaker.

Thank you and regards 
UJWAL KUMAR N L

 

0 项奖励
回复
979 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The on-chip SRAM of LPC5569 is 320KB, if you have used 98% SRAM, I have to say there is not the other way to extend the SRAM. The LPC5569 does not support external SRAM or SDRAM.

Hope it can help you

BR

XiangJun Rong

 

0 项奖励
回复