#include <linux/delay.h>
#include <linux/device.h>
#include <linux/pm_runtime.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/dmi.h>
#include <linux/firmware.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include "rt1318-sdw.h"
static const struct reg_sequence rt1318_blind_write[] = …;
static const struct reg_default rt1318_reg_defaults[] = …;
static bool rt1318_readable_register(struct device *dev, unsigned int reg)
{ … }
static bool rt1318_volatile_register(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rt1318_sdw_regmap = …;
static int rt1318_read_prop(struct sdw_slave *slave)
{ … }
static int rt1318_io_init(struct device *dev, struct sdw_slave *slave)
{ … }
static int rt1318_update_status(struct sdw_slave *slave,
enum sdw_slave_status status)
{ … }
static int rt1318_classd_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const char * const rt1318_rx_data_ch_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt1318_rx_data_ch_enum,
SDW_SDCA_CTL(FUNC_NUM_SMART_AMP, RT1318_SDCA_ENT_UDMPU21, RT1318_SDCA_CTL_UDMPU_CLUSTER, 0), 0,
rt1318_rx_data_ch_select);
static const struct snd_kcontrol_new rt1318_snd_controls[] = …;
static const struct snd_kcontrol_new rt1318_sto_dac = …;
static const struct snd_soc_dapm_widget rt1318_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt1318_dapm_routes[] = …;
static int rt1318_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
int direction)
{ … }
static void rt1318_sdw_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int rt1318_sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt1318_sdw_pcm_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static const struct sdw_slave_ops rt1318_slave_ops = …;
static int rt1318_sdw_component_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_sdw_rt1318 = …;
static const struct snd_soc_dai_ops rt1318_aif_dai_ops = …;
#define RT1318_STEREO_RATES …
#define RT1318_FORMATS …
static struct snd_soc_dai_driver rt1318_sdw_dai[] = …;
static int rt1318_sdw_init(struct device *dev, struct regmap *regmap,
struct sdw_slave *slave)
{ … }
static int rt1318_sdw_probe(struct sdw_slave *slave,
const struct sdw_device_id *id)
{ … }
static int rt1318_sdw_remove(struct sdw_slave *slave)
{ … }
static const struct sdw_device_id rt1318_id[] = …;
MODULE_DEVICE_TABLE(sdw, rt1318_id);
static int __maybe_unused rt1318_dev_suspend(struct device *dev)
{ … }
#define RT1318_PROBE_TIMEOUT …
static int __maybe_unused rt1318_dev_resume(struct device *dev)
{ … }
static const struct dev_pm_ops rt1318_pm = …;
static struct sdw_driver rt1318_sdw_driver = …;
module_sdw_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;