Lines Matching refs:stream
30 struct hdac_ext_stream *stream, in snd_hdac_ext_stream_init() argument
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()
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()
53 stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + in snd_hdac_ext_stream_init()
56 stream->decoupled = false; in snd_hdac_ext_stream_init()
57 snd_hdac_stream_init(bus, &stream->hstream, idx, direction, tag); in snd_hdac_ext_stream_init()
76 struct hdac_ext_stream *stream = in snd_hdac_ext_stream_init_all() local
77 kzalloc(sizeof(*stream), GFP_KERNEL); in snd_hdac_ext_stream_init_all()
78 if (!stream) in snd_hdac_ext_stream_init_all()
81 snd_hdac_ext_stream_init(bus, stream, idx, dir, tag); in snd_hdac_ext_stream_init_all()
98 struct hdac_ext_stream *stream; in snd_hdac_stream_free_all() local
101 stream = stream_to_hdac_ext_stream(s); in snd_hdac_stream_free_all()
102 snd_hdac_ext_stream_decouple(bus, stream, false); in snd_hdac_stream_free_all()
104 kfree(stream); in snd_hdac_stream_free_all()
116 struct hdac_ext_stream *stream, bool decouple) in snd_hdac_ext_stream_decouple() argument
118 struct hdac_stream *hstream = &stream->hstream; in snd_hdac_ext_stream_decouple()
130 stream->decoupled = decouple; in snd_hdac_ext_stream_decouple()
139 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *stream) in snd_hdac_ext_link_stream_start() argument
141 snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, in snd_hdac_ext_link_stream_start()
150 void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *stream) in snd_hdac_ext_link_stream_clear() argument
152 snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, AZX_PPLCCTL_RUN, 0); in snd_hdac_ext_link_stream_clear()
160 void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *stream) in snd_hdac_ext_link_stream_reset() argument
165 snd_hdac_ext_link_stream_clear(stream); in snd_hdac_ext_link_stream_reset()
167 snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, in snd_hdac_ext_link_stream_reset()
172 val = readl(stream->pplc_addr + AZX_REG_PPLCCTL) & in snd_hdac_ext_link_stream_reset()
179 writel(val, stream->pplc_addr + AZX_REG_PPLCCTL); in snd_hdac_ext_link_stream_reset()
185 val = readl(stream->pplc_addr + AZX_REG_PPLCCTL) & AZX_PPLCCTL_STRST; in snd_hdac_ext_link_stream_reset()
199 int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *stream, int fmt) in snd_hdac_ext_link_stream_setup() argument
201 struct hdac_stream *hstream = &stream->hstream; in snd_hdac_ext_link_stream_setup()
205 snd_hdac_ext_link_stream_clear(stream); in snd_hdac_ext_link_stream_setup()
207 val = readl(stream->pplc_addr + AZX_REG_PPLCCTL); in snd_hdac_ext_link_stream_setup()
210 writel(val, stream->pplc_addr + AZX_REG_PPLCCTL); in snd_hdac_ext_link_stream_setup()
213 writew(fmt, stream->pplc_addr + AZX_REG_PPLCFMT); in snd_hdac_ext_link_stream_setup()
225 int stream) in snd_hdac_ext_link_set_stream_id() argument
227 snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 1 << stream); in snd_hdac_ext_link_set_stream_id()
237 int stream) in snd_hdac_ext_link_clear_stream_id() argument
239 snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 0); in snd_hdac_ext_link_clear_stream_id()
248 struct hdac_stream *stream = NULL; in hdac_ext_link_stream_assign() local
255 list_for_each_entry(stream, &bus->stream_list, list) { in hdac_ext_link_stream_assign()
256 struct hdac_ext_stream *hstream = container_of(stream, in hdac_ext_link_stream_assign()
259 if (stream->direction != substream->stream) in hdac_ext_link_stream_assign()
288 struct hdac_stream *stream = NULL; in hdac_ext_host_stream_assign() local
295 list_for_each_entry(stream, &bus->stream_list, list) { in hdac_ext_host_stream_assign()
296 struct hdac_ext_stream *hstream = container_of(stream, in hdac_ext_host_stream_assign()
299 if (stream->direction != substream->stream) in hdac_ext_host_stream_assign()
302 if (!stream->opened) { in hdac_ext_host_stream_assign()
342 struct hdac_stream *stream = NULL; in snd_hdac_ext_stream_assign() local
346 stream = snd_hdac_stream_assign(bus, substream); in snd_hdac_ext_stream_assign()
347 if (stream) in snd_hdac_ext_stream_assign()
348 hstream = container_of(stream, in snd_hdac_ext_stream_assign()
371 void snd_hdac_ext_stream_release(struct hdac_ext_stream *stream, int type) in snd_hdac_ext_stream_release() argument
373 struct hdac_bus *bus = stream->hstream.bus; in snd_hdac_ext_stream_release()
377 snd_hdac_stream_release(&stream->hstream); in snd_hdac_ext_stream_release()
381 if (stream->decoupled && !stream->link_locked) in snd_hdac_ext_stream_release()
382 snd_hdac_ext_stream_decouple(bus, stream, false); in snd_hdac_ext_stream_release()
383 snd_hdac_stream_release(&stream->hstream); in snd_hdac_ext_stream_release()
387 if (stream->decoupled && !stream->hstream.opened) in snd_hdac_ext_stream_release()
388 snd_hdac_ext_stream_decouple(bus, stream, false); in snd_hdac_ext_stream_release()
390 stream->link_locked = 0; in snd_hdac_ext_stream_release()
391 stream->link_substream = NULL; in snd_hdac_ext_stream_release()
434 struct hdac_ext_stream *stream, u32 value) in snd_hdac_ext_stream_set_spib() argument
442 writel(value, stream->spib_addr); in snd_hdac_ext_stream_set_spib()
456 struct hdac_ext_stream *stream) in snd_hdac_ext_stream_get_spbmaxfifo() argument
464 return readl(stream->fifo_addr); in snd_hdac_ext_stream_get_spbmaxfifo()
475 struct hdac_stream *stream; in snd_hdac_ext_stop_streams() local
478 list_for_each_entry(stream, &bus->stream_list, list) in snd_hdac_ext_stop_streams()
479 snd_hdac_stream_stop(stream); in snd_hdac_ext_stop_streams()
517 struct hdac_ext_stream *stream, u32 value) in snd_hdac_ext_stream_set_dpibr() argument
525 writel(value, stream->dpibr_addr); in snd_hdac_ext_stream_set_dpibr()
536 int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value) in snd_hdac_ext_stream_set_lpib() argument
538 snd_hdac_stream_writel(&stream->hstream, SD_LPIB, value); in snd_hdac_ext_stream_set_lpib()