Lines Matching refs:per_pin

115 			      struct hdmi_spec_per_pin *per_pin,
256 struct hdmi_spec_per_pin *per_pin; in pin_id_to_pin_index() local
266 per_pin = get_pin(spec, pin_idx); in pin_id_to_pin_index()
267 if ((per_pin->pin_nid == pin_nid) && in pin_id_to_pin_index()
268 (per_pin->dev_id == dev_id)) in pin_id_to_pin_index()
294 struct hdmi_spec_per_pin *per_pin; in hinfo_to_pin_index() local
298 per_pin = get_pin(spec, pin_idx); in hinfo_to_pin_index()
299 if (per_pin->pcm && in hinfo_to_pin_index()
300 per_pin->pcm->pcm->stream == hinfo) in hinfo_to_pin_index()
313 struct hdmi_spec_per_pin *per_pin; in pcm_idx_to_pin() local
316 per_pin = get_pin(spec, i); in pcm_idx_to_pin()
317 if (per_pin->pcm_idx == pcm_idx) in pcm_idx_to_pin()
318 return per_pin; in pcm_idx_to_pin()
341 struct hdmi_spec_per_pin *per_pin; in hdmi_eld_ctl_info() local
349 per_pin = pcm_idx_to_pin(spec, pcm_idx); in hdmi_eld_ctl_info()
350 if (!per_pin) { in hdmi_eld_ctl_info()
355 eld = &per_pin->sink_eld; in hdmi_eld_ctl_info()
368 struct hdmi_spec_per_pin *per_pin; in hdmi_eld_ctl_get() local
375 per_pin = pcm_idx_to_pin(spec, pcm_idx); in hdmi_eld_ctl_get()
376 if (!per_pin) { in hdmi_eld_ctl_get()
383 eld = &per_pin->sink_eld; in hdmi_eld_ctl_get()
496 struct hdmi_spec_per_pin *per_pin = entry->private_data; in print_eld_info() local
498 mutex_lock(&per_pin->lock); in print_eld_info()
499 snd_hdmi_print_eld_info(&per_pin->sink_eld, buffer, per_pin->pin_nid, in print_eld_info()
500 per_pin->dev_id, per_pin->cvt_nid); in print_eld_info()
501 mutex_unlock(&per_pin->lock); in print_eld_info()
507 struct hdmi_spec_per_pin *per_pin = entry->private_data; in write_eld_info() local
509 mutex_lock(&per_pin->lock); in write_eld_info()
510 snd_hdmi_write_eld_info(&per_pin->sink_eld, buffer); in write_eld_info()
511 mutex_unlock(&per_pin->lock); in write_eld_info()
514 static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index) in eld_proc_new() argument
517 struct hda_codec *codec = per_pin->codec; in eld_proc_new()
526 snd_info_set_text_ops(entry, per_pin, print_eld_info); in eld_proc_new()
529 per_pin->proc_entry = entry; in eld_proc_new()
534 static void eld_proc_free(struct hdmi_spec_per_pin *per_pin) in eld_proc_free() argument
536 if (!per_pin->codec->bus->shutdown) { in eld_proc_free()
537 snd_info_free_entry(per_pin->proc_entry); in eld_proc_free()
538 per_pin->proc_entry = NULL; in eld_proc_free()
542 static inline int eld_proc_new(struct hdmi_spec_per_pin *per_pin, in eld_proc_new() argument
547 static inline void eld_proc_free(struct hdmi_spec_per_pin *per_pin) in eld_proc_free() argument
739 struct hdmi_spec_per_pin *per_pin, in hdmi_setup_audio_infoframe() argument
744 hda_nid_t pin_nid = per_pin->pin_nid; in hdmi_setup_audio_infoframe()
745 int dev_id = per_pin->dev_id; in hdmi_setup_audio_infoframe()
746 int channels = per_pin->channels; in hdmi_setup_audio_infoframe()
762 eld = &per_pin->sink_eld; in hdmi_setup_audio_infoframe()
766 per_pin->chmap_set, non_pcm, per_pin->chmap); in hdmi_setup_audio_infoframe()
770 chmap->ops.set_channel_count(&codec->core, per_pin->cvt_nid, in hdmi_setup_audio_infoframe()
779 per_pin->chmap, per_pin->chmap_set); in hdmi_setup_audio_infoframe()
784 per_pin->non_pcm = non_pcm; in hdmi_setup_audio_infoframe()
791 static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll);
997 struct hdmi_spec_per_pin *per_pin; in hdmi_choose_cvt() local
1003 per_pin = NULL; in hdmi_choose_cvt()
1005 per_pin = get_pin(spec, pin_idx); in hdmi_choose_cvt()
1007 if (per_pin && per_pin->silent_stream) { in hdmi_choose_cvt()
1008 cvt_idx = cvt_nid_to_cvt_index(codec, per_pin->cvt_nid); in hdmi_choose_cvt()
1024 if (per_pin == NULL) in hdmi_choose_cvt()
1027 for (mux_idx = 0; mux_idx < per_pin->num_mux_nids; mux_idx++) in hdmi_choose_cvt()
1028 if (per_pin->mux_nids[mux_idx] == per_cvt->cvt_nid) in hdmi_choose_cvt()
1031 if (mux_idx == per_pin->num_mux_nids) in hdmi_choose_cvt()
1040 if (per_pin != NULL) in hdmi_choose_cvt()
1041 per_pin->mux_idx = mux_idx; in hdmi_choose_cvt()
1051 struct hdmi_spec_per_pin *per_pin) in intel_verify_pin_cvt_connect() argument
1053 hda_nid_t pin_nid = per_pin->pin_nid; in intel_verify_pin_cvt_connect()
1056 mux_idx = per_pin->mux_idx; in intel_verify_pin_cvt_connect()
1096 struct hdmi_spec_per_pin *per_pin; in intel_not_share_assigned_cvt() local
1104 per_pin = get_pin(spec, pin_idx); in intel_not_share_assigned_cvt()
1109 if (!per_pin->pcm) in intel_not_share_assigned_cvt()
1112 if ((per_pin->pin_nid == pin_nid) && in intel_not_share_assigned_cvt()
1113 (per_pin->dev_id == dev_id)) in intel_not_share_assigned_cvt()
1122 dev_num = snd_hda_get_num_devices(codec, per_pin->pin_nid) + 1; in intel_not_share_assigned_cvt()
1123 if (per_pin->dev_id >= dev_num) in intel_not_share_assigned_cvt()
1126 nid = per_pin->pin_nid; in intel_not_share_assigned_cvt()
1135 snd_hda_set_dev_select(codec, nid, per_pin->dev_id); in intel_not_share_assigned_cvt()
1182 struct hdmi_spec_per_pin *per_pin, in pin_cvt_fixup() argument
1188 spec->ops.pin_cvt_fixup(codec, per_pin, cvt_nid); in pin_cvt_fixup()
1247 struct hdmi_spec_per_pin *per_pin; in hdmi_pcm_open() local
1276 per_pin = get_pin(spec, pin_idx); in hdmi_pcm_open()
1277 per_pin->cvt_nid = per_cvt->cvt_nid; in hdmi_pcm_open()
1284 snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id); in hdmi_pcm_open()
1285 snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0, in hdmi_pcm_open()
1287 per_pin->mux_idx); in hdmi_pcm_open()
1290 pin_cvt_fixup(codec, per_pin, 0); in hdmi_pcm_open()
1301 eld = &per_pin->sink_eld; in hdmi_pcm_open()
1334 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in hdmi_read_pin_conn() local
1335 hda_nid_t pin_nid = per_pin->pin_nid; in hdmi_read_pin_conn()
1336 int dev_id = per_pin->dev_id; in hdmi_read_pin_conn()
1350 memcpy(per_pin->mux_nids, spec->cvt_nids, in hdmi_read_pin_conn()
1354 per_pin->mux_nids, in hdmi_read_pin_conn()
1359 per_pin->num_mux_nids = conns; in hdmi_read_pin_conn()
1365 struct hdmi_spec_per_pin *per_pin) in hdmi_find_pcm_slot() argument
1377 struct hdmi_spec_per_pin *per_pin) in hdmi_attach_hda_pcm() argument
1382 if (per_pin->pcm) in hdmi_attach_hda_pcm()
1385 idx = per_pin->prev_pcm_idx; in hdmi_attach_hda_pcm()
1389 per_pin->prev_pcm_idx = -1; /* no longer valid, clear it */ in hdmi_attach_hda_pcm()
1391 idx = hdmi_find_pcm_slot(spec, per_pin); in hdmi_attach_hda_pcm()
1395 per_pin->pcm_idx = idx; in hdmi_attach_hda_pcm()
1396 per_pin->pcm = get_hdmi_pcm(spec, idx); in hdmi_attach_hda_pcm()
1401 struct hdmi_spec_per_pin *per_pin) in hdmi_detach_hda_pcm() argument
1406 if (!per_pin->pcm) in hdmi_detach_hda_pcm()
1408 idx = per_pin->pcm_idx; in hdmi_detach_hda_pcm()
1409 per_pin->pcm_idx = -1; in hdmi_detach_hda_pcm()
1410 per_pin->prev_pcm_idx = idx; /* remember the previous index */ in hdmi_detach_hda_pcm()
1411 per_pin->pcm = NULL; in hdmi_detach_hda_pcm()
1417 struct hdmi_spec_per_pin *per_pin, hda_nid_t cvt_nid) in hdmi_get_pin_cvt_mux() argument
1421 for (mux_idx = 0; mux_idx < per_pin->num_mux_nids; mux_idx++) in hdmi_get_pin_cvt_mux()
1422 if (per_pin->mux_nids[mux_idx] == cvt_nid) in hdmi_get_pin_cvt_mux()
1430 struct hdmi_spec_per_pin *per_pin) in hdmi_pcm_setup_pin() argument
1432 struct hda_codec *codec = per_pin->codec; in hdmi_pcm_setup_pin()
1439 if (per_pin->pcm_idx < 0 || per_pin->pcm_idx >= spec->pcm_used) in hdmi_pcm_setup_pin()
1441 pcm = get_pcm_rec(spec, per_pin->pcm_idx); in hdmi_pcm_setup_pin()
1444 if (!test_bit(per_pin->pcm_idx, &spec->pcm_in_use)) in hdmi_pcm_setup_pin()
1451 per_pin->cvt_nid = hinfo->nid; in hdmi_pcm_setup_pin()
1453 mux_idx = hdmi_get_pin_cvt_mux(spec, per_pin, hinfo->nid); in hdmi_pcm_setup_pin()
1454 if (mux_idx < per_pin->num_mux_nids) { in hdmi_pcm_setup_pin()
1455 snd_hda_set_dev_select(codec, per_pin->pin_nid, in hdmi_pcm_setup_pin()
1456 per_pin->dev_id); in hdmi_pcm_setup_pin()
1457 snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0, in hdmi_pcm_setup_pin()
1461 snd_hda_spdif_ctls_assign(codec, per_pin->pcm_idx, hinfo->nid); in hdmi_pcm_setup_pin()
1465 per_pin->channels = substream->runtime->channels; in hdmi_pcm_setup_pin()
1466 per_pin->setup = true; in hdmi_pcm_setup_pin()
1467 per_pin->mux_idx = mux_idx; in hdmi_pcm_setup_pin()
1469 hdmi_setup_audio_infoframe(codec, per_pin, non_pcm); in hdmi_pcm_setup_pin()
1473 struct hdmi_spec_per_pin *per_pin) in hdmi_pcm_reset_pin() argument
1475 if (per_pin->pcm_idx >= 0 && per_pin->pcm_idx < spec->pcm_used) in hdmi_pcm_reset_pin()
1476 snd_hda_spdif_ctls_unassign(per_pin->codec, per_pin->pcm_idx); in hdmi_pcm_reset_pin()
1478 per_pin->chmap_set = false; in hdmi_pcm_reset_pin()
1479 memset(per_pin->chmap, 0, sizeof(per_pin->chmap)); in hdmi_pcm_reset_pin()
1481 per_pin->setup = false; in hdmi_pcm_reset_pin()
1482 per_pin->channels = 0; in hdmi_pcm_reset_pin()
1486 struct hdmi_spec_per_pin *per_pin) in pin_idx_to_pcm_jack() argument
1490 if (per_pin->pcm_idx >= 0) in pin_idx_to_pcm_jack()
1491 return spec->pcm_rec[per_pin->pcm_idx].jack; in pin_idx_to_pcm_jack()
1501 struct hdmi_spec_per_pin *per_pin, in update_eld() argument
1505 struct hdmi_eld *pin_eld = &per_pin->sink_eld; in update_eld()
1518 schedule_delayed_work(&per_pin->work, in update_eld()
1531 pcm_idx = per_pin->pcm_idx; in update_eld()
1537 pcm_jack = pin_idx_to_pcm_jack(codec, per_pin); in update_eld()
1541 hdmi_attach_hda_pcm(spec, per_pin); in update_eld()
1542 hdmi_pcm_setup_pin(spec, per_pin); in update_eld()
1544 hdmi_pcm_reset_pin(spec, per_pin); in update_eld()
1545 hdmi_detach_hda_pcm(spec, per_pin); in update_eld()
1553 pcm_idx = per_pin->pcm_idx; in update_eld()
1555 pcm_jack = pin_idx_to_pcm_jack(codec, per_pin); in update_eld()
1584 if (eld->eld_valid && !old_eld_valid && per_pin->setup) { in update_eld()
1585 pin_cvt_fixup(codec, per_pin, 0); in update_eld()
1586 hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm); in update_eld()
1602 static void hdmi_present_sense_via_verbs(struct hdmi_spec_per_pin *per_pin, in hdmi_present_sense_via_verbs() argument
1605 struct hda_codec *codec = per_pin->codec; in hdmi_present_sense_via_verbs()
1609 hda_nid_t pin_nid = per_pin->pin_nid; in hdmi_present_sense_via_verbs()
1610 int dev_id = per_pin->dev_id; in hdmi_present_sense_via_verbs()
1633 mutex_lock(&per_pin->lock); in hdmi_present_sense_via_verbs()
1650 update_eld(codec, per_pin, eld, repoll); in hdmi_present_sense_via_verbs()
1651 mutex_unlock(&per_pin->lock); in hdmi_present_sense_via_verbs()
1663 struct hdmi_spec_per_pin *per_pin) in silent_stream_enable_i915() argument
1667 snd_hdac_sync_audio_rate(&codec->core, per_pin->pin_nid, in silent_stream_enable_i915()
1668 per_pin->dev_id, I915_SILENT_RATE); in silent_stream_enable_i915()
1673 snd_hda_codec_setup_stream(codec, per_pin->cvt_nid, in silent_stream_enable_i915()
1676 snd_hda_codec_setup_stream(codec, per_pin->cvt_nid, I915_SILENT_FMT_MASK, 0, format); in silent_stream_enable_i915()
1678 per_pin->channels = I915_SILENT_CHANNELS; in silent_stream_enable_i915()
1679 hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm); in silent_stream_enable_i915()
1683 struct hdmi_spec_per_pin *per_pin, in silent_stream_set_kae() argument
1688 codec_dbg(codec, "HDMI: KAE %d cvt-NID=0x%x\n", enable, per_pin->cvt_nid); in silent_stream_set_kae()
1690 param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, AC_VERB_GET_DIGI_CONVERT_1, 0); in silent_stream_set_kae()
1698 snd_hda_codec_write(codec, per_pin->cvt_nid, 0, AC_VERB_SET_DIGI_CONVERT_3, param); in silent_stream_set_kae()
1702 struct hdmi_spec_per_pin *per_pin) in silent_stream_enable() argument
1722 mutex_lock(&per_pin->lock); in silent_stream_enable()
1724 if (per_pin->setup) { in silent_stream_enable()
1730 pin_idx = pin_id_to_pin_index(codec, per_pin->pin_nid, per_pin->dev_id); in silent_stream_enable()
1739 per_pin->cvt_nid = per_cvt->cvt_nid; in silent_stream_enable()
1740 per_pin->silent_stream = true; in silent_stream_enable()
1743 per_pin->pin_nid, per_cvt->cvt_nid); in silent_stream_enable()
1745 snd_hda_set_dev_select(codec, per_pin->pin_nid, per_pin->dev_id); in silent_stream_enable()
1746 snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0, in silent_stream_enable()
1748 per_pin->mux_idx); in silent_stream_enable()
1751 pin_cvt_fixup(codec, per_pin, 0); in silent_stream_enable()
1755 silent_stream_enable_i915(codec, per_pin); in silent_stream_enable()
1756 silent_stream_set_kae(codec, per_pin, true); in silent_stream_enable()
1759 silent_stream_enable_i915(codec, per_pin); in silent_stream_enable()
1767 mutex_unlock(&per_pin->lock); in silent_stream_enable()
1774 struct hdmi_spec_per_pin *per_pin) in silent_stream_disable() argument
1789 mutex_lock(&per_pin->lock); in silent_stream_disable()
1790 if (!per_pin->silent_stream) in silent_stream_disable()
1794 per_pin->pin_nid, per_pin->cvt_nid); in silent_stream_disable()
1796 cvt_idx = cvt_nid_to_cvt_index(codec, per_pin->cvt_nid); in silent_stream_disable()
1806 silent_stream_set_kae(codec, per_pin, false); in silent_stream_disable()
1809 per_pin->cvt_nid = 0; in silent_stream_disable()
1810 per_pin->silent_stream = false; in silent_stream_disable()
1813 mutex_unlock(&per_pin->lock); in silent_stream_disable()
1820 struct hdmi_spec_per_pin *per_pin) in sync_eld_via_acomp() argument
1826 mutex_lock(&per_pin->lock); in sync_eld_via_acomp()
1828 monitor_prev = per_pin->sink_eld.monitor_present; in sync_eld_via_acomp()
1829 eld->eld_size = snd_hdac_acomp_get_eld(&codec->core, per_pin->pin_nid, in sync_eld_via_acomp()
1830 per_pin->dev_id, &eld->monitor_present, in sync_eld_via_acomp()
1833 update_eld(codec, per_pin, eld, 0); in sync_eld_via_acomp()
1834 monitor_next = per_pin->sink_eld.monitor_present; in sync_eld_via_acomp()
1835 mutex_unlock(&per_pin->lock); in sync_eld_via_acomp()
1839 silent_stream_enable(codec, per_pin); in sync_eld_via_acomp()
1841 silent_stream_disable(codec, per_pin); in sync_eld_via_acomp()
1845 static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) in hdmi_present_sense() argument
1847 struct hda_codec *codec = per_pin->codec; in hdmi_present_sense()
1850 hdmi_present_sense_via_verbs(per_pin, repoll); in hdmi_present_sense()
1852 sync_eld_via_acomp(codec, per_pin); in hdmi_present_sense()
1857 struct hdmi_spec_per_pin *per_pin = in hdmi_repoll_eld() local
1859 struct hda_codec *codec = per_pin->codec; in hdmi_repoll_eld()
1863 jack = snd_hda_jack_tbl_get_mst(codec, per_pin->pin_nid, in hdmi_repoll_eld()
1864 per_pin->dev_id); in hdmi_repoll_eld()
1868 if (per_pin->repoll_count++ > 6) in hdmi_repoll_eld()
1869 per_pin->repoll_count = 0; in hdmi_repoll_eld()
1872 hdmi_present_sense(per_pin, per_pin->repoll_count); in hdmi_repoll_eld()
1881 struct hdmi_spec_per_pin *per_pin; in hdmi_add_pin() local
1930 per_pin = snd_array_new(&spec->pins); in hdmi_add_pin()
1932 if (!per_pin) in hdmi_add_pin()
1935 per_pin->pcm = NULL; in hdmi_add_pin()
1936 per_pin->pcm_idx = -1; in hdmi_add_pin()
1937 per_pin->prev_pcm_idx = -1; in hdmi_add_pin()
1938 per_pin->pin_nid = pin_nid; in hdmi_add_pin()
1939 per_pin->pin_nid_idx = spec->num_nids; in hdmi_add_pin()
1940 per_pin->dev_id = i; in hdmi_add_pin()
1941 per_pin->non_pcm = false; in hdmi_add_pin()
2094 struct hdmi_spec_per_pin *per_pin; in generic_hdmi_playback_pcm_prepare() local
2112 per_pin = get_pin(spec, pin_idx); in generic_hdmi_playback_pcm_prepare()
2122 pin_cvt_fixup(codec, per_pin, 0); in generic_hdmi_playback_pcm_prepare()
2127 snd_hdac_sync_audio_rate(&codec->core, per_pin->pin_nid, in generic_hdmi_playback_pcm_prepare()
2128 per_pin->dev_id, runtime->rate); in generic_hdmi_playback_pcm_prepare()
2131 mutex_lock(&per_pin->lock); in generic_hdmi_playback_pcm_prepare()
2132 per_pin->channels = substream->runtime->channels; in generic_hdmi_playback_pcm_prepare()
2133 per_pin->setup = true; in generic_hdmi_playback_pcm_prepare()
2143 hdmi_setup_audio_infoframe(codec, per_pin, non_pcm); in generic_hdmi_playback_pcm_prepare()
2144 mutex_unlock(&per_pin->lock); in generic_hdmi_playback_pcm_prepare()
2146 snd_hda_set_dev_select(codec, per_pin->pin_nid, in generic_hdmi_playback_pcm_prepare()
2147 per_pin->dev_id); in generic_hdmi_playback_pcm_prepare()
2148 pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0, in generic_hdmi_playback_pcm_prepare()
2150 snd_hda_codec_write(codec, per_pin->pin_nid, 0, in generic_hdmi_playback_pcm_prepare()
2156 err = spec->ops.setup_stream(codec, cvt_nid, per_pin->pin_nid, in generic_hdmi_playback_pcm_prepare()
2157 per_pin->dev_id, stream_tag, format); in generic_hdmi_playback_pcm_prepare()
2178 struct hdmi_spec_per_pin *per_pin; in hdmi_pcm_close() local
2210 per_pin = get_pin(spec, pin_idx); in hdmi_pcm_close()
2213 snd_hda_set_dev_select(codec, per_pin->pin_nid, in hdmi_pcm_close()
2214 per_pin->dev_id); in hdmi_pcm_close()
2215 pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0, in hdmi_pcm_close()
2217 snd_hda_codec_write(codec, per_pin->pin_nid, 0, in hdmi_pcm_close()
2222 mutex_lock(&per_pin->lock); in hdmi_pcm_close()
2223 per_pin->chmap_set = false; in hdmi_pcm_close()
2224 memset(per_pin->chmap, 0, sizeof(per_pin->chmap)); in hdmi_pcm_close()
2226 per_pin->setup = false; in hdmi_pcm_close()
2227 per_pin->channels = 0; in hdmi_pcm_close()
2228 mutex_unlock(&per_pin->lock); in hdmi_pcm_close()
2248 struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx); in hdmi_get_spk_alloc() local
2250 if (!per_pin) in hdmi_get_spk_alloc()
2253 return per_pin->sink_eld.info.spk_alloc; in hdmi_get_spk_alloc()
2261 struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx); in hdmi_get_chmap() local
2264 if (!per_pin) in hdmi_get_chmap()
2267 memcpy(chmap, per_pin->chmap, ARRAY_SIZE(per_pin->chmap)); in hdmi_get_chmap()
2275 struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx); in hdmi_set_chmap() local
2277 if (!per_pin) in hdmi_set_chmap()
2279 mutex_lock(&per_pin->lock); in hdmi_set_chmap()
2280 per_pin->chmap_set = true; in hdmi_set_chmap()
2281 memcpy(per_pin->chmap, chmap, ARRAY_SIZE(per_pin->chmap)); in hdmi_set_chmap()
2283 hdmi_setup_audio_infoframe(codec, per_pin, per_pin->non_pcm); in hdmi_set_chmap()
2284 mutex_unlock(&per_pin->lock); in hdmi_set_chmap()
2291 struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx); in is_hdmi_pcm_attached() local
2293 return per_pin ? true:false; in is_hdmi_pcm_attached()
2402 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in generic_hdmi_build_controls() local
2403 struct hdmi_eld *pin_eld = &per_pin->sink_eld; in generic_hdmi_build_controls()
2406 hdmi_attach_hda_pcm(spec, per_pin); in generic_hdmi_build_controls()
2407 hdmi_pcm_setup_pin(spec, per_pin); in generic_hdmi_build_controls()
2411 hdmi_present_sense(per_pin, 0); in generic_hdmi_build_controls()
2435 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in generic_hdmi_init_per_pins() local
2437 per_pin->codec = codec; in generic_hdmi_init_per_pins()
2438 mutex_init(&per_pin->lock); in generic_hdmi_init_per_pins()
2439 INIT_DELAYED_WORK(&per_pin->work, hdmi_repoll_eld); in generic_hdmi_init_per_pins()
2440 eld_proc_new(per_pin, pin_idx); in generic_hdmi_init_per_pins()
2452 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in generic_hdmi_init() local
2453 hda_nid_t pin_nid = per_pin->pin_nid; in generic_hdmi_init()
2454 int dev_id = per_pin->dev_id; in generic_hdmi_init()
2504 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in generic_hdmi_free() local
2505 cancel_delayed_work_sync(&per_pin->work); in generic_hdmi_free()
2506 eld_proc_free(per_pin); in generic_hdmi_free()
2525 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in generic_hdmi_suspend() local
2526 cancel_delayed_work_sync(&per_pin->work); in generic_hdmi_suspend()
2540 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in generic_hdmi_resume() local
2541 hdmi_present_sense(per_pin, 1); in generic_hdmi_resume()
2913 struct hdmi_spec_per_pin *per_pin; in i915_hsw_setup_stream() local
2917 per_pin = NULL; in i915_hsw_setup_stream()
2919 per_pin = get_pin(spec, pin_idx); in i915_hsw_setup_stream()
2923 if (spec->silent_stream_type == SILENT_STREAM_KAE && per_pin && per_pin->silent_stream) { in i915_hsw_setup_stream()
2924 silent_stream_set_kae(codec, per_pin, false); in i915_hsw_setup_stream()
2932 if (spec->silent_stream_type == SILENT_STREAM_KAE && per_pin && per_pin->silent_stream) { in i915_hsw_setup_stream()
2934 silent_stream_set_kae(codec, per_pin, true); in i915_hsw_setup_stream()
2942 struct hdmi_spec_per_pin *per_pin, in i915_pin_cvt_fixup() argument
2945 if (per_pin) { in i915_pin_cvt_fixup()
2946 haswell_verify_D0(codec, per_pin->cvt_nid, per_pin->pin_nid); in i915_pin_cvt_fixup()
2947 snd_hda_set_dev_select(codec, per_pin->pin_nid, in i915_pin_cvt_fixup()
2948 per_pin->dev_id); in i915_pin_cvt_fixup()
2949 intel_verify_pin_cvt_connect(codec, per_pin); in i915_pin_cvt_fixup()
2950 intel_not_share_assigned_cvt(codec, per_pin->pin_nid, in i915_pin_cvt_fixup()
2951 per_pin->dev_id, per_pin->mux_idx); in i915_pin_cvt_fixup()
2967 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in i915_adlp_hdmi_suspend() local
2969 if (per_pin->silent_stream) { in i915_adlp_hdmi_suspend()
3009 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in i915_adlp_hdmi_resume() local
3016 if (per_pin->silent_stream) { in i915_adlp_hdmi_resume()
3019 param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, in i915_adlp_hdmi_resume()
3023 silent_stream_enable_i915(codec, per_pin); in i915_adlp_hdmi_resume()
3026 param = snd_hda_codec_read(codec, per_pin->cvt_nid, 0, in i915_adlp_hdmi_resume()
3030 silent_stream_set_kae(codec, per_pin, true); in i915_adlp_hdmi_resume()
3278 struct hdmi_spec_per_pin *per_pin = get_pin(spec, 0); in simple_playback_init() local
3279 hda_nid_t pin = per_pin->pin_nid; in simple_playback_init()
3287 snd_hda_jack_detect_enable(codec, pin, per_pin->dev_id); in simple_playback_init()
3460 struct hdmi_spec_per_pin *per_pin; in patch_simple_hdmi() local
3475 per_pin = snd_array_new(&spec->pins); in patch_simple_hdmi()
3477 if (!per_pin || !per_cvt) { in patch_simple_hdmi()
3482 per_pin->pin_nid = pin_nid; in patch_simple_hdmi()
4399 struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); in atihdmi_init() local
4402 snd_hda_codec_write(codec, per_pin->pin_nid, 0, ATI_VERB_SET_DOWNMIX_INFO, 0); in atihdmi_init()
4406 snd_hda_codec_write(codec, per_pin->pin_nid, 0, in atihdmi_init()