Lines Matching refs:bus
42 void snd_hdac_ext_bus_ppcap_enable(struct hdac_bus *bus, bool enable) in snd_hdac_ext_bus_ppcap_enable() argument
45 if (!bus->ppcap) { in snd_hdac_ext_bus_ppcap_enable()
46 dev_err(bus->dev, "Address of PP capability is NULL"); in snd_hdac_ext_bus_ppcap_enable()
51 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, AZX_PPCTL_GPROCEN); in snd_hdac_ext_bus_ppcap_enable()
53 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_GPROCEN, 0); in snd_hdac_ext_bus_ppcap_enable()
62 void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_bus *bus, bool enable) in snd_hdac_ext_bus_ppcap_int_enable() argument
65 if (!bus->ppcap) { in snd_hdac_ext_bus_ppcap_int_enable()
66 dev_err(bus->dev, "Address of PP capability is NULL\n"); in snd_hdac_ext_bus_ppcap_int_enable()
71 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, AZX_PPCTL_PIE); in snd_hdac_ext_bus_ppcap_int_enable()
73 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_PIE, 0); in snd_hdac_ext_bus_ppcap_int_enable()
90 int snd_hdac_ext_bus_get_ml_capabilities(struct hdac_bus *bus) in snd_hdac_ext_bus_get_ml_capabilities() argument
96 link_count = readl(bus->mlcap + AZX_REG_ML_MLCD) + 1; in snd_hdac_ext_bus_get_ml_capabilities()
98 dev_dbg(bus->dev, "In %s Link count: %d\n", __func__, link_count); in snd_hdac_ext_bus_get_ml_capabilities()
105 hlink->bus = bus; in snd_hdac_ext_bus_get_ml_capabilities()
106 hlink->ml_addr = bus->mlcap + AZX_ML_BASE + in snd_hdac_ext_bus_get_ml_capabilities()
114 list_add_tail(&hlink->list, &bus->hlink_list); in snd_hdac_ext_bus_get_ml_capabilities()
127 void snd_hdac_link_free_all(struct hdac_bus *bus) in snd_hdac_link_free_all() argument
131 while (!list_empty(&bus->hlink_list)) { in snd_hdac_link_free_all()
132 l = list_first_entry(&bus->hlink_list, struct hdac_ext_link, list); in snd_hdac_link_free_all()
144 struct hdac_ext_link *snd_hdac_ext_bus_get_link(struct hdac_bus *bus, in snd_hdac_ext_bus_get_link() argument
153 if (bus->idx != bus_idx) in snd_hdac_ext_bus_get_link()
156 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_get_link()
219 int snd_hdac_ext_bus_link_power_up_all(struct hdac_bus *bus) in snd_hdac_ext_bus_link_power_up_all() argument
224 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_link_power_up_all()
240 int snd_hdac_ext_bus_link_power_down_all(struct hdac_bus *bus) in snd_hdac_ext_bus_link_power_down_all() argument
245 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
261 mutex_lock(&bus->lock); in snd_hdac_ext_bus_link_get()
268 if (!bus->cmd_dma_state) { in snd_hdac_ext_bus_link_get()
269 snd_hdac_bus_init_cmd_io(bus); in snd_hdac_ext_bus_link_get()
270 bus->cmd_dma_state = true; in snd_hdac_ext_bus_link_get()
280 bus->codec_mask = snd_hdac_chip_readw(bus, STATESTS); in snd_hdac_ext_bus_link_get()
281 dev_dbg(bus->dev, "codec_mask = 0x%lx\n", bus->codec_mask); in snd_hdac_ext_bus_link_get()
282 snd_hdac_chip_writew(bus, STATESTS, bus->codec_mask); in snd_hdac_ext_bus_link_get()
285 mutex_unlock(&bus->lock); in snd_hdac_ext_bus_link_get()
290 int snd_hdac_ext_bus_link_put(struct hdac_bus *bus, in snd_hdac_ext_bus_link_put() argument
297 mutex_lock(&bus->lock); in snd_hdac_ext_bus_link_put()
310 list_for_each_entry(hlink, &bus->hlink_list, list) { in snd_hdac_ext_bus_link_put()
318 snd_hdac_bus_stop_cmd_io(bus); in snd_hdac_ext_bus_link_put()
319 bus->cmd_dma_state = false; in snd_hdac_ext_bus_link_put()
323 mutex_unlock(&bus->lock); in snd_hdac_ext_bus_link_put()