Lines Matching full:codec
32 * Intel High Definition Audio (CODEC) driver for FreeBSD.
63 #define hdacc_lock(codec) snd_mtxlock((codec)->lock) argument
64 #define hdacc_unlock(codec) snd_mtxunlock((codec)->lock) argument
65 #define hdacc_lockassert(codec) snd_mtxassert((codec)->lock) argument
67 MALLOC_DEFINE(M_HDACC, "hdacc", "HDA CODEC");
479 device_set_descf(dev, "%s HDA CODEC", buf); in hdacc_probe()
486 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_attach() local
494 codec->lock = HDAC_GET_MTX(device_get_parent(dev), dev); in hdacc_attach()
495 codec->dev = dev; in hdacc_attach()
496 codec->cad = cad; in hdacc_attach()
498 hdacc_lock(codec); in hdacc_attach()
501 hdacc_unlock(codec); in hdacc_attach()
504 codec->fgcnt = HDA_PARAM_SUB_NODE_COUNT_TOTAL(subnode); in hdacc_attach()
506 endnode = startnode + codec->fgcnt; in hdacc_attach()
515 codec->fgs = malloc(sizeof(struct hdacc_fg) * codec->fgcnt, in hdacc_attach()
518 codec->fgs[n].nid = i; in hdacc_attach()
519 hdacc_lock(codec); in hdacc_attach()
520 codec->fgs[n].type = in hdacc_attach()
523 codec->fgs[n].subsystem_id = hda_command(dev, in hdacc_attach()
525 hdacc_unlock(codec); in hdacc_attach()
526 codec->fgs[n].dev = child = device_add_child(dev, NULL, DEVICE_UNIT_ANY); in hdacc_attach()
531 device_set_ivars(child, &codec->fgs[n]); in hdacc_attach()
542 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_detach() local
547 free(codec->fgs, M_HDACC); in hdacc_detach()
586 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_probe_nomatch() local
603 hdacc_lock(codec); in hdacc_probe_nomatch()
606 hdacc_unlock(codec); in hdacc_probe_nomatch()
634 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_get_mtx() local
636 return (codec->lock); in hdacc_get_mtx()
650 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_stream_alloc() local
656 codec->streams[dir][stream] = child; in hdacc_stream_alloc()
663 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_stream_free() local
665 codec->streams[dir][stream] = NULL; in hdacc_stream_free()
702 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_stream_intr() local
705 if ((child = codec->streams[dir][stream]) != NULL) in hdacc_stream_intr()
712 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_unsol_alloc() local
718 if (codec->tags[tag] == NULL) { in hdacc_unsol_alloc()
719 codec->tags[tag] = child; in hdacc_unsol_alloc()
732 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_unsol_free() local
735 codec->tags[tag] = NULL; in hdacc_unsol_free()
742 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_unsol_intr() local
747 if ((child = codec->tags[tag]) != NULL) in hdacc_unsol_intr()
750 device_printf(codec->dev, "Unexpected unsolicited " in hdacc_unsol_intr()