#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/gpio/consumer.h>
#include <linux/of.h>
#include <linux/i2c.h>
#include <linux/clk.h>
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <sound/pcm.h>
#include <sound/soc-dapm.h>
#include <sound/simple_card_utils.h>
#include "fsl_sai.h"
#define IMX_CARD_MCLK_22P5792MHZ …
#define IMX_CARD_MCLK_24P576MHZ …
enum codec_type { … };
struct imx_akcodec_fs_mul { … };
struct imx_akcodec_tdm_fs_mul { … };
struct imx_card_plat_data { … };
struct dai_link_data { … };
struct imx_card_data { … };
static struct imx_akcodec_fs_mul ak4458_fs_mul[] = …;
static struct imx_akcodec_tdm_fs_mul ak4458_tdm_fs_mul[] = …;
static struct imx_akcodec_fs_mul ak4497_fs_mul[] = …;
static struct imx_akcodec_fs_mul ak5558_fs_mul[] = …;
static struct imx_akcodec_tdm_fs_mul ak5558_tdm_fs_mul[] = …;
static const u32 akcodec_rates[] = …;
static const u32 akcodec_tdm_rates[] = …;
static const u32 ak4458_channels[] = …;
static const u32 ak4458_tdm_channels[] = …;
static const u32 ak5558_channels[] = …;
static const u32 ak5558_tdm_channels[] = …;
static bool format_is_dsd(struct snd_pcm_hw_params *params)
{ … }
static bool format_is_tdm(struct dai_link_data *link_data)
{ … }
static bool codec_is_akcodec(unsigned int type)
{ … }
static unsigned long akcodec_get_mclk_rate(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
int slots, int slot_width)
{ … }
static int imx_aif_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int ak5558_hw_rule_rate(struct snd_pcm_hw_params *p, struct snd_pcm_hw_rule *r)
{ … }
static int imx_aif_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops imx_aif_ops = …;
static const struct snd_soc_ops imx_aif_ops_be = …;
static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params)
{ … }
static int imx_card_parse_of(struct imx_card_data *data)
{ … }
static int imx_card_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id imx_card_dt_ids[] = …;
MODULE_DEVICE_TABLE(of, imx_card_dt_ids);
static struct platform_driver imx_card_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;