Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sound/pci/hda/hdacc.c
Show First 20 Lines • Show All 536 Lines • ▼ Show 20 Lines | hdacc_detach(device_t dev) | ||||
int error; | int error; | ||||
error = device_delete_children(dev); | error = device_delete_children(dev); | ||||
free(codec->fgs, M_HDACC); | free(codec->fgs, M_HDACC); | ||||
return (error); | return (error); | ||||
} | } | ||||
static int | static int | ||||
hdacc_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) | hdacc_child_location(device_t dev, device_t child, struct sbuf *sb) | ||||
{ | { | ||||
struct hdacc_fg *fg = device_get_ivars(child); | struct hdacc_fg *fg = device_get_ivars(child); | ||||
snprintf(buf, buflen, "nid=%d", fg->nid); | sbuf_printf(sb, "nid=%d", fg->nid); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
hdacc_child_pnpinfo_str_method(device_t dev, device_t child, char *buf, | hdacc_child_pnpinfo_method(device_t dev, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
struct hdacc_fg *fg = device_get_ivars(child); | struct hdacc_fg *fg = device_get_ivars(child); | ||||
snprintf(buf, buflen, "type=0x%02x subsystem=0x%08x", | sbuf_printf(sb, "type=0x%02x subsystem=0x%08x", | ||||
fg->type, fg->subsystem_id); | fg->type, fg->subsystem_id); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
hdacc_print_child(device_t dev, device_t child) | hdacc_print_child(device_t dev, device_t child) | ||||
{ | { | ||||
struct hdacc_fg *fg = device_get_ivars(child); | struct hdacc_fg *fg = device_get_ivars(child); | ||||
▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | |||||
static device_method_t hdacc_methods[] = { | static device_method_t hdacc_methods[] = { | ||||
/* device interface */ | /* device interface */ | ||||
DEVMETHOD(device_probe, hdacc_probe), | DEVMETHOD(device_probe, hdacc_probe), | ||||
DEVMETHOD(device_attach, hdacc_attach), | DEVMETHOD(device_attach, hdacc_attach), | ||||
DEVMETHOD(device_detach, hdacc_detach), | DEVMETHOD(device_detach, hdacc_detach), | ||||
DEVMETHOD(device_suspend, hdacc_suspend), | DEVMETHOD(device_suspend, hdacc_suspend), | ||||
DEVMETHOD(device_resume, hdacc_resume), | DEVMETHOD(device_resume, hdacc_resume), | ||||
/* Bus interface */ | /* Bus interface */ | ||||
DEVMETHOD(bus_child_location_str, hdacc_child_location_str), | DEVMETHOD(bus_child_location, hdacc_child_location), | ||||
DEVMETHOD(bus_child_pnpinfo_str, hdacc_child_pnpinfo_str_method), | DEVMETHOD(bus_child_pnpinfo, hdacc_child_pnpinfo_method), | ||||
DEVMETHOD(bus_print_child, hdacc_print_child), | DEVMETHOD(bus_print_child, hdacc_print_child), | ||||
DEVMETHOD(bus_probe_nomatch, hdacc_probe_nomatch), | DEVMETHOD(bus_probe_nomatch, hdacc_probe_nomatch), | ||||
DEVMETHOD(bus_read_ivar, hdacc_read_ivar), | DEVMETHOD(bus_read_ivar, hdacc_read_ivar), | ||||
DEVMETHOD(hdac_get_mtx, hdacc_get_mtx), | DEVMETHOD(hdac_get_mtx, hdacc_get_mtx), | ||||
DEVMETHOD(hdac_codec_command, hdacc_codec_command), | DEVMETHOD(hdac_codec_command, hdacc_codec_command), | ||||
DEVMETHOD(hdac_stream_alloc, hdacc_stream_alloc), | DEVMETHOD(hdac_stream_alloc, hdacc_stream_alloc), | ||||
DEVMETHOD(hdac_stream_free, hdacc_stream_free), | DEVMETHOD(hdac_stream_free, hdacc_stream_free), | ||||
DEVMETHOD(hdac_stream_start, hdacc_stream_start), | DEVMETHOD(hdac_stream_start, hdacc_stream_start), | ||||
Show All 20 Lines |