#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/gpio/consumer.h>
#include <sound/core.h>
#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include "rockchip_i2s.h"
#define DRV_NAME …
struct rk_drvdata { … };
static int rk_hp_power(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
{ … }
static struct snd_soc_jack headphone_jack;
static struct snd_soc_jack_pin headphone_jack_pins[] = …;
static const struct snd_soc_dapm_widget rk_dapm_widgets[] = …;
static const struct snd_kcontrol_new rk_mc_controls[] = …;
static int rk_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static struct snd_soc_jack_gpio rk_hp_jack_gpio = …;
static int rk_init(struct snd_soc_pcm_runtime *runtime)
{ … }
static const struct snd_soc_ops rk_ops = …;
SND_SOC_DAILINK_DEFS(…);
static struct snd_soc_dai_link rk_dailink = …;
static struct snd_soc_card snd_soc_card_rk = …;
static int snd_rk_mc_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id rockchip_sound_of_match[] = …;
MODULE_DEVICE_TABLE(of, rockchip_sound_of_match);
static struct platform_driver rockchip_sound_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;