Lines Matching refs:codec
29 static int request_codec_module(struct hda_codec *codec) in request_codec_module() argument
35 switch (codec->probe_id) { 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()
52 return device_attach(hda_codec_dev(codec)); in request_codec_module()
55 static int hda_codec_load_module(struct hda_codec *codec) in hda_codec_load_module() argument
59 ret = snd_hdac_device_register(&codec->core); in hda_codec_load_module()
61 dev_err(&codec->core.dev, "failed to register hdac device\n"); in hda_codec_load_module()
62 put_device(&codec->core.dev); in hda_codec_load_module()
66 ret = request_codec_module(codec); in hda_codec_load_module()
68 codec->probe_id = HDA_CODEC_ID_GENERIC; in hda_codec_load_module()
69 ret = request_codec_module(codec); in hda_codec_load_module()
80 struct hda_codec *codec; in hda_codec_jack_wake_enable() local
84 list_for_each_codec(codec, hbus) in hda_codec_jack_wake_enable()
85 if (codec->jacktbl.used) in hda_codec_jack_wake_enable()
86 mask |= BIT(codec->core.addr); in hda_codec_jack_wake_enable()
96 struct hda_codec *codec; in hda_codec_jack_check() local
98 list_for_each_codec(codec, hbus) in hda_codec_jack_check()
103 if (codec->jacktbl.used) in hda_codec_jack_check()
104 pm_request_resume(&codec->core.dev); in hda_codec_jack_check()
122 struct hda_codec *codec; in hda_codec_device_init() local
124 codec = snd_hda_codec_device_init(to_hda_bus(bus), addr, "ehdaudio%dD%d", bus->idx, addr); in hda_codec_device_init()
125 if (IS_ERR(codec)) { in hda_codec_device_init()
127 return codec; in hda_codec_device_init()
130 codec->core.type = type; in hda_codec_device_init()
132 return codec; in hda_codec_device_init()
144 struct hda_codec *codec; in hda_codec_probe() local
171 codec = hda_codec_device_init(&hbus->core, address, type); in hda_codec_probe()
172 ret = PTR_ERR_OR_ZERO(codec); 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()
190 codec->probe_id = HDA_CODEC_ID_GENERIC; in hda_codec_probe()
192 codec->probe_id = 0; in hda_codec_probe()
195 ret = hda_codec_load_module(codec); 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()
211 ret = PTR_ERR_OR_ZERO(codec); in hda_codec_probe()