Lines Matching full:codec

3  * Universal Interface for Intel High Definition Audio Codec
19 MODULE_PARM_DESC(dump_coef, "Dump processing coefficients in codec proc file (-1=auto, 0=disable, 1…
22 #define param_read(codec, nid, parm) \ argument
23 snd_hdac_read_parm_uncached(&(codec)->core, nid, parm)
48 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument
75 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument
80 list_for_each_entry(cpcm, &codec->pcm_list_head, list) { in print_nid_pcms()
94 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument
97 caps = param_read(codec, nid, dir == HDA_OUTPUT ? in print_amp_caps()
112 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument
126 if (snd_hda_get_raw_connections(codec, nid, &conn, 1) < 0) in is_stereo_amps()
129 wcaps = snd_hda_param_read(codec, conn, AC_PAR_AUDIO_WIDGET_CAP); in is_stereo_amps()
134 struct hda_codec *codec, hda_nid_t nid, in print_amp_vals() argument
141 stereo = is_stereo_amps(codec, nid, dir, wcaps, indices); in print_amp_vals()
146 val = snd_hda_codec_read(codec, nid, 0, in print_amp_vals()
151 val = snd_hda_codec_read(codec, nid, 0, in print_amp_vals()
200 struct hda_codec *codec, hda_nid_t nid) in print_pcm_caps() argument
202 unsigned int pcm = param_read(codec, nid, AC_PAR_PCM); in print_pcm_caps()
203 unsigned int stream = param_read(codec, nid, AC_PAR_STREAM); in print_pcm_caps()
305 struct hda_codec *codec, hda_nid_t nid, in print_pin_caps() argument
313 caps = param_read(codec, nid, AC_PAR_PIN_CAP); in print_pin_caps()
329 if ((codec->core.vendor_id >> 16) == 0x10ec) in print_pin_caps()
363 val = snd_hda_codec_read(codec, nid, 0, in print_pin_caps()
374 caps = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONFIG_DEFAULT, 0); in print_pin_caps()
401 struct hda_codec *codec, hda_nid_t nid, in print_pin_ctls() argument
406 pinctls = snd_hda_codec_read(codec, nid, 0, in print_pin_ctls()
439 struct hda_codec *codec, hda_nid_t nid) in print_vol_knob() argument
441 unsigned int cap = param_read(codec, nid, AC_PAR_VOL_KNB_CAP); in print_vol_knob()
444 cap = snd_hda_codec_read(codec, nid, 0, in print_vol_knob()
451 struct hda_codec *codec, hda_nid_t nid, in print_audio_io() argument
454 int conv = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); in print_audio_io()
461 int sdi = snd_hda_codec_read(codec, nid, 0, in print_audio_io()
469 struct hda_codec *codec, hda_nid_t nid) in print_digital_conv() argument
471 unsigned int digi1 = snd_hda_codec_read(codec, nid, 0, in print_digital_conv()
513 struct hda_codec *codec, hda_nid_t nid) in print_power_state() argument
526 int sup = param_read(codec, nid, AC_PAR_POWER_STATE); in print_power_state()
527 int pwr = snd_hda_codec_read(codec, nid, 0, in print_power_state()
554 struct hda_codec *codec, hda_nid_t nid) in print_unsol_cap() argument
556 int unsol = snd_hda_codec_read(codec, nid, 0, in print_unsol_cap()
564 static inline bool can_dump_coef(struct hda_codec *codec) in can_dump_coef() argument
569 default: return codec->dump_coef; in can_dump_coef()
574 struct hda_codec *codec, hda_nid_t nid) in print_proc_caps() argument
577 unsigned int proc_caps = param_read(codec, nid, AC_PAR_PROC_CAP); in print_proc_caps()
582 if (!can_dump_coef(codec)) in print_proc_caps()
587 oldindex = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_COEF_INDEX, 0); in print_proc_caps()
590 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, i); in print_proc_caps()
591 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, in print_proc_caps()
595 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, oldindex); in print_proc_caps()
599 struct hda_codec *codec, hda_nid_t nid, in print_conn_list() argument
611 curr = snd_hda_codec_read(codec, nid, 0, in print_conn_list()
625 cache_len = snd_hda_get_conn_list(codec, nid, &list); in print_conn_list()
639 struct hda_codec *codec, hda_nid_t nid) in print_gpio() argument
642 param_read(codec, codec->core.afg, AC_PAR_GPIO_CAP); in print_gpio()
655 enable = snd_hda_codec_read(codec, nid, 0, in print_gpio()
657 direction = snd_hda_codec_read(codec, nid, 0, in print_gpio()
659 wake = snd_hda_codec_read(codec, nid, 0, in print_gpio()
661 unsol = snd_hda_codec_read(codec, nid, 0, in print_gpio()
663 sticky = snd_hda_codec_read(codec, nid, 0, in print_gpio()
665 data = snd_hda_codec_read(codec, nid, 0, in print_gpio()
678 print_nid_array(buffer, codec, nid, &codec->mixers); in print_gpio()
679 print_nid_array(buffer, codec, nid, &codec->nids); in print_gpio()
682 static void print_dpmst_connections(struct snd_info_buffer *buffer, struct hda_codec *codec, in print_dpmst_connections() argument
688 conn_len = snd_hda_get_num_raw_conns(codec, nid); in print_dpmst_connections()
696 dev_id_saved = snd_hda_get_dev_select(codec, nid); in print_dpmst_connections()
698 snd_hda_set_dev_select(codec, nid, dev_num); in print_dpmst_connections()
699 curr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONNECT_SEL, 0); in print_dpmst_connections()
700 if (snd_hda_get_raw_connections(codec, nid, conn, conn_len) < 0) in print_dpmst_connections()
711 snd_hda_set_dev_select(codec, nid, dev_id_saved); in print_dpmst_connections()
715 struct hda_codec *codec, hda_nid_t nid) in print_device_list() argument
721 devlist_len = snd_hda_get_devices(codec, nid, dev_list, in print_device_list()
727 curr = snd_hda_codec_read(codec, nid, 0, in print_device_list()
742 print_dpmst_connections(buffer, codec, nid, i); in print_device_list()
748 static void print_codec_core_info(struct hdac_device *codec, in print_codec_core_info() argument
751 snd_iprintf(buffer, "Codec: "); in print_codec_core_info()
752 if (codec->vendor_name && codec->chip_name) in print_codec_core_info()
754 codec->vendor_name, codec->chip_name); in print_codec_core_info()
757 snd_iprintf(buffer, "Address: %d\n", codec->addr); in print_codec_core_info()
758 if (codec->afg) in print_codec_core_info()
760 codec->afg_function_id, codec->afg_unsol); in print_codec_core_info()
761 if (codec->mfg) in print_codec_core_info()
763 codec->mfg_function_id, codec->mfg_unsol); in print_codec_core_info()
764 snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id); in print_codec_core_info()
765 snd_iprintf(buffer, "Subsystem Id: 0x%08x\n", codec->subsystem_id); in print_codec_core_info()
766 snd_iprintf(buffer, "Revision Id: 0x%x\n", codec->revision_id); in print_codec_core_info()
768 if (codec->mfg) in print_codec_core_info()
769 snd_iprintf(buffer, "Modem Function Group: 0x%x\n", codec->mfg); in print_codec_core_info()
777 struct hda_codec *codec = entry->private_data; in print_codec_info() local
781 print_codec_core_info(&codec->core, buffer); in print_codec_info()
782 fg = codec->core.afg; in print_codec_info()
785 snd_hda_power_up(codec); in print_codec_info()
787 print_pcm_caps(buffer, codec, fg); in print_codec_info()
789 print_amp_caps(buffer, codec, fg, HDA_INPUT); in print_codec_info()
791 print_amp_caps(buffer, codec, fg, HDA_OUTPUT); in print_codec_info()
793 print_power_state(buffer, codec, fg); in print_codec_info()
795 nodes = snd_hda_get_sub_nodes(codec, fg, &nid); in print_codec_info()
798 snd_hda_power_down(codec); in print_codec_info()
802 print_gpio(buffer, codec, fg); in print_codec_info()
803 if (codec->proc_widget_hook) in print_codec_info()
804 codec->proc_widget_hook(buffer, codec, fg); in print_codec_info()
808 param_read(codec, nid, AC_PAR_AUDIO_WIDGET_CAP); in print_codec_info()
837 print_nid_array(buffer, codec, nid, &codec->mixers); in print_codec_info()
838 print_nid_array(buffer, codec, nid, &codec->nids); in print_codec_info()
839 print_nid_pcms(buffer, codec, nid); in print_codec_info()
848 conn_len = snd_hda_get_num_raw_conns(codec, nid); in print_codec_info()
855 if (snd_hda_get_raw_connections(codec, nid, conn, in print_codec_info()
863 print_amp_caps(buffer, codec, nid, HDA_INPUT); in print_codec_info()
866 (codec->single_adc_amp && in print_codec_info()
868 print_amp_vals(buffer, codec, nid, HDA_INPUT, in print_codec_info()
871 print_amp_vals(buffer, codec, nid, HDA_INPUT, in print_codec_info()
876 print_amp_caps(buffer, codec, nid, HDA_OUTPUT); in print_codec_info()
879 codec->pin_amp_workaround) in print_codec_info()
880 print_amp_vals(buffer, codec, nid, HDA_OUTPUT, in print_codec_info()
883 print_amp_vals(buffer, codec, nid, HDA_OUTPUT, in print_codec_info()
890 print_pin_caps(buffer, codec, nid, &supports_vref); in print_codec_info()
891 print_pin_ctls(buffer, codec, nid, supports_vref); in print_codec_info()
895 print_vol_knob(buffer, codec, nid); in print_codec_info()
899 print_audio_io(buffer, codec, nid, wid_type); in print_codec_info()
901 print_digital_conv(buffer, codec, nid); in print_codec_info()
904 print_pcm_caps(buffer, codec, nid); in print_codec_info()
910 print_unsol_cap(buffer, codec, nid); in print_codec_info()
913 print_power_state(buffer, codec, nid); in print_codec_info()
920 if (wid_type == AC_WID_PIN && codec->dp_mst) in print_codec_info()
921 print_device_list(buffer, codec, nid); in print_codec_info()
924 print_conn_list(buffer, codec, nid, wid_type, in print_codec_info()
928 print_proc_caps(buffer, codec, nid); in print_codec_info()
930 if (codec->proc_widget_hook) in print_codec_info()
931 codec->proc_widget_hook(buffer, codec, nid); in print_codec_info()
935 snd_hda_power_down(codec); in print_codec_info()
941 int snd_hda_codec_proc_new(struct hda_codec *codec) in snd_hda_codec_proc_new() argument
945 snprintf(name, sizeof(name), "codec#%d", codec->core.addr); in snd_hda_codec_proc_new()
946 return snd_card_ro_proc_new(codec->card, name, codec, print_codec_info); in snd_hda_codec_proc_new()