WM8960:no voice on headphone

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

WM8960:no voice on headphone

3,489 Views
xrz_lam
Contributor I

Hi,

    We worked on the following platform:

   1.Android 4.0.4(android-13.5.0-ga.01);

   2.CPU:Freescale i.MX 6SoloLite EVK Board;

   3.Codec: WM8960;

   4.Bootup from SD card +LPDDR2;

  5. Now the situation is:

       Codec had been registered,but I can't hear any sounds when I play mp3 music.it is no voice on headphone.

   6.Here is the source codes:

     6.1).Board files configuration of WM8960:    

static struct imx_ssi_platform_data mx6sl_evk_ssi_pdata = {

  .flags = IMX_SSI_DMA | IMX_SSI_SYN,

};

static struct mxc_audio_platform_data wm8960_pdata;

 

static struct platform_device mx6sl_evk_audio_wm8960_device = {

  .name = IMX_WM8960_DRIVE_NAME,

};

static struct wm8960_data wm8960_config_data = {

 

};

 

static int wm8960_clk_enable(int enable)

{

  imx6Sl_debug("enable=%d",enable);

       if (IS_ERR(extern_audio_root)) {

                pr_err("audio clock source is not found!\n");

                return -1;

        }

  if (enable)

  clk_enable(extern_audio_root);

  else

  clk_disable(extern_audio_root);

  return 0;

}

 

 

static int mxc_wm8960_init(void)

{

  struct clk *pll4;

  int rate;

  imx6Sl_debug();

  extern_audio_root = clk_get(NULL, "extern_audio_clk");

  if (IS_ERR(extern_audio_root)) {

  pr_err("can't get extern_audio_root clock.\n");

  return PTR_ERR(extern_audio_root);

  }

  pll4 = clk_get(NULL, "pll4");

  if (IS_ERR(pll4)) {

  pr_err("can't get pll4 clock.\n");

  return PTR_ERR(pll4);

  }

  clk_set_parent(extern_audio_root, pll4);

  rate = clk_round_rate(extern_audio_root,11289600);

  clk_set_rate(extern_audio_root, rate);

  imx6Sl_debug("rate =%d",rate);

  wm8960_pdata.sysclk = rate;

  return 0;

}

static struct mxc_audio_platform_data wm8960_pdata = {

  .ssi_num = 1,

  .src_port = 2,

  .ext_port = 3,

  .hp_gpio =-1,

  .hp_active_low = 1,

  .mic_gpio =-1,

  .mic_active_low = 1,

  .init = mxc_wm8960_init,

  .clock_enable = wm8960_clk_enable,

};

static int __init mx6_evk_init_audio(void)

{

  imx6Sl_debug();

  mxc_register_device(&mx6sl_evk_audio_wm8960_device,

  &wm8960_pdata);

  /*imx-ssi.c*/

  imx6q_add_imx_ssi(1, &mx6sl_evk_ssi_pdata);

 

  return 0;

}

6.2).WM8960.c and imx-wm8960.c please see attachment files(wm8960.txt,imx-wm8960.txt).

 

7. The log of wm8960 can see this log(wm8960_log_0122.txt).

 

Can you tell me where was wrong ?

 

Thanks very much in advance.

Original Attachment has been moved to: wm8960.txt.zip

Original Attachment has been moved to: wm8960_log_0122.txt.zip

Original Attachment has been moved to: imx-wm8960.txt.zip

Labels (2)
0 Kudos
Reply
11 Replies

2,699 Views
saurabh206
Senior Contributor III

Hi

As such i don't find any issue.

0 Kudos
Reply

2,699 Views
xrz_lam
Contributor I

HI,Saurabh,

   Can you give me some advices?

Thanks.

0 Kudos
Reply

2,699 Views
saurabh206
Senior Contributor III

You can do following.

- review platform interface code. Which does the configuration for SSI.

- Verify signal on SSI using Scope.

In Audio clock is important part. You should verify that first.

Check MCLK, LRCLK and Bit clk.

Thanks

Saurabh

0 Kudos
Reply

2,699 Views
xrztech_wen
Contributor II

Hi,Saurabh,

     Did you debug wm8960 before?

    Can you give me some other advices?

    


Thanks.

0 Kudos
Reply

2,699 Views
saurabh206
Senior Contributor III

Hi

Wen

I haven't debug with Wm8960, But I had work with many other.

Main thing about audio is configuration and clocking.

Thanks

Saurabh

0 Kudos
Reply

2,699 Views
xrztech_wen
Contributor II

Hi,Saurabh,

   The Audio clock is 11289600,I had set,but it only get the 10156249.

   In other codec,for example, TLV320AIC3206IRSBR,it also get the 10156249,but it works very,

so I think the Audio clock is right,so the MCLK is right.

Thanks.

0 Kudos
Reply

2,699 Views
saurabh206
Senior Contributor III

Hi

Can you share logcat detail?

Verify you hardware/imx code change for your Codec.

Thanks

Saurabh

0 Kudos
Reply

2,699 Views
xrz_lam
Contributor I

Hi,

  Sorry for reply later.

   The logcat detail had attached,and the hardware/imx codes also had attached.

Thanks.

0 Kudos
Reply

2,699 Views
saurabh206
Senior Contributor III

Hi,

Logcat detail is ok,

You need to check the signal on Codec.

Have you configured your codec correctly master or slave?

Thanks

Saurabh

0 Kudos
Reply

2,699 Views
xrz_lam
Contributor I

HI,Saurabh,

     Do you find any errors about this drivers?

Thanks.

0 Kudos
Reply

2,699 Views
xrz_lam
Contributor I

HI,Saurabh,

      I had configured the WM8960 as master,the register 0x7 value is 0x42,so

the wm8960 as master.you can get more information from "wm8960.pdf".

Thanks,

0 Kudos
Reply