Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/hda/hdac.c
Show First 20 Lines • Show All 1,768 Lines • ▼ Show 20 Lines | hdac_print_child(device_t dev, device_t child) | ||||
retval = bus_print_child_header(dev, child); | retval = bus_print_child_header(dev, child); | ||||
retval += printf(" at cad %d", (int)(intptr_t)device_get_ivars(child)); | retval += printf(" at cad %d", (int)(intptr_t)device_get_ivars(child)); | ||||
retval += bus_print_child_footer(dev, child); | retval += bus_print_child_footer(dev, child); | ||||
return (retval); | return (retval); | ||||
} | } | ||||
static int | static int | ||||
hdac_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) | hdac_child_location(device_t dev, device_t child, struct sbuf *sb) | ||||
{ | { | ||||
snprintf(buf, buflen, "cad=%d", (int)(intptr_t)device_get_ivars(child)); | sbuf_printf(sb, "cad=%d", (int)(intptr_t)device_get_ivars(child)); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
hdac_child_pnpinfo_str_method(device_t dev, device_t child, char *buf, | hdac_child_pnpinfo_method(device_t dev, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
struct hdac_softc *sc = device_get_softc(dev); | struct hdac_softc *sc = device_get_softc(dev); | ||||
nid_t cad = (uintptr_t)device_get_ivars(child); | nid_t cad = (uintptr_t)device_get_ivars(child); | ||||
snprintf(buf, buflen, | sbuf_printf(sb, | ||||
"vendor=0x%04x device=0x%04x revision=0x%02x stepping=0x%02x", | "vendor=0x%04x device=0x%04x revision=0x%02x stepping=0x%02x", | ||||
sc->codecs[cad].vendor_id, sc->codecs[cad].device_id, | sc->codecs[cad].vendor_id, sc->codecs[cad].device_id, | ||||
sc->codecs[cad].revision_id, sc->codecs[cad].stepping_id); | sc->codecs[cad].revision_id, sc->codecs[cad].stepping_id); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
hdac_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) | hdac_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) | ||||
▲ Show 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | static device_method_t hdac_methods[] = { | ||||
DEVMETHOD(device_probe, hdac_probe), | DEVMETHOD(device_probe, hdac_probe), | ||||
DEVMETHOD(device_attach, hdac_attach), | DEVMETHOD(device_attach, hdac_attach), | ||||
DEVMETHOD(device_detach, hdac_detach), | DEVMETHOD(device_detach, hdac_detach), | ||||
DEVMETHOD(device_suspend, hdac_suspend), | DEVMETHOD(device_suspend, hdac_suspend), | ||||
DEVMETHOD(device_resume, hdac_resume), | DEVMETHOD(device_resume, hdac_resume), | ||||
/* Bus interface */ | /* Bus interface */ | ||||
DEVMETHOD(bus_get_dma_tag, hdac_get_dma_tag), | DEVMETHOD(bus_get_dma_tag, hdac_get_dma_tag), | ||||
DEVMETHOD(bus_print_child, hdac_print_child), | DEVMETHOD(bus_print_child, hdac_print_child), | ||||
DEVMETHOD(bus_child_location_str, hdac_child_location_str), | DEVMETHOD(bus_child_location, hdac_child_location), | ||||
DEVMETHOD(bus_child_pnpinfo_str, hdac_child_pnpinfo_str_method), | DEVMETHOD(bus_child_pnpinfo, hdac_child_pnpinfo_method), | ||||
DEVMETHOD(bus_read_ivar, hdac_read_ivar), | DEVMETHOD(bus_read_ivar, hdac_read_ivar), | ||||
DEVMETHOD(hdac_get_mtx, hdac_get_mtx), | DEVMETHOD(hdac_get_mtx, hdac_get_mtx), | ||||
DEVMETHOD(hdac_codec_command, hdac_codec_command), | DEVMETHOD(hdac_codec_command, hdac_codec_command), | ||||
DEVMETHOD(hdac_stream_alloc, hdac_stream_alloc), | DEVMETHOD(hdac_stream_alloc, hdac_stream_alloc), | ||||
DEVMETHOD(hdac_stream_free, hdac_stream_free), | DEVMETHOD(hdac_stream_free, hdac_stream_free), | ||||
DEVMETHOD(hdac_stream_start, hdac_stream_start), | DEVMETHOD(hdac_stream_start, hdac_stream_start), | ||||
DEVMETHOD(hdac_stream_stop, hdac_stream_stop), | DEVMETHOD(hdac_stream_stop, hdac_stream_stop), | ||||
DEVMETHOD(hdac_stream_reset, hdac_stream_reset), | DEVMETHOD(hdac_stream_reset, hdac_stream_reset), | ||||
Show All 15 Lines |