Hello Kristian,
Basically the steps mention by weidong.sun are correct and this are the necessary to get the I2S functionality enable, but you need to create and configure the new codec, that you can take a look at the SGTL500. driver to get an idea, or I recommend that you use the FSL SGTL5000 instead! :smileywink:
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,
};