在imx258上修改音频wm8960,没有声音

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

在imx258上修改音频wm8960,没有声音

2,749 Views
wangqinghao
Contributor I

贵公司好!

我最近修改wm8960的驱动,soc是imx258,之前audio是ok的,但是硬件把gpio管脚AUD4改成AUD6了。我修改了如下部分。但是MCLK,BLCK,LRCK,DACDAT都是有信号的,但是SPK部分输出的波形不对,没有任何声音。请问我都要改什么内容。谢谢!

static struct mxc_audio_platform_data wm8960_data = {

    .ssi_num = 2,

    .src_port = 1,

    .ext_port = 6,//之前是4

    .sysclk = 8300000,

};

Labels (1)
0 Kudos
Reply
9 Replies

2,176 Views
jimmychan
NXP TechSupport
NXP TechSupport

please try this pad setting

        mxc_iomux_set_pad(MX25_PIN_CSI_MCLK, PAD_CTL_PKE | PAD_CTL_PUE | PAD_CT_PUS_100K_UP);

        mxc_iomux_set_pad(MX25_PIN_CSI_VSYNC, PAD_CTL_PKE | PAD_CTL_PUE | PAD_CT_PUS_100K_UP);

        mxc_iomux_set_pad(MX25_PIN_CSI_PIXCLK, PAD_CTL_PKE | PAD_CTL_PUE | PAD_CT_PUS_100K_UP);

        mxc_iomux_set_pad(MX25_PIN_CSI_HSYNC, PAD_CTL_PKE | PAD_CTL_PUE | PAD_CT_PUS_100K_UP);

0 Kudos
Reply

2,176 Views
wangqinghao
Contributor I

thank you very much!

may be a problem on hardware

0 Kudos
Reply

2,176 Views
jimmychan
NXP TechSupport
NXP TechSupport

Is your AUD6 IOMUX like this?

        mxc_request_iomux(MX25_PIN_CSI_MCLK, MUX_CONFIG_ALT1); /*SSI6_STXD*/

        mxc_request_iomux(MX25_PIN_CSI_VSYNC, MUX_CONFIG_ALT1); /*SSI6_SRXD*/

        mxc_request_iomux(MX25_PIN_CSI_PIXCLK, MUX_CONFIG_ALT1); /*SSI6_STXFS*/

        mxc_request_iomux(MX25_PIN_CSI_HSYNC, MUX_CONFIG_ALT1); /*SSI6_SCK*/

        mxc_iomux_set_pad(MX25_PIN_CSI_MCLK, PAD_CTL_SRE_FAST);

        mxc_iomux_set_pad(MX25_PIN_CSI_VSYNC, PAD_CTL_SRE_FAST);

        mxc_iomux_set_pad(MX25_PIN_CSI_PIXCLK, PAD_CTL_SRE_FAST);

        mxc_iomux_set_pad(MX25_PIN_CSI_HSYNC, PAD_CTL_SRE_FAST);

Please double check if the IOMUX of AUD6 conflict with other IOMUX setting.

0 Kudos
Reply

2,176 Views
wangqinghao
Contributor I

sorry.the interface of soc with codec is 4_wire synchronous ssi mode.

0 Kudos
Reply

2,176 Views
wangqinghao
Contributor I

mxc_free_iomux(MX25_PIN_CSI_MCLK, MUX_CONFIG_FUNC);

mxc_free_iomux(MX25_PIN_CSI_VSYNC, MUX_CONFIG_FUNC);

mxc_free_iomux(MX25_PIN_CSI_HSYNC, MUX_CONFIG_FUNC);

mxc_free_iomux(MX25_PIN_CSI_PIXCLK, MUX_CONFIG_FUNC);

//mxc_free_iomux(MX25_PIN_CSI_D9, MUX_CONFIG_FUNC);

mxc_request_iomux(MX25_PIN_CSI_MCLK, MUX_CONFIG_ALT1); //AUD6_TXD

mxc_request_iomux(MX25_PIN_CSI_VSYNC, MUX_CONFIG_ALT1); //AUD6_RXD

mxc_request_iomux(MX25_PIN_CSI_HSYNC, MUX_CONFIG_ALT1); //AUD6_TXC

mxc_request_iomux(MX25_PIN_CSI_PIXCLK, MUX_CONFIG_ALT1); //AUD6_TXFS

//mxc_request_iomux(MX25_PIN_CSI_D9, MUX_CONFIG_ALT2); //AUD6_RXFS

mxc_iomux_set_pad(MX27_PIN_CSI_MCLK,PAD_CTL_SRE_FAST);

mxc_iomux_set_pad(MX25_PIN_CSI_VSYNC,PAD_CTL_SRE_FAST);

mxc_iomux_set_pad(MX25_PIN_CSI_HSYNC,PAD_CTL_SRE_FAST);

mxc_iomux_set_pad(MX25_PIN_CSI_PIXCLK,PAD_CTL_SRE_FAST);

0 Kudos
Reply

2,176 Views
jimmychan
NXP TechSupport
NXP TechSupport

是不是之前用AUD4是沒有任何問題? 改用AUD6之後就沒声音? 原來AUD4的IOMUX和AUD6的IOMUX都改了嗎?

0 Kudos
Reply

2,176 Views
wangqinghao
Contributor I

IOMUX是从AUD4改成了AUD6,之前的AUD4是没有问题的。我知道改下IO,SSI接口位置,不清楚还有什么东西是遗漏的。谢谢!

0 Kudos
Reply

2,176 Views
jimmychan
NXP TechSupport
NXP TechSupport

could you tell me which BSP are you using? which file you have modified?

0 Kudos
Reply

2,176 Views
wangqinghao
Contributor I

system :linux 2.6.31

soc: imx258

codec:wm8960

interface:6 line ssi

modified:mx25_3stack.c (.ext_port = 4 ==> .ext_port = 6)

mx25_3stack_gpio.c(IOMUX AUD4 ==> AUD6)。

No error occur when run applay .wav file.soc as the slave ,and the frequency os MCLK is 12M,BCLK is 8k,and have LRCK ADCDAT.

thank you!

0 Kudos
Reply