codec configuration for IMX6SoloX board.

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

codec configuration for IMX6SoloX board.

1,235 Views
robinsingh
Contributor III

HI All,

I want to know the setting required for a new codec to make it work in imx6sx kernel 3.10.

here is what i am trying to do :

1) Connection :

LCD1_RESET -> AUD3_RXD   ->  -> I2S_SDIO  codec side

LCD1_ENABLE -> AUD3_TXC   -> J -> I2S_ LRCLK codec side

LCD1_HSYNC -> AUD3_TXD   ->  -> I2S_ SDI codec

LCD1_VSYNC -> AUD3_TXFS   ->  -> I2S_SCLK_codec

i have written a Machine driver(based on wm8962 driver   imx-wm8962.c) for my codec , but as of now i do not see any signal coming out:

Here is my DT binding:

============================================

/*DT binding for DAI LINK driver*/

        sound {

                compatible = "fsl,imx6q-sabresd-wm8962",

                           "fsl,imx-audio-mycodec";

                model = "mycodec-audio";

                cpu-dai = <&ssi2>; /* si-controller*/

                audio-codec = <&codec;

                audio-routing =

                        "Headphone Jack", "HPOUTL",

                        "Headphone Jack", "HPOUTR",

                        "Ext Spk", "SPKOUTL",

                        "Ext Spk", "SPKOUTR",

                        "AMIC", "MICBIAS",

                        "IN3R", "AMIC";

                mux-int-port = <2>;

                mux-ext-port = <3>;

                hp-det-gpios = <&gpio1 17 1>;

        };

==============================================

FIle : imx6sx.dtsi

audmux {

                 pinctrl_audmux_4: audmuxgrp-4 {

                        fsl,pins = <

                                MX6SX_PAD_LCD1_ENABLE__AUDMUX_AUD3_TXC  0x130B0

                                MX6SX_PAD_LCD1_VSYNC__AUDMUX_AUD3_TXFS  0x130B0

                                MX6SX_PAD_LCD1_HSYNC__AUDMUX_AUD3_TXD    0x120B0

                                MX6SX_PAD_LCD1_RESET__AUDMUX_AUD3_RXD    0x130B0

                        >;

                };

=====================

File : imx6sx-sdb.dts

&audmux {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_audmux_4>;

        status = "okay";

};

===========================

I am using SSI2 ===>  AUD3 ====> my codec

Does above setting looks fine or i am missing something? please  share some details including clock for ssi2 etc

thanks

Robin Singh

Labels (3)
0 Kudos
4 Replies

725 Views
igorpadykov
NXP Employee
NXP Employee

Hi robin

suggest to check attached Porting Guide

Chapter 8 Porting Audio Codecs to a Custom Board

Best regards

igor

0 Kudos

725 Views
saurabh206
Senior Contributor III

Hi

Robin

Does You codec is in slave configuration or master configuration?

You need to make code change for clock supply.

Thanks

Saurabh

0 Kudos

725 Views
robinsingh
Contributor III

HI Saurabh,

Thank you for your reply. I am configuring codec as a slave device.  what are code change required for clock supply ? Can you please give me some pointer ?

I checked in /sys/kernel/debugs/clk/clk_summry and clocks are not enable on my board for audio [ ssi1_ipg,ssi2_ipg,ssi_ipg].i tried to enable them machine code , but no luck.  please give me some pointer .

thanks

Robin Singh

0 Kudos

725 Views
saurabh206
Senior Contributor III

Hi

Robin

you can study existing code from "kernel\sound\soc\fsl"

Following modification is required for your driver.

snd_soc_dai_set_fmt needs to pass SND_SOC_DAIFMT_CBS_CFS for I2S as a master mode.

And

snd_soc_dai_set_sysclk(cpu_dai, 0, bclk, SND_SOC_CLOCK_OUT);

I hope this helps.

Thanks

Saurabh

0 Kudos