#include <linux/init.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <linux/spinlock.h>
#include <sound/pcm.h>
#include <asm/dma.h>
#include <linux/dma-mapping.h>
#include <sound/pcm_params.h>
#include "q6apm.h"
#define DRV_NAME …
#define PLAYBACK_MIN_NUM_PERIODS …
#define PLAYBACK_MAX_NUM_PERIODS …
#define PLAYBACK_MAX_PERIOD_SIZE …
#define PLAYBACK_MIN_PERIOD_SIZE …
#define CAPTURE_MIN_NUM_PERIODS …
#define CAPTURE_MAX_NUM_PERIODS …
#define CAPTURE_MAX_PERIOD_SIZE …
#define CAPTURE_MIN_PERIOD_SIZE …
#define BUFFER_BYTES_MAX …
#define BUFFER_BYTES_MIN …
#define COMPR_PLAYBACK_MAX_FRAGMENT_SIZE …
#define COMPR_PLAYBACK_MAX_NUM_FRAGMENTS …
#define COMPR_PLAYBACK_MIN_FRAGMENT_SIZE …
#define COMPR_PLAYBACK_MIN_NUM_FRAGMENTS …
#define SID_MASK_DEFAULT …
static const struct snd_compr_codec_caps q6apm_compr_caps = …;
enum stream_state { … };
struct q6apm_dai_rtd { … };
struct q6apm_dai_data { … };
static const struct snd_pcm_hardware q6apm_dai_hardware_capture = …;
static const struct snd_pcm_hardware q6apm_dai_hardware_playback = …;
static void event_handler(uint32_t opcode, uint32_t token, void *payload, void *priv)
{ … }
static void event_handler_compr(uint32_t opcode, uint32_t token,
void *payload, void *priv)
{ … }
static int q6apm_dai_prepare(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int q6apm_dai_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{ … }
static int q6apm_dai_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int q6apm_dai_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static snd_pcm_uframes_t q6apm_dai_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int q6apm_dai_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int q6apm_dai_pcm_new(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd)
{ … }
static int q6apm_dai_compr_open(struct snd_soc_component *component,
struct snd_compr_stream *stream)
{ … }
static int q6apm_dai_compr_free(struct snd_soc_component *component,
struct snd_compr_stream *stream)
{ … }
static int q6apm_dai_compr_get_caps(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct snd_compr_caps *caps)
{ … }
static int q6apm_dai_compr_get_codec_caps(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct snd_compr_codec_caps *codec)
{ … }
static int q6apm_dai_compr_pointer(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct snd_compr_tstamp *tstamp)
{ … }
static int q6apm_dai_compr_trigger(struct snd_soc_component *component,
struct snd_compr_stream *stream, int cmd)
{ … }
static int q6apm_dai_compr_ack(struct snd_soc_component *component, struct snd_compr_stream *stream,
size_t count)
{ … }
static int q6apm_dai_compr_set_params(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct snd_compr_params *params)
{ … }
static int q6apm_dai_compr_set_metadata(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct snd_compr_metadata *metadata)
{ … }
static int q6apm_dai_compr_mmap(struct snd_soc_component *component,
struct snd_compr_stream *stream,
struct vm_area_struct *vma)
{ … }
static int q6apm_compr_copy(struct snd_soc_component *component,
struct snd_compr_stream *stream, char __user *buf,
size_t count)
{ … }
static const struct snd_compress_ops q6apm_dai_compress_ops = …;
static const struct snd_soc_component_driver q6apm_fe_dai_component = …;
static int q6apm_dai_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_OF
static const struct of_device_id q6apm_dai_device_id[] = …;
MODULE_DEVICE_TABLE(of, q6apm_dai_device_id);
#endif
static struct platform_driver q6apm_dai_platform_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;