Hi Guys,
Hope you can help.
We have a custom board with an AK4951 codec IC connected to McASP1 on an AM3354
The connections are as follows:
static struct pinmux_config mcasp1_pin_mux[] =
{
{ "mii1_crs.mcasp1_aclkx", OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT },
{ "mii1_rxerr.mcasp1_fsx", OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT },
{ "mii1_col.mcasp1_axr2", OMAP_MUX_MODE4 | AM33XX_PIN_OUTPUT },
{ "rmii1_refclk.mcasp1_axr3", OMAP_MUX_MODE4 | AM33XX_PIN_INPUT_PULLUP },
{ NULL, 0 },
};
static u8 am335x_iis_serializer_direction1[] = {
INACTIVE_MODE, INACTIVE_MODE, TX_MODE, RX_MODE,
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE,
INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE, INACTIVE_MODE
};
static struct snd_platform_data am335x_evm_snd_data1 = {
.tx_dma_offset = 0x46400000, /* McASP1 */
.rx_dma_offset = 0x46400000,
.op_mode = DAVINCI_MCASP_IIS_MODE,
.num_serializer = ARRAY_SIZE(am335x_iis_serializer_direction1),
.tdm_slots = 2,
.serial_dir = am335x_iis_serializer_direction1,
.asp_chan_q = EVENTQ_2,
.version = MCASP_VERSION_3,
.txnumevt = 1,
.rxnumevt = 1,
.sync_mode = 0,
};
I've compiled the AK4951 codec driver from the chip manufacturer and it seems to get detected just fine (from dmesg):
asoc: ak4951-AIF1 <-> davinci-mcasp.1 mapping ok
ALSA device list:
#0: AM335X EVM
The issue I'm struggling with is that I don't see the BICK and LRCK clock pulses being generated when I play music.
I do see data on the SDOUT line, but no clocks on the 2 clock lines?
Are my output pins configured wrong?
The idea is that the AK4951 is configured as a slave device and will only ever play music; no recording.
I tested the electrical connection by configuring the clock lines as GPIO and manually pulsed them - I could see the manual pulses.
davinci-evm.c:
static struct snd_soc_dai_link am335x_evm_dai[] = {
{
.name = "AK4951",
.stream_name = "Playback",
.cpu_dai_name = "davinci-mcasp.1",
.codec_dai_name = "ak4951-AIF1",
.codec_name = "ak4951.2-0024",
.platform_name = "davinci-pcm-audio",
.init = evm_aic3x_init,
.ops = &evm_ops,
.dai_fmt = ( SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_NB_NF )
},
};
tinymix and tinyplay from the Android build; as well as android audio classes see the audio device; and I do see data on the data line, just the clocks aremissing...
Thank you
Louis