#include <linux/pci.h>
#include <linux/pm_runtime.h>
#include <linux/delay.h>
#include <sound/hdaudio.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include "skl.h"
#include "skl-topology.h"
#include "skl-sst-dsp.h"
#include "skl-sst-ipc.h"
#define HDA_MONO …
#define HDA_STEREO …
#define HDA_QUAD …
#define HDA_MAX …
static const struct snd_pcm_hardware azx_pcm_hw = …;
static inline
struct hdac_ext_stream *get_hdac_ext_stream(struct snd_pcm_substream *substream)
{ … }
static struct hdac_bus *get_bus_ctx(struct snd_pcm_substream *substream)
{ … }
static int skl_substream_alloc_pages(struct hdac_bus *bus,
struct snd_pcm_substream *substream,
size_t size)
{ … }
static void skl_set_pcm_constrains(struct hdac_bus *bus,
struct snd_pcm_runtime *runtime)
{ … }
static enum hdac_ext_stream_type skl_get_host_stream_type(struct hdac_bus *bus)
{ … }
static void skl_set_suspend_active(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai, bool enable)
{ … }
int skl_pcm_host_dma_prepare(struct device *dev, struct skl_pipe_params *params)
{ … }
int skl_pcm_link_dma_prepare(struct device *dev, struct skl_pipe_params *params)
{ … }
static int skl_pcm_open(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int skl_pcm_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int skl_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static void skl_pcm_close(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int skl_pcm_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int skl_be_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int skl_decoupled_trigger(struct snd_pcm_substream *substream,
int cmd)
{ … }
static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{ … }
static int skl_link_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{ … }
static int skl_link_pcm_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static int skl_link_pcm_trigger(struct snd_pcm_substream *substream,
int cmd, struct snd_soc_dai *dai)
{ … }
static int skl_link_hw_free(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{ … }
static const struct snd_soc_dai_ops skl_pcm_dai_ops = …;
static const struct snd_soc_dai_ops skl_dmic_dai_ops = …;
static const struct snd_soc_dai_ops skl_be_ssp_dai_ops = …;
static const struct snd_soc_dai_ops skl_link_dai_ops = …;
static struct snd_soc_dai_driver skl_fe_dai[] = …;
static struct snd_soc_dai_driver skl_platform_dai[] = …;
int skl_dai_load(struct snd_soc_component *cmp, int index,
struct snd_soc_dai_driver *dai_drv,
struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai)
{ … }
static int skl_platform_soc_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int skl_coupled_trigger(struct snd_pcm_substream *substream,
int cmd)
{ … }
static int skl_platform_soc_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
int cmd)
{ … }
static snd_pcm_uframes_t skl_platform_soc_pointer(
struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static u64 skl_adjust_codec_delay(struct snd_pcm_substream *substream,
u64 nsec)
{ … }
static int skl_platform_soc_get_time_info(
struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct timespec64 *system_ts, struct timespec64 *audio_ts,
struct snd_pcm_audio_tstamp_config *audio_tstamp_config,
struct snd_pcm_audio_tstamp_report *audio_tstamp_report)
{ … }
#define MAX_PREALLOC_SIZE …
static int skl_platform_soc_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{ … }
static int skl_get_module_info(struct skl_dev *skl,
struct skl_module_cfg *mconfig)
{ … }
static int skl_populate_modules(struct skl_dev *skl)
{ … }
static int skl_platform_soc_probe(struct snd_soc_component *component)
{ … }
static void skl_platform_soc_remove(struct snd_soc_component *component)
{ … }
static const struct snd_soc_component_driver skl_component = …;
int skl_platform_register(struct device *dev)
{ … }
int skl_platform_unregister(struct device *dev)
{ … }