AnsweredAssumed Answered

I cann't measure the waveform from the BCLK and WCLK when i debug the tlv320dac3100 on sabresd platform

Question asked by tang yuan on Jan 6, 2017
Latest reply on Jan 8, 2017 by igorpadykov

HI,

    I am debugging the tlv320dac3100 (audio chip) .I cann't measure the waveform form the BCLK and WCLK when i aplay

My Schematic diagram is as follows:

ed 

 

I am defined the special  pin in the board-mx6q_sabresd.h as follows:

 

 

MX6Q_PAD_DISP0_DAT20__AUDMUX_AUD4_TXC,
MX6Q_PAD_DISP0_DAT22__AUDMUX_AUD4_TXFS,
MX6Q_PAD_DISP0_DAT21__AUDMUX_AUD4_TXD,

MX6Q_PAD_GPIO_3__CCM_CLKO2,
MX6Q_PAD_DISP0_DAT17__GPIO_5_11,

 

 

in board-mx6q_sabresd.c ,I do as follows:

static struct mxc_audio_platform_data tlv320dac3100_data = {
.ssi_num = 1,
.src_port = 2,
.ext_port = 4,
//.hp_gpio = SABRESD_HEADPHONE_DET,
//.hp_active_low = 1,
//.mic_gpio = SABRESD_MICROPHONE_DET,
//.mic_active_low = 1,
.init = mxc_tlv320dac3100_init,
.clock_enable = tlv320dac3100_clk_enable,
};

 

static int mxc_tlv320dac3100_init(void)
{
int rate;

clko = clk_get(NULL, "clko2_clk");
if (IS_ERR(clko)) {
pr_err("can't get CLKO clock.\n");
return PTR_ERR(clko);
}
/* both audio codec and comera use CLKO clk*/
rate = clk_round_rate(clko, 12000000);
clk_set_rate(clko, rate);

tlv320dac3100_data.sysclk = rate;

/*gpio_request(TLV320DA3100_RESET, "tlv320-reset");
gpio_direction_output(TLV320DA3100_RESET, 0);
mdelay(5);
gpio_direction_output(TLV320DA3100_RESET, 1);*/

return 0;
}

 

static int tlv320dac3100_clk_enable(int enable)
{
if (enable)
clk_enable(clko);
else
clk_disable(clko);

return 0;
}

 

static int __init imx6q_init_audio(void)
{


platform_device_register(&sabresd_vwm8962_reg_devices);
mxc_register_device(&mx6_sabresd_audio_tlv320dac3100_device,
&tlv320dac3100_data);
imx6q_add_imx_ssi(1, &mx6_sabresd_ssi_pdata);

//#endif
return 0;
}

My machine driver and my codec driver is enclosure.

Original Attachment has been moved to: tlv320dac3100.c.zip

Original Attachment has been moved to: imx-tlv320dac3100.c.zip

Outcomes