Lines Matching full:bus

20  * @bus: HD-audio core bus
29 static void snd_hdac_ext_stream_init(struct hdac_bus *bus, in snd_hdac_ext_stream_init() argument
33 if (bus->ppcap) { in snd_hdac_ext_stream_init()
34 hext_stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + in snd_hdac_ext_stream_init()
37 hext_stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + in snd_hdac_ext_stream_init()
38 AZX_PPLC_MULTI * bus->num_streams + in snd_hdac_ext_stream_init()
42 if (bus->spbcap) { in snd_hdac_ext_stream_init()
43 hext_stream->spib_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
47 hext_stream->fifo_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
52 if (bus->drsmcap) in snd_hdac_ext_stream_init()
53 hext_stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + in snd_hdac_ext_stream_init()
57 snd_hdac_stream_init(bus, &hext_stream->hstream, idx, direction, tag); in snd_hdac_ext_stream_init()
62 * for an extended hda bus
63 * @bus: HD-audio core bus
68 int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, in snd_hdac_ext_stream_init_all() argument
80 snd_hdac_ext_stream_init(bus, hext_stream, idx, dir, tag); in snd_hdac_ext_stream_init_all()
92 * @bus: HD-audio core bus
94 void snd_hdac_ext_stream_free_all(struct hdac_bus *bus) in snd_hdac_ext_stream_free_all() argument
99 list_for_each_entry_safe(s, _s, &bus->stream_list, list) { in snd_hdac_ext_stream_free_all()
101 snd_hdac_ext_stream_decouple(bus, hext_stream, false); in snd_hdac_ext_stream_free_all()
108 void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus, in snd_hdac_ext_stream_decouple_locked() argument
116 val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask; in snd_hdac_ext_stream_decouple_locked()
119 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask); in snd_hdac_ext_stream_decouple_locked()
121 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0); in snd_hdac_ext_stream_decouple_locked()
129 * @bus: HD-audio core bus
133 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, in snd_hdac_ext_stream_decouple() argument
136 spin_lock_irq(&bus->reg_lock); in snd_hdac_ext_stream_decouple()
137 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, decouple); in snd_hdac_ext_stream_decouple()
138 spin_unlock_irq(&bus->reg_lock); in snd_hdac_ext_stream_decouple()
251 hdac_ext_link_stream_assign(struct hdac_bus *bus, in hdac_ext_link_stream_assign() argument
257 if (!bus->ppcap) { in hdac_ext_link_stream_assign()
258 dev_err(bus->dev, "stream type not supported\n"); in hdac_ext_link_stream_assign()
262 spin_lock_irq(&bus->reg_lock); in hdac_ext_link_stream_assign()
263 list_for_each_entry(hstream, &bus->stream_list, list) { in hdac_ext_link_stream_assign()
278 snd_hdac_ext_stream_decouple_locked(bus, res, true); in hdac_ext_link_stream_assign()
282 spin_unlock_irq(&bus->reg_lock); in hdac_ext_link_stream_assign()
287 hdac_ext_host_stream_assign(struct hdac_bus *bus, in hdac_ext_host_stream_assign() argument
293 if (!bus->ppcap) { in hdac_ext_host_stream_assign()
294 dev_err(bus->dev, "stream type not supported\n"); in hdac_ext_host_stream_assign()
298 spin_lock_irq(&bus->reg_lock); in hdac_ext_host_stream_assign()
299 list_for_each_entry(hstream, &bus->stream_list, list) { in hdac_ext_host_stream_assign()
312 snd_hdac_ext_stream_decouple_locked(bus, res, true); in hdac_ext_host_stream_assign()
317 spin_unlock_irq(&bus->reg_lock); in hdac_ext_host_stream_assign()
324 * @bus: HD-audio core bus
339 struct hdac_ext_stream *snd_hdac_ext_stream_assign(struct hdac_bus *bus, in snd_hdac_ext_stream_assign() argument
348 hstream = snd_hdac_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
356 return hdac_ext_host_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
359 return hdac_ext_link_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
376 struct hdac_bus *bus = hext_stream->hstream.bus; in snd_hdac_ext_stream_release() local
384 spin_lock_irq(&bus->reg_lock); in snd_hdac_ext_stream_release()
387 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); in snd_hdac_ext_stream_release()
389 spin_unlock_irq(&bus->reg_lock); in snd_hdac_ext_stream_release()
393 spin_lock_irq(&bus->reg_lock); in snd_hdac_ext_stream_release()
396 snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); in snd_hdac_ext_stream_release()
399 spin_unlock_irq(&bus->reg_lock); in snd_hdac_ext_stream_release()
403 dev_dbg(bus->dev, "Invalid type %d\n", type); in snd_hdac_ext_stream_release()
411 * @bus: HD-audio core bus
415 void snd_hdac_ext_stream_spbcap_enable(struct hdac_bus *bus, in snd_hdac_ext_stream_spbcap_enable() argument
420 if (!bus->spbcap) { in snd_hdac_ext_stream_spbcap_enable()
421 dev_err(bus->dev, "Address of SPB capability is NULL\n"); in snd_hdac_ext_stream_spbcap_enable()
428 snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, mask, mask); in snd_hdac_ext_stream_spbcap_enable()
430 snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, mask, 0); in snd_hdac_ext_stream_spbcap_enable()
436 * @bus: HD-audio core bus
440 int snd_hdac_ext_stream_set_spib(struct hdac_bus *bus, in snd_hdac_ext_stream_set_spib() argument
444 if (!bus->spbcap) { in snd_hdac_ext_stream_set_spib()
445 dev_err(bus->dev, "Address of SPB capability is NULL\n"); in snd_hdac_ext_stream_set_spib()
457 * @bus: HD-audio core bus
462 int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_bus *bus, in snd_hdac_ext_stream_get_spbmaxfifo() argument
466 if (!bus->spbcap) { in snd_hdac_ext_stream_get_spbmaxfifo()
467 dev_err(bus->dev, "Address of SPB capability is NULL\n"); in snd_hdac_ext_stream_get_spbmaxfifo()
477 * @bus: HD-audio core bus
481 void snd_hdac_ext_stream_drsm_enable(struct hdac_bus *bus, in snd_hdac_ext_stream_drsm_enable() argument
486 if (!bus->drsmcap) { in snd_hdac_ext_stream_drsm_enable()
487 dev_err(bus->dev, "Address of DRSM capability is NULL\n"); in snd_hdac_ext_stream_drsm_enable()
494 snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, mask); in snd_hdac_ext_stream_drsm_enable()
496 snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, 0); in snd_hdac_ext_stream_drsm_enable()
502 * @bus: HD-audio core bus
506 int snd_hdac_ext_stream_set_dpibr(struct hdac_bus *bus, in snd_hdac_ext_stream_set_dpibr() argument
510 if (!bus->drsmcap) { in snd_hdac_ext_stream_set_dpibr()
511 dev_err(bus->dev, "Address of DRSM capability is NULL\n"); in snd_hdac_ext_stream_set_dpibr()