Lines Matching defs:dev

37 static int codec_exec_verb(struct hdac_device *dev, unsigned int cmd,
40 struct hda_codec *codec = container_of(dev, struct hda_codec, core);
851 static void snd_hda_codec_dev_release(struct device *dev)
853 struct hda_codec *codec = dev_to_hda_codec(dev);
878 dev_dbg(card->dev, "%s: entry\n", __func__);
935 dev_dbg(card->dev, "%s: entry\n", __func__);
942 codec->core.dev.release = snd_hda_codec_dev_release;
989 codec->core.dev.power.power_state = PMSG_ON;
1004 pm_runtime_forbid(&codec->core.dev);
1603 find_mixer_ctl(struct hda_codec *codec, const char *name, int dev, int idx)
1608 id.device = dev;
2936 codec->core.dev.power.power_state = PMSG_ON;
2940 static int hda_codec_runtime_suspend(struct device *dev)
2942 struct hda_codec *codec = dev_to_hda_codec(dev);
2959 static int hda_codec_runtime_resume(struct device *dev)
2961 struct hda_codec *codec = dev_to_hda_codec(dev);
2970 pm_runtime_mark_last_busy(dev);
2977 static int hda_codec_pm_prepare(struct device *dev)
2979 dev->power.power_state = PMSG_SUSPEND;
2980 return pm_runtime_suspended(dev);
2983 static void hda_codec_pm_complete(struct device *dev)
2985 struct hda_codec *codec = dev_to_hda_codec(dev);
2988 if (dev->power.power_state.event == PM_EVENT_SUSPEND)
2989 dev->power.power_state = PMSG_RESUME;
2991 if (pm_runtime_suspended(dev) && (codec->jackpoll_interval ||
2993 pm_request_resume(dev);
2996 static int hda_codec_pm_suspend(struct device *dev)
2998 dev->power.power_state = PMSG_SUSPEND;
2999 return pm_runtime_force_suspend(dev);
3002 static int hda_codec_pm_resume(struct device *dev)
3004 dev->power.power_state = PMSG_RESUME;
3005 return pm_runtime_force_resume(dev);
3008 static int hda_codec_pm_freeze(struct device *dev)
3010 dev->power.power_state = PMSG_FREEZE;
3011 return pm_runtime_force_suspend(dev);
3014 static int hda_codec_pm_thaw(struct device *dev)
3016 dev->power.power_state = PMSG_THAW;
3017 return pm_runtime_force_resume(dev);
3020 static int hda_codec_pm_restore(struct device *dev)
3022 dev->power.power_state = PMSG_RESTORE;
3023 return pm_runtime_force_resume(dev);
3233 /* assigned to static slots up to dev#10; if more needed, assign
3245 dev_err(bus->card->dev, "Invalid PCM type %d\n", type);
3266 dev_warn(bus->card->dev, "Too many %s devices\n",
3269 dev_warn(bus->card->dev,
3321 int dev, err;
3334 dev = get_empty_pcm_device(bus, cpcm->pcm_type);
3335 if (dev < 0) {
3339 cpcm->device = dev;
3344 dev, codec->core.addr);
3405 struct device *dev = hda_codec_dev(codec);
3411 pm_runtime_set_autosuspend_delay(dev, delay);
3412 pm_runtime_use_autosuspend(dev);
3413 pm_runtime_allow(dev);
3414 if (!pm_runtime_suspended(dev))
3415 pm_runtime_mark_last_busy(dev);
3417 pm_runtime_dont_use_autosuspend(dev);
3418 pm_runtime_forbid(dev);