How to modify the struct mxc_audio_platform_data

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to modify the struct mxc_audio_platform_data

Jump to solution
4,519 Views
sebimohan
Contributor III

I want to create a custom board based on i.MX6 which needs to use the three ssi ports connected to the audmux which is connecing to 3 audio sources via 3 external ports. My doubtful areas are:

1. How to configure the three ssi??

        Do we need to make 3 structure of struct mxc_audio_platform_data instances for the three ssi in the board info file like

        static struct mxc_audio_platform_data mx6_audio1_data = {

            .ssi_num= 3, (is this the total number of ssi used or the ssi port used)

            .src_port = 5, // Port5: AUD5

            .ext_port = 2, // Port2: ssi-2

            .hp_gpio = -1,

           };

     (do we need 3 structures like this???)

2. How to configure the audmux

3. I want to connect 2 i2s audio input( obtained from another board as audio samples) and one sgtl5000 codec. can i use imx6 as slave for the 2 i2s input and master for sgtl5000 codec?. If yes how is the configuration done?

Thanks in advance,

Sebi

Tags (5)
1 Solution
1,239 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Sebi,

      Let me explain this structure at first .

(1)Explanation of data structure

#define SABRESD_HEADPHONE_DET IMX_GPIO_NR(7, 8)

        static struct mxc_audio_platform_data mx6_audio1_data = {

            .ssi_num= 1,// (Which SSI will be used, SSI0,SSI1 or SSI2, here means we will use SSI1 )

            .src_port = 2, // Internal connection is SSI1 to Port 2 of AUDMUX

            .ext_port = 5, // External port of AUDMUX is No.5(AUD5). For i.mx6 cpu, AUD3,AUD4,AUD5 and AUD6 can be muxed to PADs to connect with external deivce)

            .hp_gpio = SABRESD_HEADPHONE_DET,//here is a gpio used to detect if Headphone is input.

     }

The following is diagram for SSIx and AUDMUX, you can see in reference manual:

5777_5777.pngSSI-AUDMUX.png

SSI1/SSI2/SSI3 in diagram are SSI0/SSI1/SSI2 in BSP.

(2)Using 3 SSIs of I.MX6

In addition, From reference manual of I.MX6DQ, SDMA can access SSI0,SSI1 and SSI2 module, So they can be used to transimit High-bandwidth data. But on our evaluation board, we don't use 3 SSIs to connect 3 different devices. So we don't have corresponding experience to share with you. and not recommend you use 3 I2S of I.MX6 simultaneously.

(3) The following solution is recomended to you.(Using a audio code with 3 I2S Interfaces, such as WM8958)

Driver of WM895 has been supported in linux BSP, this can help you to save development time. The following is an example schematic. MCLK can be 24MHz that output from GPIO_0 on CPU.

5779_5779.pngwm8958.png

I think maybe wm8958 can be suitable for your requirement.

 

Regards,

Weidong

View solution in original post

9 Replies
1,240 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Sebi,

      Let me explain this structure at first .

(1)Explanation of data structure

#define SABRESD_HEADPHONE_DET IMX_GPIO_NR(7, 8)

        static struct mxc_audio_platform_data mx6_audio1_data = {

            .ssi_num= 1,// (Which SSI will be used, SSI0,SSI1 or SSI2, here means we will use SSI1 )

            .src_port = 2, // Internal connection is SSI1 to Port 2 of AUDMUX

            .ext_port = 5, // External port of AUDMUX is No.5(AUD5). For i.mx6 cpu, AUD3,AUD4,AUD5 and AUD6 can be muxed to PADs to connect with external deivce)

            .hp_gpio = SABRESD_HEADPHONE_DET,//here is a gpio used to detect if Headphone is input.

     }

The following is diagram for SSIx and AUDMUX, you can see in reference manual:

5777_5777.pngSSI-AUDMUX.png

SSI1/SSI2/SSI3 in diagram are SSI0/SSI1/SSI2 in BSP.

(2)Using 3 SSIs of I.MX6

In addition, From reference manual of I.MX6DQ, SDMA can access SSI0,SSI1 and SSI2 module, So they can be used to transimit High-bandwidth data. But on our evaluation board, we don't use 3 SSIs to connect 3 different devices. So we don't have corresponding experience to share with you. and not recommend you use 3 I2S of I.MX6 simultaneously.

(3) The following solution is recomended to you.(Using a audio code with 3 I2S Interfaces, such as WM8958)

Driver of WM895 has been supported in linux BSP, this can help you to save development time. The following is an example schematic. MCLK can be 24MHz that output from GPIO_0 on CPU.

5779_5779.pngwm8958.png

I think maybe wm8958 can be suitable for your requirement.

 

Regards,

Weidong

1,239 Views
aravinthkumarja
Senior Contributor II

Hi weidong.sun

Can you share the wm8958 driver file with BT audio support.

I'm using Android 6.0.1, i don't have wm8958 driver with BT audio support.

Thanks & Regards,

Aravinth

0 Kudos
1,239 Views
宗標廖
Contributor V

Hello,Weidong

>From reference manual of I.MX6DQ, SDMA can access SSI0,SSI1 and SSI2 module, So they can be used to transimit High-bandwidth data.

I want to capture raw data from SSI1,but I don't know how to do it.

Could you give me some suggests.

Thank you very much!

ZongbiaoLiao

0 Kudos
1,239 Views
sebimohan
Contributor III

Hello 

0 Kudos
1,239 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello,Sebi,

1,239 Views
sebimohan
Contributor III

Hello 

0 Kudos
1,239 Views
YixingKong
Senior Contributor IV

S.M.

Had your issue got resolved? If yes, we are going to close the discussion in 3 days. If you still need help, please feel

free to reply with an update to this discussion.

Thanks,
Yixing

0 Kudos
1,239 Views
sebimohan
Contributor III

Hello ,

My issues got fixed.

Thanks

Sebi

0 Kudos
1,239 Views
YixingKong
Senior Contributor IV

Thanks, SM. I will close the DI.

Yixing

0 Kudos