Lines Matching full:stream

55  * The Presence rate of a constant bitrate stream is mean flow rate of the
56 * stream expressed in occupied Segments of that Data Channel per second.
90 * slim_stream_allocate() - Allocate a new SLIMbus Stream
92 * @name: name of the stream
95 * a new SLIMbus stream and return a valid stream runtime pointer for client
96 * to use it in subsequent stream apis. state of stream is set to ALLOCATED
125 static int slim_connect_port_channel(struct slim_stream_runtime *stream, in slim_connect_port_channel() argument
128 struct slim_device *sdev = stream->dev; in slim_connect_port_channel()
132 DEFINE_SLIM_LDEST_TXN(txn, mc, 6, stream->dev->laddr, &msg); in slim_connect_port_channel()
145 static int slim_disconnect_port(struct slim_stream_runtime *stream, in slim_disconnect_port() argument
148 struct slim_device *sdev = stream->dev; in slim_disconnect_port()
152 DEFINE_SLIM_LDEST_TXN(txn, mc, 5, stream->dev->laddr, &msg); in slim_disconnect_port()
161 static int slim_deactivate_remove_channel(struct slim_stream_runtime *stream, in slim_deactivate_remove_channel() argument
164 struct slim_device *sdev = stream->dev; in slim_deactivate_remove_channel()
168 DEFINE_SLIM_LDEST_TXN(txn, mc, 5, stream->dev->laddr, &msg); in slim_deactivate_remove_channel()
195 * slim_stream_prepare() - Prepare a SLIMbus Stream
197 * @rt: instance of slim stream runtime to configure
198 * @cfg: new configuration for the stream
200 * This API will configure SLIMbus stream with config parameters from cfg.
212 dev_err(&rt->dev->dev, "Stream already Prepared\n"); in slim_stream_prepare()
272 static int slim_define_channel_content(struct slim_stream_runtime *stream, in slim_define_channel_content() argument
275 struct slim_device *sdev = stream->dev; in slim_define_channel_content()
279 DEFINE_SLIM_LDEST_TXN(txn, mc, 8, stream->dev->laddr, &msg); in slim_define_channel_content()
285 if (stream->prot != SLIM_PROTO_ISO) in slim_define_channel_content()
289 wbuf[3] = stream->bps/SLIM_SLOT_LEN_BITS; in slim_define_channel_content()
307 static int slim_define_channel(struct slim_stream_runtime *stream, in slim_define_channel() argument
310 struct slim_device *sdev = stream->dev; in slim_define_channel()
314 DEFINE_SLIM_LDEST_TXN(txn, mc, 8, stream->dev->laddr, &msg); in slim_define_channel()
316 port->ch.seg_dist = slim_get_segdist_code(stream->ratem); in slim_define_channel()
320 wbuf[2] = (stream->prot << 4) | ((port->ch.seg_dist & 0xF00) >> 8); in slim_define_channel()
321 if (stream->prot == SLIM_PROTO_ISO) in slim_define_channel()
322 wbuf[3] = stream->bps/SLIM_SLOT_LEN_BITS; in slim_define_channel()
324 wbuf[3] = stream->bps/SLIM_SLOT_LEN_BITS + 1; in slim_define_channel()
331 static int slim_activate_channel(struct slim_stream_runtime *stream, in slim_activate_channel() argument
334 struct slim_device *sdev = stream->dev; in slim_activate_channel()
338 DEFINE_SLIM_LDEST_TXN(txn, mc, 5, stream->dev->laddr, &msg); in slim_activate_channel()
349 * slim_stream_enable() - Enable a prepared SLIMbus Stream
351 * @stream: instance of slim stream runtime to enable
354 * SLIMbus stream
359 int slim_stream_enable(struct slim_stream_runtime *stream) in slim_stream_enable() argument
363 struct slim_controller *ctrl = stream->dev->ctrl; in slim_stream_enable()
367 ret = ctrl->enable_stream(stream); in slim_stream_enable()
371 for (i = 0; i < stream->num_ports; i++) in slim_stream_enable()
372 stream->ports[i].ch.state = SLIM_CH_STATE_ACTIVE; in slim_stream_enable()
382 for (i = 0; i < stream->num_ports; i++) { in slim_stream_enable()
383 struct slim_port *port = &stream->ports[i]; in slim_stream_enable()
385 slim_define_channel(stream, port); in slim_stream_enable()
386 slim_define_channel_content(stream, port); in slim_stream_enable()
389 for (i = 0; i < stream->num_ports; i++) { in slim_stream_enable()
390 struct slim_port *port = &stream->ports[i]; in slim_stream_enable()
392 slim_activate_channel(stream, port); in slim_stream_enable()
402 * slim_stream_disable() - Disable a SLIMbus Stream
404 * @stream: instance of slim stream runtime to disable
407 * SLIMbus stream
412 int slim_stream_disable(struct slim_stream_runtime *stream) in slim_stream_disable() argument
416 struct slim_controller *ctrl = stream->dev->ctrl; in slim_stream_disable()
419 if (!stream->ports || !stream->num_ports) in slim_stream_disable()
423 ctrl->disable_stream(stream); in slim_stream_disable()
429 for (i = 0; i < stream->num_ports; i++) in slim_stream_disable()
430 slim_deactivate_remove_channel(stream, &stream->ports[i]); in slim_stream_disable()
439 * slim_stream_unprepare() - Un-prepare a SLIMbus Stream
441 * @stream: instance of slim stream runtime to unprepare
444 * SLIMbus stream
449 int slim_stream_unprepare(struct slim_stream_runtime *stream) in slim_stream_unprepare() argument
453 if (!stream->ports || !stream->num_ports) in slim_stream_unprepare()
456 for (i = 0; i < stream->num_ports; i++) in slim_stream_unprepare()
457 slim_disconnect_port(stream, &stream->ports[i]); in slim_stream_unprepare()
459 kfree(stream->ports); in slim_stream_unprepare()
460 stream->ports = NULL; in slim_stream_unprepare()
461 stream->num_ports = 0; in slim_stream_unprepare()
468 * slim_stream_free() - Free a SLIMbus Stream
470 * @stream: instance of slim stream runtime to free
473 * slim stream runtime, user is not allowed to make an dereference
474 * to stream after this call.
479 int slim_stream_free(struct slim_stream_runtime *stream) in slim_stream_free() argument
481 struct slim_device *sdev = stream->dev; in slim_stream_free()
484 list_del(&stream->node); in slim_stream_free()
487 kfree(stream->name); in slim_stream_free()
488 kfree(stream); in slim_stream_free()