Lines Matching defs:codec
142 * @res_ex: codec addr and flags (upper 32bit or RIRB entry)
172 struct hdac_device *codec;
185 codec = bus->caddr_tbl[caddr & 0x0f];
186 if (!codec || !codec->registered)
189 drv = drv_to_hdac_driver(codec->dev.driver);
191 drv->unsol_event(codec, res);
198 * snd_hdac_bus_add_device - Add a codec to bus
200 * @codec: HDA core device to add
202 * Adds the given codec to the list in the bus. The caddr_tbl array
206 int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec)
208 if (bus->caddr_tbl[codec->addr]) {
210 codec->addr);
214 list_add_tail(&codec->list, &bus->codec_list);
215 bus->caddr_tbl[codec->addr] = codec;
216 set_bit(codec->addr, &bus->codec_powered);
222 * snd_hdac_bus_remove_device - Remove a codec from bus
224 * @codec: HDA core device to remove
227 struct hdac_device *codec)
229 WARN_ON(bus != codec->bus);
230 if (list_empty(&codec->list))
232 list_del_init(&codec->list);
233 bus->caddr_tbl[codec->addr] = NULL;
234 clear_bit(codec->addr, &bus->codec_powered);
269 void snd_hdac_codec_link_up(struct hdac_device *codec)
271 struct hdac_bus *bus = codec->bus;
274 bus->ops->link_power(codec, true);
276 snd_hdac_bus_link_power(codec, true);
280 void snd_hdac_codec_link_down(struct hdac_device *codec)
282 struct hdac_bus *bus = codec->bus;
285 bus->ops->link_power(codec, false);
287 snd_hdac_bus_link_power(codec, false);