Lines Matching full:slots
128 hdsp_slot_first(uint32_t slots) in hdsp_slot_first() argument
130 return (slots & (~(slots - 1))); /* Extract first bit set. */ in hdsp_slot_first()
134 hdsp_slot_first_row(uint32_t slots) in hdsp_slot_first_row() argument
139 ends = slots & (~(slots >> 1)); in hdsp_slot_first_row()
140 /* First row of contiguous slots ends in the first row end. */ in hdsp_slot_first_row()
141 return (slots & (ends ^ (ends - 1))); in hdsp_slot_first_row()
145 hdsp_slot_first_n(uint32_t slots, unsigned int n) in hdsp_slot_first_n() argument
147 /* Clear all but the first n slots. */ in hdsp_slot_first_n()
149 if ((slots & slot) && n > 0) in hdsp_slot_first_n()
152 slots &= ~slot; in hdsp_slot_first_n()
154 return (slots); in hdsp_slot_first_n()
158 hdsp_slot_count(uint32_t slots) in hdsp_slot_count() argument
160 return (bitcount32(slots)); in hdsp_slot_count()
164 hdsp_slot_offset(uint32_t slots) in hdsp_slot_offset() argument
166 return (hdsp_slot_count(hdsp_slot_first(slots) - 1)); in hdsp_slot_offset()
170 hdsp_slot_channel_offset(uint32_t subset, uint32_t slots) in hdsp_slot_channel_offset() argument
174 /* Make sure we have a subset of slots. */ in hdsp_slot_channel_offset()
175 subset &= slots; in hdsp_slot_channel_offset()
176 /* Include all slots preceding the first one of the subset. */ in hdsp_slot_channel_offset()
177 preceding = slots & (hdsp_slot_first(subset) - 1); in hdsp_slot_channel_offset()
268 uint32_t slot, slots; in hdspchan_setgain() local
281 slots = hdsp_port_slot_map(port, 48000); in hdspchan_setgain()
282 slot = hdsp_slot_first(slots); in hdspchan_setgain()
290 slots &= ~slot; in hdspchan_setgain()
291 slot = hdsp_slot_first(slots); in hdspchan_setgain()
293 /* Subsequent slots all get the right channel volume. */ in hdspchan_setgain()
373 uint32_t slot, slots; in hdspchan_enable() local
387 /* Iterate through all slots of the channel's physical ports. */ in hdspchan_enable()
388 slots = hdsp_port_slot_map(ch->ports, sc->speed); in hdspchan_enable()
389 slot = hdsp_slot_first(slots); in hdspchan_enable()
395 slots &= ~slot; in hdspchan_enable()
396 slot = hdsp_slot_first(slots); in hdspchan_enable()
473 buffer_mux_port(uint32_t *dma, uint32_t *pcm, uint32_t subset, uint32_t slots, in buffer_mux_port() argument
484 chan_pos = hdsp_slot_channel_offset(subset, slots); in buffer_mux_port()
518 buffer_demux_port(uint32_t *dma, uint32_t *pcm, uint32_t subset, uint32_t slots, in buffer_demux_port() argument
529 chan_pos = hdsp_slot_channel_offset(subset, slots); in buffer_demux_port()
555 uint32_t row, slots; in buffer_copy() local
605 /* Iterate through rows of contiguous slots. */ in buffer_copy()
606 slots = hdsp_port_slot_map(ch->ports, sc->speed); in buffer_copy()
607 slots = hdsp_slot_first_n(slots, channels); in buffer_copy()
608 row = hdsp_slot_first_row(slots); in buffer_copy()
612 buffer_mux_port(sc->pbuf, ch->data, row, slots, pos, in buffer_copy()
614 buffer_mux_port(sc->pbuf, ch->data, row, slots, 0, in buffer_copy()
617 buffer_demux_port(sc->rbuf, ch->data, row, slots, pos, in buffer_copy()
619 buffer_demux_port(sc->rbuf, ch->data, row, slots, 0, in buffer_copy()
623 slots &= ~row; in buffer_copy()
624 row = hdsp_slot_first_row(slots); in buffer_copy()
636 uint32_t slot, slots; in clean() local
646 /* Iterate through all of the channel's slots. */ in clean()
647 slots = hdsp_port_slot_map(ch->ports, sc->speed); in clean()
648 slot = hdsp_slot_first(slots); in clean()
654 slots &= ~slot; in clean()
655 slot = hdsp_slot_first(slots); in clean()