pclk = devm_clk_get_enabled(dev, "pclk"); if (IS_ERR(pclk)) return dev_err_probe(dev, PTR_ERR(pclk), "Can't get the aiu pclk\n");
aiu->spdif_mclk = devm_clk_get(dev, "spdif_mclk"); if (IS_ERR(aiu->spdif_mclk)) return dev_err_probe(dev, PTR_ERR(aiu->spdif_mclk), "Can't get the aiu spdif master clock\n");
ret = aiu_clk_bulk_get(dev, aiu_i2s_ids, ARRAY_SIZE(aiu_i2s_ids),
&aiu->i2s); if (ret) return dev_err_probe(dev, ret, "Can't get the i2s clocks\n");
ret = aiu_clk_bulk_get(dev, aiu_spdif_ids, ARRAY_SIZE(aiu_spdif_ids),
&aiu->spdif); if (ret) return dev_err_probe(dev, ret, "Can't get the spdif clocks\n");
aiu = devm_kzalloc(dev, sizeof(*aiu), GFP_KERNEL); if (!aiu) return -ENOMEM;
aiu->platform = device_get_match_data(dev); if (!aiu->platform) return -ENODEV;
platform_set_drvdata(pdev, aiu);
ret = device_reset(dev); if (ret) return dev_err_probe(dev, ret, "Failed to reset device\n");
regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) return PTR_ERR(regs);
map = devm_regmap_init_mmio(dev, regs, &aiu_regmap_cfg); if (IS_ERR(map)) {
dev_err(dev, "failed to init regmap: %ld\n",
PTR_ERR(map)); return PTR_ERR(map);
}
aiu->i2s.irq = platform_get_irq_byname(pdev, "i2s"); if (aiu->i2s.irq < 0) return aiu->i2s.irq;
aiu->spdif.irq = platform_get_irq_byname(pdev, "spdif"); if (aiu->spdif.irq < 0) return aiu->spdif.irq;
ret = aiu_clk_get(dev); if (ret) return ret;
/* Register the cpu component of the aiu */
ret = snd_soc_register_component(dev, &aiu_cpu_component,
aiu_cpu_dai_drv,
ARRAY_SIZE(aiu_cpu_dai_drv)); if (ret) {
dev_err(dev, "Failed to register cpu component\n"); return ret;
}
/* Register the hdmi codec control component */
ret = aiu_hdmi_ctrl_register_component(dev); if (ret) {
dev_err(dev, "Failed to register hdmi control component\n"); goto err;
}
/* Register the internal dac control component on gxl */ if (aiu->platform->has_acodec) {
ret = aiu_acodec_ctrl_register_component(dev); if (ret) {
dev_err(dev, "Failed to register acodec control component\n"); goto err;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.