Lines Matching defs:hwbuf

2335 	audio_ring_t *hwbuf;
2521 hwbuf = &sc->sc_pmixer->hwbuf;
2525 hwbuf->mem,
2526 hwbuf->capacity *
2527 hwbuf->fmt.channels * hwbuf->fmt.stride / NBBY);
2540 hwbuf = &sc->sc_rmixer->hwbuf;
2544 hwbuf->mem,
2545 hwbuf->capacity *
2546 hwbuf->fmt.channels * hwbuf->fmt.stride / NBBY);
5203 * Calculate blktime [msec] from mixer(.hwbuf.fmt).
5215 fmt = &mixer->hwbuf.fmt;
5273 mixer->hwbuf.fmt = *hwfmt;
5280 mixer->frames_per_block = frame_per_block(mixer, &mixer->hwbuf.fmt);
5281 blksize = frametobyte(&mixer->hwbuf.fmt, mixer->frames_per_block);
5284 audio_params_t p = format2_to_params(&mixer->hwbuf.fmt);
5291 if ((rounded * NBBY) % (mixer->hwbuf.fmt.stride *
5292 mixer->hwbuf.fmt.channels) != 0) {
5299 mixer->hwbuf.fmt.stride,
5300 mixer->hwbuf.fmt.channels);
5306 (mixer->hwbuf.fmt.stride *
5307 mixer->hwbuf.fmt.channels);
5311 mixer->blktime_d = mixer->hwbuf.fmt.sample_rate;
5314 bufsize = frametobyte(&mixer->hwbuf.fmt, capacity);
5348 mixer->hwbuf.capacity = capacity;
5352 mixer->hwbuf.mem = sc->hw_if->allocm(sc->hw_hdl, mode, bufsize);
5353 if (mixer->hwbuf.mem == NULL) {
5358 mixer->hwbuf.mem = kmem_alloc(bufsize, KM_SLEEP);
5383 mixer->track_fmt.channels = mixer->hwbuf.fmt.channels;
5384 mixer->track_fmt.sample_rate = mixer->hwbuf.fmt.sample_rate;
5386 if (mixer->hwbuf.fmt.encoding == AUDIO_ENCODING_SLINEAR_OE &&
5387 mixer->hwbuf.fmt.precision == AUDIO_INTERNAL_BITS) {
5417 mixer->codecarg.dstfmt = &mixer->hwbuf.fmt;
5419 mixer->codecarg.srcfmt = &mixer->hwbuf.fmt;
5433 audio_encoding_name(mixer->hwbuf.fmt.encoding),
5434 mixer->hwbuf.fmt.precision);
5472 bufsize = frametobyte(&mixer->hwbuf.fmt, mixer->hwbuf.capacity);
5474 if (mixer->hwbuf.mem != NULL) {
5477 sc->hw_if->freem(sc->hw_hdl, mixer->hwbuf.mem, bufsize);
5479 kmem_free(mixer->hwbuf.mem, bufsize);
5481 mixer->hwbuf.mem = NULL;
5514 TRACE(2, "%smixseq=%d hwseq=%d hwbuf=%d/%d/%d%s",
5517 mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity,
5522 while (mixer->hwbuf.used < mixer->frames_per_block * minimum) {
5530 TRACE(3, "end mixseq=%d hwseq=%d hwbuf=%d/%d/%d",
5532 mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity);
5553 * hwbuf [............] NBLKHW blocks ring buffer
5562 * hwbuf [............] NBLKHW blocks ring buffer
5566 * hwbuf: HW encoding, HW precision, HW ch, HW freq.
5570 * Performs track mixing and converts it to hwbuf.
5571 * Note that this function doesn't transfer hwbuf to hardware.
5589 KASSERTMSG(auring_get_contig_free(&mixer->hwbuf) >= frame_count,
5591 auring_get_contig_free(&mixer->hwbuf), frame_count);
5690 mixer->codecarg.dst = auring_tailptr(&mixer->hwbuf);
5699 mixer->codecarg.dst = auring_tailptr(&mixer->hwbuf);
5702 mixer->codecarg.dstfmt = &mixer->hwbuf.fmt;
5706 auring_push(&mixer->hwbuf, frame_count);
5708 TRACE(4, "done mixseq=%d hwbuf=%d/%d/%d%s",
5710 mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity,
5866 * Output one block from hwbuf to HW.
5880 TRACE(4, "pbusy=%d hwbuf=%d/%d/%d",
5882 mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity);
5883 KASSERTMSG(mixer->hwbuf.used >= mixer->frames_per_block,
5884 "mixer->hwbuf.used=%d mixer->frames_per_block=%d",
5885 mixer->hwbuf.used, mixer->frames_per_block);
5887 blksize = frametobyte(&mixer->hwbuf.fmt, mixer->frames_per_block);
5892 start = mixer->hwbuf.mem;
5893 end = (uint8_t *)start + auring_bytelen(&mixer->hwbuf);
5894 params = format2_to_params(&mixer->hwbuf.fmt);
5907 start = auring_headptr(&mixer->hwbuf);
5949 auring_take(&mixer->hwbuf, mixer->frames_per_block);
5952 "HW_INT ++hwseq=%" PRIu64 " cmplcnt=%" PRIu64 " hwbuf=%d/%d/%d",
5954 mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity);
5973 if (mixer->hwbuf.used >= mixer->frames_per_block) {
5979 if (mixer->hwbuf.used < mixer->frames_per_block) {
6028 * hwbuf [............] NBLKHW blocks ring buffer
6039 * hwbuf [............] NBLKHW blocks ring buffer
6044 * hwbuf: HW encoding, HW precision, HW ch, HW freq.
6069 count = auring_get_contig_used(&mixer->hwbuf);
6080 mixer->codecarg.src = auring_headptr(&mixer->hwbuf);
6095 codecarg.srcfmt = &mixer->hwbuf.fmt;
6119 /* drain hwbuf */
6120 auring_take(&mixer->hwbuf, count);
6124 codecarg.src = auring_headptr(&mixer->hwbuf);
6131 auring_take(&mixer->hwbuf, count);
6186 * Input one block from HW to hwbuf.
6200 blksize = frametobyte(&mixer->hwbuf.fmt, mixer->frames_per_block);
6205 start = mixer->hwbuf.mem;
6206 end = (uint8_t *)start + auring_bytelen(&mixer->hwbuf);
6207 params = format2_to_params(&mixer->hwbuf.fmt);
6220 start = auring_tailptr(&mixer->hwbuf);
6262 auring_push(&mixer->hwbuf, mixer->frames_per_block);
6265 "HW_INT ++hwseq=%" PRIu64 " cmplcnt=%" PRIu64 " hwbuf=%d/%d/%d",
6267 mixer->hwbuf.head, mixer->hwbuf.used, mixer->hwbuf.capacity);
6306 sc->sc_pmixer->hwbuf.head = 0;
6307 sc->sc_pmixer->hwbuf.used = 0;
6336 sc->sc_rmixer->hwbuf.head = 0;
6337 sc->sc_rmixer->hwbuf.used = 0;
7556 hwfmt = &track->mixer->hwbuf.fmt;
8084 phwfmt = sc->sc_pmixer->hwbuf.fmt;
8088 rhwfmt = sc->sc_rmixer->hwbuf.fmt;