#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <media/v4l2-device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include "cobalt-driver.h"
#include "cobalt-alsa.h"
#include "cobalt-alsa-pcm.h"
static unsigned int pcm_debug;
module_param(pcm_debug, int, 0644);
MODULE_PARM_DESC(…) …;
#define dprintk(fmt, arg...) …
static const struct snd_pcm_hardware snd_cobalt_hdmi_capture = …;
static const struct snd_pcm_hardware snd_cobalt_playback = …;
static void sample_cpy(u8 *dst, const u8 *src, u32 len, bool is_s32)
{ … }
static void cobalt_alsa_announce_pcm_data(struct snd_cobalt_card *cobsc,
u8 *pcm_data,
size_t skip,
size_t samples)
{ … }
static int alsa_fnc(struct vb2_buffer *vb, void *priv)
{ … }
static int snd_cobalt_pcm_capture_open(struct snd_pcm_substream *substream)
{ … }
static int snd_cobalt_pcm_capture_close(struct snd_pcm_substream *substream)
{ … }
static int snd_cobalt_pcm_prepare(struct snd_pcm_substream *substream)
{ … }
static int snd_cobalt_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{ … }
static
snd_pcm_uframes_t snd_cobalt_pcm_pointer(struct snd_pcm_substream *substream)
{ … }
static void pb_sample_cpy(u8 *dst, const u8 *src, u32 len, bool is_s32)
{ … }
static void cobalt_alsa_pb_pcm_data(struct snd_cobalt_card *cobsc,
u8 *pcm_data,
size_t skip,
size_t samples)
{ … }
static int alsa_pb_fnc(struct vb2_buffer *vb, void *priv)
{ … }
static int snd_cobalt_pcm_playback_open(struct snd_pcm_substream *substream)
{ … }
static int snd_cobalt_pcm_playback_close(struct snd_pcm_substream *substream)
{ … }
static int snd_cobalt_pcm_pb_prepare(struct snd_pcm_substream *substream)
{ … }
static int snd_cobalt_pcm_pb_trigger(struct snd_pcm_substream *substream,
int cmd)
{ … }
static
snd_pcm_uframes_t snd_cobalt_pcm_pb_pointer(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_ops snd_cobalt_pcm_capture_ops = …;
static const struct snd_pcm_ops snd_cobalt_pcm_playback_ops = …;
int snd_cobalt_pcm_create(struct snd_cobalt_card *cobsc)
{ … }