#ifndef __SOUND_ARM_BCM2835_H
#define __SOUND_ARM_BCM2835_H
#include <linux/device.h>
#include <linux/wait.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm-indirect.h>
#include "../include/linux/raspberrypi/vchiq.h"
#define MAX_SUBSTREAMS …
#define AVAIL_SUBSTREAMS_MASK …
enum { … };
#define alsa2chip(vol) …
#define chip2alsa(vol) …
#define CHIP_MIN_VOLUME …
enum snd_bcm2835_route { … };
enum snd_bcm2835_ctrl { … };
struct bcm2835_vchi_ctx { … };
struct bcm2835_chip { … };
struct bcm2835_alsa_stream { … };
int snd_bcm2835_new_pcm(struct bcm2835_chip *chip, const char *name,
int idx, enum snd_bcm2835_route route,
u32 numchannels, bool spdif);
int snd_bcm2835_new_hdmi_ctl(struct bcm2835_chip *chip);
int snd_bcm2835_new_headphones_ctl(struct bcm2835_chip *chip);
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_close(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_set_ctls(struct bcm2835_alsa_stream *alsa_stream);
int bcm2835_audio_write(struct bcm2835_alsa_stream *alsa_stream,
unsigned int count,
void *src);
void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream,
unsigned int size);
unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream);
#endif