iMX6 integration with MAXIM Max98089 audio codec

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

iMX6 integration with MAXIM Max98089 audio codec

2,663 Views
sriniv
Contributor II

Hi,


We are trying to integrate Maxim Max98089 Audio codec with iMX6 processor. When we try to run alsa_aplay, we do not hear the music. SOMETIMES we get an underplay for some period of time as the output and other times there is no output that comes out.

We have some clarifications for which we request feedback/comments:

(1)

We would like to get a clarification on the below code(arch/arm/plat-mxc/include/mach/audmux.h):

/* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */

#define MXC_AUDMUX_V2_PTCR_TFSDIR       (1 << 31)

#define MXC_AUDMUX_V2_PTCR_TFSEL(x)     (((x) & 0xf) << 27)

#define MXC_AUDMUX_V2_PTCR_TCLKDIR      (1 << 26)

#define MXC_AUDMUX_V2_PTCR_TCSEL(x)     (((x) & 0xf) << 22)

#define MXC_AUDMUX_V2_PTCR_RFSDIR       (1 << 21)

#define MXC_AUDMUX_V2_PTCR_RFSEL(x)     (((x) & 0xf) << 17)

#define MXC_AUDMUX_V2_PTCR_RCLKDIR      (1 << 16)

#define MXC_AUDMUX_V2_PTCR_RCSEL(x)     (((x) & 0xf) << 12)

#define MXC_AUDMUX_V2_PTCR_SYN          (1 << 11)

#define MXC_AUDMUX_V2_PDCR_RXDSEL(x)    (((x) & 0x7) << 13)

#define MXC_AUDMUX_V2_PDCR_TXRXEN       (1 << 12)

#define MXC_AUDMUX_V2_PDCR_MODE(x)      (((x) & 0x3) << 8)

#define MXC_AUDMUX_V2_PDCR_INMMASK(x)   ((x) & 0xff)

----

The above set of definitions do not indicate that these are to be used for IMX6 processor but only talk till iMX51 only.

Will the same work for iMX6?


(2)


We are using SSI num as 1, Src Port as 2 and External port as 3 currently in board-init file. We are connected to AUD3 in our hardware board and we use the Second DAI interface of our codec (because of which we have kept the src port as 2). Is this the correct set of configuration parameters?


Also, we call the audmux_configure function as follows:

imx_audmux_config(plat->src_port, plat->ext_port);

Our AUD3_TXD shows clock pulse when we try to play a audio wave file but AUD3_TXC and AUD3_TXFS just continues to remain HIGH when we observe with an oscilloscope.

(3)

We want to have IMX6 act as a master and our codec to act as a slave.

Our imx_audmux_config is defined as follows:


static int imx_audmux_config(int slave, int master)

{

        unsigned int ptcr, pdcr;

        slave = slave - 1;

        master = master - 1;

                ptcr = MXC_AUDMUX_V2_PTCR_SYN |

                MXC_AUDMUX_V2_PTCR_TFSDIR |

                MXC_AUDMUX_V2_PTCR_TFSEL(master) |

                MXC_AUDMUX_V2_PTCR_TCLKDIR |

                MXC_AUDMUX_V2_PTCR_TCSEL(master);

        pdcr = MXC_AUDMUX_V2_PDCR_RXDSEL(master);

        mxc_audmux_v2_configure_port(slave, ptcr, pdcr);

        ptcr = MXC_AUDMUX_V2_PTCR_SYN;

        pdcr = MXC_AUDMUX_V2_PDCR_RXDSEL(slave);

        mxc_audmux_v2_configure_port(master, ptcr, pdcr);

        return 0;

}

Is this the correct configuration for imx_audmux_config routine above?

Please let us know if you see any issue in the above configuration because of which we are not able to use it successfully.

Thanks in advance,

Labels (2)
Tags (2)
7 Replies

1,497 Views
jimmychan
NXP TechSupport
NXP TechSupport

I attached a BSP porting guide here. You can download it. it is for i.MX6.

https://community.freescale.com/thread/306088

Please check the BSP porting guide. Chapter 8 is about audio codec porting.

1,497 Views
sriniv
Contributor II

Jimmy,

The document  talks about changes to be made to imx-ssi.c when it is a different codec as compared to the reference board. In our case, it is a different codec (max98089) as compared to the reference board(sgtl5000). But I do not see any changes made in imx-ssi.c specific to wm8962 codec support.

Do you have the list of changes specifically made on imx-ssi.c for the wm8962 support?

Thanks

Vasan

0 Kudos
Reply

1,497 Views
hok
Contributor II

Hello Vasan!

I'm tying to use MAX98089 on i.mx6 with 3.14.28 Kernel.

What is the status regarding MAX98089 on you side?

br,

Horst

0 Kudos
Reply

1,497 Views
sriniv
Contributor II

Thanks much Jimmy. Will look at this in detail.

Regards

Vasan

0 Kudos
Reply

1,497 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Vasan,

    The above information  is not enough, Please send your schematic to me !  weidong.sun@freescale.com

Regards,

Weidong

0 Kudos
Reply

1,497 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Vasan,

      Nitrogen6X-SOM CPU module is designed by Boundary devices, Can they provide schematic to you ? If not , how about BSP ?

Regards,

weidong

0 Kudos
Reply

1,497 Views
sriniv
Contributor II

Weidong,

The schematic for the SOM module is available and part of the schematic that I had sent. The reference is using SGTL whereas we are trying to use Maxim 98089 audio codec.

Regards

Vasan

0 Kudos
Reply