Open EMLommers opened 1 year ago
@EMLommers - i'm not fully understanding what you mean: are you speaking about adding dtb info also on intel systems to the kernel? what is the problem, which is solved this way? i got glk audio qorking quite well at least with uefi payload - is your approach intended for the non-uefi case?
New appoach1, to get audio working without / with SOF / get DA7219 working: (flat) device tree
3 build new kernel with (flat) Device-tree
4 make sure regulator reg_audio: is included.
5 build kernel with dtb and if needed dtbo overlay
New appoach2, to get audio working without / with SOF / get DA7219 working:
2 add to acpi dlg,vddio and value 1800 , dlg,vdd value 1800 and dlg,vddmic 3300 3 da719.c read ACPI and write to according u32.
+ if (device_property_read_u32(dev, "dlg,vdd", &of_val32) >= 0) + pdata->vdd = of_val32; +
+ if (device_property_read_u32(dev, "dlg,vddio", &of_val32) >= 0) + pdata->vddio = of_val32; +
+ if (device_property_read_u32(dev, "dlg,vddmic", &of_val32) >= 0) + pdata->vddmic = of_val32; + ret = regulator_get_voltage(vddio); + / If regulator_get_voltage() fails, try to use vddio from pdata. / + if (ret < 0 && da7219->pdata) + ret = da7219->pdata->vddio;
+ ret = regulator_get_voltage(vdd); + / If regulator_get_voltage() fails, try to use vdd from pdata. / + if (ret < 0 && da7219->pdata) + ret = da7219->pdata->vdd;
+ret = regulator_get_voltage(vddmic); / If regulator_get_voltage() fails, try to use vddio from pdata. / + if (ret < 0 && da7219->pdata) + ret = da7219->pdata->vddmic;
+ dev_warn(component->dev, "Invalid VDDIO voltage: %d mV\n", + ret);
+ / Handle DT/ACPI/Platform data / + da7219->pdata = dev_get_platdata(component->dev); + if (!da7219->pdata) + da7219->pdata = da7219_fw_to_pdata(component); \ +
Or use Device tree and ACPI together.. Works guaranteed!! Thanks