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

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  sst_pvt.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]>
 *		KP Jeeja <[email protected]>
 *  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 */
#include <linux/kobject.h>
#include <linux/pci.h>
#include <linux/fs.h>
#include <linux/firmware.h>
#include <linux/pm_runtime.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <sound/asound.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"

int sst_shim_write(void __iomem *addr, int offset, int value)
{}

u32 sst_shim_read(void __iomem *addr, int offset)
{}

u64 sst_reg_read64(void __iomem *addr, int offset)
{}

int sst_shim_write64(void __iomem *addr, int offset, u64 value)
{}

u64 sst_shim_read64(void __iomem *addr, int offset)
{}

void sst_set_fw_state_locked(
		struct intel_sst_drv *sst_drv_ctx, int sst_state)
{}

/*
 * sst_wait_interruptible - wait on event
 *
 * @sst_drv_ctx: Driver context
 * @block: Driver block to wait on
 *
 * This function waits without a timeout (and is interruptable) for a
 * given block event
 */
int sst_wait_interruptible(struct intel_sst_drv *sst_drv_ctx,
				struct sst_block *block)
{}

/*
 * sst_wait_timeout - wait on event for timeout
 *
 * @sst_drv_ctx: Driver context
 * @block: Driver block to wait on
 *
 * This function waits with a timeout value (and is not interruptible) on a
 * given block event
 */
int sst_wait_timeout(struct intel_sst_drv *sst_drv_ctx, struct sst_block *block)
{}

/*
 * sst_create_ipc_msg - create a IPC message
 *
 * @arg: ipc message
 * @large: large or short message
 *
 * this function allocates structures to send a large or short
 * message to the firmware
 */
int sst_create_ipc_msg(struct ipc_post **arg, bool large)
{}

/*
 * sst_create_block_and_ipc_msg - Creates IPC message and sst block
 * @arg: passed to sst_create_ipc_message API
 * @large: large or short message
 * @sst_drv_ctx: sst driver context
 * @block: return block allocated
 * @msg_id: IPC
 * @drv_id: stream id or private id
 */
int sst_create_block_and_ipc_msg(struct ipc_post **arg, bool large,
		struct intel_sst_drv *sst_drv_ctx, struct sst_block **block,
		u32 msg_id, u32 drv_id)
{}

/*
 * sst_clean_stream - clean the stream context
 *
 * @stream: stream structure
 *
 * this function resets the stream contexts
 * should be called in free
 */
void sst_clean_stream(struct stream_info *stream)
{}

int sst_prepare_and_post_msg(struct intel_sst_drv *sst,
		int task_id, int ipc_msg, int cmd_id, int pipe_id,
		size_t mbox_data_len, const void *mbox_data, void **data,
		bool large, bool fill_dsp, bool sync, bool response)
{}

int sst_pm_runtime_put(struct intel_sst_drv *sst_drv)
{}

void sst_fill_header_mrfld(union ipc_header_mrfld *header,
				int msg, int task_id, int large, int drv_id)
{}

void sst_fill_header_dsp(struct ipc_dsp_hdr *dsp, int msg,
					int pipe_id, int len)
{}

#define SST_MAX_BLOCKS
/*
 * sst_assign_pvt_id - assign a pvt id for stream
 *
 * @sst_drv_ctx : driver context
 *
 * this function assigns a private id for calls that dont have stream
 * context yet, should be called with lock held
 * uses bits for the id, and finds first free bits and assigns that
 */
int sst_assign_pvt_id(struct intel_sst_drv *drv)
{}

int sst_validate_strid(
		struct intel_sst_drv *sst_drv_ctx, int str_id)
{}

struct stream_info *get_stream_info(
		struct intel_sst_drv *sst_drv_ctx, int str_id)
{}

int get_stream_id_mrfld(struct intel_sst_drv *sst_drv_ctx,
		u32 pipe_id)
{}

u32 relocate_imr_addr_mrfld(u32 base_addr)
{}
EXPORT_SYMBOL_GPL();

void sst_add_to_dispatch_list_and_post(struct intel_sst_drv *sst,
						struct ipc_post *msg)
{}