#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#define TEST_NAME_LEN …
struct test_dai_name { … };
struct test_priv { … };
struct test_adata { … };
#define mile_stone(d) …
#define mile_stone_x(dev) …
static int test_dai_set_sysclk(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir)
{ … }
static int test_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
unsigned int freq_in, unsigned int freq_out)
{ … }
static int test_dai_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div)
{ … }
static int test_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{ … }
static int test_dai_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
{ … }
static int test_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
static void test_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
static int test_dai_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int test_dai_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{ … }
static int test_dai_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
{ … }
static int test_dai_bespoke_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{ … }
static const u64 test_dai_formats = …
SND_SOC_POSSIBLE_DAIFMT_I2S |
SND_SOC_POSSIBLE_DAIFMT_RIGHT_J |
SND_SOC_POSSIBLE_DAIFMT_LEFT_J |
SND_SOC_POSSIBLE_DAIFMT_DSP_A |
SND_SOC_POSSIBLE_DAIFMT_DSP_B |
SND_SOC_POSSIBLE_DAIFMT_AC97 |
SND_SOC_POSSIBLE_DAIFMT_PDM |
SND_SOC_POSSIBLE_DAIFMT_NB_NF |
SND_SOC_POSSIBLE_DAIFMT_NB_IF |
SND_SOC_POSSIBLE_DAIFMT_IB_NF |
SND_SOC_POSSIBLE_DAIFMT_IB_IF;
static const struct snd_soc_dai_ops test_ops = …;
static const struct snd_soc_dai_ops test_verbose_ops = …;
#define STUB_RATES …
#define STUB_FORMATS …
static int test_component_probe(struct snd_soc_component *component)
{ … }
static void test_component_remove(struct snd_soc_component *component)
{ … }
static int test_component_suspend(struct snd_soc_component *component)
{ … }
static int test_component_resume(struct snd_soc_component *component)
{ … }
#define PREALLOC_BUFFER …
static int test_component_pcm_construct(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{ … }
static void test_component_pcm_destruct(struct snd_soc_component *component,
struct snd_pcm *pcm)
{ … }
static int test_component_set_sysclk(struct snd_soc_component *component,
int clk_id, int source, unsigned int freq, int dir)
{ … }
static int test_component_set_pll(struct snd_soc_component *component, int pll_id,
int source, unsigned int freq_in, unsigned int freq_out)
{ … }
static int test_component_set_jack(struct snd_soc_component *component,
struct snd_soc_jack *jack, void *data)
{ … }
static void test_component_seq_notifier(struct snd_soc_component *component,
enum snd_soc_dapm_type type, int subseq)
{ … }
static int test_component_stream_event(struct snd_soc_component *component, int event)
{ … }
static int test_component_set_bias_level(struct snd_soc_component *component,
enum snd_soc_bias_level level)
{ … }
static const struct snd_pcm_hardware test_component_hardware = …;
static int test_component_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int test_component_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int test_component_ioctl(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
unsigned int cmd, void *arg)
{ … }
static int test_component_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int test_component_hw_free(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int test_component_prepare(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static void test_component_timer_stop(struct test_priv *priv)
{ … }
static void test_component_timer_start(struct test_priv *priv)
{ … }
static void test_component_dwork(struct work_struct *work)
{ … }
static int test_component_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{ … }
static int test_component_sync_stop(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static snd_pcm_uframes_t test_component_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int test_component_get_time_info(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct timespec64 *system_ts,
struct timespec64 *audio_ts,
struct snd_pcm_audio_tstamp_config *audio_tstamp_config,
struct snd_pcm_audio_tstamp_report *audio_tstamp_report)
{ … }
static int test_component_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static const struct test_adata test_cpu = …;
static const struct test_adata test_cpu_vv = …;
static const struct test_adata test_cpu_nv = …;
static const struct test_adata test_cpu_vn = …;
static const struct test_adata test_codec = …;
static const struct test_adata test_codec_vv = …;
static const struct test_adata test_codec_nv = …;
static const struct test_adata test_codec_vn = …;
static const struct of_device_id test_of_match[] = …;
MODULE_DEVICE_TABLE(of, test_of_match);
static const struct snd_soc_dapm_widget widgets[] = …;
static int test_driver_probe(struct platform_device *pdev)
{ … }
static void test_driver_remove(struct platform_device *pdev)
{ … }
static struct platform_driver test_driver = …;
module_platform_driver(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;