Lines Matching refs:hdev

80 	struct hdac_device *hdev;  member
124 struct hdac_device *hdev; member
159 struct hdac_device *hdev = port->pin->hdev; in hdac_hdmi_jack_report() local
169 dev_dbg(&hdev->dev, in hdac_hdmi_jack_report()
217 static int hdac_hdmi_get_port_len(struct hdac_device *hdev, hda_nid_t nid) in hdac_hdmi_get_port_len() argument
222 caps = snd_hdac_get_wcaps(hdev, nid); in hdac_hdmi_get_port_len()
228 param = snd_hdac_read_parm_uncached(hdev, nid, AC_PAR_DEVLIST_LEN); in hdac_hdmi_get_port_len()
240 static int hdac_hdmi_port_select_get(struct hdac_device *hdev, in hdac_hdmi_port_select_get() argument
243 return snd_hdac_codec_read(hdev, port->pin->nid, in hdac_hdmi_port_select_get()
251 static int hdac_hdmi_port_select_set(struct hdac_device *hdev, in hdac_hdmi_port_select_set() argument
260 num_ports = hdac_hdmi_get_port_len(hdev, port->pin->nid); in hdac_hdmi_port_select_set()
270 snd_hdac_codec_write(hdev, port->pin->nid, 0, in hdac_hdmi_port_select_set()
273 if (port->id != hdac_hdmi_port_select_get(hdev, port)) in hdac_hdmi_port_select_set()
276 dev_dbg(&hdev->dev, "Selected the port=%d\n", port->id); in hdac_hdmi_port_select_set()
334 hdac_hdmi_set_dip_index(struct hdac_device *hdev, hda_nid_t pin_nid, in hdac_hdmi_set_dip_index() argument
340 snd_hdac_codec_write(hdev, pin_nid, 0, AC_VERB_SET_HDMI_DIP_INDEX, val); in hdac_hdmi_set_dip_index()
355 static int hdac_hdmi_setup_audio_infoframe(struct hdac_device *hdev, in hdac_hdmi_setup_audio_infoframe() argument
362 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_setup_audio_infoframe()
371 ca = snd_hdac_channel_allocation(hdev, port->eld.info.spk_alloc, in hdac_hdmi_setup_audio_infoframe()
375 hdmi->chmap.ops.set_channel_count(hdev, cvt->nid, channels); in hdac_hdmi_setup_audio_infoframe()
408 dev_err(&hdev->dev, "Invalid connection type: %d\n", conn_type); in hdac_hdmi_setup_audio_infoframe()
413 hdac_hdmi_set_dip_index(hdev, pin->nid, 0x0, 0x0); in hdac_hdmi_setup_audio_infoframe()
414 snd_hdac_codec_write(hdev, pin->nid, 0, in hdac_hdmi_setup_audio_infoframe()
419 hdac_hdmi_set_dip_index(hdev, pin->nid, 0x0, 0x0); in hdac_hdmi_setup_audio_infoframe()
422 snd_hdac_codec_write(hdev, pin->nid, 0, in hdac_hdmi_setup_audio_infoframe()
426 snd_hdac_codec_write(hdev, pin->nid, 0, in hdac_hdmi_setup_audio_infoframe()
431 hdac_hdmi_set_dip_index(hdev, pin->nid, 0x0, 0x0); in hdac_hdmi_setup_audio_infoframe()
432 snd_hdac_codec_write(hdev, pin->nid, 0, in hdac_hdmi_setup_audio_infoframe()
442 struct hdac_device *hdev = hdmi->hdev; in hdac_hdmi_set_stream() local
452 dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, hstream->stream_tag); in hdac_hdmi_set_stream()
489 static int hdac_hdmi_query_port_connlist(struct hdac_device *hdev, in hdac_hdmi_query_port_connlist() argument
493 if (!(snd_hdac_get_wcaps(hdev, pin->nid) & AC_WCAP_CONN_LIST)) { in hdac_hdmi_query_port_connlist()
494 dev_warn(&hdev->dev, in hdac_hdmi_query_port_connlist()
496 pin->nid, snd_hdac_get_wcaps(hdev, pin->nid)); in hdac_hdmi_query_port_connlist()
500 if (hdac_hdmi_port_select_set(hdev, port) < 0) in hdac_hdmi_query_port_connlist()
503 port->num_mux_nids = snd_hdac_get_connections(hdev, pin->nid, in hdac_hdmi_query_port_connlist()
506 dev_warn(&hdev->dev, in hdac_hdmi_query_port_connlist()
510 dev_dbg(&hdev->dev, "num_mux_nids %d for pin:port %d:%d\n", in hdac_hdmi_query_port_connlist()
526 struct hdac_device *hdev, in hdac_hdmi_get_port_from_cvt() argument
541 ret = hdac_hdmi_query_port_connlist(hdev, in hdac_hdmi_get_port_from_cvt()
564 static void hdac_hdmi_verify_connect_sel_all_pins(struct hdac_device *hdev) in hdac_hdmi_verify_connect_sel_all_pins() argument
566 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_verify_connect_sel_all_pins()
572 port = hdac_hdmi_get_port_from_cvt(hdev, hdmi, cvt); in hdac_hdmi_verify_connect_sel_all_pins()
574 snd_hdac_codec_write(hdev, port->pin->nid, 0, in hdac_hdmi_verify_connect_sel_all_pins()
576 dev_dbg(&hdev->dev, "%s: %s set connect %d -> %d\n", in hdac_hdmi_verify_connect_sel_all_pins()
592 struct hdac_device *hdev = hdmi->hdev; in hdac_hdmi_pcm_open() local
601 port = hdac_hdmi_get_port_from_cvt(hdev, hdmi, cvt); in hdac_hdmi_pcm_open()
612 dev_warn(&hdev->dev, in hdac_hdmi_pcm_open()
655 hdac_hdmi_query_cvt_params(struct hdac_device *hdev, struct hdac_hdmi_cvt *cvt) in hdac_hdmi_query_cvt_params() argument
658 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_query_cvt_params()
661 chans = snd_hdac_get_wcaps(hdev, cvt->nid); in hdac_hdmi_query_cvt_params()
670 err = snd_hdac_query_supported_pcm(hdev, cvt->nid, in hdac_hdmi_query_cvt_params()
676 dev_err(&hdev->dev, in hdac_hdmi_query_cvt_params()
718 static struct hdac_hdmi_pcm *hdac_hdmi_get_pcm(struct hdac_device *hdev, in hdac_hdmi_get_pcm() argument
721 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_get_pcm()
738 static void hdac_hdmi_set_power_state(struct hdac_device *hdev, in hdac_hdmi_set_power_state() argument
744 if (snd_hdac_get_wcaps(hdev, nid) & AC_WCAP_POWER) { in hdac_hdmi_set_power_state()
745 if (!snd_hdac_check_power_state(hdev, nid, pwr_state)) { in hdac_hdmi_set_power_state()
747 snd_hdac_codec_read(hdev, nid, 0, in hdac_hdmi_set_power_state()
750 state = snd_hdac_sync_power_state(hdev, in hdac_hdmi_set_power_state()
759 static void hdac_hdmi_set_amp(struct hdac_device *hdev, in hdac_hdmi_set_amp() argument
762 if (snd_hdac_get_wcaps(hdev, nid) & AC_WCAP_OUT_AMP) in hdac_hdmi_set_amp()
763 snd_hdac_codec_write(hdev, nid, 0, in hdac_hdmi_set_amp()
772 struct hdac_device *hdev = dev_to_hdac_dev(w->dapm->dev); in hdac_hdmi_pin_output_widget_event() local
775 dev_dbg(&hdev->dev, "%s: widget: %s event: %x\n", in hdac_hdmi_pin_output_widget_event()
778 pcm = hdac_hdmi_get_pcm(hdev, port); in hdac_hdmi_pin_output_widget_event()
783 if (hdac_hdmi_port_select_set(hdev, port) < 0) in hdac_hdmi_pin_output_widget_event()
788 hdac_hdmi_set_power_state(hdev, port->pin->nid, AC_PWRST_D0); in hdac_hdmi_pin_output_widget_event()
791 snd_hdac_codec_write(hdev, port->pin->nid, 0, in hdac_hdmi_pin_output_widget_event()
794 hdac_hdmi_set_amp(hdev, port->pin->nid, AMP_OUT_UNMUTE); in hdac_hdmi_pin_output_widget_event()
796 return hdac_hdmi_setup_audio_infoframe(hdev, pcm, port); in hdac_hdmi_pin_output_widget_event()
799 hdac_hdmi_set_amp(hdev, port->pin->nid, AMP_OUT_MUTE); in hdac_hdmi_pin_output_widget_event()
802 snd_hdac_codec_write(hdev, port->pin->nid, 0, in hdac_hdmi_pin_output_widget_event()
805 hdac_hdmi_set_power_state(hdev, port->pin->nid, AC_PWRST_D3); in hdac_hdmi_pin_output_widget_event()
817 struct hdac_device *hdev = dev_to_hdac_dev(w->dapm->dev); in hdac_hdmi_cvt_output_widget_event() local
818 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_cvt_output_widget_event()
821 dev_dbg(&hdev->dev, "%s: widget: %s event: %x\n", in hdac_hdmi_cvt_output_widget_event()
830 hdac_hdmi_set_power_state(hdev, cvt->nid, AC_PWRST_D0); in hdac_hdmi_cvt_output_widget_event()
833 snd_hdac_codec_write(hdev, cvt->nid, 0, in hdac_hdmi_cvt_output_widget_event()
837 snd_hdac_codec_write(hdev, cvt->nid, 0, in hdac_hdmi_cvt_output_widget_event()
840 snd_hdac_codec_write(hdev, cvt->nid, 0, in hdac_hdmi_cvt_output_widget_event()
842 snd_hdac_codec_write(hdev, cvt->nid, 0, in hdac_hdmi_cvt_output_widget_event()
850 hdac_hdmi_verify_connect_sel_all_pins(hdev); in hdac_hdmi_cvt_output_widget_event()
855 snd_hdac_codec_write(hdev, cvt->nid, 0, in hdac_hdmi_cvt_output_widget_event()
857 snd_hdac_codec_write(hdev, cvt->nid, 0, in hdac_hdmi_cvt_output_widget_event()
860 hdac_hdmi_set_power_state(hdev, cvt->nid, AC_PWRST_D3); in hdac_hdmi_cvt_output_widget_event()
872 struct hdac_device *hdev = dev_to_hdac_dev(w->dapm->dev); in hdac_hdmi_pin_mux_widget_event() local
875 dev_dbg(&hdev->dev, "%s: widget: %s event: %x\n", in hdac_hdmi_pin_mux_widget_event()
884 if (hdac_hdmi_port_select_set(hdev, port) < 0) in hdac_hdmi_pin_mux_widget_event()
888 snd_hdac_codec_write(hdev, port->pin->nid, 0, in hdac_hdmi_pin_mux_widget_event()
907 struct hdac_device *hdev = dev_to_hdac_dev(dapm->dev); in hdac_hdmi_set_pin_port_mux() local
908 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_set_pin_port_mux()
961 static int hdac_hdmi_create_pin_port_muxs(struct hdac_device *hdev, in hdac_hdmi_create_pin_port_muxs() argument
966 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_create_pin_port_muxs()
978 kc = devm_kzalloc(&hdev->dev, sizeof(*kc), GFP_KERNEL); in hdac_hdmi_create_pin_port_muxs()
982 se = devm_kzalloc(&hdev->dev, sizeof(*se), GFP_KERNEL); in hdac_hdmi_create_pin_port_muxs()
988 kc->name = devm_kstrdup(&hdev->dev, kc_name, GFP_KERNEL); in hdac_hdmi_create_pin_port_muxs()
1006 items[i] = devm_kstrdup(&hdev->dev, mux_items, GFP_KERNEL); in hdac_hdmi_create_pin_port_muxs()
1013 items[i] = devm_kstrdup(&hdev->dev, mux_items, GFP_KERNEL); in hdac_hdmi_create_pin_port_muxs()
1018 se->texts = devm_kmemdup_array(&hdev->dev, items, num_items, sizeof(items[0]), GFP_KERNEL); in hdac_hdmi_create_pin_port_muxs()
1022 return hdac_hdmi_fill_widget_info(&hdev->dev, widget, in hdac_hdmi_create_pin_port_muxs()
1029 static void hdac_hdmi_add_pinmux_cvt_route(struct hdac_device *hdev, in hdac_hdmi_add_pinmux_cvt_route() argument
1033 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_add_pinmux_cvt_route()
1075 struct hdac_device *hdev = dev_to_hdac_dev(dapm->dev); in create_fill_widget_route_map() local
1076 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in create_fill_widget_route_map()
1128 ret = hdac_hdmi_create_pin_port_muxs(hdev, in create_fill_widget_route_map()
1163 hdac_hdmi_add_pinmux_cvt_route(hdev, widgets, route, i); in create_fill_widget_route_map()
1175 static int hdac_hdmi_init_dai_map(struct hdac_device *hdev) in hdac_hdmi_init_dai_map() argument
1177 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_init_dai_map()
1193 dev_warn(&hdev->dev, in hdac_hdmi_init_dai_map()
1202 static int hdac_hdmi_add_cvt(struct hdac_device *hdev, hda_nid_t nid) in hdac_hdmi_add_cvt() argument
1204 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_add_cvt()
1208 cvt = devm_kzalloc(&hdev->dev, sizeof(*cvt), GFP_KERNEL); in hdac_hdmi_add_cvt()
1214 cvt->name = devm_kstrdup(&hdev->dev, name, GFP_KERNEL); in hdac_hdmi_add_cvt()
1221 return hdac_hdmi_query_cvt_params(hdev, cvt); in hdac_hdmi_add_cvt()
1224 static int hdac_hdmi_parse_eld(struct hdac_device *hdev, in hdac_hdmi_parse_eld() argument
1233 dev_err_ratelimited(&hdev->dev, in hdac_hdmi_parse_eld()
1242 dev_err_ratelimited(&hdev->dev, in hdac_hdmi_parse_eld()
1255 struct hdac_device *hdev = pin->hdev; in hdac_hdmi_present_sense() local
1256 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_present_sense()
1275 size = snd_hdac_acomp_get_eld(hdev, pin->nid, port_id, in hdac_hdmi_present_sense()
1282 if (hdac_hdmi_parse_eld(hdev, port) < 0) in hdac_hdmi_present_sense()
1298 pcm = hdac_hdmi_get_pcm(hdev, port); in hdac_hdmi_present_sense()
1302 dev_dbg(&hdev->dev, "%s: disconnect for pin:port %d:%d\n", in hdac_hdmi_present_sense()
1338 static int hdac_hdmi_add_ports(struct hdac_device *hdev, in hdac_hdmi_add_ports() argument
1351 ports = devm_kcalloc(&hdev->dev, max_ports, sizeof(*ports), GFP_KERNEL); in hdac_hdmi_add_ports()
1365 static int hdac_hdmi_add_pin(struct hdac_device *hdev, hda_nid_t nid) in hdac_hdmi_add_pin() argument
1367 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_add_pin()
1371 pin = devm_kzalloc(&hdev->dev, sizeof(*pin), GFP_KERNEL); in hdac_hdmi_add_pin()
1377 pin->hdev = hdev; in hdac_hdmi_add_pin()
1378 ret = hdac_hdmi_add_ports(hdev, pin); in hdac_hdmi_add_pin()
1396 static void hdac_hdmi_skl_enable_all_pins(struct hdac_device *hdev) in hdac_hdmi_skl_enable_all_pins() argument
1399 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_skl_enable_all_pins()
1402 vendor_param = snd_hdac_codec_read(hdev, vendor_nid, 0, in hdac_hdmi_skl_enable_all_pins()
1408 vendor_param = snd_hdac_codec_read(hdev, vendor_nid, 0, in hdac_hdmi_skl_enable_all_pins()
1414 static void hdac_hdmi_skl_enable_dp12(struct hdac_device *hdev) in hdac_hdmi_skl_enable_dp12() argument
1417 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_skl_enable_dp12()
1420 vendor_param = snd_hdac_codec_read(hdev, vendor_nid, 0, in hdac_hdmi_skl_enable_dp12()
1427 vendor_param = snd_hdac_codec_read(hdev, vendor_nid, 0, in hdac_hdmi_skl_enable_dp12()
1445 static int hdac_hdmi_create_dais(struct hdac_device *hdev, in hdac_hdmi_create_dais() argument
1458 hdmi_dais = devm_kzalloc(&hdev->dev, in hdac_hdmi_create_dais()
1465 ret = snd_hdac_query_supported_pcm(hdev, cvt->nid, in hdac_hdmi_create_dais()
1477 hdmi_dais[i].name = devm_kstrdup(&hdev->dev, in hdac_hdmi_create_dais()
1485 devm_kstrdup(&hdev->dev, name, GFP_KERNEL); in hdac_hdmi_create_dais()
1514 static int hdac_hdmi_parse_and_map_nid(struct hdac_device *hdev, in hdac_hdmi_parse_and_map_nid() argument
1519 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_parse_and_map_nid()
1522 hdac_hdmi_skl_enable_all_pins(hdev); in hdac_hdmi_parse_and_map_nid()
1523 hdac_hdmi_skl_enable_dp12(hdev); in hdac_hdmi_parse_and_map_nid()
1525 num_nodes = snd_hdac_get_sub_nodes(hdev, hdev->afg, &nid); in hdac_hdmi_parse_and_map_nid()
1527 dev_warn(&hdev->dev, "HDMI: failed to get afg sub nodes\n"); in hdac_hdmi_parse_and_map_nid()
1535 caps = snd_hdac_get_wcaps(hdev, nid); in hdac_hdmi_parse_and_map_nid()
1544 ret = hdac_hdmi_add_cvt(hdev, nid); in hdac_hdmi_parse_and_map_nid()
1550 ret = hdac_hdmi_add_pin(hdev, nid); in hdac_hdmi_parse_and_map_nid()
1559 dev_err(&hdev->dev, "Bad pin/cvt setup in %s\n", __func__); in hdac_hdmi_parse_and_map_nid()
1563 ret = hdac_hdmi_create_dais(hdev, dais, hdmi, hdmi->num_cvt); in hdac_hdmi_parse_and_map_nid()
1565 dev_err(&hdev->dev, "Failed to create dais with err: %d\n", in hdac_hdmi_parse_and_map_nid()
1571 ret = hdac_hdmi_init_dai_map(hdev); in hdac_hdmi_parse_and_map_nid()
1573 dev_err(&hdev->dev, "Failed to init DAI map with err: %d\n", in hdac_hdmi_parse_and_map_nid()
1585 struct hdac_device *hdev = aptr; in hdac_hdmi_eld_notify_cb() local
1586 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_eld_notify_cb()
1595 dev_dbg(&hdev->dev, "%s: for pin:%d port=%d\n", __func__, in hdac_hdmi_eld_notify_cb()
1608 if (atomic_read(&hdev->in_pm)) in hdac_hdmi_eld_notify_cb()
1641 static void hdac_hdmi_present_sense_all_pins(struct hdac_device *hdev, in hdac_hdmi_present_sense_all_pins() argument
1650 if (hdac_hdmi_get_port_len(hdev, pin->nid) == 0) in hdac_hdmi_present_sense_all_pins()
1668 struct hdac_device *hdev = hdmi->hdev; in hdmi_codec_probe() local
1680 hlink = snd_hdac_ext_bus_get_hlink_by_name(hdev->bus, dev_name(&hdev->dev)); in hdmi_codec_probe()
1682 dev_err(&hdev->dev, "hdac link not found\n"); in hdmi_codec_probe()
1686 snd_hdac_ext_bus_link_get(hdev->bus, hlink); in hdmi_codec_probe()
1692 aops.audio_ptr = hdev; in hdmi_codec_probe()
1693 ret = snd_hdac_acomp_register_notifier(hdev->bus, &aops); in hdmi_codec_probe()
1695 dev_err(&hdev->dev, "notifier register failed: err: %d\n", ret); in hdmi_codec_probe()
1699 hdac_hdmi_present_sense_all_pins(hdev, hdmi, true); in hdmi_codec_probe()
1712 device_link_add(component->card->dev, &hdev->dev, DL_FLAG_RPM_ACTIVE | in hdmi_codec_probe()
1718 pm_runtime_enable(&hdev->dev); in hdmi_codec_probe()
1719 pm_runtime_put(&hdev->dev); in hdmi_codec_probe()
1720 pm_runtime_suspend(&hdev->dev); in hdmi_codec_probe()
1728 struct hdac_device *hdev = hdmi->hdev; in hdmi_codec_remove() local
1731 ret = snd_hdac_acomp_register_notifier(hdev->bus, NULL); in hdmi_codec_remove()
1733 dev_err(&hdev->dev, "notifier unregister failed: err: %d\n", in hdmi_codec_remove()
1736 pm_runtime_disable(&hdev->dev); in hdmi_codec_remove()
1741 struct hdac_device *hdev = dev_to_hdac_dev(dev); in hdmi_codec_resume() local
1742 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdmi_codec_resume()
1758 hdac_hdmi_present_sense_all_pins(hdev, hdmi, false); in hdmi_codec_resume()
1769 static void hdac_hdmi_get_chmap(struct hdac_device *hdev, int pcm_idx, in hdac_hdmi_get_chmap() argument
1772 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_get_chmap()
1778 static void hdac_hdmi_set_chmap(struct hdac_device *hdev, int pcm_idx, in hdac_hdmi_set_chmap() argument
1781 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_set_chmap()
1796 hdac_hdmi_setup_audio_infoframe(hdev, pcm, port); in hdac_hdmi_set_chmap()
1800 static bool is_hdac_hdmi_pcm_attached(struct hdac_device *hdev, int pcm_idx) in is_hdac_hdmi_pcm_attached() argument
1802 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in is_hdac_hdmi_pcm_attached()
1814 static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdev, int pcm_idx) in hdac_hdmi_get_spk_alloc() argument
1816 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in hdac_hdmi_get_spk_alloc()
1842 static int hdac_hdmi_dev_probe(struct hdac_device *hdev) in hdac_hdmi_dev_probe() argument
1849 struct hdac_driver *hdrv = drv_to_hdac_driver(hdev->dev.driver); in hdac_hdmi_dev_probe()
1850 const struct hda_device_id *hdac_id = hdac_get_device_id(hdev, hdrv); in hdac_hdmi_dev_probe()
1853 hlink = snd_hdac_ext_bus_get_hlink_by_name(hdev->bus, dev_name(&hdev->dev)); in hdac_hdmi_dev_probe()
1855 dev_err(&hdev->dev, "hdac link not found\n"); in hdac_hdmi_dev_probe()
1859 snd_hdac_ext_bus_link_get(hdev->bus, hlink); in hdac_hdmi_dev_probe()
1861 hdmi_priv = devm_kzalloc(&hdev->dev, sizeof(*hdmi_priv), GFP_KERNEL); in hdac_hdmi_dev_probe()
1865 snd_hdac_register_chmap_ops(hdev, &hdmi_priv->chmap); in hdac_hdmi_dev_probe()
1870 hdmi_priv->hdev = hdev; in hdac_hdmi_dev_probe()
1881 dev_set_drvdata(&hdev->dev, hdmi_priv); in hdac_hdmi_dev_probe()
1892 snd_hdac_display_power(hdev->bus, hdev->addr, true); in hdac_hdmi_dev_probe()
1894 ret = hdac_hdmi_parse_and_map_nid(hdev, &hdmi_dais, &num_dais); in hdac_hdmi_dev_probe()
1896 dev_err(&hdev->dev, in hdac_hdmi_dev_probe()
1900 snd_hdac_refresh_widgets(hdev); in hdac_hdmi_dev_probe()
1903 ret = devm_snd_soc_register_component(&hdev->dev, &hdmi_hda_codec, in hdac_hdmi_dev_probe()
1906 snd_hdac_ext_bus_link_put(hdev->bus, hlink); in hdac_hdmi_dev_probe()
1911 static void clear_dapm_works(struct hdac_device *hdev) in clear_dapm_works() argument
1913 struct hdac_hdmi_priv *hdmi = hdev_to_hdmi_priv(hdev); in clear_dapm_works()
1922 static int hdac_hdmi_dev_remove(struct hdac_device *hdev) in hdac_hdmi_dev_remove() argument
1924 clear_dapm_works(hdev); in hdac_hdmi_dev_remove()
1925 snd_hdac_display_power(hdev->bus, hdev->addr, false); in hdac_hdmi_dev_remove()
1932 struct hdac_device *hdev = dev_to_hdac_dev(dev); in hdac_hdmi_runtime_suspend() local
1933 struct hdac_bus *bus = hdev->bus; in hdac_hdmi_runtime_suspend()
1949 snd_hdac_codec_read(hdev, hdev->afg, 0, AC_VERB_SET_POWER_STATE, in hdac_hdmi_runtime_suspend()
1958 snd_hdac_codec_link_down(hdev); in hdac_hdmi_runtime_suspend()
1961 snd_hdac_display_power(bus, hdev->addr, false); in hdac_hdmi_runtime_suspend()
1968 struct hdac_device *hdev = dev_to_hdac_dev(dev); in hdac_hdmi_runtime_resume() local
1969 struct hdac_bus *bus = hdev->bus; in hdac_hdmi_runtime_resume()
1985 snd_hdac_codec_link_up(hdev); in hdac_hdmi_runtime_resume()
1987 snd_hdac_display_power(bus, hdev->addr, true); in hdac_hdmi_runtime_resume()
1989 hdac_hdmi_skl_enable_all_pins(hdev); in hdac_hdmi_runtime_resume()
1990 hdac_hdmi_skl_enable_dp12(hdev); in hdac_hdmi_runtime_resume()
1993 snd_hdac_codec_read(hdev, hdev->afg, 0, AC_VERB_SET_POWER_STATE, in hdac_hdmi_runtime_resume()