Lines Matching defs:odev

131 	ossdev_t		*odev = arg;
150 if (!odev->d_play_grp) {
151 ext = &odev->d_exts[odev->d_nctrl];
152 ext->ctrl = odev->d_nctrl;
158 odev->d_play_grp = odev->d_nctrl;
159 odev->d_nctrl++;
162 parent = odev->d_play_grp;
164 if (!odev->d_rec_grp) {
165 ext = &odev->d_exts[odev->d_nctrl];
166 ext->ctrl = odev->d_nctrl;
172 odev->d_rec_grp = odev->d_nctrl;
173 odev->d_nctrl++;
176 parent = odev->d_rec_grp;
178 if (!odev->d_mon_grp) {
179 ext = &odev->d_exts[odev->d_nctrl];
180 ext->ctrl = odev->d_nctrl;
186 odev->d_mon_grp = odev->d_nctrl;
187 odev->d_nctrl++;
190 parent = odev->d_mon_grp;
192 if (!odev->d_misc_grp) {
193 ext = &odev->d_exts[odev->d_nctrl];
194 ext->ctrl = odev->d_nctrl;
200 odev->d_misc_grp = odev->d_nctrl;
201 odev->d_nctrl++;
204 parent = odev->d_misc_grp;
210 ext = &odev->d_exts[odev->d_nctrl];
211 ext->ctrl = odev->d_nctrl;
220 parent = odev->d_nctrl++;
224 ext = &odev->d_exts[odev->d_nctrl];
227 odev->d_ctrls[odev->d_nctrl] = ctrl;
233 ext->ctrl = odev->d_nctrl;
311 ext = &odev->d_exts[odev->d_nctrl];
318 ext->ctrl = odev->d_nctrl;
327 odev->d_ctrls[odev->d_nctrl] = ctrl;
328 odev->d_nctrl++;
369 odev->d_nctrl++;
379 oss_free_controls(ossdev_t *odev)
381 kmem_free(odev->d_ctrls, sizeof (audio_ctrl_t *) * odev->d_nalloc);
382 kmem_free(odev->d_exts, sizeof (oss_mixext) * odev->d_nalloc);
383 odev->d_nctrl = 0;
384 odev->d_nalloc = 0;
392 oss_alloc_controls(ossdev_t *odev)
394 audio_dev_t *d = odev->d_dev;
411 odev->d_nalloc = nctrl;
412 odev->d_ctrls = kmem_zalloc(sizeof (audio_ctrl_t *) * nctrl, KM_SLEEP);
413 odev->d_exts = kmem_zalloc(sizeof (oss_mixext) * nctrl, KM_SLEEP);
422 ext = &odev->d_exts[odev->d_nctrl];
437 odev->d_nctrl++;
443 ext = &odev->d_exts[odev->d_nctrl];
444 ext->ctrl = odev->d_nctrl;
449 odev->d_nctrl++;
452 auclnt_walk_controls(d, oss_add_control, odev);
455 for (nctrl = 0; nctrl < odev->d_nctrl; nctrl++) {
458 ext = &odev->d_exts[nctrl];
460 while ((i >= 0) && (i < odev->d_nctrl)) {
462 ext = &odev->d_exts[i];
471 ASSERT(odev->d_nctrl <= odev->d_nalloc);
478 ossdev_t *odev;
496 odev = auclnt_get_minor_data(c, AUDIO_MINOR_DSP);
500 sc->o_ossdev = odev;
1397 ossdev_t *odev;
1424 if ((odev = auclnt_get_dev_minor_data(d, AUDIO_MINOR_DSP)) == NULL) {
1448 mi->nrext = odev->d_nctrl;
1925 ossdev_t *odev;
1943 odev = auclnt_get_minor_data(c, AUDIO_MINOR_DSP);
1947 sc->o_ossdev = odev;
1969 ossdev_t *odev;
1977 if ((odev = auclnt_get_dev_minor_data(d, AUDIO_MINOR_DSP)) == NULL) {
1981 *ncp = odev->d_nctrl;
1990 ossdev_t *odev;
1999 if (((odev = auclnt_get_dev_minor_data(d, AUDIO_MINOR_DSP)) == NULL) ||
2000 (pext->ctrl >= odev->d_nctrl)) {
2004 bcopy(&odev->d_exts[pext->ctrl], pext, sizeof (*pext));
2017 ossdev_t *odev;
2027 if (((odev = auclnt_get_dev_minor_data(d, AUDIO_MINOR_DSP)) == NULL) ||
2028 (ei->ctrl >= odev->d_nctrl) ||
2029 (odev->d_exts[ei->ctrl].type != MIXT_ENUM) ||
2030 ((ctrl = odev->d_ctrls[ei->ctrl]) == NULL) ||
2059 ossdev_t *odev;
2066 if (((odev = auclnt_get_dev_minor_data(d, AUDIO_MINOR_DSP)) == NULL) ||
2067 (vr->ctrl >= odev->d_nctrl) ||
2068 ((ctrl = odev->d_ctrls[vr->ctrl]) == NULL)) {
2072 switch (odev->d_exts[vr->ctrl].type) {
2085 if (odev->d_exts[vr->ctrl].enumbit >= 0) {
2088 mask <<= (odev->d_exts[vr->ctrl].enumbit);
2111 ossdev_t *odev;
2118 if (((odev = auclnt_get_dev_minor_data(d, AUDIO_MINOR_DSP)) == NULL) ||
2119 (vr->ctrl >= odev->d_nctrl) ||
2120 ((ctrl = odev->d_ctrls[vr->ctrl]) == NULL)) {
2124 switch (odev->d_exts[vr->ctrl].type) {
2127 if (odev->d_exts[vr->ctrl].enumbit >= 0) {
2133 mask <<= (odev->d_exts[vr->ctrl].enumbit);
2366 ossdev_t *odev;
2368 odev = kmem_zalloc(sizeof (*odev), KM_SLEEP);
2369 odev->d_dev = dev;
2371 mutex_init(&odev->d_mx, NULL, MUTEX_DRIVER, NULL);
2372 cv_init(&odev->d_cv, NULL, CV_DRIVER, NULL);
2373 oss_alloc_controls(odev);
2375 return (odev);
2381 ossdev_t *odev = arg;
2383 if (odev != NULL) {
2384 oss_free_controls(odev);
2385 mutex_destroy(&odev->d_mx);
2386 cv_destroy(&odev->d_cv);
2387 kmem_free(odev, sizeof (*odev));