Lines Matching refs:pos

443 buffer_mux_write(uint32_t *dma, uint32_t *pcm, unsigned int pos,
450 dma[slot * HDSPE_CHANBUF_SAMPLES + pos] =
451 pcm[pos * channels + slot];
453 pos = (pos + 1) % HDSPE_CHANBUF_SAMPLES;
459 unsigned int pos, unsigned int samples, unsigned int adat_width,
479 buffer_mux_write(dma, pcm, pos, samples, 2, channels);
481 buffer_mux_write(dma, pcm, pos, samples, 4, channels);
483 buffer_mux_write(dma, pcm, pos, samples, 8, channels);
485 buffer_mux_write(dma, pcm, pos, samples, slots, channels);
489 buffer_demux_read(uint32_t *dma, uint32_t *pcm, unsigned int pos,
496 pcm[pos * channels + slot] =
497 dma[slot * HDSPE_CHANBUF_SAMPLES + pos];
499 pos = (pos + 1) % HDSPE_CHANBUF_SAMPLES;
505 unsigned int pos, unsigned int samples, unsigned int adat_width,
525 buffer_demux_read(dma, pcm, pos, samples, 2, channels);
527 buffer_demux_read(dma, pcm, pos, samples, 4, channels);
529 buffer_demux_read(dma, pcm, pos, samples, 8, channels);
531 buffer_demux_read(dma, pcm, pos, samples, slots, channels);
543 unsigned int pos, length, offset;
564 pos = sndbuf_getreadyptr(ch->buffer) / n;
570 offset = (ch->position + HDSPE_CHANBUF_SIZE) - pos;
573 pos = (pos + offset) % HDSPE_CHANBUF_SIZE;
578 pos = sndbuf_getfreeptr(ch->buffer) / n;
583 length = (dma_pos + HDSPE_CHANBUF_SIZE) - pos;
588 pos /= 4;
600 buffer_mux_port(sc->pbuf, ch->data, row, ch->ports, pos,
604 pos, length, adat_width, pcm_width);
613 ch->position = ((pos + length) * 4) % HDSPE_CHANBUF_SIZE;
761 uint32_t ret, pos;
771 pos = ret & HDSPE_BUF_POSITION_MASK;
772 pos *= AFMT_CHANNEL(ch->format); /* Hardbuf with multiple channels. */
774 return (pos);