/** * snd_hdac_ext_bus_init - initialize a HD-audio extended bus * @bus: the pointer to HDAC bus object * @dev: device pointer * @ops: bus verb operators * @ext_ops: operators used for ASoC HDA codec drivers * * Returns 0 if successful, or a negative error code.
*/ int snd_hdac_ext_bus_init(struct hdac_bus *bus, struct device *dev, conststruct hdac_bus_ops *ops, conststruct hdac_ext_bus_ops *ext_ops)
{ int ret;
ret = snd_hdac_bus_init(bus, dev, ops); if (ret < 0) return ret;
bus->ext_ops = ext_ops; /* FIXME: * Currently only one bus is supported, if there is device with more * buses, bus->idx should be greater than 0, but there needs to be a * reliable way to always assign same number.
*/
bus->idx = 0;
bus->cmd_dma_state = true;
/** * snd_hdac_ext_bus_exit - clean up a HD-audio extended bus * @bus: the pointer to HDAC bus object
*/ void snd_hdac_ext_bus_exit(struct hdac_bus *bus)
{
snd_hdac_bus_exit(bus);
WARN_ON(!list_empty(&bus->hlink_list));
}
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_exit);
/** * snd_hdac_ext_bus_device_remove - remove HD-audio extended codec base devices * * @bus: the pointer to HDAC bus object
*/ void snd_hdac_ext_bus_device_remove(struct hdac_bus *bus)
{ struct hdac_device *codec, *__codec; /* * we need to remove all the codec devices objects created in the * snd_hdac_ext_bus_device_init
*/
list_for_each_entry_safe(codec, __codec, &bus->codec_list, list) {
snd_hdac_device_unregister(codec);
put_device(&codec->dev);
}
}
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_remove); #define dev_to_hdac(dev) (container_of((dev), \ struct hdac_device, dev))
/** * snd_hda_ext_driver_register - register a driver for ext hda devices * * @drv: ext hda driver structure
*/ int snd_hda_ext_driver_register(struct hdac_driver *drv)
{
drv->type = HDA_DEV_ASOC;
drv->driver.bus = &snd_hda_bus_type; /* we use default match */
if (drv->probe)
drv->driver.probe = hda_ext_drv_probe; if (drv->remove)
drv->driver.remove = hdac_ext_drv_remove; if (drv->shutdown)
drv->driver.shutdown = hdac_ext_drv_shutdown;
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.