Lines Matching refs:codec

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
487 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_attach() local
495 codec->lock = HDAC_GET_MTX(device_get_parent(dev), dev); in hdacc_attach()
496 codec->dev = dev; in hdacc_attach()
497 codec->cad = cad; in hdacc_attach()
499 hdacc_lock(codec); in hdacc_attach()
502 hdacc_unlock(codec); in hdacc_attach()
505 codec->fgcnt = HDA_PARAM_SUB_NODE_COUNT_TOTAL(subnode); in hdacc_attach()
507 endnode = startnode + codec->fgcnt; in hdacc_attach()
516 codec->fgs = malloc(sizeof(struct hdacc_fg) * codec->fgcnt, in hdacc_attach()
519 codec->fgs[n].nid = i; in hdacc_attach()
520 hdacc_lock(codec); in hdacc_attach()
521 codec->fgs[n].type = in hdacc_attach()
524 codec->fgs[n].subsystem_id = hda_command(dev, in hdacc_attach()
526 hdacc_unlock(codec); in hdacc_attach()
527 codec->fgs[n].dev = child = device_add_child(dev, NULL, DEVICE_UNIT_ANY); in hdacc_attach()
532 device_set_ivars(child, &codec->fgs[n]); in hdacc_attach()
543 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_detach() local
548 free(codec->fgs, M_HDACC); in hdacc_detach()
587 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_probe_nomatch() local
604 hdacc_lock(codec); in hdacc_probe_nomatch()
607 hdacc_unlock(codec); in hdacc_probe_nomatch()
635 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_get_mtx() local
637 return (codec->lock); in hdacc_get_mtx()
651 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_stream_alloc() local
657 codec->streams[dir][stream] = child; in hdacc_stream_alloc()
664 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_stream_free() local
666 codec->streams[dir][stream] = NULL; in hdacc_stream_free()
703 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_stream_intr() local
706 if ((child = codec->streams[dir][stream]) != NULL) in hdacc_stream_intr()
713 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_unsol_alloc() local
719 if (codec->tags[tag] == NULL) { in hdacc_unsol_alloc()
720 codec->tags[tag] = child; in hdacc_unsol_alloc()
733 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_unsol_free() local
736 codec->tags[tag] = NULL; in hdacc_unsol_free()
743 struct hdacc_softc *codec = device_get_softc(dev); in hdacc_unsol_intr() local
748 if ((child = codec->tags[tag]) != NULL) in hdacc_unsol_intr()
751 device_printf(codec->dev, "Unexpected unsolicited " in hdacc_unsol_intr()