linux/sound/soc/sof/mediatek/mt8186/mt8186.c

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
//
// Copyright(c) 2022 Mediatek Inc. All rights reserved.
//
// Author: Allen-KH Cheng <[email protected]>
//         Tinghan Shen <[email protected]>

/*
 * Hardware interface for audio DSP on mt8186
 */

#include <linux/delay.h>
#include <linux/firmware.h>
#include <linux/io.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/of_reserved_mem.h>
#include <linux/module.h>

#include <sound/sof.h>
#include <sound/sof/xtensa.h>
#include "../../ops.h"
#include "../../sof-of-dev.h"
#include "../../sof-audio.h"
#include "../adsp_helper.h"
#include "../mtk-adsp-common.h"
#include "mt8186.h"
#include "mt8186-clk.h"

static int mt8186_get_mailbox_offset(struct snd_sof_dev *sdev)
{}

static int mt8186_get_window_offset(struct snd_sof_dev *sdev, u32 id)
{}

static int mt8186_send_msg(struct snd_sof_dev *sdev,
			   struct snd_sof_ipc_msg *msg)
{}

static void mt8186_dsp_handle_reply(struct mtk_adsp_ipc *ipc)
{}

static void mt8186_dsp_handle_request(struct mtk_adsp_ipc *ipc)
{}

static const struct mtk_adsp_ipc_ops dsp_ops =;

static int platform_parse_resource(struct platform_device *pdev, void *data)
{}

static void adsp_sram_power_on(struct snd_sof_dev *sdev)
{}

static void adsp_sram_power_off(struct snd_sof_dev *sdev)
{}

/*  Init the basic DSP DRAM address */
static int adsp_memory_remap_init(struct snd_sof_dev *sdev, struct mtk_adsp_chip_info *adsp)
{}

static int mt8186_run(struct snd_sof_dev *sdev)
{}

static int mt8186_dsp_probe(struct snd_sof_dev *sdev)
{}

static void mt8186_dsp_remove(struct snd_sof_dev *sdev)
{}

static int mt8186_dsp_shutdown(struct snd_sof_dev *sdev)
{}

static int mt8186_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
{}

static int mt8186_dsp_resume(struct snd_sof_dev *sdev)
{}

/* on mt8186 there is 1 to 1 match between type and BAR idx */
static int mt8186_get_bar_index(struct snd_sof_dev *sdev, u32 type)
{}

static int mt8186_pcm_hw_params(struct snd_sof_dev *sdev,
				struct snd_pcm_substream *substream,
				struct snd_pcm_hw_params *params,
				struct snd_sof_platform_stream_params *platform_params)
{}

static snd_pcm_uframes_t mt8186_pcm_pointer(struct snd_sof_dev *sdev,
					    struct snd_pcm_substream *substream)
{}

static void mt8186_adsp_dump(struct snd_sof_dev *sdev, u32 flags)
{}

static struct snd_soc_dai_driver mt8186_dai[] =;

/* mt8186 ops */
static const struct snd_sof_dsp_ops sof_mt8186_ops =;

static struct snd_sof_of_mach sof_mt8186_machs[] =;

static const struct sof_dev_desc sof_of_mt8186_desc =;

/*
 * DL2, DL3, UL4, UL5 are registered as SOF FE, so creating the corresponding
 * SOF BE to complete the pipeline.
 */
static struct snd_soc_dai_driver mt8188_dai[] =;

/* mt8188 ops */
static struct snd_sof_dsp_ops sof_mt8188_ops;

static int sof_mt8188_ops_init(struct snd_sof_dev *sdev)
{}

static struct snd_sof_of_mach sof_mt8188_machs[] =;

static const struct sof_dev_desc sof_of_mt8188_desc =;

static const struct of_device_id sof_of_mt8186_ids[] =;
MODULE_DEVICE_TABLE(of, sof_of_mt8186_ids);

/* DT driver definition */
static struct platform_driver snd_sof_of_mt8186_driver =;
module_platform_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_IMPORT_NS();
MODULE_IMPORT_NS();