Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED
0003 #define SOUND_FIREWIRE_PACKETS_BUFFER_H_INCLUDED
0004 
0005 #include <linux/dma-mapping.h>
0006 #include <linux/firewire.h>
0007 
0008 /**
0009  * struct iso_packets_buffer - manages a buffer for many packets
0010  * @iso_buffer: the memory containing the packets
0011  * @packets: an array, with each element pointing to one packet
0012  */
0013 struct iso_packets_buffer {
0014     struct fw_iso_buffer iso_buffer;
0015     struct {
0016         void *buffer;
0017         unsigned int offset;
0018     } *packets;
0019 };
0020 
0021 int iso_packets_buffer_init(struct iso_packets_buffer *b, struct fw_unit *unit,
0022                 unsigned int count, unsigned int packet_size,
0023                 enum dma_data_direction direction);
0024 void iso_packets_buffer_destroy(struct iso_packets_buffer *b,
0025                 struct fw_unit *unit);
0026 
0027 #endif