Generate audio with pwm (IMX6UL)

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

Generate audio with pwm (IMX6UL)

536 Views
ganesh_k
Contributor III

I am working on pwm audio driver, i got some pwm driver from below link:

GitHub - Glowforge/kernel-module-imx-pwm-audio: i.MX6 PWM audio driver 

Please look at this driver once from above..............................

code from driver... "sdma-params" passing from device tree
  /* Read SDMA channel number and load address */
  if (of_property_read_u32_array(pdev->dev.of_node, "sdma-params",
    sdma_params, ARRAY_SIZE(sdma_params)) == 0) {
//  if (of_property_read_u32_array(pdev->dev.of_node, NULL,
//    NULL,0)) {
    self->sdma_ch_num = sdma_params[0];
    self->sdma_script_origin = sdma_params[1];
  } else {
  dev_err(&pdev->dev, "sdma-params property not specified");
  goto failed_sdma_init;
  }

while passing the parameters of sdma(channel No. and address of sdma script load address ) in devicetree the board is not booting(its booting till bootloader), is because of channel number and address?

Devicetree
&pwm3 {
        comaptible = "glowforge,imx-pwm-audio";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_pwm3>;
        enable-gpio = <&gpio1 4 0>;
        timer = <0x10>;
        sdma-params = <0x19 0xdc0>;
        status = "okay";

Please suggest me how to pass these parameters through devicetree and also give some examples to understand it.

Thanks & Regards

Ganesh K

0 Kudos
1 Reply

376 Views
BiyongSUN
NXP Employee
NXP Employee

maybe you can check the Medium Quality Sound (MQS) of i.MX6UL to see if meet your requirements.

 

Untitled.png

0 Kudos