Audio Out test for TWR-KL46z.

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

Audio Out test for TWR-KL46z.

874 Views
ajaypatel
Contributor I

Hello,

I want to implement the test for TWR-KL46z board. My test will perform following tasks.

1. Read compress data from the file.

2. Decode the compress data. I can handle this part and it is available with me.

3. Need to send decoded data to audio out.

Can somebody help me to setup this test for the KL46 board.

Thanks,

Ajay-

0 Kudos
6 Replies

585 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ajay,

As you know that Freescale only provides the MCU, we do not provide the decoder code. For a decodering system, it consists of the 4 parts:

1)receive the compressed bit stream from the spdif, USB...,save the stream to a buffer.

2)analysis the data in the buffer, for example, get the head from  the compressed bit stream, get the protocol for example AC-3, DTS, MP3..., frame length, decode the compressed data and save the result to multiple buffer based on channels.

3)handle the data in different channels with EQ, scale..

4)write the data in buffer to codec via I2S.

we have the code to write the buffer to codec via I2S port.

I have question, where does the MCU get bit stream, from USB or I2S receiver?  do you have OS? what is the protocol(AC-3, DTS, MP3...)? have you implemented the decoder? how many channels do you hope, the I2S only supports two channels for transmitter for KL46.

BR

XiangJun Rong

0 Kudos

585 Views
ajaypatel
Contributor I

Hello Rong,

Thanks for the feedback.

I am using prebuilt MP3 decoder lib and I have integrated it with my test. I have used USB MSD demo test from the KSDS_1.2.0. I have integrated my lib with this test. This test will only dump the decoded output data to file on USB MSC device but I want to setup the real demo that will output the audio.

So my demo aim is :

1. Open the Mp3 file from the SDCARD/USB MSC device.

2. Read the data from the file and fill in the buffer.

3. My decoder lib operates on the filled buffer and produced the decoded data in output buffer.

4. Instead of writing to file I want to listen the output data from the either headphone or USB speaker.

Thanks,

Ajay-

0 Kudos

585 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Ajay,

Okay, I see that you would like to decode MP3, which output two channels stream. As you know we have a Audio board, on which the SGTL500 codec is embedded. we have developed the code for the Audio board, pls refer to the code based on SDK1.2

D:\Freescale\KSDK_1.2.0\examples\twrk60d100m\demo_apps\sai_demo

This is the website of the Audio SGTL5000 board:

SGTL5000 Codec Tower System Audio Module|Freescale

Hope it can help you

BR

XiangJun Rong

0 Kudos

585 Views
ajaypatel
Contributor I

Hello Rong,

I have port the test which you have mentioned D:\Freescale\KSDK_1.2.0\examples\twrk60d100m\demo_apps\sai_demo for KL46Z board. But when I start the test, it does not come out from the SGTL_Init() funciton ( SGTL_WriteReg(handler,CHIP_ANA_POWER, 0x6AFF); ). Is there any help for this ?

Same test which I have run on k60 board ( pure test ) works fine.

Thanks,

Ajay

0 Kudos

585 Views
isaacavila
NXP Employee
NXP Employee

Hello Ajay,

Do you still have problems on migrating SAI demo?

Regards,

Isaac

0 Kudos

585 Views
ajaypatel
Contributor I

Hello Rong,

Thanks for the information.. Yes you are correct. I want to decode MP3 with two channel and get the audio out using SGTL5000 codec. The test which you have mentioned is based on TWR-K60 board but I need to use TWR-KL46 ( Cortex-M0+ ) board.

Is there any test SGTL5000 codec work with KL46z ?

Thanks,

Ajay-

0 Kudos