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()
895 void snd_hda_activate_path(struct hda_codec *codec, struct nid_path *path, in snd_hda_activate_path() argument
901 path->active = enable; in snd_hda_activate_path()
905 path_power_update(codec, path, codec->power_save_node); in snd_hda_activate_path()
907 for (i = path->depth - 1; i >= 0; i--) { in snd_hda_activate_path()
908 hda_nid_t nid = path->path[i]; in snd_hda_activate_path()
910 if (enable && path->multi[i]) in snd_hda_activate_path()
913 path->idx[i]); in snd_hda_activate_path()
914 if (has_amp_in(codec, path, i)) in snd_hda_activate_path()
915 activate_amp_in(codec, path, i, enable, add_aamix); in snd_hda_activate_path()
916 if (has_amp_out(codec, path, i)) in snd_hda_activate_path()
917 activate_amp_out(codec, path, i, enable); in snd_hda_activate_path()
923 static void path_power_down_sync(struct hda_codec *codec, struct nid_path *path) in path_power_down_sync() argument
927 if (!(spec->power_down_unused || codec->power_save_node) || path->active) in path_power_down_sync()
929 sync_power_state_change(codec, path_power_update(codec, path, true)); in path_power_down_sync()
951 struct nid_path *path = snd_hda_get_path_from_idx(codec, path_idx); in resume_path_from_idx() local
952 if (path) in resume_path_from_idx()
953 snd_hda_activate_path(codec, path, path->active, false); in resume_path_from_idx()
1029 unsigned int chs, struct nid_path *path) in add_vol_ctl() argument
1032 if (!path) in add_vol_ctl()
1034 val = path->ctls[NID_PATH_VOL_CTL]; in add_vol_ctl()
1042 static int get_default_ch_nums(struct hda_codec *codec, struct nid_path *path, in get_default_ch_nums() argument
1046 if (path) { in get_default_ch_nums()
1047 hda_nid_t nid = get_amp_nid_(path->ctls[type]); in get_default_ch_nums()
1055 struct nid_path *path) in add_stereo_vol() argument
1057 int chs = get_default_ch_nums(codec, path, NID_PATH_VOL_CTL); in add_stereo_vol()
1058 return add_vol_ctl(codec, pfx, cidx, chs, path); in add_stereo_vol()
1065 unsigned int chs, struct nid_path *path) in add_sw_ctl() argument
1070 if (!path) in add_sw_ctl()
1072 val = path->ctls[NID_PATH_MUTE_CTL]; in add_sw_ctl()
1088 int cidx, struct nid_path *path) in add_stereo_sw() argument
1090 int chs = get_default_ch_nums(codec, path, NID_PATH_MUTE_CTL); in add_stereo_sw()
1091 return add_sw_ctl(codec, pfx, cidx, chs, path); in add_stereo_sw()
1126 struct nid_path *path = snd_hda_get_path_from_idx(codec, path_idx); in path_has_mixer() local
1127 return path && path->ctls[ctl_type]; in path_has_mixer()
1244 static int assign_out_path_ctls(struct hda_codec *codec, struct nid_path *path) in assign_out_path_ctls() argument
1251 if (!path) in assign_out_path_ctls()
1254 if (path->ctls[NID_PATH_VOL_CTL] || in assign_out_path_ctls()
1255 path->ctls[NID_PATH_MUTE_CTL]) in assign_out_path_ctls()
1258 nid = look_for_out_vol_nid(codec, path); in assign_out_path_ctls()
1266 path->ctls[NID_PATH_VOL_CTL] = val; in assign_out_path_ctls()
1269 nid = look_for_out_mute_nid(codec, path); in assign_out_path_ctls()
1280 path->ctls[NID_PATH_MUTE_CTL] = val; in assign_out_path_ctls()
1342 struct nid_path *path; in try_assign_dacs() local
1345 path = snd_hda_get_path_from_idx(codec, path_idx[i]); in try_assign_dacs()
1346 if (path) { in try_assign_dacs()
1347 badness += assign_out_path_ctls(codec, path); in try_assign_dacs()
1396 path = snd_hda_add_new_path(codec, dac, pin, -spec->mixer_nid); in try_assign_dacs()
1397 if (!path && !i && spec->mixer_nid) { in try_assign_dacs()
1399 path = snd_hda_add_new_path(codec, dac, pin, 0); in try_assign_dacs()
1401 if (!path) { in try_assign_dacs()
1406 path->active = true; in try_assign_dacs()
1407 path_idx[i] = snd_hda_get_path_idx(codec, path); in try_assign_dacs()
1408 badness += assign_out_path_ctls(codec, path); in try_assign_dacs()
1492 struct nid_path *path; in fill_multi_ios() local
1526 path = snd_hda_add_new_path(codec, dac, nid, in fill_multi_ios()
1528 if (!path) { in fill_multi_ios()
1536 snd_hda_get_path_idx(codec, path); in fill_multi_ios()
1560 path = snd_hda_get_path_from_idx(codec, spec->out_paths[cfg->line_outs + i]); in fill_multi_ios()
1561 badness += assign_out_path_ctls(codec, path); in fill_multi_ios()
1575 struct nid_path *path; in map_singles() local
1582 path = snd_hda_add_new_path(codec, dac, pins[i], in map_singles()
1584 if (!path && !i && spec->mixer_nid) in map_singles()
1585 path = snd_hda_add_new_path(codec, dac, pins[i], 0); in map_singles()
1586 if (path) { in map_singles()
1590 path->active = true; in map_singles()
1591 path_idx[i] = snd_hda_get_path_idx(codec, path); in map_singles()
1607 struct nid_path *path; in check_aamix_out_path() local
1610 path = snd_hda_get_path_from_idx(codec, path_idx); in check_aamix_out_path()
1611 if (!path || !path->depth || in check_aamix_out_path()
1612 is_nid_contained(path, spec->mixer_nid)) in check_aamix_out_path()
1614 path_dac = path->path[0]; in check_aamix_out_path()
1616 pin = path->path[path->depth - 1]; in check_aamix_out_path()
1617 path = snd_hda_add_new_path(codec, dac, pin, spec->mixer_nid); in check_aamix_out_path()
1618 if (!path) { in check_aamix_out_path()
1628 path = snd_hda_add_new_path(codec, dac, pin, in check_aamix_out_path()
1631 if (!path) in check_aamix_out_path()
1634 path->active = false; /* unused as default */ in check_aamix_out_path()
1635 path->pin_fixed = true; /* static route */ in check_aamix_out_path()
1636 return snd_hda_get_path_idx(codec, path); in check_aamix_out_path()
1644 struct nid_path *path; in indep_hp_possible() local
1651 path = snd_hda_get_path_from_idx(codec, idx); in indep_hp_possible()
1652 if (!path) in indep_hp_possible()
1656 if (!spec->mixer_nid || !is_nid_contained(path, spec->mixer_nid)) in indep_hp_possible()
1663 path = snd_hda_get_path_from_idx(codec, spec->out_paths[i]); in indep_hp_possible()
1664 if (path && is_nid_contained(path, spec->mixer_nid)) in indep_hp_possible()
1668 path = snd_hda_get_path_from_idx(codec, spec->speaker_paths[i]); in indep_hp_possible()
1669 if (path && is_nid_contained(path, spec->mixer_nid)) in indep_hp_possible()
1682 struct nid_path *path; in refill_shared_dacs() local
1688 path = snd_hda_get_path_from_idx(codec, path_idx[i]); in refill_shared_dacs()
1689 if (!path) in refill_shared_dacs()
1691 dacs[i] = path->path[0]; in refill_shared_dacs()
1862 struct nid_path *path; in print_nid_path_idx() local
1864 path = snd_hda_get_path_from_idx(codec, idx); in print_nid_path_idx()
1865 if (path) in print_nid_path_idx()
1866 print_nid_path(codec, pfx, path); in print_nid_path_idx()
2026 struct nid_path *path; in parse_output_paths() local
2027 path = snd_hda_get_path_from_idx(codec, spec->out_paths[0]); in parse_output_paths()
2028 if (path) in parse_output_paths()
2029 spec->vmaster_nid = look_for_out_vol_nid(codec, path); in parse_output_paths()
2074 struct nid_path *path; in create_multi_out_ctls() local
2076 path = snd_hda_get_path_from_idx(codec, spec->out_paths[i]); in create_multi_out_ctls()
2077 if (!path) in create_multi_out_ctls()
2083 err = add_vol_ctl(codec, "Center", 0, 1, path); in create_multi_out_ctls()
2086 err = add_vol_ctl(codec, "LFE", 0, 2, path); in create_multi_out_ctls()
2090 err = add_stereo_vol(codec, name, index, path); in create_multi_out_ctls()
2097 err = add_sw_ctl(codec, "Center", 0, 1, path); in create_multi_out_ctls()
2100 err = add_sw_ctl(codec, "LFE", 0, 2, path); in create_multi_out_ctls()
2104 err = add_stereo_sw(codec, name, index, path); in create_multi_out_ctls()
2115 struct nid_path *path; in create_extra_out() local
2118 path = snd_hda_get_path_from_idx(codec, path_idx); in create_extra_out()
2119 if (!path) in create_extra_out()
2121 err = add_stereo_vol(codec, pfx, cidx, path); in create_extra_out()
2124 err = add_stereo_sw(codec, pfx, cidx, path); in create_extra_out()
2333 struct nid_path *path; in set_multi_io() local
2335 path = get_multiio_path(codec, idx); in set_multi_io()
2336 if (!path) in set_multi_io()
2339 if (path->active == output) in set_multi_io()
2344 snd_hda_activate_path(codec, path, true, aamix_default(spec)); in set_multi_io()
2348 snd_hda_activate_path(codec, path, false, aamix_default(spec)); in set_multi_io()
2350 path_power_down_sync(codec, path); in set_multi_io()
2431 mix_path->path[0] != spec->alt_dac_nid) in update_aamix_paths()
2450 struct nid_path *path; in update_output_paths() local
2454 path = snd_hda_get_path_from_idx(codec, paths[i]); in update_output_paths()
2455 if (path) in update_output_paths()
2456 snd_hda_activate_path(codec, path, path->active, in update_output_paths()
3057 struct nid_path *path; in new_analog_input() local
3064 path = snd_hda_add_new_path(codec, pin, mix_nid, 0); in new_analog_input()
3065 if (!path) in new_analog_input()
3067 print_nid_path(codec, "loopback", path); in new_analog_input()
3068 spec->loopback_paths[input_idx] = snd_hda_get_path_idx(codec, path); in new_analog_input()
3070 idx = path->idx[path->depth - 1]; in new_analog_input()
3075 path->ctls[NID_PATH_VOL_CTL] = mix_val; in new_analog_input()
3082 path->ctls[NID_PATH_MUTE_CTL] = mute_val; in new_analog_input()
3085 path->active = true; in new_analog_input()
3086 path->stream_enabled = true; /* no DAC/ADC involved */ in new_analog_input()
3093 path = snd_hda_add_new_path(codec, spec->mixer_nid, in new_analog_input()
3095 if (path) { in new_analog_input()
3096 print_nid_path(codec, "loopback-merge", path); in new_analog_input()
3097 path->active = true; in new_analog_input()
3098 path->pin_fixed = true; /* static route */ in new_analog_input()
3099 path->stream_enabled = true; /* no DAC/ADC involved */ in new_analog_input()
3101 snd_hda_get_path_idx(codec, path); in new_analog_input()
3223 struct nid_path *path; in parse_capture_source() local
3228 path = snd_hda_add_new_path(codec, pin, adc, anchor); in parse_capture_source()
3229 if (!path) in parse_capture_source()
3231 print_nid_path(codec, "input", path); in parse_capture_source()
3233 snd_hda_get_path_idx(codec, path); in parse_capture_source()
3431 struct nid_path *path; in cap_put_caller() local
3438 path = get_input_path(codec, adc_idx, i); in cap_put_caller()
3439 if (!path || !path->ctls[type]) in cap_put_caller()
3441 kcontrol->private_value = path->ctls[type]; in cap_put_caller()
3497 static int parse_capvol_in_path(struct hda_codec *codec, struct nid_path *path) in parse_capvol_in_path() argument
3502 path->ctls[NID_PATH_VOL_CTL] = path->ctls[NID_PATH_MUTE_CTL] = 0; in parse_capvol_in_path()
3504 if (depth >= path->depth) in parse_capvol_in_path()
3506 i = path->depth - depth - 1; in parse_capvol_in_path()
3507 nid = path->path[i]; in parse_capvol_in_path()
3508 if (!path->ctls[NID_PATH_VOL_CTL]) { in parse_capvol_in_path()
3510 path->ctls[NID_PATH_VOL_CTL] = in parse_capvol_in_path()
3513 int idx = path->idx[i]; in parse_capvol_in_path()
3516 path->ctls[NID_PATH_VOL_CTL] = in parse_capvol_in_path()
3520 if (!path->ctls[NID_PATH_MUTE_CTL]) { in parse_capvol_in_path()
3522 path->ctls[NID_PATH_MUTE_CTL] = in parse_capvol_in_path()
3525 int idx = path->idx[i]; in parse_capvol_in_path()
3528 path->ctls[NID_PATH_MUTE_CTL] = in parse_capvol_in_path()
3663 struct nid_path *path; in get_first_cap_ctl() local
3667 path = get_input_path(codec, 0, idx); in get_first_cap_ctl()
3668 if (!path) in get_first_cap_ctl()
3670 ctl = path->ctls[type]; in get_first_cap_ctl()
3674 path = get_input_path(codec, 0, i); in get_first_cap_ctl()
3675 if (path && path->ctls[type] == ctl) in get_first_cap_ctl()
3740 struct nid_path *path; in create_capture_mixers() local
3741 path = get_input_path(codec, n, i); in create_capture_mixers()
3742 if (!path) in create_capture_mixers()
3744 parse_capvol_in_path(codec, path); in create_capture_mixers()
3746 vol = path->ctls[NID_PATH_VOL_CTL]; in create_capture_mixers()
3747 else if (vol != path->ctls[NID_PATH_VOL_CTL]) { in create_capture_mixers()
3750 path->ctls[NID_PATH_VOL_CTL], HDA_INPUT)) in create_capture_mixers()
3754 sw = path->ctls[NID_PATH_MUTE_CTL]; in create_capture_mixers()
3755 else if (sw != path->ctls[NID_PATH_MUTE_CTL]) { in create_capture_mixers()
3758 path->ctls[NID_PATH_MUTE_CTL], HDA_INPUT)) in create_capture_mixers()
3803 struct nid_path *path) in look_for_boost_amp() argument
3810 if (depth >= path->depth - 1) in look_for_boost_amp()
3812 nid = path->path[depth]; in look_for_boost_amp()
3817 path->idx[depth])) { in look_for_boost_amp()
3818 val = HDA_COMPOSE_AMP_VAL(nid, 3, path->idx[depth], in look_for_boost_amp()
3838 struct nid_path *path; in parse_mic_boost() local
3851 path = get_input_path(codec, 0, i); in parse_mic_boost()
3852 if (!path) in parse_mic_boost()
3855 val = look_for_boost_amp(codec, path); in parse_mic_boost()
3866 path->ctls[NID_PATH_BOOST_CTL] = val; in parse_mic_boost()
3877 struct nid_path *path; in parse_digital() local
3888 path = snd_hda_add_new_path(codec, dig_nid, pin, 0); in parse_digital()
3889 if (!path) in parse_digital()
3891 print_nid_path(codec, "digout", path); in parse_digital()
3892 path->active = true; in parse_digital()
3893 path->pin_fixed = true; /* no jack detection */ in parse_digital()
3894 spec->digout_paths[i] = snd_hda_get_path_idx(codec, path); in parse_digital()
3916 path = snd_hda_add_new_path(codec, pin, dig_nid, 0); in parse_digital()
3917 if (path) { in parse_digital()
3918 print_nid_path(codec, "digin", path); in parse_digital()
3919 path->active = true; in parse_digital()
3920 path->pin_fixed = true; /* no jack */ in parse_digital()
3922 spec->digin_path = snd_hda_get_path_idx(codec, path); in parse_digital()
3943 struct nid_path *old_path, *path; in mux_select() local
3968 path = get_input_path(codec, adc_idx, idx); in mux_select()
3969 if (!path) in mux_select()
3971 if (path->active) in mux_select()
3973 snd_hda_activate_path(codec, path, true, false); in mux_select()
3990 struct nid_path *path; in set_path_power() local
3994 path = snd_array_elem(&spec->paths, n); in set_path_power()
3995 if (path->path[0] == nid || in set_path_power()
3996 path->path[path->depth - 1] == nid) { in set_path_power()
3997 bool pin_old = path->pin_enabled; in set_path_power()
3998 bool stream_old = path->stream_enabled; in set_path_power()
4001 path->pin_enabled = pin_state; in set_path_power()
4003 path->stream_enabled = stream_state; in set_path_power()
4004 if ((!path->pin_fixed && path->pin_enabled != pin_old) in set_path_power()
4005 || path->stream_enabled != stream_old) { in set_path_power()
4006 last = path_power_update(codec, path, true); in set_path_power()
4137 struct nid_path *path; in add_fake_paths() local
4145 path = snd_array_new(&spec->paths); in add_fake_paths()
4146 if (!path) in add_fake_paths()
4148 memset(path, 0, sizeof(*path)); in add_fake_paths()
4149 path->depth = 2; in add_fake_paths()
4150 path->path[0] = nid; in add_fake_paths()
4151 path->path[1] = pins[i]; in add_fake_paths()
4152 path->active = true; in add_fake_paths()
4198 struct nid_path *path; in snd_hda_gen_fix_pin_power() local
4200 path = snd_array_new(&spec->paths); in snd_hda_gen_fix_pin_power()
4201 if (!path) in snd_hda_gen_fix_pin_power()
4203 memset(path, 0, sizeof(*path)); in snd_hda_gen_fix_pin_power()
4204 path->depth = 1; in snd_hda_gen_fix_pin_power()
4205 path->path[0] = pin; in snd_hda_gen_fix_pin_power()
4206 path->active = true; in snd_hda_gen_fix_pin_power()
4207 path->pin_fixed = true; in snd_hda_gen_fix_pin_power()
4208 path->stream_enabled = true; in snd_hda_gen_fix_pin_power()
4254 struct nid_path *path; in do_automute() local
4257 path = snd_hda_get_path_from_idx(codec, paths[i]); in do_automute()
4258 if (!path) in do_automute()
4260 mute_nid = get_amp_nid_(path->ctls[NID_PATH_MUTE_CTL]); in do_automute()
5644 struct nid_path *path; in set_output_and_unmute() local
5647 path = snd_hda_get_path_from_idx(codec, path_idx); in set_output_and_unmute()
5648 if (!path || !path->depth) in set_output_and_unmute()
5650 pin = path->path[path->depth - 1]; in set_output_and_unmute()
5652 snd_hda_activate_path(codec, path, path->active, in set_output_and_unmute()
5654 set_pin_eapd(codec, pin, path->active); in set_output_and_unmute()
5696 struct nid_path *path; in init_multi_io() local
5697 path = get_multiio_path(codec, i); in init_multi_io()
5698 if (!path) in init_multi_io()
5703 snd_hda_activate_path(codec, path, path->active, in init_multi_io()
5752 struct nid_path *path; in init_input_src() local
5762 path = get_input_path(codec, c, i); in init_input_src()
5763 if (path) { in init_input_src()
5764 bool active = path->active; in init_input_src()
5767 snd_hda_activate_path(codec, path, active, false); in init_input_src()