Lines Matching refs:hdev

148 	struct hdac_device *hdev = &codec->core;  in hda_codec_probe_complete()  local
149 struct hdac_bus *bus = hdev->bus; in hda_codec_probe_complete()
154 dev_err(&hdev->dev, "unable to create controls %d\n", ret); in hda_codec_probe_complete()
159 pm_runtime_set_active(&hdev->dev); in hda_codec_probe_complete()
176 struct hdac_device *hdev = &codec->core; in hda_codec_probe() local
177 struct hdac_bus *bus = hdev->bus; in hda_codec_probe()
182 WARN_ON(atomic_read(&hdev->dev.power.usage_count) != 1 || in hda_codec_probe()
183 !pm_runtime_status_suspended(&hdev->dev)); in hda_codec_probe()
186 hlink = snd_hdac_ext_bus_get_hlink_by_addr(bus, hdev->addr); in hda_codec_probe()
188 dev_err(&hdev->dev, "hdac link not found\n"); in hda_codec_probe()
194 snd_hdac_display_power(bus, hdev->addr, true); in hda_codec_probe()
197 ret = snd_hda_codec_device_new(codec->bus, component->card->snd_card, hdev->addr, codec, in hda_codec_probe()
200 dev_err(&hdev->dev, "codec create failed: %d\n", ret); in hda_codec_probe()
206 dev_err(&hdev->dev, "set name: %s failed: %d\n", codec->preset->name, ret); in hda_codec_probe()
212 dev_err(&hdev->dev, "regmap init failed: %d\n", ret); in hda_codec_probe()
223 dev_err(&hdev->dev, "codec init failed: %d\n", ret); in hda_codec_probe()
229 dev_err(&hdev->dev, "unable to map pcms to dai: %d\n", ret); in hda_codec_probe()
235 dev_err(&hdev->dev, "update dais failed: %d\n", ret); in hda_codec_probe()
258 snd_hdac_display_power(bus, hdev->addr, false); in hda_codec_probe()
271 struct hdac_device *hdev = &codec->core; in hda_codec_remove() local
272 struct hdac_bus *bus = hdev->bus; in hda_codec_remove()
277 pm_runtime_forbid(&hdev->dev); in hda_codec_remove()
285 pm_runtime_put_noidle(&hdev->dev); in hda_codec_remove()
287 pm_runtime_set_suspended(&hdev->dev); in hda_codec_remove()
290 snd_hdac_display_power(bus, hdev->addr, false); in hda_codec_remove()
292 hlink = snd_hdac_ext_bus_get_hlink_by_addr(bus, hdev->addr); in hda_codec_remove()
304 WARN_ON(atomic_read(&hdev->dev.power.usage_count) != 1 || in hda_codec_remove()
305 !pm_runtime_status_suspended(&hdev->dev)); in hda_codec_remove()
344 static int hda_hdev_attach(struct hdac_device *hdev) in hda_hdev_attach() argument
346 struct hda_codec *codec = dev_to_hda_codec(&hdev->dev); in hda_hdev_attach()
349 if (hda_codec_is_display(codec) && !hdev->bus->audio_component) { in hda_hdev_attach()
350 dev_dbg(&hdev->dev, "no i915, skip registration for 0x%08x\n", hdev->vendor_id); in hda_hdev_attach()
354 comp_drv = devm_kzalloc(&hdev->dev, sizeof(*comp_drv), GFP_KERNEL); in hda_hdev_attach()
362 comp_drv->name = dev_name(&hdev->dev); in hda_hdev_attach()
373 return snd_soc_register_component(&hdev->dev, comp_drv, &card_binder_dai, 1); in hda_hdev_attach()
376 static int hda_hdev_detach(struct hdac_device *hdev) in hda_hdev_detach() argument
378 struct hda_codec *codec = dev_to_hda_codec(&hdev->dev); in hda_hdev_detach()
383 snd_soc_unregister_component(&hdev->dev); in hda_hdev_detach()