Lines Matching refs:dsp_code
23 short hpi_dsp_code_open(u32 adapter, void *os_data, struct dsp_code *dsp_code,
72 dsp_code->pvt = kmalloc(sizeof(*dsp_code->pvt), GFP_KERNEL);
73 if (!dsp_code->pvt) {
78 dsp_code->pvt->dev = dev;
79 dsp_code->pvt->firmware = firmware;
80 dsp_code->header = header;
81 dsp_code->block_length = header.size / sizeof(u32);
82 dsp_code->word_count = sizeof(header) / sizeof(u32);
88 dsp_code->block_length = 0;
93 void hpi_dsp_code_close(struct dsp_code *dsp_code)
96 release_firmware(dsp_code->pvt->firmware);
97 kfree(dsp_code->pvt);
101 void hpi_dsp_code_rewind(struct dsp_code *dsp_code)
104 dsp_code->word_count = sizeof(struct code_header) / sizeof(u32);
108 short hpi_dsp_code_read_word(struct dsp_code *dsp_code, u32 *pword)
110 if (dsp_code->word_count + 1 > dsp_code->block_length)
113 *pword = ((u32 *)(dsp_code->pvt->firmware->data))[dsp_code->
115 dsp_code->word_count++;
121 struct dsp_code *dsp_code, u32 **ppblock)
123 if (dsp_code->word_count + words_requested > dsp_code->block_length)
127 ((u32 *)(dsp_code->pvt->firmware->data)) +
128 dsp_code->word_count;
129 dsp_code->word_count += words_requested;