Lines Matching refs:rt
104 struct slim_stream_runtime *rt; in slim_stream_allocate() local
106 rt = kzalloc(sizeof(*rt), GFP_KERNEL); in slim_stream_allocate()
107 if (!rt) in slim_stream_allocate()
110 rt->name = kasprintf(GFP_KERNEL, "slim-%s", name); in slim_stream_allocate()
111 if (!rt->name) { in slim_stream_allocate()
112 kfree(rt); in slim_stream_allocate()
116 rt->dev = dev; in slim_stream_allocate()
118 list_add_tail(&rt->node, &dev->stream_list); in slim_stream_allocate()
121 return rt; in slim_stream_allocate()
204 int slim_stream_prepare(struct slim_stream_runtime *rt, in slim_stream_prepare() argument
207 struct slim_controller *ctrl = rt->dev->ctrl; in slim_stream_prepare()
211 if (rt->ports) { in slim_stream_prepare()
212 dev_err(&rt->dev->dev, "Stream already Prepared\n"); in slim_stream_prepare()
217 rt->ports = kcalloc(num_ports, sizeof(*port), GFP_KERNEL); in slim_stream_prepare()
218 if (!rt->ports) in slim_stream_prepare()
221 rt->num_ports = num_ports; in slim_stream_prepare()
222 rt->rate = cfg->rate; in slim_stream_prepare()
223 rt->bps = cfg->bps; in slim_stream_prepare()
224 rt->direction = cfg->direction; in slim_stream_prepare()
228 dev_err(&rt->dev->dev, "Cannot get presence rate for rate %d Hz\n", in slim_stream_prepare()
239 rt->prot = SLIM_PROTO_PUSH; in slim_stream_prepare()
241 rt->prot = SLIM_PROTO_PULL; in slim_stream_prepare()
243 rt->prot = SLIM_PROTO_ISO; in slim_stream_prepare()
246 rt->ratem = cfg->rate/ctrl->a_framer->superfreq; in slim_stream_prepare()
250 port = &rt->ports[i]; in slim_stream_prepare()
264 slim_connect_port_channel(rt, port); in slim_stream_prepare()