linux/sound/soc/intel/atom/sst/sst_drv_interface.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  sst_drv_interface.c - Intel SST Driver for audio engine
 *
 *  Copyright (C) 2008-14 Intel Corp
 *  Authors:	Vinod Koul <[email protected]>
 *		Harsha Priya <[email protected]>
 *		Dharageswari R <[email protected])
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */
#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/fs.h>
#include <linux/firmware.h>
#include <linux/pm_runtime.h>
#include <linux/pm_qos.h>
#include <linux/math64.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
#include <sound/compress_driver.h>
#include <asm/platform_sst_audio.h>
#include "../sst-mfld-platform.h"
#include "sst.h"

#define NUM_CODEC
#define MIN_FRAGMENT
#define MAX_FRAGMENT
#define MIN_FRAGMENT_SIZE
#define MAX_FRAGMENT_SIZE
#define SST_GET_BYTES_PER_SAMPLE(pcm_wd_sz)
#ifdef CONFIG_PM
#define GET_USAGE_COUNT(dev)
#else
#define GET_USAGE_COUNT
#endif

int free_stream_context(struct intel_sst_drv *ctx, unsigned int str_id)
{}

int sst_get_stream_allocated(struct intel_sst_drv *ctx,
	struct snd_sst_params *str_param,
	struct snd_sst_lib_download **lib_dnld)
{}

/*
 * sst_get_sfreq - this function returns the frequency of the stream
 *
 * @str_param : stream params
 */
int sst_get_sfreq(struct snd_sst_params *str_param)
{}

/*
 * sst_get_num_channel - get number of channels for the stream
 *
 * @str_param : stream params
 */
int sst_get_num_channel(struct snd_sst_params *str_param)
{}

/*
 * sst_get_stream - this function prepares for stream allocation
 *
 * @str_param : stream param
 */
int sst_get_stream(struct intel_sst_drv *ctx,
			struct snd_sst_params *str_param)
{}

static int sst_power_control(struct device *dev, bool state)
{}

/*
 * sst_open_pcm_stream - Open PCM interface
 *
 * @str_param: parameters of pcm stream
 *
 * This function is called by MID sound card driver to open
 * a new pcm interface
 */
static int sst_open_pcm_stream(struct device *dev,
		struct snd_sst_params *str_param)
{}

static int sst_cdev_open(struct device *dev,
		struct snd_sst_params *str_params, struct sst_compress_cb *cb)
{}

static int sst_cdev_close(struct device *dev, unsigned int str_id)
{}

static int sst_cdev_ack(struct device *dev, unsigned int str_id,
		unsigned long bytes)
{}

static int sst_cdev_set_metadata(struct device *dev,
		unsigned int str_id, struct snd_compr_metadata *metadata)
{}

static int sst_cdev_stream_pause(struct device *dev, unsigned int str_id)
{}

static int sst_cdev_stream_pause_release(struct device *dev,
		unsigned int str_id)
{}

static int sst_cdev_stream_start(struct device *dev, unsigned int str_id)
{}

static int sst_cdev_stream_drop(struct device *dev, unsigned int str_id)
{}

static int sst_cdev_stream_drain(struct device *dev, unsigned int str_id)
{}

static int sst_cdev_stream_partial_drain(struct device *dev,
		unsigned int str_id)
{}

static int sst_cdev_tstamp(struct device *dev, unsigned int str_id,
		struct snd_compr_tstamp *tstamp)
{}

static int sst_cdev_caps(struct snd_compr_caps *caps)
{}

static const struct snd_compr_codec_caps caps_mp3 =;

static const struct snd_compr_codec_caps caps_aac =;

static int sst_cdev_codec_caps(struct snd_compr_codec_caps *codec)
{}

void sst_cdev_fragment_elapsed(struct intel_sst_drv *ctx, int str_id)
{}

/*
 * sst_close_pcm_stream - Close PCM interface
 *
 * @str_id: stream id to be closed
 *
 * This function is called by MID sound card driver to close
 * an existing pcm interface
 */
static int sst_close_pcm_stream(struct device *dev, unsigned int str_id)
{}

static inline int sst_calc_tstamp(struct intel_sst_drv *ctx,
		struct pcm_stream_info *info,
		struct snd_pcm_substream *substream,
		struct snd_sst_tstamp *fw_tstamp)
{}

static int sst_read_timestamp(struct device *dev, struct pcm_stream_info *info)
{}

static int sst_stream_start(struct device *dev, int str_id)
{}

static int sst_stream_drop(struct device *dev, int str_id)
{}

static int sst_stream_pause(struct device *dev, int str_id)
{}

static int sst_stream_resume(struct device *dev, int str_id)
{}

static int sst_stream_init(struct device *dev, struct pcm_stream_info *str_info)
{}

/*
 * sst_set_byte_stream - Set generic params
 *
 * @cmd: control cmd to be set
 * @arg: command argument
 *
 * This function is called by MID sound card driver to configure
 * SST runtime params.
 */
static int sst_send_byte_stream(struct device *dev,
		struct snd_sst_bytes_v2 *bytes)
{}

static struct sst_ops pcm_ops =;

static struct compress_sst_ops compr_ops =;

static struct sst_device sst_dsp_device =;

/*
 * sst_register - function to register DSP
 *
 * This functions registers DSP with the platform driver
 */
int sst_register(struct device *dev)
{}

int sst_unregister(struct device *dev)
{}