Lines Matching refs:path
254 static bool is_nid_contained(struct nid_path *path, hda_nid_t nid) in is_nid_contained() argument
256 return find_idx_in_nid_list(nid, path->path, path->depth) >= 0; in is_nid_contained()
267 struct nid_path *path = snd_array_elem(&spec->paths, i); in get_nid_path() local
268 if (path->depth <= 0) in get_nid_path()
270 if ((!from_nid || path->path[0] == from_nid) && in get_nid_path()
271 (!to_nid || path->path[path->depth - 1] == to_nid)) { in get_nid_path()
273 (anchor_nid > 0 && is_nid_contained(path, anchor_nid)) || in get_nid_path()
274 (anchor_nid < 0 && !is_nid_contained(path, anchor_nid))) in get_nid_path()
275 return path; in get_nid_path()
306 int snd_hda_get_path_idx(struct hda_codec *codec, struct nid_path *path) in snd_hda_get_path_idx() argument
314 idx = path - array; in snd_hda_get_path_idx()
344 struct nid_path *path = snd_array_elem(&spec->paths, i); in is_dac_already_used() local
345 if (path->path[0] == nid) in is_dac_already_used()
371 struct nid_path *path = snd_array_elem(&spec->paths, i); in is_ctl_used() local
372 if ((path->ctls[type] & AMP_VAL_COMPARE_MASK) == val) in is_ctl_used()
387 const char *pfx, struct nid_path *path) in print_nid_path() argument
394 for (i = 0; i < path->depth; i++) in print_nid_path()
397 path->path[i]); in print_nid_path()
399 codec_dbg(codec, "%s path: depth=%d '%s'\n", pfx, path->depth, buf); in print_nid_path()
405 int anchor_nid, struct nid_path *path, in __parse_nid_path() argument
440 anchor_nid, path, depth + 1)) in __parse_nid_path()
446 path->path[path->depth] = conn[i]; in __parse_nid_path()
447 path->idx[path->depth + 1] = i; in __parse_nid_path()
449 path->multi[path->depth + 1] = 1; in __parse_nid_path()
450 path->depth++; in __parse_nid_path()
475 struct nid_path *path) in snd_hda_parse_nid_path() argument
477 if (__parse_nid_path(codec, from_nid, to_nid, anchor_nid, path, 1)) { in snd_hda_parse_nid_path()
478 path->path[path->depth] = to_nid; in snd_hda_parse_nid_path()
479 path->depth++; in snd_hda_parse_nid_path()
501 struct nid_path *path; in snd_hda_add_new_path() local
507 path = get_nid_path(codec, from_nid, to_nid, anchor_nid); in snd_hda_add_new_path()
508 if (path) in snd_hda_add_new_path()
509 return path; in snd_hda_add_new_path()
511 path = snd_array_new(&spec->paths); in snd_hda_add_new_path()
512 if (!path) in snd_hda_add_new_path()
514 memset(path, 0, sizeof(*path)); in snd_hda_add_new_path()
515 if (snd_hda_parse_nid_path(codec, from_nid, to_nid, anchor_nid, path)) in snd_hda_add_new_path()
516 return path; in snd_hda_add_new_path()
526 struct nid_path *path = snd_hda_get_path_from_idx(codec, idx); in invalidate_nid_path() local
527 if (!path) in invalidate_nid_path()
529 memset(path, 0, sizeof(*path)); in invalidate_nid_path()
586 struct nid_path *path) in look_for_out_mute_nid() argument
590 for (i = path->depth - 1; i >= 0; i--) { in look_for_out_mute_nid()
591 if (nid_has_mute(codec, path->path[i], HDA_OUTPUT)) in look_for_out_mute_nid()
592 return path->path[i]; in look_for_out_mute_nid()
593 if (i != path->depth - 1 && i != 0 && in look_for_out_mute_nid()
594 nid_has_mute(codec, path->path[i], HDA_INPUT)) in look_for_out_mute_nid()
595 return path->path[i]; in look_for_out_mute_nid()
602 struct nid_path *path) in look_for_out_vol_nid() argument
607 for (i = path->depth - 1; i >= 0; i--) { in look_for_out_vol_nid()
608 hda_nid_t nid = path->path[i]; in look_for_out_vol_nid()
622 static bool has_amp_in(struct hda_codec *codec, struct nid_path *path, int idx) in has_amp_in() argument
624 hda_nid_t nid = path->path[idx]; in has_amp_in()
636 static bool has_amp_out(struct hda_codec *codec, struct nid_path *path, int idx) in has_amp_out() argument
638 hda_nid_t nid = path->path[idx]; in has_amp_out()
661 struct nid_path *path = snd_array_elem(&spec->paths, n); in is_active_nid() local
662 if (!path->active) in is_active_nid()
665 if (!path->stream_enabled) in is_active_nid()
668 if (!(path->pin_enabled || path->pin_fixed) && in is_active_nid()
672 for (i = 0; i < path->depth; i++) { in is_active_nid()
673 if (path->path[i] == nid) { in is_active_nid()
675 path->idx[i] == idx) in is_active_nid()
794 static void activate_amp_out(struct hda_codec *codec, struct nid_path *path, in activate_amp_out() argument
797 hda_nid_t nid = path->path[i]; in activate_amp_out()
802 static void activate_amp_in(struct hda_codec *codec, struct nid_path *path, in activate_amp_in() argument
809 hda_nid_t nid = path->path[i]; in activate_amp_in()
818 idx = path->idx[i]; in activate_amp_in()
842 struct nid_path *path, in path_power_update() argument
848 for (i = 0; i < path->depth; i++) { in path_power_update()
849 nid = path->path[i]; in path_power_update()
897 void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path, in snd_hda_activate_path() argument
903 path->active = enable; in snd_hda_activate_path()
907 path_power_update(codec, path, codec->power_save_node); in snd_hda_activate_path()
909 for (i = path->depth - 1; i >= 0; i--) { in snd_hda_activate_path()
910 hda_nid_t nid = path->path[i]; in snd_hda_activate_path()
912 if (enable && path->multi[i]) in snd_hda_activate_path()
915 path->idx[i]); in snd_hda_activate_path()
916 if (has_amp_in(codec, path, i)) in snd_hda_activate_path()
917 activate_amp_in(codec, path, i, enable, add_aamix); in snd_hda_activate_path()
918 if (has_amp_out(codec, path, i)) in snd_hda_activate_path()
919 activate_amp_out(codec, path, i, enable); in snd_hda_activate_path()
925 static void path_power_down_sync(struct hda_codec *codec, struct nid_path *path) in path_power_down_sync() argument
929 if (!(spec->power_down_unused || codec->power_save_node) || path->active) in path_power_down_sync()
931 sync_power_state_change(codec, path_power_update(codec, path, true)); in path_power_down_sync()
953 struct nid_path *path = snd_hda_get_path_from_idx(codec, path_idx); in resume_path_from_idx() local
954 if (path) in resume_path_from_idx()
955 snd_hda_activate_path(codec, path, path->active, false); in resume_path_from_idx()
1031 unsigned int chs, struct nid_path *path) in add_vol_ctl() argument
1034 if (!path) in add_vol_ctl()
1036 val = path->ctls[NID_PATH_VOL_CTL]; in add_vol_ctl()
1044 static int get_default_ch_nums(struct hda_codec *codec, struct nid_path *path, in get_default_ch_nums() argument
1048 if (path) { in get_default_ch_nums()
1049 hda_nid_t nid = get_amp_nid_(path->ctls[type]); in get_default_ch_nums()
1057 struct nid_path *path) in add_stereo_vol() argument
1059 int chs = get_default_ch_nums(codec, path, NID_PATH_VOL_CTL); in add_stereo_vol()
1060 return add_vol_ctl(codec, pfx, cidx, chs, path); in add_stereo_vol()
1067 unsigned int chs, struct nid_path *path) in add_sw_ctl() argument
1072 if (!path) in add_sw_ctl()
1074 val = path->ctls[NID_PATH_MUTE_CTL]; in add_sw_ctl()
1090 int cidx, struct nid_path *path) in add_stereo_sw() argument
1092 int chs = get_default_ch_nums(codec, path, NID_PATH_MUTE_CTL); in add_stereo_sw()
1093 return add_sw_ctl(codec, pfx, cidx, chs, path); in add_stereo_sw()
1128 struct nid_path *path = snd_hda_get_path_from_idx(codec, path_idx); in path_has_mixer() local
1129 return path && path->ctls[ctl_type]; in path_has_mixer()
1246 static int assign_out_path_ctls(struct hda_codec *codec, struct nid_path *path) in assign_out_path_ctls() argument
1253 if (!path) in assign_out_path_ctls()
1256 if (path->ctls[NID_PATH_VOL_CTL] || in assign_out_path_ctls()
1257 path->ctls[NID_PATH_MUTE_CTL]) in assign_out_path_ctls()
1260 nid = look_for_out_vol_nid(codec, path); in assign_out_path_ctls()
1268 path->ctls[NID_PATH_VOL_CTL] = val; in assign_out_path_ctls()
1271 nid = look_for_out_mute_nid(codec, path); in assign_out_path_ctls()
1282 path->ctls[NID_PATH_MUTE_CTL] = val; in assign_out_path_ctls()
1344 struct nid_path *path; in try_assign_dacs() local
1347 path = snd_hda_get_path_from_idx(codec, path_idx[i]); in try_assign_dacs()
1348 if (path) { in try_assign_dacs()
1349 badness += assign_out_path_ctls(codec, path); in try_assign_dacs()
1398 path = snd_hda_add_new_path(codec, dac, pin, -spec->mixer_nid); in try_assign_dacs()
1399 if (!path && !i && spec->mixer_nid) { in try_assign_dacs()
1401 path = snd_hda_add_new_path(codec, dac, pin, 0); in try_assign_dacs()
1403 if (!path) { in try_assign_dacs()
1408 path->active = true; in try_assign_dacs()
1409 path_idx[i] = snd_hda_get_path_idx(codec, path); in try_assign_dacs()
1410 badness += assign_out_path_ctls(codec, path); in try_assign_dacs()
1494 struct nid_path *path; in fill_multi_ios() local
1528 path = snd_hda_add_new_path(codec, dac, nid, in fill_multi_ios()
1530 if (!path) { in fill_multi_ios()
1538 snd_hda_get_path_idx(codec, path); in fill_multi_ios()
1562 path = snd_hda_get_path_from_idx(codec, spec->out_paths[cfg->line_outs + i]); in fill_multi_ios()
1563 badness += assign_out_path_ctls(codec, path); in fill_multi_ios()
1577 struct nid_path *path; in map_singles() local
1584 path = snd_hda_add_new_path(codec, dac, pins[i], in map_singles()
1586 if (!path && !i && spec->mixer_nid) in map_singles()
1587 path = snd_hda_add_new_path(codec, dac, pins[i], 0); in map_singles()
1588 if (path) { in map_singles()
1592 path->active = true; in map_singles()
1593 path_idx[i] = snd_hda_get_path_idx(codec, path); in map_singles()
1609 struct nid_path *path; in check_aamix_out_path() local
1612 path = snd_hda_get_path_from_idx(codec, path_idx); in check_aamix_out_path()
1613 if (!path || !path->depth || in check_aamix_out_path()
1614 is_nid_contained(path, spec->mixer_nid)) in check_aamix_out_path()
1616 path_dac = path->path[0]; in check_aamix_out_path()
1618 pin = path->path[path->depth - 1]; in check_aamix_out_path()
1619 path = snd_hda_add_new_path(codec, dac, pin, spec->mixer_nid); in check_aamix_out_path()
1620 if (!path) { in check_aamix_out_path()
1630 path = snd_hda_add_new_path(codec, dac, pin, in check_aamix_out_path()
1633 if (!path) in check_aamix_out_path()
1636 path->active = false; /* unused as default */ in check_aamix_out_path()
1637 path->pin_fixed = true; /* static route */ in check_aamix_out_path()
1638 return snd_hda_get_path_idx(codec, path); in check_aamix_out_path()
1646 struct nid_path *path; in indep_hp_possible() local
1653 path = snd_hda_get_path_from_idx(codec, idx); in indep_hp_possible()
1654 if (!path) in indep_hp_possible()
1658 if (!spec->mixer_nid || !is_nid_contained(path, spec->mixer_nid)) in indep_hp_possible()
1665 path = snd_hda_get_path_from_idx(codec, spec->out_paths[i]); in indep_hp_possible()
1666 if (path && is_nid_contained(path, spec->mixer_nid)) in indep_hp_possible()
1670 path = snd_hda_get_path_from_idx(codec, spec->speaker_paths[i]); in indep_hp_possible()
1671 if (path && is_nid_contained(path, spec->mixer_nid)) in indep_hp_possible()
1684 struct nid_path *path; in refill_shared_dacs() local
1690 path = snd_hda_get_path_from_idx(codec, path_idx[i]); in refill_shared_dacs()
1691 if (!path) in refill_shared_dacs()
1693 dacs[i] = path->path[0]; in refill_shared_dacs()
1864 struct nid_path *path; in print_nid_path_idx() local
1866 path = snd_hda_get_path_from_idx(codec, idx); in print_nid_path_idx()
1867 if (path) in print_nid_path_idx()
1868 print_nid_path(codec, pfx, path); in print_nid_path_idx()
2028 struct nid_path *path; in parse_output_paths() local
2029 path = snd_hda_get_path_from_idx(codec, spec->out_paths[0]); in parse_output_paths()
2030 if (path) in parse_output_paths()
2031 spec->vmaster_nid = look_for_out_vol_nid(codec, path); in parse_output_paths()
2076 struct nid_path *path; in create_multi_out_ctls() local
2078 path = snd_hda_get_path_from_idx(codec, spec->out_paths[i]); in create_multi_out_ctls()
2079 if (!path) in create_multi_out_ctls()
2085 err = add_vol_ctl(codec, "Center", 0, 1, path); in create_multi_out_ctls()
2088 err = add_vol_ctl(codec, "LFE", 0, 2, path); in create_multi_out_ctls()
2092 err = add_stereo_vol(codec, name, index, path); in create_multi_out_ctls()
2099 err = add_sw_ctl(codec, "Center", 0, 1, path); in create_multi_out_ctls()
2102 err = add_sw_ctl(codec, "LFE", 0, 2, path); in create_multi_out_ctls()
2106 err = add_stereo_sw(codec, name, index, path); in create_multi_out_ctls()
2117 struct nid_path *path; in create_extra_out() local
2120 path = snd_hda_get_path_from_idx(codec, path_idx); in create_extra_out()
2121 if (!path) in create_extra_out()
2123 err = add_stereo_vol(codec, pfx, cidx, path); in create_extra_out()
2126 err = add_stereo_sw(codec, pfx, cidx, path); in create_extra_out()
2335 struct nid_path *path; in set_multi_io() local
2337 path = get_multiio_path(codec, idx); in set_multi_io()
2338 if (!path) in set_multi_io()
2341 if (path->active == output) in set_multi_io()
2346 snd_hda_activate_path(codec, path, true, aamix_default(spec)); in set_multi_io()
2350 snd_hda_activate_path(codec, path, false, aamix_default(spec)); in set_multi_io()
2352 path_power_down_sync(codec, path); in set_multi_io()
2433 mix_path->path[0] != spec->alt_dac_nid) in update_aamix_paths()
2452 struct nid_path *path; in update_output_paths() local
2456 path = snd_hda_get_path_from_idx(codec, paths[i]); in update_output_paths()
2457 if (path) in update_output_paths()
2458 snd_hda_activate_path(codec, path, path->active, in update_output_paths()
3059 struct nid_path *path; in new_analog_input() local
3066 path = snd_hda_add_new_path(codec, pin, mix_nid, 0); in new_analog_input()
3067 if (!path) in new_analog_input()
3069 print_nid_path(codec, "loopback", path); in new_analog_input()
3070 spec->loopback_paths[input_idx] = snd_hda_get_path_idx(codec, path); in new_analog_input()
3072 idx = path->idx[path->depth - 1]; in new_analog_input()
3077 path->ctls[NID_PATH_VOL_CTL] = mix_val; in new_analog_input()
3084 path->ctls[NID_PATH_MUTE_CTL] = mute_val; in new_analog_input()
3087 path->active = true; in new_analog_input()
3088 path->stream_enabled = true; /* no DAC/ADC involved */ in new_analog_input()
3095 path = snd_hda_add_new_path(codec, spec->mixer_nid, in new_analog_input()
3097 if (path) { in new_analog_input()
3098 print_nid_path(codec, "loopback-merge", path); in new_analog_input()
3099 path->active = true; in new_analog_input()
3100 path->pin_fixed = true; /* static route */ in new_analog_input()
3101 path->stream_enabled = true; /* no DAC/ADC involved */ in new_analog_input()
3103 snd_hda_get_path_idx(codec, path); in new_analog_input()
3225 struct nid_path *path; in parse_capture_source() local
3230 path = snd_hda_add_new_path(codec, pin, adc, anchor); in parse_capture_source()
3231 if (!path) in parse_capture_source()
3233 print_nid_path(codec, "input", path); in parse_capture_source()
3235 snd_hda_get_path_idx(codec, path); in parse_capture_source()
3433 struct nid_path *path; in cap_put_caller() local
3440 path = get_input_path(codec, adc_idx, i); in cap_put_caller()
3441 if (!path || !path->ctls[type]) in cap_put_caller()
3443 kcontrol->private_value = path->ctls[type]; in cap_put_caller()
3499 static int parse_capvol_in_path(struct hda_codec *codec, struct nid_path *path) in parse_capvol_in_path() argument
3504 path->ctls[NID_PATH_VOL_CTL] = path->ctls[NID_PATH_MUTE_CTL] = 0; in parse_capvol_in_path()
3506 if (depth >= path->depth) in parse_capvol_in_path()
3508 i = path->depth - depth - 1; in parse_capvol_in_path()
3509 nid = path->path[i]; in parse_capvol_in_path()
3510 if (!path->ctls[NID_PATH_VOL_CTL]) { in parse_capvol_in_path()
3512 path->ctls[NID_PATH_VOL_CTL] = in parse_capvol_in_path()
3515 int idx = path->idx[i]; in parse_capvol_in_path()
3518 path->ctls[NID_PATH_VOL_CTL] = in parse_capvol_in_path()
3522 if (!path->ctls[NID_PATH_MUTE_CTL]) { in parse_capvol_in_path()
3524 path->ctls[NID_PATH_MUTE_CTL] = in parse_capvol_in_path()
3527 int idx = path->idx[i]; in parse_capvol_in_path()
3530 path->ctls[NID_PATH_MUTE_CTL] = in parse_capvol_in_path()
3665 struct nid_path *path; in get_first_cap_ctl() local
3669 path = get_input_path(codec, 0, idx); in get_first_cap_ctl()
3670 if (!path) in get_first_cap_ctl()
3672 ctl = path->ctls[type]; in get_first_cap_ctl()
3676 path = get_input_path(codec, 0, i); in get_first_cap_ctl()
3677 if (path && path->ctls[type] == ctl) in get_first_cap_ctl()
3742 struct nid_path *path; in create_capture_mixers() local
3743 path = get_input_path(codec, n, i); in create_capture_mixers()
3744 if (!path) in create_capture_mixers()
3746 parse_capvol_in_path(codec, path); in create_capture_mixers()
3748 vol = path->ctls[NID_PATH_VOL_CTL]; in create_capture_mixers()
3749 else if (vol != path->ctls[NID_PATH_VOL_CTL]) { in create_capture_mixers()
3752 path->ctls[NID_PATH_VOL_CTL], HDA_INPUT)) in create_capture_mixers()
3756 sw = path->ctls[NID_PATH_MUTE_CTL]; in create_capture_mixers()
3757 else if (sw != path->ctls[NID_PATH_MUTE_CTL]) { in create_capture_mixers()
3760 path->ctls[NID_PATH_MUTE_CTL], HDA_INPUT)) in create_capture_mixers()
3805 struct nid_path *path) in look_for_boost_amp() argument
3812 if (depth >= path->depth - 1) in look_for_boost_amp()
3814 nid = path->path[depth]; in look_for_boost_amp()
3819 path->idx[depth])) { in look_for_boost_amp()
3820 val = HDA_COMPOSE_AMP_VAL(nid, 3, path->idx[depth], in look_for_boost_amp()
3840 struct nid_path *path; in parse_mic_boost() local
3853 path = get_input_path(codec, 0, i); in parse_mic_boost()
3854 if (!path) in parse_mic_boost()
3857 val = look_for_boost_amp(codec, path); in parse_mic_boost()
3868 path->ctls[NID_PATH_BOOST_CTL] = val; in parse_mic_boost()
3879 struct nid_path *path; in parse_digital() local
3890 path = snd_hda_add_new_path(codec, dig_nid, pin, 0); in parse_digital()
3891 if (!path) in parse_digital()
3893 print_nid_path(codec, "digout", path); in parse_digital()
3894 path->active = true; in parse_digital()
3895 path->pin_fixed = true; /* no jack detection */ in parse_digital()
3896 spec->digout_paths[i] = snd_hda_get_path_idx(codec, path); in parse_digital()
3918 path = snd_hda_add_new_path(codec, pin, dig_nid, 0); in parse_digital()
3919 if (path) { in parse_digital()
3920 print_nid_path(codec, "digin", path); in parse_digital()
3921 path->active = true; in parse_digital()
3922 path->pin_fixed = true; /* no jack */ in parse_digital()
3924 spec->digin_path = snd_hda_get_path_idx(codec, path); in parse_digital()
3945 struct nid_path *old_path, *path; in mux_select() local
3970 path = get_input_path(codec, adc_idx, idx); in mux_select()
3971 if (!path) in mux_select()
3973 if (path->active) in mux_select()
3975 snd_hda_activate_path(codec, path, true, false); in mux_select()
3992 struct nid_path *path; in set_path_power() local
3996 path = snd_array_elem(&spec->paths, n); in set_path_power()
3997 if (path->path[0] == nid || in set_path_power()
3998 path->path[path->depth - 1] == nid) { in set_path_power()
3999 bool pin_old = path->pin_enabled; in set_path_power()
4000 bool stream_old = path->stream_enabled; in set_path_power()
4003 path->pin_enabled = pin_state; in set_path_power()
4005 path->stream_enabled = stream_state; in set_path_power()
4006 if ((!path->pin_fixed && path->pin_enabled != pin_old) in set_path_power()
4007 || path->stream_enabled != stream_old) { in set_path_power()
4008 last = path_power_update(codec, path, true); in set_path_power()
4139 struct nid_path *path; in add_fake_paths() local
4147 path = snd_array_new(&spec->paths); in add_fake_paths()
4148 if (!path) in add_fake_paths()
4150 memset(path, 0, sizeof(*path)); in add_fake_paths()
4151 path->depth = 2; in add_fake_paths()
4152 path->path[0] = nid; in add_fake_paths()
4153 path->path[1] = pins[i]; in add_fake_paths()
4154 path->active = true; in add_fake_paths()
4200 struct nid_path *path; in snd_hda_gen_fix_pin_power() local
4202 path = snd_array_new(&spec->paths); in snd_hda_gen_fix_pin_power()
4203 if (!path) in snd_hda_gen_fix_pin_power()
4205 memset(path, 0, sizeof(*path)); in snd_hda_gen_fix_pin_power()
4206 path->depth = 1; in snd_hda_gen_fix_pin_power()
4207 path->path[0] = pin; in snd_hda_gen_fix_pin_power()
4208 path->active = true; in snd_hda_gen_fix_pin_power()
4209 path->pin_fixed = true; in snd_hda_gen_fix_pin_power()
4210 path->stream_enabled = true; in snd_hda_gen_fix_pin_power()
4256 struct nid_path *path; in do_automute() local
4259 path = snd_hda_get_path_from_idx(codec, paths[i]); in do_automute()
4260 if (!path) in do_automute()
4262 mute_nid = get_amp_nid_(path->ctls[NID_PATH_MUTE_CTL]); in do_automute()
5646 struct nid_path *path; in set_output_and_unmute() local
5649 path = snd_hda_get_path_from_idx(codec, path_idx); in set_output_and_unmute()
5650 if (!path || !path->depth) in set_output_and_unmute()
5652 pin = path->path[path->depth - 1]; in set_output_and_unmute()
5654 snd_hda_activate_path(codec, path, path->active, in set_output_and_unmute()
5656 set_pin_eapd(codec, pin, path->active); in set_output_and_unmute()
5698 struct nid_path *path; in init_multi_io() local
5699 path = get_multiio_path(codec, i); in init_multi_io()
5700 if (!path) in init_multi_io()
5705 snd_hda_activate_path(codec, path, path->active, in init_multi_io()
5754 struct nid_path *path; in init_input_src() local
5764 path = get_input_path(codec, c, i); in init_input_src()
5765 if (path) { in init_input_src()
5766 bool active = path->active; in init_input_src()
5769 snd_hda_activate_path(codec, path, active, false); in init_input_src()