Lines Matching refs:kcontrol
366 static int snd_akm4xxx_volume_info(struct snd_kcontrol *kcontrol, in snd_akm4xxx_volume_info() argument
369 unsigned int mask = AK_GET_MASK(kcontrol->private_value); in snd_akm4xxx_volume_info()
378 static int snd_akm4xxx_volume_get(struct snd_kcontrol *kcontrol, in snd_akm4xxx_volume_get() argument
381 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in snd_akm4xxx_volume_get()
382 int chip = AK_GET_CHIP(kcontrol->private_value); in snd_akm4xxx_volume_get()
383 int addr = AK_GET_ADDR(kcontrol->private_value); in snd_akm4xxx_volume_get()
389 static int put_ak_reg(struct snd_kcontrol *kcontrol, int addr, in put_ak_reg() argument
392 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in put_ak_reg()
393 unsigned int mask = AK_GET_MASK(kcontrol->private_value); in put_ak_reg()
394 int chip = AK_GET_CHIP(kcontrol->private_value); in put_ak_reg()
400 if (AK_GET_VOL_CVT(kcontrol->private_value) && nval < 128) in put_ak_reg()
402 if (AK_GET_IPGA(kcontrol->private_value) && nval >= 128) in put_ak_reg()
404 if (AK_GET_INVERT(kcontrol->private_value)) in put_ak_reg()
406 if (AK_GET_NEEDSMSB(kcontrol->private_value)) in put_ak_reg()
414 static int snd_akm4xxx_volume_put(struct snd_kcontrol *kcontrol, in snd_akm4xxx_volume_put() argument
417 unsigned int mask = AK_GET_MASK(kcontrol->private_value); in snd_akm4xxx_volume_put()
421 return put_ak_reg(kcontrol, AK_GET_ADDR(kcontrol->private_value), val); in snd_akm4xxx_volume_put()
424 static int snd_akm4xxx_stereo_volume_info(struct snd_kcontrol *kcontrol, in snd_akm4xxx_stereo_volume_info() argument
427 unsigned int mask = AK_GET_MASK(kcontrol->private_value); in snd_akm4xxx_stereo_volume_info()
436 static int snd_akm4xxx_stereo_volume_get(struct snd_kcontrol *kcontrol, in snd_akm4xxx_stereo_volume_get() argument
439 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in snd_akm4xxx_stereo_volume_get()
440 int chip = AK_GET_CHIP(kcontrol->private_value); in snd_akm4xxx_stereo_volume_get()
441 int addr = AK_GET_ADDR(kcontrol->private_value); in snd_akm4xxx_stereo_volume_get()
448 static int snd_akm4xxx_stereo_volume_put(struct snd_kcontrol *kcontrol, in snd_akm4xxx_stereo_volume_put() argument
451 int addr = AK_GET_ADDR(kcontrol->private_value); in snd_akm4xxx_stereo_volume_put()
452 unsigned int mask = AK_GET_MASK(kcontrol->private_value); in snd_akm4xxx_stereo_volume_put()
460 change = put_ak_reg(kcontrol, addr, val[0]); in snd_akm4xxx_stereo_volume_put()
461 change |= put_ak_reg(kcontrol, addr + 1, val[1]); in snd_akm4xxx_stereo_volume_put()
465 static int snd_akm4xxx_deemphasis_info(struct snd_kcontrol *kcontrol, in snd_akm4xxx_deemphasis_info() argument
481 static int snd_akm4xxx_deemphasis_get(struct snd_kcontrol *kcontrol, in snd_akm4xxx_deemphasis_get() argument
484 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in snd_akm4xxx_deemphasis_get()
485 int chip = AK_GET_CHIP(kcontrol->private_value); in snd_akm4xxx_deemphasis_get()
486 int addr = AK_GET_ADDR(kcontrol->private_value); in snd_akm4xxx_deemphasis_get()
487 int shift = AK_GET_SHIFT(kcontrol->private_value); in snd_akm4xxx_deemphasis_get()
493 static int snd_akm4xxx_deemphasis_put(struct snd_kcontrol *kcontrol, in snd_akm4xxx_deemphasis_put() argument
496 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in snd_akm4xxx_deemphasis_put()
497 int chip = AK_GET_CHIP(kcontrol->private_value); in snd_akm4xxx_deemphasis_put()
498 int addr = AK_GET_ADDR(kcontrol->private_value); in snd_akm4xxx_deemphasis_put()
499 int shift = AK_GET_SHIFT(kcontrol->private_value); in snd_akm4xxx_deemphasis_put()
513 static int ak4xxx_switch_get(struct snd_kcontrol *kcontrol, in ak4xxx_switch_get() argument
516 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in ak4xxx_switch_get()
517 int chip = AK_GET_CHIP(kcontrol->private_value); in ak4xxx_switch_get()
518 int addr = AK_GET_ADDR(kcontrol->private_value); in ak4xxx_switch_get()
519 int shift = AK_GET_SHIFT(kcontrol->private_value); in ak4xxx_switch_get()
520 int invert = AK_GET_INVERT(kcontrol->private_value); in ak4xxx_switch_get()
529 static int ak4xxx_switch_put(struct snd_kcontrol *kcontrol, in ak4xxx_switch_put() argument
532 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in ak4xxx_switch_put()
533 int chip = AK_GET_CHIP(kcontrol->private_value); in ak4xxx_switch_put()
534 int addr = AK_GET_ADDR(kcontrol->private_value); in ak4xxx_switch_put()
535 int shift = AK_GET_SHIFT(kcontrol->private_value); in ak4xxx_switch_put()
536 int invert = AK_GET_INVERT(kcontrol->private_value); in ak4xxx_switch_put()
568 static int ak4xxx_capture_source_info(struct snd_kcontrol *kcontrol, in ak4xxx_capture_source_info() argument
571 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in ak4xxx_capture_source_info()
572 int mixer_ch = AK_GET_SHIFT(kcontrol->private_value); in ak4xxx_capture_source_info()
591 static int ak4xxx_capture_source_get(struct snd_kcontrol *kcontrol, in ak4xxx_capture_source_get() argument
594 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in ak4xxx_capture_source_get()
595 int chip = AK_GET_CHIP(kcontrol->private_value); in ak4xxx_capture_source_get()
596 int addr = AK_GET_ADDR(kcontrol->private_value); in ak4xxx_capture_source_get()
597 int mask = AK_GET_MASK(kcontrol->private_value); in ak4xxx_capture_source_get()
605 static int ak4xxx_capture_source_put(struct snd_kcontrol *kcontrol, in ak4xxx_capture_source_put() argument
608 struct snd_akm4xxx *ak = snd_kcontrol_chip(kcontrol); in ak4xxx_capture_source_put()
609 int mixer_ch = AK_GET_SHIFT(kcontrol->private_value); in ak4xxx_capture_source_put()
610 int chip = AK_GET_CHIP(kcontrol->private_value); in ak4xxx_capture_source_put()
611 int addr = AK_GET_ADDR(kcontrol->private_value); in ak4xxx_capture_source_put()
612 int mask = AK_GET_MASK(kcontrol->private_value); in ak4xxx_capture_source_put()