• Home
  • Raw
  • Download

Lines Matching refs:cmix

309 		struct cras_alsa_mixer *cmix,  in mixer_control_create_by_name()  argument
340 elem = snd_mixer_find_selem(cmix->mixer, sid); in mixer_control_create_by_name()
453 static int add_main_volume_control(struct cras_alsa_mixer *cmix, in add_main_volume_control() argument
464 cmix->max_volume_dB += c->max_volume_dB; in add_main_volume_control()
465 cmix->min_volume_dB += c->min_volume_dB; in add_main_volume_control()
469 DL_FOREACH(cmix->main_volume_controls, next) { in add_main_volume_control()
475 DL_INSERT(cmix->main_volume_controls, next, c); in add_main_volume_control()
480 if (cmix->playback_switch == NULL && in add_main_volume_control()
484 cmix->playback_switch = elem; in add_main_volume_control()
492 static int add_main_capture_control(struct cras_alsa_mixer *cmix, in add_main_capture_control() argument
506 DL_APPEND(cmix->main_capture_controls, c); in add_main_capture_control()
511 if (cmix->capture_switch == NULL && in add_main_capture_control()
515 cmix->capture_switch = elem; in add_main_capture_control()
522 static int add_control_with_name(struct cras_alsa_mixer *cmix, in add_control_with_name() argument
545 DL_APPEND(cmix->output_controls, c); in add_control_with_name()
547 DL_APPEND(cmix->input_controls, c); in add_control_with_name()
551 static int add_control(struct cras_alsa_mixer *cmix, in add_control() argument
555 return add_control_with_name(cmix, dir, elem, in add_control()
584 struct cras_alsa_mixer *cmix, in add_control_with_coupled_mixers() argument
593 &c, cmix, name, coupled_controls, dir); in add_control_with_coupled_mixers()
606 DL_APPEND(cmix->output_controls, c); in add_control_with_coupled_mixers()
608 DL_APPEND(cmix->input_controls, c); in add_control_with_coupled_mixers()
612 static int add_control_by_name(struct cras_alsa_mixer *cmix, in add_control_by_name() argument
624 rc = mixer_control_create_by_name(&c, cmix, name, m_name, dir); in add_control_by_name()
637 DL_APPEND(cmix->output_controls, c); in add_control_by_name()
639 DL_APPEND(cmix->input_controls, c); in add_control_by_name()
649 struct cras_alsa_mixer *cmix; in cras_alsa_mixer_create() local
651 cmix = (struct cras_alsa_mixer *)calloc(1, sizeof(*cmix)); in cras_alsa_mixer_create()
652 if (cmix == NULL) in cras_alsa_mixer_create()
657 alsa_mixer_open(card_name, &cmix->mixer); in cras_alsa_mixer_create()
659 return cmix; in cras_alsa_mixer_create()
663 struct cras_alsa_mixer *cmix, in cras_alsa_mixer_add_controls_by_name_matching() argument
699 if (cmix->mixer == NULL) { in cras_alsa_mixer_add_controls_by_name_matching()
724 for(elem = snd_mixer_first_elem(cmix->mixer); in cras_alsa_mixer_add_controls_by_name_matching()
757 rc = add_main_volume_control(cmix, elem); in cras_alsa_mixer_add_controls_by_name_matching()
762 cmix, CRAS_STREAM_OUTPUT, elem); in cras_alsa_mixer_add_controls_by_name_matching()
794 rc = add_main_capture_control(cmix, elem); in cras_alsa_mixer_add_controls_by_name_matching()
798 cmix, CRAS_STREAM_INPUT, elem); in cras_alsa_mixer_add_controls_by_name_matching()
835 cmix, CRAS_STREAM_OUTPUT, in cras_alsa_mixer_add_controls_by_name_matching()
846 if (!cmix->main_volume_controls && !cmix->output_controls && in cras_alsa_mixer_add_controls_by_name_matching()
848 rc = add_main_volume_control(cmix, other_elem); in cras_alsa_mixer_add_controls_by_name_matching()
861 struct cras_alsa_mixer *cmix, in cras_alsa_mixer_add_controls_in_section() argument
867 if (cmix->mixer == NULL) { in cras_alsa_mixer_add_controls_in_section()
881 cmix, section->dir, section->mixer_name); in cras_alsa_mixer_add_controls_in_section()
891 cmix, section->dir, in cras_alsa_mixer_add_controls_in_section()
1007 struct cras_alsa_mixer *cmix, in cras_alsa_mixer_get_minimum_capture_gain() argument
1013 assert(cmix); in cras_alsa_mixer_get_minimum_capture_gain()
1014 DL_FOREACH(cmix->main_capture_controls, c) in cras_alsa_mixer_get_minimum_capture_gain()
1025 struct cras_alsa_mixer *cmix, in cras_alsa_mixer_get_maximum_capture_gain() argument
1031 assert(cmix); in cras_alsa_mixer_get_maximum_capture_gain()
1032 DL_FOREACH(cmix->main_capture_controls, c) in cras_alsa_mixer_get_maximum_capture_gain()