Lines Matching +full:reserved +full:- +full:channels
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2005-2009 Ariff Abdullah <ariff@FreeBSD.org>
5 * All rights reserved.
54 uint32_t channels, uint8_t *dst, uint32_t count) \
60 dst += count * PCM_##BIT##_BPS * channels; \
62 i = channels; \
64 dst -= PCM_##BIT##_BPS; \
65 i--; \
74 } while (--count != 0); \
101 uint32_t bps, channels; member
154 if (f->desc->in != f->desc->out || in feed_volume_init()
155 AFMT_CHANNEL(f->desc->in) > SND_CHN_MAX) in feed_volume_init()
159 if (AFMT_ENCODING(f->desc->in) == in feed_volume_init()
166 info->bps = AFMT_BPS(f->desc->in); in feed_volume_init()
167 info->channels = AFMT_CHANNEL(f->desc->in); in feed_volume_init()
168 info->apply = feed_volume_info_tab[i].apply; in feed_volume_init()
169 info->volume_class = SND_VOL_C_PCM; in feed_volume_init()
170 info->state = FEEDVOLUME_ENABLE; in feed_volume_init()
172 f->data = info; in feed_volume_init()
173 m = feeder_matrix_default_channel_map(info->channels); in feed_volume_init()
195 info = f->data; in feed_volume_free()
199 f->data = NULL; in feed_volume_free()
211 info = f->data; in feed_volume_set()
218 info->volume_class = value; in feed_volume_set()
231 info->state = value; in feed_volume_set()
256 info = f->data; in feed_volume_feed()
258 if (info->state == FEEDVOLUME_BYPASS) in feed_volume_feed()
259 return (FEEDER_FEED(f->source, c, b, count, source)); in feed_volume_feed()
261 vol = c->volume[SND_VOL_C_VAL(info->volume_class)]; in feed_volume_feed()
262 muted = c->muted[SND_VOL_C_VAL(info->volume_class)]; in feed_volume_feed()
263 matrix = info->matrix; in feed_volume_feed()
269 i = info->channels; in feed_volume_feed()
270 while (i--) { in feed_volume_feed()
280 return (FEEDER_FEED(f->source, c, b, count, source)); in feed_volume_feed()
287 align = info->bps * info->channels; in feed_volume_feed()
293 j = SND_FXDIV(FEEDER_FEED(f->source, c, dst, count, source), in feed_volume_feed()
298 info->apply(temp_vol, matrix, info->channels, dst, j); in feed_volume_feed()
302 count -= j; in feed_volume_feed()
306 return (dst - b); in feed_volume_feed()
340 if (f == NULL || f->desc == NULL || f->desc->type != FEEDER_VOLUME || in feeder_volume_apply_matrix()
341 f->data == NULL || m == NULL || m->channels < SND_CHN_MIN || in feeder_volume_apply_matrix()
342 m->channels > SND_CHN_MAX) in feeder_volume_apply_matrix()
345 info = f->data; in feeder_volume_apply_matrix()
347 for (i = 0; i < nitems(info->matrix); i++) { in feeder_volume_apply_matrix()
348 if (i < m->channels) in feeder_volume_apply_matrix()
349 info->matrix[i] = m->map[i].type; in feeder_volume_apply_matrix()
351 info->matrix[i] = SND_CHN_T_FL; in feeder_volume_apply_matrix()
354 info->channels = m->channels; in feeder_volume_apply_matrix()