imx6 custom board audio problem with wm8960 on kernel 4.9

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

imx6 custom board audio problem with wm8960 on kernel 4.9

1,425 Views
kaangencay
Contributor I

Hello, 

I have a custom board based on i.MX6 quad and trying to run WM8960 audio codec chip as master.

WM8960 is on daughter board, and it has own 24MHz oscillator. So it has to be master and generate BCLK and FS clocks.

In kernel 4.9, in /sound/soc/codecs/wm8960.c file, I think it is set as slave.

How can I set the codec as master in kernel and device tree?

Do you have any suggestion for which device tree settings and kernel configurations work?

Thanks

Kaan

Labels (1)
0 Kudos
7 Replies

440 Views
OliverHawthorne
Contributor I

Have you solved this problem and can you share the solution?Thank You Very much!

0 Kudos

1,312 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kaan

one can look at codec-master property in dts:

imx6qdl-sabresd.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,312 Views
kaangencay
Contributor I

Hi Igor,

Thanks for your reply. 

But in dts above, there are the lines about codec settings like that: 

codec: wm8962@1a {   compatible = "wlf,wm8962";   reg = <0x1a>;   clocks = <&clks IMX6QDL_CLK_CKO>;
                  ...

In the last line, what is clocks property for? I supposed that it determines which clock source is used as master clock. 

In this case the master clock is provided by i.MX clock source, IMX6QDL_CLK_CKO, so i.MX produces BCLK and FS clocks.

Am I wrong?

0 Kudos

1,312 Views
igorpadykov
NXP Employee
NXP Employee

Hi Kaan

sorry I do not think so, one can look at codec sources

imx-wm8962.c\fsl\soc\sound - linux-imx - i.MX Linux kernel 

Best regards
igor

0 Kudos

1,312 Views
kaangencay
Contributor I

Thank you Igor,

There is the function which parse "gpr" property in machine driver which is imx-wm8960.c

static int of_parse_gpr(struct platform_device *pdev,   struct imx_wm8960_data *data)
{
...
ret = of_parse_phandle_with_fixed_args(pdev->dev.of_node,            "gpr", 3, 0, &args); if (ret) {  dev_warn(&pdev->dev, "failed to get gpr property\n");  return ret; }

...

}

When I set "gpr" in dtsi file like that;

sound{

...

gpr = <&gpr>;

...

}

I got this error: OF /sound: arguments longer than property

So, how should I set this property?

Kaan

0 Kudos

1,312 Views
kaangencay
Contributor I

I got this error:

OF /sound: arguments longer than property,

and also:

"imx-wm8960 sound: failed to get gpr property"

0 Kudos

1,312 Views
igorpadykov
NXP Employee
NXP Employee

one can try to debug it using

Using Open Source Debugging Tools for Linux on i.MX Processors

gpr descriptions in IOMUX Chapter i.MX 6Dual/6Quad Applications Processor Reference Manual

Best regards
igor

0 Kudos