diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-02-09 23:26:14 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-10 12:49:35 -0500 |
commit | ba3a909962650d81e9c3731d87b8653652869685 (patch) | |
tree | 65e156a29d20bf71e5a91501890eaaa1e13d82b3 /sound | |
parent | ee246fc041c4ace7a8cc3d995716cbc8f8f6cd5c (diff) |
ALSA: asihpi - Remove unused code and data.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/asihpi/hpi6205.c | 37 | ||||
-rw-r--r-- | sound/pci/asihpi/hpi_internal.h | 4 | ||||
-rw-r--r-- | sound/pci/asihpi/hpifunc.c | 106 |
3 files changed, 1 insertions, 146 deletions
diff --git a/sound/pci/asihpi/hpi6205.c b/sound/pci/asihpi/hpi6205.c index 377e56f59a86..33136cb0d251 100644 --- a/sound/pci/asihpi/hpi6205.c +++ b/sound/pci/asihpi/hpi6205.c | |||
@@ -127,9 +127,6 @@ struct hpi_hw_obj { | |||
127 | u32 outstream_host_buffer_size[HPI_MAX_STREAMS]; | 127 | u32 outstream_host_buffer_size[HPI_MAX_STREAMS]; |
128 | 128 | ||
129 | struct consistent_dma_area h_control_cache; | 129 | struct consistent_dma_area h_control_cache; |
130 | struct consistent_dma_area h_async_event_buffer; | ||
131 | /* struct hpi_control_cache_single *pControlCache; */ | ||
132 | struct hpi_async_event *p_async_event_buffer; | ||
133 | struct hpi_control_cache *p_cache; | 130 | struct hpi_control_cache *p_cache; |
134 | }; | 131 | }; |
135 | 132 | ||
@@ -625,34 +622,6 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao, | |||
625 | pao->has_control_cache = 0; | 622 | pao->has_control_cache = 0; |
626 | } | 623 | } |
627 | } | 624 | } |
628 | /* allocate bus mastering async buffer and tell the DSP about it */ | ||
629 | if (interface->async_buffer.b.size) { | ||
630 | err = hpios_locked_mem_alloc(&phw->h_async_event_buffer, | ||
631 | interface->async_buffer.b.size * | ||
632 | sizeof(struct hpi_async_event), pao->pci.pci_dev); | ||
633 | if (!err) | ||
634 | err = hpios_locked_mem_get_virt_addr | ||
635 | (&phw->h_async_event_buffer, (void *) | ||
636 | &phw->p_async_event_buffer); | ||
637 | if (!err) | ||
638 | memset((void *)phw->p_async_event_buffer, 0, | ||
639 | interface->async_buffer.b.size * | ||
640 | sizeof(struct hpi_async_event)); | ||
641 | if (!err) { | ||
642 | err = hpios_locked_mem_get_phys_addr | ||
643 | (&phw->h_async_event_buffer, &phys_addr); | ||
644 | interface->async_buffer.physical_address32 = | ||
645 | phys_addr; | ||
646 | } | ||
647 | if (err) { | ||
648 | if (hpios_locked_mem_valid(&phw-> | ||
649 | h_async_event_buffer)) { | ||
650 | hpios_locked_mem_free | ||
651 | (&phw->h_async_event_buffer); | ||
652 | phw->p_async_event_buffer = NULL; | ||
653 | } | ||
654 | } | ||
655 | } | ||
656 | send_dsp_command(phw, H620_HIF_IDLE); | 625 | send_dsp_command(phw, H620_HIF_IDLE); |
657 | 626 | ||
658 | { | 627 | { |
@@ -716,11 +685,6 @@ static void delete_adapter_obj(struct hpi_adapter_obj *pao) | |||
716 | 685 | ||
717 | phw = pao->priv; | 686 | phw = pao->priv; |
718 | 687 | ||
719 | if (hpios_locked_mem_valid(&phw->h_async_event_buffer)) { | ||
720 | hpios_locked_mem_free(&phw->h_async_event_buffer); | ||
721 | phw->p_async_event_buffer = NULL; | ||
722 | } | ||
723 | |||
724 | if (hpios_locked_mem_valid(&phw->h_control_cache)) { | 688 | if (hpios_locked_mem_valid(&phw->h_control_cache)) { |
725 | hpios_locked_mem_free(&phw->h_control_cache); | 689 | hpios_locked_mem_free(&phw->h_control_cache); |
726 | hpi_free_control_cache(phw->p_cache); | 690 | hpi_free_control_cache(phw->p_cache); |
@@ -1126,6 +1090,7 @@ static void instream_host_buffer_allocate(struct hpi_adapter_obj *pao, | |||
1126 | status->auxiliary_data_available = 0; | 1090 | status->auxiliary_data_available = 0; |
1127 | 1091 | ||
1128 | hw_message(pao, phm, phr); | 1092 | hw_message(pao, phm, phr); |
1093 | |||
1129 | if (phr->error | 1094 | if (phr->error |
1130 | && hpios_locked_mem_valid(&phw-> | 1095 | && hpios_locked_mem_valid(&phw-> |
1131 | instream_host_buffers[phm->obj_index])) { | 1096 | instream_host_buffers[phm->obj_index])) { |
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h index 990816085561..06a8779ff9a0 100644 --- a/sound/pci/asihpi/hpi_internal.h +++ b/sound/pci/asihpi/hpi_internal.h | |||
@@ -1541,10 +1541,6 @@ u32 hpi_indexes_to_handle(const char c_object, const u16 adapter_index, | |||
1541 | /* main HPI entry point */ | 1541 | /* main HPI entry point */ |
1542 | void hpi_send_recv(struct hpi_message *phm, struct hpi_response *phr); | 1542 | void hpi_send_recv(struct hpi_message *phm, struct hpi_response *phr); |
1543 | 1543 | ||
1544 | /* UDP message */ | ||
1545 | void hpi_send_recvUDP(struct hpi_message *phm, struct hpi_response *phr, | ||
1546 | const unsigned int timeout); | ||
1547 | |||
1548 | /* used in PnP OS/driver */ | 1544 | /* used in PnP OS/driver */ |
1549 | u16 hpi_subsys_create_adapter(const struct hpi_resource *p_resource, | 1545 | u16 hpi_subsys_create_adapter(const struct hpi_resource *p_resource, |
1550 | u16 *pw_adapter_index); | 1546 | u16 *pw_adapter_index); |
diff --git a/sound/pci/asihpi/hpifunc.c b/sound/pci/asihpi/hpifunc.c index b79eba1ee0f5..3aa1f09a4954 100644 --- a/sound/pci/asihpi/hpifunc.c +++ b/sound/pci/asihpi/hpifunc.c | |||
@@ -263,112 +263,6 @@ u16 hpi_adapter_get_module_by_index(u16 adapter_index, u16 module_index, | |||
263 | return hr.error; | 263 | return hr.error; |
264 | } | 264 | } |
265 | 265 | ||
266 | u16 hpi_adapter_get_assert2(u16 adapter_index, u16 *p_assert_count, | ||
267 | char *psz_assert, u32 *p_param1, u32 *p_param2, | ||
268 | u32 *p_dsp_string_addr, u16 *p_processor_id) | ||
269 | { | ||
270 | struct hpi_message hm; | ||
271 | struct hpi_response hr; | ||
272 | hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER, | ||
273 | HPI_ADAPTER_GET_ASSERT); | ||
274 | hm.adapter_index = adapter_index; | ||
275 | |||
276 | hpi_send_recv(&hm, &hr); | ||
277 | |||
278 | *p_assert_count = 0; | ||
279 | |||
280 | if (!hr.error) { | ||
281 | *p_assert_count = hr.u.ax.assert.count; | ||
282 | |||
283 | if (*p_assert_count) { | ||
284 | *p_param1 = hr.u.ax.assert.p1; | ||
285 | *p_param2 = hr.u.ax.assert.p2; | ||
286 | *p_processor_id = hr.u.ax.assert.dsp_index; | ||
287 | *p_dsp_string_addr = hr.u.ax.assert.dsp_msg_addr; | ||
288 | memcpy(psz_assert, hr.u.ax.assert.sz_message, | ||
289 | HPI_STRING_LEN); | ||
290 | } else { | ||
291 | *psz_assert = 0; | ||
292 | } | ||
293 | } | ||
294 | return hr.error; | ||
295 | } | ||
296 | |||
297 | u16 hpi_adapter_test_assert(u16 adapter_index, u16 assert_id) | ||
298 | { | ||
299 | struct hpi_message hm; | ||
300 | struct hpi_response hr; | ||
301 | hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER, | ||
302 | HPI_ADAPTER_TEST_ASSERT); | ||
303 | hm.adapter_index = adapter_index; | ||
304 | hm.u.ax.test_assert.value = assert_id; | ||
305 | |||
306 | hpi_send_recv(&hm, &hr); | ||
307 | |||
308 | return hr.error; | ||
309 | } | ||
310 | |||
311 | u16 hpi_adapter_enable_capability(u16 adapter_index, u16 capability, u32 key) | ||
312 | { | ||
313 | #if 1 | ||
314 | return HPI_ERROR_UNIMPLEMENTED; | ||
315 | #else | ||
316 | struct hpi_message hm; | ||
317 | struct hpi_response hr; | ||
318 | hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER, | ||
319 | HPI_ADAPTER_ENABLE_CAPABILITY); | ||
320 | hm.adapter_index = adapter_index; | ||
321 | hm.u.ax.enable_cap.cap = capability; | ||
322 | hm.u.ax.enable_cap.key = key; | ||
323 | |||
324 | hpi_send_recv(&hm, &hr); | ||
325 | |||
326 | return hr.error; | ||
327 | #endif | ||
328 | } | ||
329 | |||
330 | u16 hpi_adapter_self_test(u16 adapter_index) | ||
331 | { | ||
332 | struct hpi_message hm; | ||
333 | struct hpi_response hr; | ||
334 | hpi_init_message_response(&hm, &hr, HPI_OBJ_ADAPTER, | ||
335 | HPI_ADAPTER_SELFTEST); | ||
336 | hm.adapter_index = adapter_index; | ||
337 | hpi_send_recv(&hm, &hr); | ||
338 | return hr.error; | ||
339 | } | ||
340 | |||
341 | u16 hpi_adapter_debug_read(u16 adapter_index, u32 dsp_address, char *p_buffer, | ||
342 | int *count_bytes) | ||
343 | { | ||
344 | struct hpi_msg_adapter_debug_read hm; | ||
345 | struct hpi_res_adapter_debug_read hr; | ||
346 | |||
347 | hpi_init_message_responseV1(&hm.h, sizeof(hm), &hr.h, sizeof(hr), | ||
348 | HPI_OBJ_ADAPTER, HPI_ADAPTER_DEBUG_READ); | ||
349 | |||
350 | hm.h.adapter_index = adapter_index; | ||
351 | hm.dsp_address = dsp_address; | ||
352 | |||
353 | if (*count_bytes > (int)sizeof(hr.bytes)) | ||
354 | *count_bytes = (int)sizeof(hr.bytes); | ||
355 | |||
356 | hm.count_bytes = *count_bytes; | ||
357 | |||
358 | hpi_send_recvV1(&hm.h, &hr.h); | ||
359 | |||
360 | if (!hr.h.error) { | ||
361 | int res_bytes = hr.h.size - sizeof(hr.h); | ||
362 | if (res_bytes > *count_bytes) | ||
363 | res_bytes = *count_bytes; | ||
364 | *count_bytes = res_bytes; | ||
365 | memcpy(p_buffer, &hr.bytes, res_bytes); | ||
366 | } else | ||
367 | *count_bytes = 0; | ||
368 | |||
369 | return hr.h.error; | ||
370 | } | ||
371 | |||
372 | u16 hpi_adapter_set_property(u16 adapter_index, u16 property, u16 parameter1, | 266 | u16 hpi_adapter_set_property(u16 adapter_index, u16 property, u16 parameter1, |
373 | u16 parameter2) | 267 | u16 parameter2) |
374 | { | 268 | { |