#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 <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/sdw.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include "rt1316-sdw.h"
static const struct reg_default rt1316_reg_defaults[] = …;
static const struct reg_sequence rt1316_blind_write[] = …;
static bool rt1316_readable_register(struct device *dev, unsigned int reg)
{ … }
static bool rt1316_volatile_register(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config rt1316_sdw_regmap = …;
static int rt1316_read_prop(struct sdw_slave *slave)
{ … }
static void rt1316_apply_bq_params(struct rt1316_sdw_priv *rt1316)
{ … }
static int rt1316_io_init(struct device *dev, struct sdw_slave *slave)
{ … }
static int rt1316_update_status(struct sdw_slave *slave,
enum sdw_slave_status status)
{ … }
static int rt1316_classd_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static int rt1316_pde24_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{ … }
static const char * const rt1316_rx_data_ch_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt1316_rx_data_ch_enum,
SDW_SDCA_CTL(FUNC_NUM_SMART_AMP, RT1316_SDCA_ENT_UDMPU21, RT1316_SDCA_CTL_UDMPU_CLUSTER, 0), 0,
rt1316_rx_data_ch_select);
static const char * const rt1316_dac_output_vol_select[] = …;
static SOC_ENUM_SINGLE_DECL(rt1316_dac_vol_ctl_enum,
0xc010, 6, rt1316_dac_output_vol_select);
static const struct snd_kcontrol_new rt1316_snd_controls[] = …;
static const struct snd_kcontrol_new rt1316_sto_dac = …;
static const struct snd_soc_dapm_widget rt1316_dapm_widgets[] = …;
static const struct snd_soc_dapm_route rt1316_dapm_routes[] = …;
static int rt1316_set_sdw_stream(struct snd_soc_dai *dai, void *sdw_stream,
int direction)
{ … }
static void rt1316_sdw_shutdown(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int rt1316_sdw_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct snd_soc_dai *dai)
{ … }
static int rt1316_sdw_pcm_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static const struct sdw_slave_ops rt1316_slave_ops = …;
static int rt1316_sdw_parse_dt(struct rt1316_sdw_priv *rt1316, struct device *dev)
{ … }
static int rt1316_sdw_component_probe(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver soc_component_sdw_rt1316 = …;
static const struct snd_soc_dai_ops rt1316_aif_dai_ops = …;
#define RT1316_STEREO_RATES …
#define RT1316_FORMATS …
static struct snd_soc_dai_driver rt1316_sdw_dai[] = …;
static int rt1316_sdw_init(struct device *dev, struct regmap *regmap,
struct sdw_slave *slave)
{ … }
static int rt1316_sdw_probe(struct sdw_slave *slave,
const struct sdw_device_id *id)
{ … }
static int rt1316_sdw_remove(struct sdw_slave *slave)
{ … }
static const struct sdw_device_id rt1316_id[] = …;
MODULE_DEVICE_TABLE(sdw, rt1316_id);
static int __maybe_unused rt1316_dev_suspend(struct device *dev)
{ … }
#define RT1316_PROBE_TIMEOUT …
static int __maybe_unused rt1316_dev_resume(struct device *dev)
{ … }
static const struct dev_pm_ops rt1316_pm = …;
static struct sdw_driver rt1316_sdw_driver = …;
module_sdw_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;