Lines Matching refs:phm

72 static inline void hw_entry_point(struct hpi_message *phm,  in hw_entry_point()  argument
75 if ((phm->adapter_index < HPI_MAX_ADAPTERS) in hw_entry_point()
76 && hpi_entry_points[phm->adapter_index]) in hw_entry_point()
77 hpi_entry_points[phm->adapter_index] (phm, phr); in hw_entry_point()
79 hpi_init_response(phr, phm->object, phm->function, in hw_entry_point()
83 static void adapter_open(struct hpi_message *phm, struct hpi_response *phr);
84 static void adapter_close(struct hpi_message *phm, struct hpi_response *phr);
86 static void mixer_open(struct hpi_message *phm, struct hpi_response *phr);
87 static void mixer_close(struct hpi_message *phm, struct hpi_response *phr);
89 static void outstream_open(struct hpi_message *phm, struct hpi_response *phr,
91 static void outstream_close(struct hpi_message *phm, struct hpi_response *phr,
93 static void instream_open(struct hpi_message *phm, struct hpi_response *phr,
95 static void instream_close(struct hpi_message *phm, struct hpi_response *phr,
100 static u16 HPIMSGX__init(struct hpi_message *phm, struct hpi_response *phr);
162 static void subsys_message(struct hpi_message *phm, struct hpi_response *phr, in subsys_message() argument
165 if (phm->adapter_index != HPI_ADAPTER_INDEX_INVALID) in subsys_message()
168 phm->adapter_index, phm->function); in subsys_message()
170 switch (phm->function) { in subsys_message()
196 HPI_COMMON(phm, phr); in subsys_message()
199 HPI_COMMON(phm, phr); in subsys_message()
207 HPI_COMMON(phm, phr); in subsys_message()
211 HPIMSGX__init(phm, phr); in subsys_message()
216 hpi_init_response(phr, HPI_OBJ_SUBSYSTEM, phm->function, in subsys_message()
222 static void adapter_message(struct hpi_message *phm, struct hpi_response *phr, in adapter_message() argument
225 switch (phm->function) { in adapter_message()
227 adapter_open(phm, phr); in adapter_message()
230 adapter_close(phm, phr); in adapter_message()
233 HPIMSGX__cleanup(phm->adapter_index, h_owner); in adapter_message()
239 hm.adapter_index = phm->adapter_index; in adapter_message()
242 hw_entry_point(phm, phr); in adapter_message()
246 hw_entry_point(phm, phr); in adapter_message()
251 static void mixer_message(struct hpi_message *phm, struct hpi_response *phr) in mixer_message() argument
253 switch (phm->function) { in mixer_message()
255 mixer_open(phm, phr); in mixer_message()
258 mixer_close(phm, phr); in mixer_message()
261 hw_entry_point(phm, phr); in mixer_message()
266 static void outstream_message(struct hpi_message *phm, in outstream_message() argument
269 if (phm->obj_index >= aDAPTER_INFO[phm->adapter_index].num_outstreams) { in outstream_message()
270 hpi_init_response(phr, HPI_OBJ_OSTREAM, phm->function, in outstream_message()
275 switch (phm->function) { in outstream_message()
277 outstream_open(phm, phr, h_owner); in outstream_message()
280 outstream_close(phm, phr, h_owner); in outstream_message()
283 hw_entry_point(phm, phr); in outstream_message()
288 static void instream_message(struct hpi_message *phm, in instream_message() argument
291 if (phm->obj_index >= aDAPTER_INFO[phm->adapter_index].num_instreams) { in instream_message()
292 hpi_init_response(phr, HPI_OBJ_ISTREAM, phm->function, in instream_message()
297 switch (phm->function) { in instream_message()
299 instream_open(phm, phr, h_owner); in instream_message()
302 instream_close(phm, phr, h_owner); in instream_message()
305 hw_entry_point(phm, phr); in instream_message()
313 void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr, in hpi_send_recv_ex() argument
318 HPI_DEBUG_MESSAGE(DEBUG, phm); in hpi_send_recv_ex()
320 if (phm->type != HPI_TYPE_REQUEST) { in hpi_send_recv_ex()
321 hpi_init_response(phr, phm->object, phm->function, in hpi_send_recv_ex()
326 if (phm->adapter_index >= HPI_MAX_ADAPTERS in hpi_send_recv_ex()
327 && phm->adapter_index != HPIMSGX_ALLADAPTERS) { in hpi_send_recv_ex()
328 hpi_init_response(phr, phm->object, phm->function, in hpi_send_recv_ex()
333 switch (phm->object) { in hpi_send_recv_ex()
335 subsys_message(phm, phr, h_owner); in hpi_send_recv_ex()
339 adapter_message(phm, phr, h_owner); in hpi_send_recv_ex()
343 mixer_message(phm, phr); in hpi_send_recv_ex()
347 outstream_message(phm, phr, h_owner); in hpi_send_recv_ex()
351 instream_message(phm, phr, h_owner); in hpi_send_recv_ex()
355 hw_entry_point(phm, phr); in hpi_send_recv_ex()
368 static void adapter_open(struct hpi_message *phm, struct hpi_response *phr) in adapter_open() argument
371 memcpy(phr, &rESP_HPI_ADAPTER_OPEN[phm->adapter_index], in adapter_open()
375 static void adapter_close(struct hpi_message *phm, struct hpi_response *phr) in adapter_close() argument
381 static void mixer_open(struct hpi_message *phm, struct hpi_response *phr) in mixer_open() argument
383 memcpy(phr, &rESP_HPI_MIXER_OPEN[phm->adapter_index], in mixer_open()
387 static void mixer_close(struct hpi_message *phm, struct hpi_response *phr) in mixer_close() argument
392 static void instream_open(struct hpi_message *phm, struct hpi_response *phr, in instream_open() argument
403 if (instream_user_open[phm->adapter_index][phm->obj_index].open_flag) in instream_open()
405 else if (rESP_HPI_ISTREAM_OPEN[phm->adapter_index] in instream_open()
406 [phm->obj_index].h.error) in instream_open()
408 &rESP_HPI_ISTREAM_OPEN[phm->adapter_index][phm-> in instream_open()
412 instream_user_open[phm->adapter_index][phm-> in instream_open()
419 hm.adapter_index = phm->adapter_index; in instream_open()
420 hm.obj_index = phm->obj_index; in instream_open()
425 instream_user_open[phm->adapter_index][phm-> in instream_open()
429 instream_user_open[phm->adapter_index][phm-> in instream_open()
431 instream_user_open[phm->adapter_index][phm-> in instream_open()
434 &rESP_HPI_ISTREAM_OPEN[phm->adapter_index] in instream_open()
435 [phm->obj_index], in instream_open()
442 static void instream_close(struct hpi_message *phm, struct hpi_response *phr, in instream_close() argument
453 instream_user_open[phm->adapter_index][phm-> in instream_close()
458 instream_user_open[phm->adapter_index][phm-> in instream_close()
464 hm.adapter_index = phm->adapter_index; in instream_close()
465 hm.obj_index = phm->obj_index; in instream_close()
469 instream_user_open[phm->adapter_index][phm-> in instream_close()
473 instream_user_open[phm->adapter_index][phm-> in instream_close()
475 instream_user_open[phm->adapter_index][phm-> in instream_close()
481 h_owner, phm->adapter_index, phm->obj_index, in instream_close()
482 instream_user_open[phm->adapter_index][phm-> in instream_close()
489 static void outstream_open(struct hpi_message *phm, struct hpi_response *phr, in outstream_open() argument
500 if (outstream_user_open[phm->adapter_index][phm->obj_index].open_flag) in outstream_open()
502 else if (rESP_HPI_OSTREAM_OPEN[phm->adapter_index] in outstream_open()
503 [phm->obj_index].h.error) in outstream_open()
505 &rESP_HPI_OSTREAM_OPEN[phm->adapter_index][phm-> in outstream_open()
509 outstream_user_open[phm->adapter_index][phm-> in outstream_open()
516 hm.adapter_index = phm->adapter_index; in outstream_open()
517 hm.obj_index = phm->obj_index; in outstream_open()
522 outstream_user_open[phm->adapter_index][phm-> in outstream_open()
526 outstream_user_open[phm->adapter_index][phm-> in outstream_open()
528 outstream_user_open[phm->adapter_index][phm-> in outstream_open()
531 &rESP_HPI_OSTREAM_OPEN[phm->adapter_index] in outstream_open()
532 [phm->obj_index], in outstream_open()
539 static void outstream_close(struct hpi_message *phm, struct hpi_response *phr, in outstream_close() argument
551 outstream_user_open[phm->adapter_index][phm-> in outstream_close()
556 outstream_user_open[phm->adapter_index][phm-> in outstream_close()
562 hm.adapter_index = phm->adapter_index; in outstream_close()
563 hm.obj_index = phm->obj_index; in outstream_close()
567 outstream_user_open[phm->adapter_index][phm-> in outstream_close()
571 outstream_user_open[phm->adapter_index][phm-> in outstream_close()
573 outstream_user_open[phm->adapter_index][phm-> in outstream_close()
579 h_owner, phm->adapter_index, phm->obj_index, in outstream_close()
580 outstream_user_open[phm->adapter_index][phm-> in outstream_close()
703 static u16 HPIMSGX__init(struct hpi_message *phm, in HPIMSGX__init() argument
714 hpi_init_response(&hr, phm->object, phm->function, in HPIMSGX__init()
718 hpi_lookup_entry_point_function(phm->u.s.resource.r.pci); in HPIMSGX__init()
721 HPI_DEBUG_MESSAGE(DEBUG, phm); in HPIMSGX__init()
722 entry_point_func(phm, &hr); in HPIMSGX__init()