Simple I2S setup in Linux kernel

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple I2S setup in Linux kernel

9,765 Views
kristianlein-ma
Contributor I

Hi!

I'm new to the Linux Asoc stack and we have a custom nitrogen6x-like PCB with an i.MX6 hooked up to a DSP (ADAU1701) via I2S.

When I boot with my nitrogen6-kernel, I see the following: <3>asoc: failed to instantiate card sgtl5000-audio: -19.

Since our custom PCB doesn't have a SGTL5000, that's expected: /proc/asound/cards is empty.


What are the changes I need to make in order to skip the detection of SGTL5000 and force the use of the I2S outputs of the i.MX6 instead?

We would, as a first step, just like to have the ability to send an audio-signal over our I2S bus in order to verify our hardware.


I have looked at I2S and DMA configuration imx6 sabre sdb and i2s or SPDIF support in linux kernel without much success.


Thanks!

Kris

Labels (1)
Tags (4)
0 Kudos
2 Replies

1,507 Views
jamesbone
NXP TechSupport
NXP TechSupport

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,

};

0 Kudos

1,507 Views
kristianlein-ma
Contributor I

Thanks Jamesbone,

but I'm still rather confused about this whole ASOC architecture.

I understand you specify which AUDMUX you want with the .ext_port field. I suppose this is for playback? Where do you specify which AUDMUXes are used for capture? We've got 4-wire incoming sound on AUD4 and AUD5, and 6-wire both incoming and outgoing on AUD3.

0 Kudos