Lines Matching defs:mix
527 const struct escodec_mixer *mix;
531 if ((mix = escodec_get_mixer(mc->dev)) == NULL)
534 switch (mix->type) {
539 val = escodec_read(sc, mix->reg[ch]);
540 shift = 8 - fls(mix->mask[ch]);
542 if (mix->type == ESCODEC_MIXER_ATTENUATOR)
543 nvol = mix->mask[ch] - nvol;
544 if (mix->maxval != 0 && nvol > mix->maxval)
545 nvol = mix->maxval;
547 val &= ~(mix->mask[ch] << mix->shift[ch]);
548 val |= (nvol & mix->mask[ch]) << mix->shift[ch];
549 escodec_write(sc, mix->reg[ch], val);
558 val = escodec_read(sc, mix->reg[0]);
560 val |= mix->mask[0];
562 val &= ~mix->mask[0];
563 escodec_write(sc, mix->reg[0], val);
576 const struct escodec_mixer *mix;
580 if ((mix = escodec_get_mixer(mc->dev)) == NULL)
583 switch (mix->type) {
588 val = escodec_read(sc, mix->reg[ch]);
589 shift = 8 - fls(mix->mask[ch]);
590 nvol = (val >> mix->shift[ch]) & mix->mask[ch];
591 if (mix->type == ESCODEC_MIXER_ATTENUATOR)
592 nvol = mix->mask[ch] - nvol;
601 val = escodec_read(sc, mix->reg[0]);
602 mc->un.ord = (val & mix->mask[0]) != 0;
614 const struct escodec_mixer *mix;
616 if ((mix = escodec_get_mixer(di->index)) == NULL)
619 strlcpy(di->label.name, mix->name, sizeof(di->label.name));
620 di->mixer_class = mix->mixer_class;
621 di->next = mix->next;
622 di->prev = mix->prev;
624 switch (mix->type) {
633 256 / (mix->mask[0] + 1);