#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/i2c.h>
#include <linux/input.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "rockchip_i2s.h"
#include "../codecs/da7219.h"
#include "../codecs/rt5514.h"
#define DRV_NAME …
#define SOUND_FS …
static unsigned int dmic_wakeup_delay;
static struct snd_soc_jack rockchip_sound_jack;
static struct snd_soc_jack_pin rockchip_sound_jack_pins[] = …;
static const struct snd_soc_dapm_widget rockchip_dapm_widgets[] = …;
static const struct snd_kcontrol_new rockchip_controls[] = …;
static int rockchip_sound_max98357a_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int rockchip_sound_rt5514_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int rockchip_sound_da7219_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static struct snd_soc_jack cdn_dp_card_jack;
static int rockchip_sound_cdndp_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd)
{ … }
static int rockchip_sound_dmic_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int rockchip_sound_startup(struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_ops rockchip_sound_max98357a_ops = …;
static const struct snd_soc_ops rockchip_sound_rt5514_ops = …;
static const struct snd_soc_ops rockchip_sound_da7219_ops = …;
static const struct snd_soc_ops rockchip_sound_dmic_ops = …;
static struct snd_soc_card rockchip_sound_card = …;
enum { … };
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
SND_SOC_DAILINK_DEFS(…);
static const struct snd_soc_dai_link rockchip_dais[] = …;
static const struct snd_soc_dapm_route rockchip_sound_cdndp_routes[] = …;
static const struct snd_soc_dapm_route rockchip_sound_da7219_routes[] = …;
static const struct snd_soc_dapm_route rockchip_sound_dmic_routes[] = …;
static const struct snd_soc_dapm_route rockchip_sound_max98357a_routes[] = …;
static const struct snd_soc_dapm_route rockchip_sound_rt5514_routes[] = …;
struct rockchip_sound_route { … };
static const struct rockchip_sound_route rockchip_routes[] = …;
struct dailink_match_data { … };
static const struct dailink_match_data dailink_match[] = …;
static int rockchip_sound_codec_node_match(struct device_node *np_codec)
{ … }
static int rockchip_sound_of_parse_dais(struct device *dev,
struct snd_soc_card *card)
{ … }
static int rockchip_sound_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id rockchip_sound_of_match[] = …;
static struct platform_driver rockchip_sound_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;
MODULE_DEVICE_TABLE(of, rockchip_sound_of_match);