Lines Matching full:stream

53  * The Presence rate of a constant bitrate stream is mean flow rate of the
54 * stream expressed in occupied Segments of that Data Channel per second.
88 * slim_stream_allocate() - Allocate a new SLIMbus Stream
90 * @name: name of the stream
93 * a new SLIMbus stream and return a valid stream runtime pointer for client
94 * to use it in subsequent stream apis. state of stream is set to ALLOCATED
123 static int slim_connect_port_channel(struct slim_stream_runtime *stream, in slim_connect_port_channel() argument
126 struct slim_device *sdev = stream->dev; in slim_connect_port_channel()
130 DEFINE_SLIM_LDEST_TXN(txn, mc, 6, stream->dev->laddr, &msg); in slim_connect_port_channel()
143 static int slim_disconnect_port(struct slim_stream_runtime *stream, in slim_disconnect_port() argument
146 struct slim_device *sdev = stream->dev; in slim_disconnect_port()
150 DEFINE_SLIM_LDEST_TXN(txn, mc, 5, stream->dev->laddr, &msg); in slim_disconnect_port()
159 static int slim_deactivate_remove_channel(struct slim_stream_runtime *stream, in slim_deactivate_remove_channel() argument
162 struct slim_device *sdev = stream->dev; in slim_deactivate_remove_channel()
166 DEFINE_SLIM_LDEST_TXN(txn, mc, 5, stream->dev->laddr, &msg); in slim_deactivate_remove_channel()
193 * slim_stream_prepare() - Prepare a SLIMbus Stream
195 * @rt: instance of slim stream runtime to configure
196 * @cfg: new configuration for the stream
198 * This API will configure SLIMbus stream with config parameters from cfg.
210 dev_err(&rt->dev->dev, "Stream already Prepared\n"); in slim_stream_prepare()
263 static int slim_define_channel_content(struct slim_stream_runtime *stream, in slim_define_channel_content() argument
266 struct slim_device *sdev = stream->dev; in slim_define_channel_content()
270 DEFINE_SLIM_LDEST_TXN(txn, mc, 8, stream->dev->laddr, &msg); in slim_define_channel_content()
276 if (stream->prot != SLIM_PROTO_ISO) in slim_define_channel_content()
280 wbuf[3] = stream->bps/SLIM_SLOT_LEN_BITS; in slim_define_channel_content()
298 static int slim_define_channel(struct slim_stream_runtime *stream, in slim_define_channel() argument
301 struct slim_device *sdev = stream->dev; in slim_define_channel()
305 DEFINE_SLIM_LDEST_TXN(txn, mc, 8, stream->dev->laddr, &msg); in slim_define_channel()
307 port->ch.seg_dist = slim_get_segdist_code(stream->ratem); in slim_define_channel()
311 wbuf[2] = (stream->prot << 4) | ((port->ch.seg_dist & 0xF00) >> 8); in slim_define_channel()
312 if (stream->prot == SLIM_PROTO_ISO) in slim_define_channel()
313 wbuf[3] = stream->bps/SLIM_SLOT_LEN_BITS; in slim_define_channel()
315 wbuf[3] = stream->bps/SLIM_SLOT_LEN_BITS + 1; in slim_define_channel()
322 static int slim_activate_channel(struct slim_stream_runtime *stream, in slim_activate_channel() argument
325 struct slim_device *sdev = stream->dev; in slim_activate_channel()
329 DEFINE_SLIM_LDEST_TXN(txn, mc, 5, stream->dev->laddr, &msg); in slim_activate_channel()
340 * slim_stream_enable() - Enable a prepared SLIMbus Stream
342 * @stream: instance of slim stream runtime to enable
345 * SLIMbus stream
350 int slim_stream_enable(struct slim_stream_runtime *stream) in slim_stream_enable() argument
354 struct slim_controller *ctrl = stream->dev->ctrl; in slim_stream_enable()
358 ret = ctrl->enable_stream(stream); in slim_stream_enable()
362 for (i = 0; i < stream->num_ports; i++) in slim_stream_enable()
363 stream->ports[i].ch.state = SLIM_CH_STATE_ACTIVE; in slim_stream_enable()
373 for (i = 0; i < stream->num_ports; i++) { in slim_stream_enable()
374 struct slim_port *port = &stream->ports[i]; in slim_stream_enable()
376 slim_define_channel(stream, port); in slim_stream_enable()
377 slim_define_channel_content(stream, port); in slim_stream_enable()
380 for (i = 0; i < stream->num_ports; i++) { in slim_stream_enable()
381 struct slim_port *port = &stream->ports[i]; in slim_stream_enable()
383 slim_activate_channel(stream, port); in slim_stream_enable()
393 * slim_stream_disable() - Disable a SLIMbus Stream
395 * @stream: instance of slim stream runtime to disable
398 * SLIMbus stream
403 int slim_stream_disable(struct slim_stream_runtime *stream) in slim_stream_disable() argument
407 struct slim_controller *ctrl = stream->dev->ctrl; in slim_stream_disable()
411 ctrl->disable_stream(stream); in slim_stream_disable()
417 for (i = 0; i < stream->num_ports; i++) in slim_stream_disable()
418 slim_deactivate_remove_channel(stream, &stream->ports[i]); in slim_stream_disable()
427 * slim_stream_unprepare() - Un-prepare a SLIMbus Stream
429 * @stream: instance of slim stream runtime to unprepare
432 * SLIMbus stream
437 int slim_stream_unprepare(struct slim_stream_runtime *stream) in slim_stream_unprepare() argument
441 for (i = 0; i < stream->num_ports; i++) in slim_stream_unprepare()
442 slim_disconnect_port(stream, &stream->ports[i]); in slim_stream_unprepare()
444 kfree(stream->ports); in slim_stream_unprepare()
445 stream->ports = NULL; in slim_stream_unprepare()
446 stream->num_ports = 0; in slim_stream_unprepare()
453 * slim_stream_free() - Free a SLIMbus Stream
455 * @stream: instance of slim stream runtime to free
458 * slim stream runtime, user is not allowed to make an dereference
459 * to stream after this call.
464 int slim_stream_free(struct slim_stream_runtime *stream) in slim_stream_free() argument
466 struct slim_device *sdev = stream->dev; in slim_stream_free()
469 list_del(&stream->node); in slim_stream_free()
472 kfree(stream->name); in slim_stream_free()
473 kfree(stream); in slim_stream_free()