Lines Matching defs:block
235 struct snd_sof_blk_hdr *block;
243 block = (struct snd_sof_blk_hdr *)((u8 *)module + sizeof(*module));
249 if (remaining < sizeof(*block)) {
254 /* minus header size of block */
255 remaining -= sizeof(*block);
257 if (block->size == 0) {
259 "warning: block %d size zero\n", count);
261 block->type, block->offset);
265 switch (block->type) {
272 offset = block->offset;
275 dev_err(sdev->dev, "%s: bad type %#x for block %#x\n",
276 __func__, block->type, count);
280 dev_dbg(sdev->dev, "block %d type %#x size %#x ==> offset %#x\n",
281 count, block->type, block->size, offset);
283 /* checking block->size to avoid unaligned access */
284 if (block->size % sizeof(u32)) {
285 dev_err(sdev->dev, "%s: invalid block size %#x\n",
286 __func__, block->size);
289 ret = snd_sof_dsp_block_write(sdev, block->type, offset,
290 block + 1, block->size);
292 dev_err(sdev->dev, "%s: write to block type %#x failed\n",
293 __func__, block->type);
297 if (remaining < block->size) {
302 /* minus body size of block */
303 remaining -= block->size;
304 /* next block */
305 block = (struct snd_sof_blk_hdr *)((u8 *)block + sizeof(*block)
306 + block->size);