18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED 38c2ecf20Sopenharmony_ci#define SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/dma-mapping.h> 68c2ecf20Sopenharmony_ci#include <linux/firewire.h> 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/** 98c2ecf20Sopenharmony_ci * struct iso_packets_buffer - manages a buffer for many packets 108c2ecf20Sopenharmony_ci * @iso_buffer: the memory containing the packets 118c2ecf20Sopenharmony_ci * @packets: an array, with each element pointing to one packet 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_cistruct iso_packets_buffer { 148c2ecf20Sopenharmony_ci struct fw_iso_buffer iso_buffer; 158c2ecf20Sopenharmony_ci struct { 168c2ecf20Sopenharmony_ci void *buffer; 178c2ecf20Sopenharmony_ci unsigned int offset; 188c2ecf20Sopenharmony_ci } *packets; 198c2ecf20Sopenharmony_ci}; 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciint iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit, 228c2ecf20Sopenharmony_ci unsigned int count, unsigned int packet_size, 238c2ecf20Sopenharmony_ci enum dma_data_direction direction); 248c2ecf20Sopenharmony_civoid iso_packets_buffer_destroy(struct iso_packets_buffer *b, 258c2ecf20Sopenharmony_ci struct fw_unit *unit); 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#endif 28