Lines Matching full:bus
20 * @bus: HD-audio core bus
29 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 stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + in snd_hdac_ext_stream_init()
37 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 stream->spib_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
47 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 stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + in snd_hdac_ext_stream_init()
57 snd_hdac_stream_init(bus, &stream->hstream, idx, direction, tag); in snd_hdac_ext_stream_init()
63 * for an extended hda bus
64 * @bus: HD-audio core bus
69 int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, in snd_hdac_ext_stream_init_all() argument
81 snd_hdac_ext_stream_init(bus, stream, idx, dir, tag); in snd_hdac_ext_stream_init_all()
93 * @bus: HD-audio core bus
95 void snd_hdac_stream_free_all(struct hdac_bus *bus) in snd_hdac_stream_free_all() argument
100 list_for_each_entry_safe(s, _s, &bus->stream_list, list) { in snd_hdac_stream_free_all()
102 snd_hdac_ext_stream_decouple(bus, stream, false); in snd_hdac_stream_free_all()
111 * @bus: HD-audio core bus
115 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, in snd_hdac_ext_stream_decouple() argument
122 spin_lock_irq(&bus->reg_lock); in snd_hdac_ext_stream_decouple()
123 val = readw(bus->ppcap + AZX_REG_PP_PPCTL) & mask; in snd_hdac_ext_stream_decouple()
126 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, mask); in snd_hdac_ext_stream_decouple()
128 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0); in snd_hdac_ext_stream_decouple()
131 spin_unlock_irq(&bus->reg_lock); in snd_hdac_ext_stream_decouple()
244 hdac_ext_link_stream_assign(struct hdac_bus *bus, in hdac_ext_link_stream_assign() argument
250 if (!bus->ppcap) { in hdac_ext_link_stream_assign()
251 dev_err(bus->dev, "stream type not supported\n"); in hdac_ext_link_stream_assign()
255 list_for_each_entry(stream, &bus->stream_list, list) { in hdac_ext_link_stream_assign()
269 snd_hdac_ext_stream_decouple(bus, hstream, true); in hdac_ext_link_stream_assign()
275 spin_lock_irq(&bus->reg_lock); in hdac_ext_link_stream_assign()
278 spin_unlock_irq(&bus->reg_lock); in hdac_ext_link_stream_assign()
284 hdac_ext_host_stream_assign(struct hdac_bus *bus, in hdac_ext_host_stream_assign() argument
290 if (!bus->ppcap) { in hdac_ext_host_stream_assign()
291 dev_err(bus->dev, "stream type not supported\n"); in hdac_ext_host_stream_assign()
295 list_for_each_entry(stream, &bus->stream_list, list) { in hdac_ext_host_stream_assign()
304 snd_hdac_ext_stream_decouple(bus, hstream, true); in hdac_ext_host_stream_assign()
310 spin_lock_irq(&bus->reg_lock); in hdac_ext_host_stream_assign()
314 spin_unlock_irq(&bus->reg_lock); in hdac_ext_host_stream_assign()
322 * @bus: HD-audio core bus
337 struct hdac_ext_stream *snd_hdac_ext_stream_assign(struct hdac_bus *bus, in snd_hdac_ext_stream_assign() argument
346 stream = snd_hdac_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
353 return hdac_ext_host_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
356 return hdac_ext_link_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
373 struct hdac_bus *bus = stream->hstream.bus; in snd_hdac_ext_stream_release() local
382 snd_hdac_ext_stream_decouple(bus, stream, false); in snd_hdac_ext_stream_release()
388 snd_hdac_ext_stream_decouple(bus, stream, false); in snd_hdac_ext_stream_release()
389 spin_lock_irq(&bus->reg_lock); in snd_hdac_ext_stream_release()
392 spin_unlock_irq(&bus->reg_lock); in snd_hdac_ext_stream_release()
396 dev_dbg(bus->dev, "Invalid type %d\n", type); in snd_hdac_ext_stream_release()
404 * @bus: HD-audio core bus
408 void snd_hdac_ext_stream_spbcap_enable(struct hdac_bus *bus, in snd_hdac_ext_stream_spbcap_enable() argument
413 if (!bus->spbcap) { in snd_hdac_ext_stream_spbcap_enable()
414 dev_err(bus->dev, "Address of SPB capability is NULL\n"); in snd_hdac_ext_stream_spbcap_enable()
421 snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, mask, mask); in snd_hdac_ext_stream_spbcap_enable()
423 snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, mask, 0); in snd_hdac_ext_stream_spbcap_enable()
429 * @bus: HD-audio core bus
433 int snd_hdac_ext_stream_set_spib(struct hdac_bus *bus, in snd_hdac_ext_stream_set_spib() argument
437 if (!bus->spbcap) { in snd_hdac_ext_stream_set_spib()
438 dev_err(bus->dev, "Address of SPB capability is NULL\n"); in snd_hdac_ext_stream_set_spib()
450 * @bus: HD-audio core bus
455 int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_bus *bus, in snd_hdac_ext_stream_get_spbmaxfifo() argument
459 if (!bus->spbcap) { in snd_hdac_ext_stream_get_spbmaxfifo()
460 dev_err(bus->dev, "Address of SPB capability is NULL\n"); in snd_hdac_ext_stream_get_spbmaxfifo()
471 * @bus: HD-audio core bus
473 void snd_hdac_ext_stop_streams(struct hdac_bus *bus) in snd_hdac_ext_stop_streams() argument
477 if (bus->chip_init) { in snd_hdac_ext_stop_streams()
478 list_for_each_entry(stream, &bus->stream_list, list) in snd_hdac_ext_stop_streams()
480 snd_hdac_bus_stop_chip(bus); in snd_hdac_ext_stop_streams()
487 * @bus: HD-audio core bus
491 void snd_hdac_ext_stream_drsm_enable(struct hdac_bus *bus, in snd_hdac_ext_stream_drsm_enable() argument
496 if (!bus->drsmcap) { in snd_hdac_ext_stream_drsm_enable()
497 dev_err(bus->dev, "Address of DRSM capability is NULL\n"); in snd_hdac_ext_stream_drsm_enable()
504 snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, mask); in snd_hdac_ext_stream_drsm_enable()
506 snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, 0); in snd_hdac_ext_stream_drsm_enable()
512 * @bus: HD-audio core bus
516 int snd_hdac_ext_stream_set_dpibr(struct hdac_bus *bus, in snd_hdac_ext_stream_set_dpibr() argument
520 if (!bus->drsmcap) { in snd_hdac_ext_stream_set_dpibr()
521 dev_err(bus->dev, "Address of DRSM capability is NULL\n"); in snd_hdac_ext_stream_set_dpibr()
533 * @bus: HD-audio core bus