Lines Matching refs:bus
34 void snd_hdac_ext_bus_ppcap_enable(struct hdac_bus *bus, bool enable) in snd_hdac_ext_bus_ppcap_enable() argument
37 if (!bus->ppcap) { in snd_hdac_ext_bus_ppcap_enable()
38 dev_err(bus->dev, "Address of PP capability is NULL"); in snd_hdac_ext_bus_ppcap_enable()
43 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, in snd_hdac_ext_bus_ppcap_enable()
46 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, in snd_hdac_ext_bus_ppcap_enable()
56 void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_bus *bus, bool enable) in snd_hdac_ext_bus_ppcap_int_enable() argument
59 if (!bus->ppcap) { in snd_hdac_ext_bus_ppcap_int_enable()
60 dev_err(bus->dev, "Address of PP capability is NULL\n"); in snd_hdac_ext_bus_ppcap_int_enable()
65 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, in snd_hdac_ext_bus_ppcap_int_enable()
68 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, in snd_hdac_ext_bus_ppcap_int_enable()
86 int snd_hdac_ext_bus_get_ml_capabilities(struct hdac_bus *bus) in snd_hdac_ext_bus_get_ml_capabilities() argument
92 link_count = readl(bus->mlcap + AZX_REG_ML_MLCD) + 1; in snd_hdac_ext_bus_get_ml_capabilities()
94 dev_dbg(bus->dev, "In %s Link count: %d\n", __func__, link_count); in snd_hdac_ext_bus_get_ml_capabilities()
101 hlink->bus = bus; in snd_hdac_ext_bus_get_ml_capabilities()
102 hlink->ml_addr = bus->mlcap + AZX_ML_BASE + in snd_hdac_ext_bus_get_ml_capabilities()
110 list_add_tail(&hlink->list, &bus->hlink_list); in snd_hdac_ext_bus_get_ml_capabilities()
123 void snd_hdac_link_free_all(struct hdac_bus *bus) in snd_hdac_link_free_all() argument
127 while (!list_empty(&bus->hlink_list)) { in snd_hdac_link_free_all()
128 l = list_first_entry(&bus->hlink_list, struct hdac_ext_link, list); in snd_hdac_link_free_all()
140 struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus, in snd_hdac_ext_bus_get_link() argument
149 if (bus->idx != bus_idx) in snd_hdac_ext_bus_get_link()
154 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_get_link()
218 int snd_hdac_ext_bus_link_power_up_all(struct hdac_bus *bus) in snd_hdac_ext_bus_link_power_up_all() argument
223 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_link_power_up_all()
239 int snd_hdac_ext_bus_link_power_down_all(struct hdac_bus *bus) in snd_hdac_ext_bus_link_power_down_all() argument
244 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_link_power_down_all()
256 int snd_hdac_ext_bus_link_get(struct hdac_bus *bus, in snd_hdac_ext_bus_link_get() argument
262 mutex_lock(&bus->lock); in snd_hdac_ext_bus_link_get()
269 if (!bus->cmd_dma_state) { in snd_hdac_ext_bus_link_get()
270 snd_hdac_bus_init_cmd_io(bus); in snd_hdac_ext_bus_link_get()
271 bus->cmd_dma_state = true; in snd_hdac_ext_bus_link_get()
286 codec_mask = snd_hdac_chip_readw(bus, STATESTS); in snd_hdac_ext_bus_link_get()
287 dev_dbg(bus->dev, "codec_mask = 0x%lx\n", codec_mask); in snd_hdac_ext_bus_link_get()
288 snd_hdac_chip_writew(bus, STATESTS, codec_mask); in snd_hdac_ext_bus_link_get()
289 if (!bus->codec_mask) in snd_hdac_ext_bus_link_get()
290 bus->codec_mask = codec_mask; in snd_hdac_ext_bus_link_get()
293 mutex_unlock(&bus->lock); in snd_hdac_ext_bus_link_get()
298 int snd_hdac_ext_bus_link_put(struct hdac_bus *bus, in snd_hdac_ext_bus_link_put() argument
305 mutex_lock(&bus->lock); in snd_hdac_ext_bus_link_put()
318 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_link_put()
326 snd_hdac_bus_stop_cmd_io(bus); in snd_hdac_ext_bus_link_put()
327 bus->cmd_dma_state = false; in snd_hdac_ext_bus_link_put()
331 mutex_unlock(&bus->lock); in snd_hdac_ext_bus_link_put()
340 snd_hdac_ext_bus_get_link(codec->bus, devname); in hdac_ext_codec_link_up()
343 snd_hdac_ext_bus_link_get(codec->bus, hlink); in hdac_ext_codec_link_up()
350 snd_hdac_ext_bus_get_link(codec->bus, devname); in hdac_ext_codec_link_down()
353 snd_hdac_ext_bus_link_put(codec->bus, hlink); in hdac_ext_codec_link_down()
358 struct hdac_bus *bus = codec->bus; in snd_hdac_ext_bus_link_power() local
359 bool oldstate = test_bit(codec->addr, &bus->codec_powered); in snd_hdac_ext_bus_link_power()