I2S and DMA configuration imx6 sabre sdb

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

I2S and DMA configuration imx6 sabre sdb

3,958 Views
johnturnur
Contributor III

Hi,

I want to setup I2S is on AUD6 interface of the I.MX6.

What are the code chagne required to for I2S configration?

How to configure I2S clocking?

Thanks

0 Kudos
Reply
10 Replies

1,891 Views
johnturnur
Contributor III


Hi,

Any input on above qestions?

0 Kudos
Reply

1,891 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,John,

      What OS are you using ? linux or anddroid released by freesclae ? or other RTOS ?

If you are using freescale's BSP, you only need IOMUX I2S signal via AUD6 port .

Regards,

Weidong

0 Kudos
Reply

1,891 Views
johnturnur
Contributor III

I am using android 13.4.1 released by freescale only. Thanks for your replay.

0 Kudos
Reply

1,891 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,John,

     Please refer to the following steps:

(1)iomux to PADs(See Reference manual)

AUD6_TXC--->DI0_PIN15

AUD6_TXFS---->DI0_PIN3

AUD6_TXD----->DI0_PIN2

AUD6_RXD----->DI0_PIN4

(2)add them to iomux structure

Open file liunx/arch/arm/mach-mx6/board-mx6q_sabresd.h

static iomux_v3_cfg_t mx6q_sabresd_pads[] = {

/* AUDMUX por 6 */

MX6Q_PAD_DI0_PIN15__AUDMUX_AUD6_TXC,

MX6Q_PAD_DI0_PIN3__AUDMUX_AUD6_TXFS,

MX6Q_PAD_DI0_PIN2__AUDMUX_AUD6_TXD,

MX6Q_PAD_DI0_PIN4__AUDMUX_AUD6_RXD,

...

}

(3)Adjust bsp file

Open board-mx6q-sabresd.c ,modify like the following :

static struct platform_device mx6_sabresd_audio_wm8958_device = {

/*Here is sound card divice's name,it should be the same as that of Machine driver*/

.name = "imx-wm8958",

};

static struct mxc_audio_platform_data wm8958_data = {

.ssi_num = 1,

.src_port = 2,

.ext_port = 6, /* Means "ssi2--->aud6 --- >codec"*/

.hp_gpio = SABRESD_HEADPHONE_DET,

.hp_active_low = 1,

};

Regards,

Weidong

1,891 Views
johnturnur
Contributor III

Hi,

I am using following command to play audio file

alsa_aplay test.wav

File plays fully but no sound heard.

If i am trying to play file using android music player then i got follwoing error.

W/AudioTrack( 2141): obtainBuffer timed out (is the CPU pegged?)

after song playback completed i got follwoing error.

I/ServiceManager( 2261): Waiting for service media.player...

I/ServiceManager( 2491): Waiting for service media.audio_policy...

I/ServiceManager( 2141): Waiting for service media.audio_flinger...

I/ServiceManager( 2261): Waiting for service media.player...

Any idea where is a bug?

0 Kudos
Reply

1,891 Views
jimmychan
NXP TechSupport
NXP TechSupport

have you try to run alsamixer? may be the volumn is too low so no sound heard.

0 Kudos
Reply

1,891 Views
johnturnur
Contributor III

No I havent tried alsamixer.

0 Kudos
Reply

1,891 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,John,

      Could you tell me the what type of audio codec is?


Regards,

Weidong

0 Kudos
Reply

1,891 Views
johnturnur
Contributor III

Hi,

Its a normal audio amplifier,

0 Kudos
Reply

1,891 Views
johnturnur
Contributor III

Thanks for this information, I have done the same thing.

0 Kudos
Reply