• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/sound/pci/asihpi/

Lines Matching refs:phm

26  void HPI_6205(struct hpi_message *phm, struct hpi_response *phr)
150 struct hpi_message *phm, struct hpi_response *phr);
152 static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
157 static void subsys_create_adapter(struct hpi_message *phm,
159 static void subsys_delete_adapter(struct hpi_message *phm,
168 struct hpi_message *phm, struct hpi_response *phr);
171 struct hpi_message *phm, struct hpi_response *phr);
174 struct hpi_message *phm, struct hpi_response *phr);
176 struct hpi_message *phm, struct hpi_response *phr);
179 struct hpi_message *phm, struct hpi_response *phr);
182 struct hpi_message *phm, struct hpi_response *phr);
185 struct hpi_message *phm, struct hpi_response *phr);
188 struct hpi_message *phm, struct hpi_response *phr);
191 struct hpi_message *phm, struct hpi_response *phr);
194 struct hpi_message *phm, struct hpi_response *phr);
197 struct hpi_message *phm, struct hpi_response *phr);
200 struct hpi_message *phm, struct hpi_response *phr);
203 struct hpi_message *phm, struct hpi_response *phr);
206 struct hpi_message *phm, struct hpi_response *phr);
230 static void subsys_message(struct hpi_message *phm, struct hpi_response *phr)
233 switch (phm->function) {
244 subsys_create_adapter(phm, phr);
247 subsys_delete_adapter(phm, phr);
256 struct hpi_message *phm, struct hpi_response *phr)
261 switch (phm->function) {
265 if (hpi_check_control_cache(phw->p_cache, phm, phr))
268 hw_message(pao, phm, phr);
271 hw_message(pao, phm, phr);
274 hw_message(pao, phm, phr);
276 hpi_sync_control_cache(phw->p_cache, phm, phr);
285 struct hpi_message *phm, struct hpi_response *phr)
287 switch (phm->function) {
289 hw_message(pao, phm, phr);
295 struct hpi_message *phm, struct hpi_response *phr)
298 if (phm->obj_index >= HPI_MAX_STREAMS) {
302 "on adapter index %d\n", phm->obj_index,
303 phm->adapter_index);
307 switch (phm->function) {
309 outstream_write(pao, phm, phr);
312 outstream_get_info(pao, phm, phr);
315 outstream_host_buffer_allocate(pao, phm, phr);
318 outstream_host_buffer_get_info(pao, phm, phr);
321 outstream_host_buffer_free(pao, phm, phr);
324 outstream_start(pao, phm, phr);
327 outstream_open(pao, phm, phr);
330 outstream_reset(pao, phm, phr);
333 hw_message(pao, phm, phr);
339 struct hpi_message *phm, struct hpi_response *phr)
342 if (phm->obj_index >= HPI_MAX_STREAMS) {
346 "on adapter index %d\n", phm->obj_index,
347 phm->adapter_index);
351 switch (phm->function) {
353 instream_read(pao, phm, phr);
356 instream_get_info(pao, phm, phr);
359 instream_host_buffer_allocate(pao, phm, phr);
362 instream_host_buffer_get_info(pao, phm, phr);
365 instream_host_buffer_free(pao, phm, phr);
368 instream_start(pao, phm, phr);
371 hw_message(pao, phm, phr);
380 void HPI_6205(struct hpi_message *phm, struct hpi_response *phr)
388 HPI_DEBUG_LOG(DEBUG, "HPI obj=%d, func=%d\n", phm->object,
389 phm->function);
392 if (phm->object != HPI_OBJ_SUBSYSTEM) {
393 pao = hpi_find_adapter(phm->adapter_index);
397 phm->object, phm->function);
402 && (phm->function != HPI_ADAPTER_DEBUG_READ)) {
404 hpi_init_response(phr, phm->object, phm->function,
407 phm->object, phm->function);
413 if (phm->function != HPI_SUBSYS_CREATE_ADAPTER)
414 hpi_init_response(phr, phm->object, phm->function,
418 switch (phm->type) {
420 switch (phm->object) {
422 subsys_message(phm, phr);
429 adapter_message(pao, phm, phr);
434 control_message(pao, phm, phr);
438 outstream_message(pao, phm, phr);
442 instream_message(pao, phm, phr);
446 hw_message(pao, phm, phr);
465 static void subsys_create_adapter(struct hpi_message *phm,
478 if (phm->u.s.resource.bus_type != HPI_BUS_PCI)
480 if (phm->u.s.resource.r.pci->vendor_id != HPI_PCI_VENDOR_ID_TI)
482 if (phm->u.s.resource.r.pci->device_id != HPI_PCI_DEV_ID_DSP6205)
492 ao.pci = *phm->u.s.resource.r.pci;
510 static void subsys_delete_adapter(struct hpi_message *phm,
516 pao = hpi_find_adapter(phm->adapter_index);
789 struct hpi_message *phm, struct hpi_response *phr)
792 u32 command = phm->u.d.u.buffer.command;
796 hpi_init_response(phr, phm->object, phm->function, 0);
803 phm->u.d.u.buffer.buffer_size =
804 roundup_pow_of_two(phm->u.d.u.buffer.buffer_size);
808 phw->outstream_host_buffer_size[phm->obj_index];
810 phm->u.d.u.buffer.buffer_size;
812 if (phw->outstream_host_buffer_size[phm->obj_index] ==
813 phm->u.d.u.buffer.buffer_size) {
818 if (hpios_locked_mem_valid(&phw->outstream_host_buffers[phm->
821 [phm->obj_index]);
824 [phm->obj_index], phm->u.d.u.buffer.buffer_size,
829 phw->outstream_host_buffer_size[phm->obj_index] = 0;
834 (&phw->outstream_host_buffers[phm->obj_index],
835 &phm->u.d.u.buffer.pci_address);
841 phm->u.d.u.buffer.pci_address;
845 [phm->obj_index]);
846 phw->outstream_host_buffer_size[phm->obj_index] = 0;
859 if (phm->u.d.u.buffer.buffer_size & (phm->u.d.u.buffer.
863 phm->u.d.u.buffer.buffer_size);
867 phw->outstream_host_buffer_size[phm->obj_index] =
868 phm->u.d.u.buffer.buffer_size;
869 status = &interface->outstream_host_buffer_status[phm->
875 status->size_in_bytes = phm->u.d.u.buffer.buffer_size;
877 hw_message(pao, phm, phr);
881 outstream_host_buffers[phm->obj_index])) {
883 [phm->obj_index]);
884 phw->outstream_host_buffer_size[phm->obj_index] = 0;
890 struct hpi_message *phm, struct hpi_response *phr)
897 if (hpios_locked_mem_valid(&phw->outstream_host_buffers[phm->
900 outstream_host_buffers[phm->obj_index],
905 status = &interface->outstream_host_buffer_status[phm->
919 struct hpi_message *phm, struct hpi_response *phr)
922 u32 command = phm->u.d.u.buffer.command;
924 if (phw->outstream_host_buffer_size[phm->obj_index]) {
927 phw->outstream_host_buffer_size[phm->obj_index] = 0;
928 hw_message(pao, phm, phr);
934 [phm->obj_index]);
951 struct hpi_message *phm, struct hpi_response *phr)
958 if (!phw->outstream_host_buffer_size[phm->obj_index]) {
960 hw_message(pao, phm, phr);
964 hpi_init_response(phr, phm->object, phm->function, 0);
965 status = &interface->outstream_host_buffer_status[phm->obj_index];
967 if (phw->flag_outstream_just_reset[phm->obj_index]) {
971 embedded in phm.
976 phw->flag_outstream_just_reset[phm->obj_index] = 0;
981 if (phm->u.d.u.data.data_size > HPI6205_SIZEOF_DATA) {
983 original_size = phm->u.d.u.data.data_size;
984 phm->u.d.u.data.data_size = HPI6205_SIZEOF_DATA;
987 phm->function = HPI_OSTREAM_WRITE;
988 hw_message(pao, phm, phr);
997 status->auxiliary_data_available = phm->u.d.u.data.data_size;
998 status->host_index += phm->u.d.u.data.data_size;
999 status->dSP_index += phm->u.d.u.data.data_size;
1007 phm->u.d.u.data.data_size =
1009 phm->u.d.u.data.pb_data += HPI6205_SIZEOF_DATA;
1013 if (space_available < phm->u.d.u.data.data_size) {
1020 if (phm->u.d.u.data.pb_data
1021 && hpios_locked_mem_valid(&phw->outstream_host_buffers[phm->
1025 u8 *p_app_data = (u8 *)phm->u.d.u.data.pb_data;
1028 outstream_host_buffers[phm->obj_index],
1037 min(phm->u.d.u.data.data_size,
1046 phm->u.d.u.data.data_size - l_first_write);
1048 status->host_index += phm->u.d.u.data.data_size;
1052 struct hpi_message *phm, struct hpi_response *phr)
1058 if (!phw->outstream_host_buffer_size[phm->obj_index]) {
1059 hw_message(pao, phm, phr);
1063 hpi_init_response(phr, phm->object, phm->function, 0);
1065 status = &interface->outstream_host_buffer_status[phm->obj_index];
1078 struct hpi_message *phm, struct hpi_response *phr)
1080 hw_message(pao, phm, phr);
1084 struct hpi_message *phm, struct hpi_response *phr)
1087 phw->flag_outstream_just_reset[phm->obj_index] = 1;
1088 hw_message(pao, phm, phr);
1092 struct hpi_message *phm, struct hpi_response *phr)
1094 outstream_reset(pao, phm, phr);
1101 struct hpi_message *phm, struct hpi_response *phr)
1104 u32 command = phm->u.d.u.buffer.command;
1108 hpi_init_response(phr, phm->object, phm->function, 0);
1113 phm->u.d.u.buffer.buffer_size =
1114 roundup_pow_of_two(phm->u.d.u.buffer.buffer_size);
1116 phw->instream_host_buffer_size[phm->obj_index];
1118 phm->u.d.u.buffer.buffer_size;
1120 if (phw->instream_host_buffer_size[phm->obj_index] ==
1121 phm->u.d.u.buffer.buffer_size) {
1126 if (hpios_locked_mem_valid(&phw->instream_host_buffers[phm->
1129 [phm->obj_index]);
1131 err = hpios_locked_mem_alloc(&phw->instream_host_buffers[phm->
1132 obj_index], phm->u.d.u.buffer.buffer_size,
1137 phw->instream_host_buffer_size[phm->obj_index] = 0;
1142 (&phw->instream_host_buffers[phm->obj_index],
1143 &phm->u.d.u.buffer.pci_address);
1147 phm->u.d.u.buffer.pci_address;
1150 [phm->obj_index]);
1151 phw->instream_host_buffer_size[phm->obj_index] = 0;
1161 if (phm->u.d.u.buffer.buffer_size & (phm->u.d.u.buffer.
1165 phm->u.d.u.buffer.buffer_size);
1170 phw->instream_host_buffer_size[phm->obj_index] =
1171 phm->u.d.u.buffer.buffer_size;
1172 status = &interface->instream_host_buffer_status[phm->
1178 status->size_in_bytes = phm->u.d.u.buffer.buffer_size;
1180 hw_message(pao, phm, phr);
1183 instream_host_buffers[phm->obj_index])) {
1185 [phm->obj_index]);
1186 phw->instream_host_buffer_size[phm->obj_index] = 0;
1192 struct hpi_message *phm, struct hpi_response *phr)
1199 if (hpios_locked_mem_valid(&phw->instream_host_buffers[phm->
1202 instream_host_buffers[phm->obj_index],
1207 status = &interface->instream_host_buffer_status[phm->
1221 struct hpi_message *phm, struct hpi_response *phr)
1224 u32 command = phm->u.d.u.buffer.command;
1226 if (phw->instream_host_buffer_size[phm->obj_index]) {
1229 phw->instream_host_buffer_size[phm->obj_index] = 0;
1230 hw_message(pao, phm, phr);
1236 [phm->obj_index]);
1249 struct hpi_message *phm, struct hpi_response *phr)
1251 hw_message(pao, phm, phr);
1260 struct hpi_message *phm, struct hpi_response *phr)
1268 u8 *p_app_data = (u8 *)phm->u.d.u.data.pb_data;
1270 if (!phw->instream_host_buffer_size[phm->obj_index]) {
1271 hw_message(pao, phm, phr);
1274 hpi_init_response(phr, phm->object, phm->function, 0);
1276 status = &interface->instream_host_buffer_status[phm->obj_index];
1278 if (data_available < phm->u.d.u.data.data_size) {
1283 if (hpios_locked_mem_valid(&phw->instream_host_buffers[phm->
1286 instream_host_buffers[phm->obj_index],
1295 min(phm->u.d.u.data.data_size,
1305 phm->u.d.u.data.data_size - l_first_read);
1307 status->host_index += phm->u.d.u.data.data_size;
1311 struct hpi_message *phm, struct hpi_response *phr)
1316 if (!phw->instream_host_buffer_size[phm->obj_index]) {
1317 hw_message(pao, phm, phr);
1321 status = &interface->instream_host_buffer_status[phm->obj_index];
1323 hpi_init_response(phr, phm->object, phm->function, 0);
2173 struct hpi_message *phm, struct hpi_response *phr)
2191 interface->u.message_buffer = *phm;
2234 phm->function);
2254 if (phm->function == HPI_ADAPTER_CLOSE) {
2263 err = hpi_validate_response(phm, phr);
2267 static void hw_message(struct hpi_adapter_obj *pao, struct hpi_message *phm,
2275 err = message_response_sequence(pao, phm, phr);
2292 switch (phm->function) {
2295 err = hpi6205_transfer_data(pao, phm->u.d.u.data.pb_data,
2296 phm->u.d.u.data.data_size, H620_HIF_SEND_DATA);
2301 err = hpi6205_transfer_data(pao, phm->u.d.u.data.pb_data,
2302 phm->u.d.u.data.data_size, H620_HIF_GET_DATA);
2306 if (phm->object == HPI_OBJ_CONTROLEX
2307 && phm->u.cx.attribute == HPI_COBRANET_SET_DATA)
2309 phm->u.cx.u.cobranet_bigdata.pb_data,
2310 phm->u.cx.u.cobranet_bigdata.byte_count,
2315 if (phm->object == HPI_OBJ_CONTROLEX
2316 && phm->u.cx.attribute == HPI_COBRANET_GET_DATA)
2318 phm->u.cx.u.cobranet_bigdata.pb_data,