diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-02-09 23:26:16 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-10 12:49:37 -0500 |
commit | bd33c1cad21da3ac3c541e2107a6c46072ca081b (patch) | |
tree | 343b4ad33ac32c3f1d59da0b019196de241f3885 /sound/pci | |
parent | 827492acb0bc1262e2d93f3b3b0e33b00a7365ad (diff) |
ALSA: asihpi - New functions prep for interrupt driven streams.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/asihpi/hpi.h | 19 | ||||
-rw-r--r-- | sound/pci/asihpi/hpi_internal.h | 25 |
2 files changed, 39 insertions, 5 deletions
diff --git a/sound/pci/asihpi/hpi.h b/sound/pci/asihpi/hpi.h index 5ac978d07740..ec19df50c183 100644 --- a/sound/pci/asihpi/hpi.h +++ b/sound/pci/asihpi/hpi.h | |||
@@ -324,6 +324,15 @@ to enable SSX2 stream mapping within the kernel level of the driver. | |||
324 | */ | 324 | */ |
325 | HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4, | 325 | HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4, |
326 | 326 | ||
327 | /** Enables/disables PCI(e) IRQ. | ||
328 | A setting of 0 indicates that no interrupts are being generated. A DSP boot | ||
329 | this property is set to 0. Setting to a non-zero value specifies the number | ||
330 | of frames of audio that should be processed between interrupts. This property | ||
331 | should be set to multiple of the mixer interval as read back from the | ||
332 | HPI_ADAPTER_PROPERTY_INTERVAL property. | ||
333 | */ | ||
334 | HPI_ADAPTER_PROPERTY_IRQ_RATE = 5, | ||
335 | |||
327 | /** Base number for readonly properties */ | 336 | /** Base number for readonly properties */ |
328 | HPI_ADAPTER_PROPERTY_READONLYBASE = 256, | 337 | HPI_ADAPTER_PROPERTY_READONLYBASE = 256, |
329 | 338 | ||
@@ -428,7 +437,13 @@ return value is true (1) or false (0). If the current adapter | |||
428 | mode is MONO SSX2 is disabled, even though this property will | 437 | mode is MONO SSX2 is disabled, even though this property will |
429 | return true. | 438 | return true. |
430 | */ | 439 | */ |
431 | HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271 | 440 | HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271, |
441 | /** Readonly supports PCI(e) IRQ. | ||
442 | Indicates that the adapter in it's current mode supports interrupts | ||
443 | across the host bus. Note, this does not imply that interrupts are | ||
444 | enabled. Instead it indicates that they can be enabled. | ||
445 | */ | ||
446 | HPI_ADAPTER_PROPERTY_SUPPORTS_IRQ = 272 | ||
432 | }; | 447 | }; |
433 | 448 | ||
434 | /** Adapter mode commands | 449 | /** Adapter mode commands |
@@ -998,6 +1013,8 @@ enum HPI_ERROR_CODES { | |||
998 | HPI_ERROR_NO_INTERADAPTER_GROUPS = 314, | 1013 | HPI_ERROR_NO_INTERADAPTER_GROUPS = 314, |
999 | /** Streams on different DSPs cannot be grouped. */ | 1014 | /** Streams on different DSPs cannot be grouped. */ |
1000 | HPI_ERROR_NO_INTERDSP_GROUPS = 315, | 1015 | HPI_ERROR_NO_INTERDSP_GROUPS = 315, |
1016 | /** Stream wait cancelled before threshold reached. */ | ||
1017 | HPI_ERROR_WAIT_CANCELLED = 316, | ||
1001 | 1018 | ||
1002 | /** Invalid mixer node for this adapter. */ | 1019 | /** Invalid mixer node for this adapter. */ |
1003 | HPI_ERROR_INVALID_NODE = 400, | 1020 | HPI_ERROR_INVALID_NODE = 400, |
diff --git a/sound/pci/asihpi/hpi_internal.h b/sound/pci/asihpi/hpi_internal.h index 06a8779ff9a0..ca5b844ceabf 100644 --- a/sound/pci/asihpi/hpi_internal.h +++ b/sound/pci/asihpi/hpi_internal.h | |||
@@ -432,7 +432,9 @@ enum HPI_FUNCTION_IDS { | |||
432 | HPI_ADAPTER_ENUM_PROPERTY = HPI_FUNC_ID(ADAPTER, 16), | 432 | HPI_ADAPTER_ENUM_PROPERTY = HPI_FUNC_ID(ADAPTER, 16), |
433 | HPI_ADAPTER_MODULE_INFO = HPI_FUNC_ID(ADAPTER, 17), | 433 | HPI_ADAPTER_MODULE_INFO = HPI_FUNC_ID(ADAPTER, 17), |
434 | HPI_ADAPTER_DEBUG_READ = HPI_FUNC_ID(ADAPTER, 18), | 434 | HPI_ADAPTER_DEBUG_READ = HPI_FUNC_ID(ADAPTER, 18), |
435 | #define HPI_ADAPTER_FUNCTION_COUNT 18 | 435 | HPI_ADAPTER_IRQ_QUERY_AND_CLEAR = HPI_FUNC_ID(ADAPTER, 19), |
436 | HPI_ADAPTER_IRQ_CALLBACK = HPI_FUNC_ID(ADAPTER, 20), | ||
437 | #define HPI_ADAPTER_FUNCTION_COUNT 20 | ||
436 | 438 | ||
437 | HPI_OSTREAM_OPEN = HPI_FUNC_ID(OSTREAM, 1), | 439 | HPI_OSTREAM_OPEN = HPI_FUNC_ID(OSTREAM, 1), |
438 | HPI_OSTREAM_CLOSE = HPI_FUNC_ID(OSTREAM, 2), | 440 | HPI_OSTREAM_CLOSE = HPI_FUNC_ID(OSTREAM, 2), |
@@ -458,7 +460,8 @@ enum HPI_FUNCTION_IDS { | |||
458 | HPI_OSTREAM_GROUP_RESET = HPI_FUNC_ID(OSTREAM, 22), | 460 | HPI_OSTREAM_GROUP_RESET = HPI_FUNC_ID(OSTREAM, 22), |
459 | HPI_OSTREAM_HOSTBUFFER_GET_INFO = HPI_FUNC_ID(OSTREAM, 23), | 461 | HPI_OSTREAM_HOSTBUFFER_GET_INFO = HPI_FUNC_ID(OSTREAM, 23), |
460 | HPI_OSTREAM_WAIT_START = HPI_FUNC_ID(OSTREAM, 24), | 462 | HPI_OSTREAM_WAIT_START = HPI_FUNC_ID(OSTREAM, 24), |
461 | #define HPI_OSTREAM_FUNCTION_COUNT 24 | 463 | HPI_OSTREAM_WAIT = HPI_FUNC_ID(OSTREAM, 25), |
464 | #define HPI_OSTREAM_FUNCTION_COUNT 25 | ||
462 | 465 | ||
463 | HPI_ISTREAM_OPEN = HPI_FUNC_ID(ISTREAM, 1), | 466 | HPI_ISTREAM_OPEN = HPI_FUNC_ID(ISTREAM, 1), |
464 | HPI_ISTREAM_CLOSE = HPI_FUNC_ID(ISTREAM, 2), | 467 | HPI_ISTREAM_CLOSE = HPI_FUNC_ID(ISTREAM, 2), |
@@ -479,7 +482,8 @@ enum HPI_FUNCTION_IDS { | |||
479 | HPI_ISTREAM_GROUP_RESET = HPI_FUNC_ID(ISTREAM, 17), | 482 | HPI_ISTREAM_GROUP_RESET = HPI_FUNC_ID(ISTREAM, 17), |
480 | HPI_ISTREAM_HOSTBUFFER_GET_INFO = HPI_FUNC_ID(ISTREAM, 18), | 483 | HPI_ISTREAM_HOSTBUFFER_GET_INFO = HPI_FUNC_ID(ISTREAM, 18), |
481 | HPI_ISTREAM_WAIT_START = HPI_FUNC_ID(ISTREAM, 19), | 484 | HPI_ISTREAM_WAIT_START = HPI_FUNC_ID(ISTREAM, 19), |
482 | #define HPI_ISTREAM_FUNCTION_COUNT 19 | 485 | HPI_ISTREAM_WAIT = HPI_FUNC_ID(ISTREAM, 20), |
486 | #define HPI_ISTREAM_FUNCTION_COUNT 20 | ||
483 | 487 | ||
484 | /* NOTE: | 488 | /* NOTE: |
485 | GET_NODE_INFO, SET_CONNECTION, GET_CONNECTIONS are not currently used */ | 489 | GET_NODE_INFO, SET_CONNECTION, GET_CONNECTIONS are not currently used */ |
@@ -494,7 +498,8 @@ enum HPI_FUNCTION_IDS { | |||
494 | HPI_MIXER_GET_CONTROL_ARRAY_BY_INDEX = HPI_FUNC_ID(MIXER, 9), | 498 | HPI_MIXER_GET_CONTROL_ARRAY_BY_INDEX = HPI_FUNC_ID(MIXER, 9), |
495 | HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES = HPI_FUNC_ID(MIXER, 10), | 499 | HPI_MIXER_GET_CONTROL_MULTIPLE_VALUES = HPI_FUNC_ID(MIXER, 10), |
496 | HPI_MIXER_STORE = HPI_FUNC_ID(MIXER, 11), | 500 | HPI_MIXER_STORE = HPI_FUNC_ID(MIXER, 11), |
497 | #define HPI_MIXER_FUNCTION_COUNT 11 | 501 | HPI_MIXER_GET_CACHE_INFO = HPI_FUNC_ID(MIXER, 12), |
502 | #define HPI_MIXER_FUNCTION_COUNT 12 | ||
498 | 503 | ||
499 | HPI_CONTROL_GET_INFO = HPI_FUNC_ID(CONTROL, 1), | 504 | HPI_CONTROL_GET_INFO = HPI_FUNC_ID(CONTROL, 1), |
500 | HPI_CONTROL_GET_STATE = HPI_FUNC_ID(CONTROL, 2), | 505 | HPI_CONTROL_GET_STATE = HPI_FUNC_ID(CONTROL, 2), |
@@ -693,6 +698,9 @@ union hpi_adapterx_msg { | |||
693 | u32 pad32; | 698 | u32 pad32; |
694 | u16 value; | 699 | u16 value; |
695 | } test_assert; | 700 | } test_assert; |
701 | struct { | ||
702 | u32 yes; | ||
703 | } irq_query; | ||
696 | }; | 704 | }; |
697 | 705 | ||
698 | struct hpi_adapter_res { | 706 | struct hpi_adapter_res { |
@@ -731,6 +739,9 @@ union hpi_adapterx_res { | |||
731 | u32 length; | 739 | u32 length; |
732 | u32 version; | 740 | u32 version; |
733 | } query_flash; | 741 | } query_flash; |
742 | struct { | ||
743 | u32 yes; | ||
744 | } irq_query; | ||
734 | }; | 745 | }; |
735 | 746 | ||
736 | struct hpi_stream_msg { | 747 | struct hpi_stream_msg { |
@@ -742,6 +753,7 @@ struct hpi_stream_msg { | |||
742 | u32 time_scale; | 753 | u32 time_scale; |
743 | struct hpi_buffer buffer; | 754 | struct hpi_buffer buffer; |
744 | struct hpi_streamid stream; | 755 | struct hpi_streamid stream; |
756 | u32 threshold_bytes; | ||
745 | } u; | 757 | } u; |
746 | }; | 758 | }; |
747 | 759 | ||
@@ -828,6 +840,11 @@ union hpi_mixerx_res { | |||
828 | u32 p_data; /* pointer to data array */ | 840 | u32 p_data; /* pointer to data array */ |
829 | u16 more_to_do; /* indicates if there is more to do */ | 841 | u16 more_to_do; /* indicates if there is more to do */ |
830 | } gcabi; | 842 | } gcabi; |
843 | struct { | ||
844 | u32 total_controls; /* count of controls in the mixer */ | ||
845 | u32 cache_controls; /* count of controls in the cac */ | ||
846 | u32 cache_bytes; /* size of cache */ | ||
847 | } cache_info; | ||
831 | }; | 848 | }; |
832 | 849 | ||
833 | struct hpi_control_msg { | 850 | struct hpi_control_msg { |