Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | #ifndef QDSP5AUDPLAYCMDI_H |
| 2 | #define QDSP5AUDPLAYCMDI_H |
| 3 | |
| 4 | /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* |
| 5 | |
| 6 | Q D S P 5 A U D I O P L A Y T A S K C O M M A N D S |
| 7 | |
| 8 | GENERAL DESCRIPTION |
| 9 | Command Interface for AUDPLAYTASK on QDSP5 |
| 10 | |
| 11 | REFERENCES |
| 12 | None |
| 13 | |
| 14 | EXTERNALIZED FUNCTIONS |
| 15 | |
| 16 | audplay_cmd_dec_data_avail |
| 17 | Send buffer to AUDPLAY task |
| 18 | |
| 19 | |
Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 20 | Copyright (c) 1992-2009, The Linux Foundation. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 21 | |
| 22 | This software is licensed under the terms of the GNU General Public |
| 23 | License version 2, as published by the Free Software Foundation, and |
| 24 | may be copied, distributed, and modified under those terms. |
| 25 | |
| 26 | This program is distributed in the hope that it will be useful, |
| 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 29 | GNU General Public License for more details. |
| 30 | |
| 31 | *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ |
| 32 | /*=========================================================================== |
| 33 | |
| 34 | EDIT HISTORY FOR FILE |
| 35 | |
| 36 | This section contains comments describing changes made to this file. |
| 37 | Notice that changes are listed in reverse chronological order. |
| 38 | |
| 39 | $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audplaycmdi.h#2 $ |
| 40 | |
| 41 | ===========================================================================*/ |
| 42 | |
| 43 | #define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL 0x0000 |
| 44 | #define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL_LEN \ |
| 45 | sizeof(audplay_cmd_bitstream_data_avail) |
| 46 | |
| 47 | /* Type specification of dec_data_avail message sent to AUDPLAYTASK |
| 48 | */ |
| 49 | typedef struct { |
| 50 | /*command ID*/ |
| 51 | unsigned int cmd_id; |
| 52 | |
| 53 | /* Decoder ID for which message is being sent */ |
| 54 | unsigned int decoder_id; |
| 55 | |
| 56 | /* Start address of data in ARM global memory */ |
| 57 | unsigned int buf_ptr; |
| 58 | |
| 59 | /* Number of 16-bit words of bit-stream data contiguously available at the |
| 60 | * above-mentioned address |
| 61 | */ |
| 62 | unsigned int buf_size; |
| 63 | |
| 64 | /* Partition number used by audPlayTask to communicate with DSP's RTOS |
| 65 | * kernel |
| 66 | */ |
| 67 | unsigned int partition_number; |
| 68 | |
| 69 | } __attribute__((packed)) audplay_cmd_bitstream_data_avail; |
| 70 | |
| 71 | #define AUDPLAY_CMD_HPCM_BUF_CFG 0x0003 |
| 72 | #define AUDPLAY_CMD_HPCM_BUF_CFG_LEN \ |
| 73 | sizeof(struct audplay_cmd_hpcm_buf_cfg) |
| 74 | |
| 75 | struct audplay_cmd_hpcm_buf_cfg { |
| 76 | unsigned int cmd_id; |
| 77 | unsigned int hostpcm_config; |
| 78 | unsigned int feedback_frequency; |
| 79 | unsigned int byte_swap; |
| 80 | unsigned int max_buffers; |
| 81 | unsigned int partition_number; |
| 82 | } __attribute__((packed)); |
| 83 | |
| 84 | #define AUDPLAY_CMD_BUFFER_REFRESH 0x0004 |
| 85 | #define AUDPLAY_CMD_BUFFER_REFRESH_LEN \ |
| 86 | sizeof(struct audplay_cmd_buffer_update) |
| 87 | |
| 88 | struct audplay_cmd_buffer_refresh { |
| 89 | unsigned int cmd_id; |
| 90 | unsigned int num_buffers; |
| 91 | unsigned int buf_read_count; |
| 92 | unsigned int buf0_address; |
| 93 | unsigned int buf0_length; |
| 94 | unsigned int buf1_address; |
| 95 | unsigned int buf1_length; |
| 96 | } __attribute__((packed)); |
| 97 | |
| 98 | #define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL_NT2 0x0005 |
| 99 | #define AUDPLAY_CMD_BITSTREAM_DATA_AVAIL_NT2_LEN \ |
| 100 | sizeof(audplay_cmd_bitstream_data_avail_nt2) |
| 101 | |
| 102 | /* Type specification of dec_data_avail message sent to AUDPLAYTASK |
| 103 | * for NT2 */ |
| 104 | struct audplay_cmd_bitstream_data_avail_nt2 { |
| 105 | /*command ID*/ |
| 106 | unsigned int cmd_id; |
| 107 | |
| 108 | /* Decoder ID for which message is being sent */ |
| 109 | unsigned int decoder_id; |
| 110 | |
| 111 | /* Start address of data in ARM global memory */ |
| 112 | unsigned int buf_ptr; |
| 113 | |
| 114 | /* Number of 16-bit words of bit-stream data contiguously available at the |
| 115 | * above-mentioned address |
| 116 | */ |
| 117 | unsigned int buf_size; |
| 118 | |
| 119 | /* Partition number used by audPlayTask to communicate with DSP's RTOS |
| 120 | * kernel |
| 121 | */ |
| 122 | unsigned int partition_number; |
| 123 | |
| 124 | /* bitstream write pointer */ |
| 125 | unsigned int dspBitstreamWritePtr; |
| 126 | |
| 127 | } __attribute__((packed)); |
| 128 | |
| 129 | #endif /* QDSP5AUDPLAYCMD_H */ |