• Home
  • Raw
  • Download

Lines Matching refs:ctl

90 		if (wm->ctl[i].flags & flags_off)  in snd_wm8776_update_agc_ctl()
91 snd_wm8776_activate_ctl(wm, wm->ctl[i].name, false); in snd_wm8776_update_agc_ctl()
92 else if (wm->ctl[i].flags & flags_on) in snd_wm8776_update_agc_ctl()
93 snd_wm8776_activate_ctl(wm, wm->ctl[i].name, true); in snd_wm8776_update_agc_ctl()
438 memcpy(wm->ctl, snd_wm8776_default_ctl, sizeof(wm->ctl)); in snd_wm8776_init()
491 uinfo->count = (wm->ctl[n].flags & WM8776_FLAG_STEREO) ? 2 : 1; in snd_wm8776_volume_info()
492 uinfo->value.integer.min = wm->ctl[n].min; in snd_wm8776_volume_info()
493 uinfo->value.integer.max = wm->ctl[n].max; in snd_wm8776_volume_info()
504 return snd_ctl_enum_info(uinfo, 1, wm->ctl[n].max, in snd_wm8776_enum_info()
505 wm->ctl[n].enum_names); in snd_wm8776_enum_info()
515 if (wm->ctl[n].get) in snd_wm8776_ctl_get()
516 wm->ctl[n].get(wm, &val1, &val2); in snd_wm8776_ctl_get()
518 val1 = wm->regs[wm->ctl[n].reg1] & wm->ctl[n].mask1; in snd_wm8776_ctl_get()
519 val1 >>= __ffs(wm->ctl[n].mask1); in snd_wm8776_ctl_get()
520 if (wm->ctl[n].flags & WM8776_FLAG_STEREO) { in snd_wm8776_ctl_get()
521 val2 = wm->regs[wm->ctl[n].reg2] & wm->ctl[n].mask2; in snd_wm8776_ctl_get()
522 val2 >>= __ffs(wm->ctl[n].mask2); in snd_wm8776_ctl_get()
523 if (wm->ctl[n].flags & WM8776_FLAG_VOL_UPDATE) in snd_wm8776_ctl_get()
527 if (wm->ctl[n].flags & WM8776_FLAG_INVERT) { in snd_wm8776_ctl_get()
528 val1 = wm->ctl[n].max - (val1 - wm->ctl[n].min); in snd_wm8776_ctl_get()
529 val2 = wm->ctl[n].max - (val2 - wm->ctl[n].min); in snd_wm8776_ctl_get()
532 if (wm->ctl[n].flags & WM8776_FLAG_STEREO) in snd_wm8776_ctl_get()
548 if (wm->ctl[n].flags & WM8776_FLAG_INVERT) { in snd_wm8776_ctl_put()
549 regval1 = wm->ctl[n].max - (regval1 - wm->ctl[n].min); in snd_wm8776_ctl_put()
550 regval2 = wm->ctl[n].max - (regval2 - wm->ctl[n].min); in snd_wm8776_ctl_put()
552 if (wm->ctl[n].set) in snd_wm8776_ctl_put()
553 wm->ctl[n].set(wm, regval1, regval2); in snd_wm8776_ctl_put()
555 val = wm->regs[wm->ctl[n].reg1] & ~wm->ctl[n].mask1; in snd_wm8776_ctl_put()
556 val |= regval1 << __ffs(wm->ctl[n].mask1); in snd_wm8776_ctl_put()
558 if (wm->ctl[n].flags & WM8776_FLAG_STEREO && in snd_wm8776_ctl_put()
559 wm->ctl[n].reg1 == wm->ctl[n].reg2) { in snd_wm8776_ctl_put()
560 val &= ~wm->ctl[n].mask2; in snd_wm8776_ctl_put()
561 val |= regval2 << __ffs(wm->ctl[n].mask2); in snd_wm8776_ctl_put()
563 snd_wm8776_write(wm, wm->ctl[n].reg1, val); in snd_wm8776_ctl_put()
565 if (wm->ctl[n].flags & WM8776_FLAG_STEREO && in snd_wm8776_ctl_put()
566 wm->ctl[n].reg1 != wm->ctl[n].reg2) { in snd_wm8776_ctl_put()
567 val = wm->regs[wm->ctl[n].reg2] & ~wm->ctl[n].mask2; in snd_wm8776_ctl_put()
568 val |= regval2 << __ffs(wm->ctl[n].mask2); in snd_wm8776_ctl_put()
569 if (wm->ctl[n].flags & WM8776_FLAG_VOL_UPDATE) in snd_wm8776_ctl_put()
571 snd_wm8776_write(wm, wm->ctl[n].reg2, val); in snd_wm8776_ctl_put()
581 struct snd_kcontrol *ctl; in snd_wm8776_add_control() local
586 cont.name = wm->ctl[num].name; in snd_wm8776_add_control()
588 if (wm->ctl[num].flags & WM8776_FLAG_LIM || in snd_wm8776_add_control()
589 wm->ctl[num].flags & WM8776_FLAG_ALC) in snd_wm8776_add_control()
595 switch (wm->ctl[num].type) { in snd_wm8776_add_control()
599 cont.tlv.p = wm->ctl[num].tlv; in snd_wm8776_add_control()
602 wm->ctl[num].max = 1; in snd_wm8776_add_control()
603 if (wm->ctl[num].flags & WM8776_FLAG_STEREO) in snd_wm8776_add_control()
614 ctl = snd_ctl_new1(&cont, wm); in snd_wm8776_add_control()
615 if (!ctl) in snd_wm8776_add_control()
618 return snd_ctl_add(wm->card, ctl); in snd_wm8776_add_control()
626 if (wm->ctl[i].name) { in snd_wm8776_build_controls()