/sound/pci/hda/ |
D | hda_proc.c | 68 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument 76 if (item->nid == nid) { in print_nid_array() 95 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument 102 if (cpcm->stream[type].nid != nid || cpcm->pcm == NULL) in print_nid_pcms() 114 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument 117 caps = snd_hda_param_read(codec, nid, in print_amp_caps() 133 struct hda_codec *codec, hda_nid_t nid, in print_amp_vals() argument 142 val = snd_hda_codec_read(codec, nid, 0, in print_amp_vals() 147 val = snd_hda_codec_read(codec, nid, 0, in print_amp_vals() 196 struct hda_codec *codec, hda_nid_t nid) in print_pcm_caps() argument [all …]
|
D | hda_local.h | 39 #define HDA_COMPOSE_AMP_VAL_OFS(nid,chs,idx,dir,ofs) \ argument 40 ((nid) | ((chs)<<16) | ((dir)<<18) | ((idx)<<19) | ((ofs)<<23)) 42 #define HDA_COMPOSE_AMP_VAL(nid,chs,idx,dir) \ argument 43 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0) 45 #define HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, channel, xindex, dir, flags) \ argument 55 .private_value = HDA_COMPOSE_AMP_VAL(nid, channel, xindex, dir) | flags } 57 #define HDA_CODEC_VOLUME_IDX(xname, xcidx, nid, xindex, direction) \ argument 58 HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0) 60 #define HDA_CODEC_VOLUME_MONO(xname, nid, channel, xindex, direction) \ argument 61 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0) [all …]
|
D | hda_jack.c | 23 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) in is_jack_detectable() argument 27 if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) in is_jack_detectable() 29 if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & in is_jack_detectable() 32 if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) && in is_jack_detectable() 40 static u32 read_pin_sense(struct hda_codec *codec, hda_nid_t nid) in read_pin_sense() argument 46 pincap = snd_hda_query_pin_caps(codec, nid); in read_pin_sense() 48 snd_hda_codec_read(codec, nid, 0, in read_pin_sense() 51 val = snd_hda_codec_read(codec, nid, 0, in read_pin_sense() 62 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_tbl_get() argument 67 if (!nid || !jack) in snd_hda_jack_tbl_get() [all …]
|
D | hda_codec.c | 188 make_codec_cmd(struct hda_codec *codec, hda_nid_t nid, int direct, in make_codec_cmd() argument 193 if ((codec->addr & ~0xf) || (direct & ~1) || (nid & ~0x7f) || in make_codec_cmd() 196 codec->addr, direct, nid, verb, parm); in make_codec_cmd() 202 val |= (u32)nid << 20; in make_codec_cmd() 266 unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, in snd_hda_codec_read() argument 270 unsigned cmd = make_codec_cmd(codec, nid, direct, verb, parm); in snd_hda_codec_read() 290 int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct, in snd_hda_codec_write() argument 293 unsigned int cmd = make_codec_cmd(codec, nid, direct, verb, parm); in snd_hda_codec_write() 310 for (; seq->nid; seq++) in snd_hda_sequence_write() 311 snd_hda_codec_write(codec, seq->nid, 0, seq->verb, seq->param); in snd_hda_sequence_write() [all …]
|
D | hda_auto_parser.c | 26 static int is_in_nid_list(hda_nid_t nid, const hda_nid_t *list) in is_in_nid_list() argument 29 if (*list == nid) in is_in_nid_list() 62 static void add_auto_cfg_input_pin(struct auto_pin_cfg *cfg, hda_nid_t nid, in add_auto_cfg_input_pin() argument 66 cfg->inputs[cfg->num_inputs].pin = nid; in add_auto_cfg_input_pin() 88 hda_nid_t nid; in reorder_outputs() local 93 nid = pins[1]; in reorder_outputs() 95 pins[2] = nid; in reorder_outputs() 170 hda_nid_t nid, end_nid; in snd_hda_parse_pin_defcfg() local 188 for (nid = codec->start_nid; nid < end_nid; nid++) { in snd_hda_parse_pin_defcfg() 189 unsigned int wid_caps = get_wcaps(codec, nid); in snd_hda_parse_pin_defcfg() [all …]
|
D | hda_generic.c | 218 static int find_idx_in_nid_list(hda_nid_t nid, const hda_nid_t *list, int nums) in find_idx_in_nid_list() argument 222 if (list[i] == nid) in find_idx_in_nid_list() 228 static bool is_nid_contained(struct nid_path *path, hda_nid_t nid) in is_nid_contained() argument 230 return find_idx_in_nid_list(nid, path->path, path->depth) >= 0; in is_nid_contained() 295 static bool is_dac_already_used(struct hda_codec *codec, hda_nid_t nid) in is_dac_already_used() argument 302 if (path->path[0] == nid) in is_dac_already_used() 336 static bool is_ctl_associated(struct hda_codec *codec, hda_nid_t nid, in is_ctl_associated() argument 339 unsigned int val = HDA_COMPOSE_AMP_VAL(nid, 3, idx, dir); in is_ctl_associated() 480 hda_nid_t nid = spec->all_dacs[i]; in look_for_dac() local 481 if (!nid || is_dac_already_used(codec, nid)) in look_for_dac() [all …]
|
D | patch_ca0132.c | 143 hda_nid_t nid; member 157 .nid = SURROUND, 165 .nid = CRYSTALIZER, 173 .nid = DIALOG_PLUS, 181 .nid = SMART_VOLUME, 189 .nid = X_BASS, 197 .nid = EQUALIZER, 208 .nid = ECHO_CANCELLATION, 216 .nid = VOICE_FOCUS, 224 .nid = MIC_SVM, [all …]
|
D | hda_jack.h | 21 hda_nid_t nid; member 41 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid); 46 snd_hda_jack_tbl_new(struct hda_codec *codec, hda_nid_t nid); 68 int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid, 70 int snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid, 77 u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid); 78 int snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid); 80 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid); 82 int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
|
D | hda_codec.h | 725 int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid); 770 hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */ member 902 unsigned int (*power_filter)(struct hda_codec *codec, hda_nid_t nid, 907 struct hda_codec *codec, hda_nid_t nid); 947 unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, 950 int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct, 952 #define snd_hda_param_read(codec, nid, param) \ argument 953 snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param) 954 int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid, 956 int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid, [all …]
|
D | hda_beep.h | 36 hda_nid_t nid; member 46 int snd_hda_attach_beep_device(struct hda_codec *codec, int nid); 49 static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) in snd_hda_attach_beep_device() argument
|
D | hda_beep.c | 53 snd_hda_codec_write(codec, beep->nid, 0, in snd_hda_generate_beep() 133 snd_hda_codec_write(beep->codec, beep->nid, 0, in turn_off_beep() 200 int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) in snd_hda_attach_beep_device() argument 216 snd_hda_codec_write_cache(codec, nid, 0, in snd_hda_attach_beep_device() 219 beep->nid = nid; in snd_hda_attach_beep_device()
|
D | patch_via.c | 245 static void update_power_state(struct hda_codec *codec, hda_nid_t nid, in update_power_state() argument 248 if (snd_hda_check_power_state(codec, nid, parm)) in update_power_state() 250 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); in update_power_state() 253 static void update_conv_power_state(struct hda_codec *codec, hda_nid_t nid, in update_conv_power_state() argument 259 if (snd_hda_check_power_state(codec, nid, parm)) in update_conv_power_state() 261 format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); in update_conv_power_state() 265 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, parm); in update_conv_power_state() 267 format = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0); in update_conv_power_state() 269 snd_hda_codec_write(codec, nid, 0, in update_conv_power_state() 292 static void set_pin_power_state(struct hda_codec *codec, hda_nid_t nid, in set_pin_power_state() argument [all …]
|
D | patch_sigmatel.c | 264 if (spec->gen.all_adcs[i] == hinfo->nid) { in stac_capture_pcm_hook() 273 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook() 278 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook() 347 hda_nid_t nid, unsigned int new_vref) in stac_vrefout_set() argument 351 snd_printdd("%s, nid %x ctl %x\n", __func__, nid, new_vref); in stac_vrefout_set() 352 pinctl = snd_hda_codec_read(codec, nid, 0, in stac_vrefout_set() 362 error = snd_hda_set_pin_ctl_cache(codec, nid, pinctl); in stac_vrefout_set() 426 static void stac_toggle_power_map(struct hda_codec *codec, hda_nid_t nid, in stac_toggle_power_map() argument 433 if (spec->pwr_nids[idx] == nid) in stac_toggle_power_map() 466 if (jack && jack->nid) { in jack_update_power() [all …]
|
D | patch_hdmi.c | 966 pin_nid = jack->nid; in hdmi_intrinsic_event() 1021 static void haswell_verify_pin_D0(struct hda_codec *codec, hda_nid_t nid) in haswell_verify_pin_D0() argument 1025 pwr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_POWER_STATE, 0); in haswell_verify_pin_D0() 1028 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_POWER_STATE, in haswell_verify_pin_D0() 1031 pwr = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_POWER_STATE, 0); in haswell_verify_pin_D0() 1033 snd_printd("Haswell HDMI audio: Power for pin 0x%x is now D%d\n", nid, pwr); in haswell_verify_pin_D0() 1036 lamp = snd_hda_codec_read(codec, nid, 0, in haswell_verify_pin_D0() 1039 ramp = snd_hda_codec_read(codec, nid, 0, in haswell_verify_pin_D0() 1043 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_AMP_GAIN_MUTE, in haswell_verify_pin_D0() 1046 lamp = snd_hda_codec_read(codec, nid, 0, in haswell_verify_pin_D0() [all …]
|
D | patch_conexant.c | 143 static inline void set_beep_amp(struct conexant_spec *spec, hda_nid_t nid, in set_beep_amp() argument 146 spec->gen.beep_nid = nid; in set_beep_amp() 147 spec->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir); in set_beep_amp() 178 #define set_beep_amp(spec, nid, idx, dir) /* NOP */ argument 278 .nid = 0, /* fill later */ 290 .nid = 0, /* fill later */ 302 .nid = 0, /* fill later */ 345 .nid = 0, /* fill later */ 364 info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = in conexant_build_pcms() 379 info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; in conexant_build_pcms() [all …]
|
D | hda_hwdep.c | 355 v->nid, v->verb, v->param); in init_verbs_show() 364 int nid, verb, param; in parse_init_verbs() local 366 if (sscanf(buf, "%i %i %i", &nid, &verb, ¶m) != 3) in parse_init_verbs() 368 if (!nid || !verb) in parse_init_verbs() 376 v->nid = nid; in parse_init_verbs() 511 pin->nid, pin->cfg); in pin_configs_show() 548 int nid, cfg, err; in parse_user_pin_configs() local 550 if (sscanf(buf, "%i %i", &nid, &cfg) != 2) in parse_user_pin_configs() 552 if (!nid) in parse_user_pin_configs() 555 err = snd_hda_add_pincfg(codec, &codec->user_pins, nid, cfg); in parse_user_pin_configs()
|
D | patch_realtek.c | 184 static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid, in alc_fix_pll_init() argument 188 spec->pll_nid = nid; in alc_fix_pll_init() 207 val = snd_hda_codec_read(codec, jack->nid, 0, in alc_update_knob_master() 253 static void set_eapd(struct hda_codec *codec, hda_nid_t nid, int on) in set_eapd() argument 255 if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) in set_eapd() 257 if (snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD) in set_eapd() 258 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_EAPD_BTLENABLE, in set_eapd() 366 unsigned nid = 0; in alc_auto_parse_customize_define() local 382 nid = 0x1d; in alc_auto_parse_customize_define() 384 nid = 0x17; in alc_auto_parse_customize_define() [all …]
|
D | hda_eld.c | 147 static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid, in hdmi_get_eld_data() argument 152 val = snd_hda_codec_read(codec, nid, 0, in hdmi_get_eld_data() 313 int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid) in snd_hdmi_get_eld_size() argument 315 return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_HDMI_DIP_SIZE, in snd_hdmi_get_eld_size() 319 int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld() argument 331 size = snd_hdmi_get_eld_size(codec, nid); in snd_hdmi_get_eld() 344 unsigned int val = hdmi_get_eld_data(codec, nid, i); in snd_hdmi_get_eld()
|
/sound/pci/lola/ |
D | lola_proc.c | 30 struct lola *chip, int nid, const char *name) in print_audio_widget() argument 34 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_audio_widget() 35 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_audio_widget() 36 lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in print_audio_widget() 41 struct lola *chip, int nid, unsigned int ampcap, in print_pin_widget() argument 46 lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in print_pin_widget() 47 snd_iprintf(buffer, "Node 0x%02x %s wcaps 0x%x\n", nid, name, val); in print_pin_widget() 50 lola_read_param(chip, nid, ampcap, &val); in print_pin_widget() 57 lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, NULL); in print_pin_widget() 62 struct lola *chip, int nid) in print_clock_widget() argument [all …]
|
D | lola_mixer.c | 32 int dir, int nid) in lola_init_pin() argument 37 pin->nid = nid; in lola_init_pin() 38 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_pin() 40 printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); in lola_init_pin() 51 printk(KERN_ERR SFX "Invalid wcaps 0x%x for 0x%x\n", val, nid); in lola_init_pin() 61 err = lola_read_param(chip, nid, LOLA_PAR_AMP_OUT_CAP, &val); in lola_init_pin() 63 err = lola_read_param(chip, nid, LOLA_PAR_AMP_IN_CAP, &val); in lola_init_pin() 65 printk(KERN_ERR SFX "Can't read AMP-caps for 0x%x\n", nid); in lola_init_pin() 79 err = lola_codec_read(chip, nid, LOLA_VERB_GET_MAX_LEVEL, 0, 0, &val, in lola_init_pin() 82 printk(KERN_ERR SFX "Can't get MAX_LEVEL 0x%x\n", nid); in lola_init_pin() [all …]
|
D | lola_clock.c | 123 int lola_init_clock_widget(struct lola *chip, int nid) in lola_init_clock_widget() argument 129 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_clock_widget() 131 printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); in lola_init_clock_widget() 140 chip->clock.nid = nid; in lola_init_clock_widget() 142 snd_printdd("clock_list nid=%x, entries=%d\n", nid, in lola_init_clock_widget() 158 err = lola_codec_read(chip, nid, LOLA_VERB_GET_CLOCK_LIST, in lola_init_clock_widget() 219 err = lola_codec_read(chip, chip->clock.nid, in lola_enable_clock_events() 238 err = lola_codec_read(chip, chip->clock.nid, in lola_set_clock_index()
|
D | lola.c | 87 static int corb_send_verb(struct lola *chip, unsigned int nid, in corb_send_verb() argument 94 chip->last_cmd_nid = nid; in corb_send_verb() 98 data |= (nid << 20) | (verb << 8); in corb_send_verb() 195 int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb, in lola_codec_write() argument 199 nid, verb, data, extdata); in lola_codec_write() 200 return corb_send_verb(chip, nid, verb, data, extdata); in lola_codec_write() 204 int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb, in lola_codec_read() argument 211 nid, verb, data, extdata); in lola_codec_read() 212 err = corb_send_verb(chip, nid, verb, data, extdata); in lola_codec_read() 451 int nid, err; in lola_parse_tree() local [all …]
|
D | lola_pcm.c | 415 err = lola_codec_read(chip, str->nid, LOLA_VERB_SET_STREAM_FORMAT, in lola_set_stream_config() 426 err = lola_codec_read(chip, str[i].nid, in lola_set_stream_config() 642 int idx, int nid, int dir) in lola_init_stream() argument 647 str->nid = nid; in lola_init_stream() 652 err = lola_read_param(chip, nid, LOLA_PAR_AUDIO_WIDGET_CAP, &val); in lola_init_stream() 654 printk(KERN_ERR SFX "Can't read wcaps for 0x%x\n", nid); in lola_init_stream() 661 val, nid); in lola_init_stream() 670 val, nid); in lola_init_stream() 678 err = lola_read_param(chip, nid, LOLA_PAR_STREAM_FORMATS, &val); in lola_init_stream() 680 printk(KERN_ERR SFX "Can't read FORMATS 0x%x\n", nid); in lola_init_stream() [all …]
|
D | lola.h | 231 unsigned int nid; member 257 unsigned int nid; member 276 unsigned int nid; member 292 unsigned int nid; /* audio widget NID */ member 485 int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb, 487 int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb, 491 #define lola_read_param(chip, nid, param, val) \ argument 492 lola_codec_read(chip, nid, LOLA_VERB_PARAMETERS, param, 0, val, NULL) 501 int lola_init_clock_widget(struct lola *chip, int nid); 512 int lola_init_mixer_widget(struct lola *chip, int nid);
|
/sound/core/ |
D | init.c | 529 const char *nid) in copy_valid_id_string() argument 533 while (*nid && !isalnum(*nid)) in copy_valid_id_string() 534 nid++; in copy_valid_id_string() 535 if (isdigit(*nid)) in copy_valid_id_string() 537 while (*nid && (size_t)(id - card->id) < sizeof(card->id) - 1) { in copy_valid_id_string() 538 if (isalnum(*nid)) in copy_valid_id_string() 539 *id++ = *nid; in copy_valid_id_string() 540 nid++; in copy_valid_id_string() 549 const char *nid) in snd_card_set_id_no_lock() argument 556 copy_valid_id_string(card, src, nid); in snd_card_set_id_no_lock() [all …]
|