#include <linux/slab.h>
#include <linux/module.h>
#include <linux/completion.h>
#include "bcm2835.h"
#include "vc_vchi_audioserv_defs.h"
#include "../interface/vchiq_arm/vchiq_arm.h"
struct bcm2835_audio_instance { … };
static bool force_bulk;
module_param(force_bulk, bool, 0444);
MODULE_PARM_DESC(…) …;
static void bcm2835_audio_lock(struct bcm2835_audio_instance *instance)
{ … }
static void bcm2835_audio_unlock(struct bcm2835_audio_instance *instance)
{ … }
static int bcm2835_audio_send_msg_locked(struct bcm2835_audio_instance *instance,
struct vc_audio_msg *m, bool wait)
{ … }
static int bcm2835_audio_send_msg(struct bcm2835_audio_instance *instance,
struct vc_audio_msg *m, bool wait)
{ … }
static int bcm2835_audio_send_simple(struct bcm2835_audio_instance *instance,
int type, bool wait)
{ … }
static int audio_vchi_callback(struct vchiq_instance *vchiq_instance,
enum vchiq_reason reason,
struct vchiq_header *header,
unsigned int handle, void *userdata)
{ … }
static int
vc_vchi_audio_init(struct vchiq_instance *vchiq_instance,
struct bcm2835_audio_instance *instance)
{ … }
static void vc_vchi_audio_deinit(struct bcm2835_audio_instance *instance)
{ … }
int bcm2835_new_vchi_ctx(struct device *dev, struct bcm2835_vchi_ctx *vchi_ctx)
{ … }
void bcm2835_free_vchi_ctx(struct bcm2835_vchi_ctx *vchi_ctx)
{ … }
int bcm2835_audio_open(struct bcm2835_alsa_stream *alsa_stream)
{ … }
int bcm2835_audio_set_ctls(struct bcm2835_alsa_stream *alsa_stream)
{ … }
int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream,
unsigned int channels, unsigned int samplerate,
unsigned int bps)
{ … }
int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream)
{ … }
int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream)
{ … }
int bcm2835_audio_drain(struct bcm2835_alsa_stream *alsa_stream)
{ … }
int bcm2835_audio_close(struct bcm2835_alsa_stream *alsa_stream)
{ … }
int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
unsigned int size, void *src)
{ … }