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:
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?
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:
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.
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 |
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);
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,