linux/sound/soc/intel/avs/pcm.c

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright(c) 2021-2022 Intel Corporation
//
// Authors: Cezary Rojewski <[email protected]>
//          Amadeusz Slawinski <[email protected]>
//

#include <linux/debugfs.h>
#include <linux/device.h>
#include <sound/hda_register.h>
#include <sound/hdaudio_ext.h>
#include <sound/pcm_params.h>
#include <sound/soc-acpi.h>
#include <sound/soc-acpi-intel-match.h>
#include <sound/soc-component.h>
#include "avs.h"
#include "path.h"
#include "pcm.h"
#include "topology.h"
#include "../../codecs/hda.h"

struct avs_dma_data {};

static struct avs_tplg_path_template *
avs_dai_find_path_template(struct snd_soc_dai *dai, bool is_fe, int direction)
{}

static void avs_period_elapsed_work(struct work_struct *work)
{}

void avs_period_elapsed(struct snd_pcm_substream *substream)
{}

static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static void avs_dai_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_hw_params(struct snd_pcm_substream *substream,
			     struct snd_pcm_hw_params *fe_hw_params,
			     struct snd_pcm_hw_params *be_hw_params, struct snd_soc_dai *dai,
			     int dma_id)
{}

static int avs_dai_be_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *be_hw_params, struct snd_soc_dai *dai,
				int dma_id)
{}

static int avs_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_nonhda_be_hw_params(struct snd_pcm_substream *substream,
				       struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
{}

static int avs_dai_nonhda_be_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_nonhda_be_trigger(struct snd_pcm_substream *substream, int cmd,
				     struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops avs_dai_nonhda_be_ops =;

static int avs_dai_hda_be_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static void avs_dai_hda_be_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_hda_be_hw_params(struct snd_pcm_substream *substream,
				    struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
{}

static int avs_dai_hda_be_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_hda_be_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_hda_be_trigger(struct snd_pcm_substream *substream, int cmd,
				  struct snd_soc_dai *dai)
{}

static const struct snd_soc_dai_ops avs_dai_hda_be_ops =;

static int hw_rule_param_size(struct snd_pcm_hw_params *params, struct snd_pcm_hw_rule *rule)
{}

static int avs_pcm_hw_constraints_init(struct snd_pcm_substream *substream)
{}

static int avs_dai_fe_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static void avs_dai_fe_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_fe_hw_params(struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *hw_params, struct snd_soc_dai *dai)
{}

static int __avs_dai_fe_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_fe_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static int avs_dai_fe_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai)
{}

static void avs_hda_stream_start(struct hdac_bus *bus, struct hdac_ext_stream *host_stream)
{}

static void avs_hda_stream_stop(struct hdac_bus *bus, struct hdac_ext_stream *host_stream)
{}

static int avs_dai_fe_trigger(struct snd_pcm_substream *substream, int cmd, struct snd_soc_dai *dai)
{}

const struct snd_soc_dai_ops avs_dai_fe_ops =;

static ssize_t topology_name_read(struct file *file, char __user *user_buf, size_t count,
				  loff_t *ppos)
{}

static const struct file_operations topology_name_fops =;

static int avs_component_load_libraries(struct avs_soc_component *acomp)
{}

static int avs_component_probe(struct snd_soc_component *component)
{}

static void avs_component_remove(struct snd_soc_component *component)
{}

static int avs_dai_resume_hw_params(struct snd_soc_dai *dai, struct avs_dma_data *data)
{}

static int avs_dai_resume_fe_prepare(struct snd_soc_dai *dai, struct avs_dma_data *data)
{}

static int avs_dai_resume_be_prepare(struct snd_soc_dai *dai, struct avs_dma_data *data)
{}

static int avs_dai_suspend_fe_hw_free(struct snd_soc_dai *dai, struct avs_dma_data *data)
{}

static int avs_dai_suspend_be_hw_free(struct snd_soc_dai *dai, struct avs_dma_data *data)
{}

static int avs_component_pm_op(struct snd_soc_component *component, bool be,
			       int (*op)(struct snd_soc_dai *, struct avs_dma_data *))
{}

static int avs_component_resume_hw_params(struct snd_soc_component *component, bool be)
{}

static int avs_component_resume_prepare(struct snd_soc_component *component, bool be)
{}

static int avs_component_suspend_hw_free(struct snd_soc_component *component, bool be)
{}

static int avs_component_suspend(struct snd_soc_component *component)
{}

static int avs_component_resume(struct snd_soc_component *component)
{}

static const struct snd_pcm_hardware avs_pcm_hardware =;

static int avs_component_open(struct snd_soc_component *component,
			      struct snd_pcm_substream *substream)
{}

static unsigned int avs_hda_stream_dpib_read(struct hdac_ext_stream *stream)
{}

static snd_pcm_uframes_t
avs_component_pointer(struct snd_soc_component *component, struct snd_pcm_substream *substream)
{}

static int avs_component_mmap(struct snd_soc_component *component,
			      struct snd_pcm_substream *substream,
			      struct vm_area_struct *vma)
{}

#define MAX_PREALLOC_SIZE

static int avs_component_construct(struct snd_soc_component *component,
				   struct snd_soc_pcm_runtime *rtd)
{}

static const struct snd_soc_component_driver avs_component_driver =;

int avs_soc_component_register(struct device *dev, const char *name,
			       const struct snd_soc_component_driver *drv,
			       struct snd_soc_dai_driver *cpu_dais, int num_cpu_dais)
{}

static struct snd_soc_dai_driver dmic_cpu_dais[] =;

int avs_dmic_platform_register(struct avs_dev *adev, const char *name)
{}

static const struct snd_soc_dai_driver i2s_dai_template =;

int avs_i2s_platform_register(struct avs_dev *adev, const char *name, unsigned long port_mask,
			      unsigned long *tdms)
{}

/* HD-Audio CPU DAI template */
static const struct snd_soc_dai_driver hda_cpu_dai =;

static void avs_component_hda_unregister_dais(struct snd_soc_component *component)
{}

static int avs_component_hda_probe(struct snd_soc_component *component)
{}

static void avs_component_hda_remove(struct snd_soc_component *component)
{}

static int avs_component_hda_open(struct snd_soc_component *component,
				  struct snd_pcm_substream *substream)
{}

static const struct snd_soc_component_driver avs_hda_component_driver =;

int avs_hda_platform_register(struct avs_dev *adev, const char *name)
{}