Lines Matching +full:dual +full:- +full:core
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
3 // This file is provided under a dual BSD/GPLv2 license. When using or
35 switch (codec->probe_id) { in request_codec_module()
38 mod = "snd-hda-codec-generic"; in request_codec_module()
42 snd_hdac_codec_modalias(&codec->core, alias, sizeof(alias)); in request_codec_module()
48 dev_dbg(&codec->core.dev, "loading codec module: %s\n", mod); in request_codec_module()
60 codec->probe_id = HDA_CODEC_ID_GENERIC; in hda_codec_load_module()
77 if (codec->jacktbl.used) in hda_codec_jack_wake_enable()
78 mask |= BIT(codec->core.addr); in hda_codec_jack_wake_enable()
92 * Wake up all jack-detecting codecs regardless whether an event in hda_codec_jack_check()
95 if (codec->jacktbl.used) in hda_codec_jack_check()
96 pm_request_resume(&codec->core.dev); in hda_codec_jack_check()
107 ((bus)->modelname && !strcmp((bus)->modelname, "generic"))
117 codec = snd_hda_codec_device_init(to_hda_bus(bus), addr, "ehdaudio%dD%d", bus->idx, addr); in hda_codec_device_init()
119 dev_err(bus->dev, "device init failed for hdac device\n"); in hda_codec_device_init()
123 codec->core.type = type; in hda_codec_device_init()
125 ret = snd_hdac_device_register(&codec->core); in hda_codec_device_init()
127 dev_err(bus->dev, "failed to register hdac device\n"); in hda_codec_device_init()
128 put_device(&codec->core.dev); in hda_codec_device_init()
147 u32 resp = -1; in hda_codec_probe()
151 mutex_lock(&hbus->core.cmd_mutex); in hda_codec_probe()
152 snd_hdac_bus_send_cmd(&hbus->core, hda_cmd); in hda_codec_probe()
153 snd_hdac_bus_get_response(&hbus->core, address, &resp); in hda_codec_probe()
154 mutex_unlock(&hbus->core.cmd_mutex); in hda_codec_probe()
155 } while (resp == -1 && retry++ < CODEC_PROBE_RETRIES); in hda_codec_probe()
157 if (resp == -1) in hda_codec_probe()
158 return -EIO; in hda_codec_probe()
159 dev_dbg(sdev->dev, "HDA codec #%d probed OK: response: %x\n", in hda_codec_probe()
163 hda_priv = devm_kzalloc(sdev->dev, sizeof(*hda_priv), GFP_KERNEL); in hda_codec_probe()
165 return -ENOMEM; in hda_codec_probe()
167 /* only probe ASoC codec drivers for HDAC-HDMI */ in hda_codec_probe()
171 codec = hda_codec_device_init(&hbus->core, address, type); in hda_codec_probe()
176 hda_priv->codec = codec; in hda_codec_probe()
177 dev_set_drvdata(&codec->core.dev, hda_priv); in hda_codec_probe()
180 if (!hbus->core.audio_component) { in hda_codec_probe()
181 dev_dbg(sdev->dev, in hda_codec_probe()
183 ret = -ENOENT; in hda_codec_probe()
186 hda_priv->need_display_power = true; in hda_codec_probe()
190 codec->probe_id = HDA_CODEC_ID_GENERIC; in hda_codec_probe()
192 codec->probe_id = 0; in hda_codec_probe()
201 ret = -ENOENT; in hda_codec_probe()
206 snd_hdac_device_unregister(&codec->core); in hda_codec_probe()
207 put_device(&codec->core.dev); in hda_codec_probe()
210 codec = hda_codec_device_init(&hbus->core, address, HDA_DEV_ASOC); in hda_codec_probe()
227 if (!(bus->codec_mask & (1 << i))) in hda_codec_probe_bus()
232 dev_warn(bus->dev, "codec #%d probe error, ret: %d\n", in hda_codec_probe_bus()
234 bus->codec_mask &= ~BIT(i); in hda_codec_probe_bus()
247 if (HDA_IDISP_CODEC(bus->codec_mask)) { in hda_codec_i915_display_power()
248 dev_dbg(bus->dev, "Turning i915 HDAC power %d\n", enable); in hda_codec_i915_display_power()
275 if (!bus->audio_component) in hda_codec_i915_exit()
287 MODULE_LICENSE("Dual BSD/GPL");