#include <linux/clk.h>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <sound/dmaengine_pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/tlv.h>
#define SUN50I_DMIC_EN_CTL …
#define SUN50I_DMIC_EN_CTL_GLOBE …
#define SUN50I_DMIC_EN_CTL_CHAN(v) …
#define SUN50I_DMIC_EN_CTL_CHAN_MASK …
#define SUN50I_DMIC_SR …
#define SUN50I_DMIC_SR_SAMPLE_RATE(v) …
#define SUN50I_DMIC_SR_SAMPLE_RATE_MASK …
#define SUN50I_DMIC_CTL …
#define SUN50I_DMIC_CTL_OVERSAMPLE_RATE …
#define SUN50I_DMIC_DATA …
#define SUN50I_DMIC_INTC …
#define SUN50I_DMIC_FIFO_DRQ_EN …
#define SUN50I_DMIC_INT_STA …
#define SUN50I_DMIC_INT_STA_OVERRUN_IRQ_PENDING …
#define SUN50I_DMIC_INT_STA_DATA_IRQ_PENDING …
#define SUN50I_DMIC_RXFIFO_CTL …
#define SUN50I_DMIC_RXFIFO_CTL_FLUSH …
#define SUN50I_DMIC_RXFIFO_CTL_MODE_MASK …
#define SUN50I_DMIC_RXFIFO_CTL_MODE_LSB …
#define SUN50I_DMIC_RXFIFO_CTL_MODE_MSB …
#define SUN50I_DMIC_RXFIFO_CTL_SAMPLE_MASK …
#define SUN50I_DMIC_RXFIFO_CTL_SAMPLE_16 …
#define SUN50I_DMIC_RXFIFO_CTL_SAMPLE_24 …
#define SUN50I_DMIC_CH_NUM …
#define SUN50I_DMIC_CH_NUM_N(v) …
#define SUN50I_DMIC_CH_NUM_N_MASK …
#define SUN50I_DMIC_CNT …
#define SUN50I_DMIC_CNT_N …
#define SUN50I_DMIC_D0D1_VOL_CTR …
#define SUN50I_DMIC_D0D1_VOL_CTR_0R …
#define SUN50I_DMIC_D0D1_VOL_CTR_0L …
#define SUN50I_DMIC_D0D1_VOL_CTR_1R …
#define SUN50I_DMIC_D0D1_VOL_CTR_1L …
#define SUN50I_DMIC_D2D3_VOL_CTR …
#define SUN50I_DMIC_D2D3_VOL_CTR_2R …
#define SUN50I_DMIC_D2D3_VOL_CTR_2L …
#define SUN50I_DMIC_D2D3_VOL_CTR_3R …
#define SUN50I_DMIC_D2D3_VOL_CTR_3L …
#define SUN50I_DMIC_HPF_CTRL …
#define SUN50I_DMIC_VERSION …
struct sun50i_dmic_dev { … };
struct dmic_rate { … };
static const struct dmic_rate dmic_rate_s[] = …;
static int sun50i_dmic_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai)
{ … }
static int sun50i_dmic_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *cpu_dai)
{ … }
static int sun50i_dmic_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int sun50i_dmic_soc_dai_probe(struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops sun50i_dmic_dai_ops = …;
static const struct regmap_config sun50i_dmic_regmap_config = …;
#define SUN50I_DMIC_RATES …
#define SUN50I_DMIC_FORMATS …
static struct snd_soc_dai_driver sun50i_dmic_dai = …;
static const struct of_device_id sun50i_dmic_of_match[] = …;
MODULE_DEVICE_TABLE(of, sun50i_dmic_of_match);
static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(sun50i_dmic_vol_scale, -12000, 75, 1);
static const struct snd_kcontrol_new sun50i_dmic_controls[] = …;
static const struct snd_soc_component_driver sun50i_dmic_component = …;
static int sun50i_dmic_runtime_suspend(struct device *dev)
{ … }
static int sun50i_dmic_runtime_resume(struct device *dev)
{ … }
static int sun50i_dmic_probe(struct platform_device *pdev)
{ … }
static void sun50i_dmic_remove(struct platform_device *pdev)
{ … }
static const struct dev_pm_ops sun50i_dmic_pm = …;
static struct platform_driver sun50i_dmic_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;