#include <linux/module.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/sizes.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>
#include <drm/amd_asic_type.h>
#include "acp.h"
#define DRV_NAME …
#define PLAYBACK_MIN_NUM_PERIODS …
#define PLAYBACK_MAX_NUM_PERIODS …
#define PLAYBACK_MAX_PERIOD_SIZE …
#define PLAYBACK_MIN_PERIOD_SIZE …
#define CAPTURE_MIN_NUM_PERIODS …
#define CAPTURE_MAX_NUM_PERIODS …
#define CAPTURE_MAX_PERIOD_SIZE …
#define CAPTURE_MIN_PERIOD_SIZE …
#define MAX_BUFFER …
#define MIN_BUFFER …
#define ST_PLAYBACK_MAX_PERIOD_SIZE …
#define ST_CAPTURE_MAX_PERIOD_SIZE …
#define ST_MAX_BUFFER …
#define ST_MIN_BUFFER …
#define DRV_NAME …
bool acp_bt_uart_enable = …;
EXPORT_SYMBOL(…);
static const struct snd_pcm_hardware acp_pcm_hardware_playback = …;
static const struct snd_pcm_hardware acp_pcm_hardware_capture = …;
static const struct snd_pcm_hardware acp_st_pcm_hardware_playback = …;
static const struct snd_pcm_hardware acp_st_pcm_hardware_capture = …;
static u32 acp_reg_read(void __iomem *acp_mmio, u32 reg)
{ … }
static void acp_reg_write(u32 val, void __iomem *acp_mmio, u32 reg)
{ … }
static void config_acp_dma_channel(void __iomem *acp_mmio, u8 ch_num,
u16 dscr_strt_idx, u16 num_dscrs,
enum acp_dma_priority_level priority_level)
{ … }
static void config_dma_descriptor_in_sram(void __iomem *acp_mmio,
u16 descr_idx,
acp_dma_dscr_transfer_t *descr_info)
{ … }
static void pre_config_reset(void __iomem *acp_mmio, u16 ch_num)
{ … }
static void set_acp_sysmem_dma_descriptors(void __iomem *acp_mmio,
u32 size, int direction,
u32 pte_offset, u16 ch,
u32 sram_bank, u16 dma_dscr_idx,
u32 asic_type)
{ … }
static void set_acp_to_i2s_dma_descriptors(void __iomem *acp_mmio, u32 size,
int direction, u32 sram_bank,
u16 destination, u16 ch,
u16 dma_dscr_idx, u32 asic_type)
{ … }
static void acp_pte_config(void __iomem *acp_mmio, dma_addr_t addr,
u16 num_of_pages, u32 pte_offset)
{ … }
static void config_acp_dma(void __iomem *acp_mmio,
struct audio_substream_data *rtd,
u32 asic_type)
{ … }
static void acp_dma_cap_channel_enable(void __iomem *acp_mmio,
u16 cap_channel)
{ … }
static void acp_dma_cap_channel_disable(void __iomem *acp_mmio,
u16 cap_channel)
{ … }
static void acp_dma_start(void __iomem *acp_mmio, u16 ch_num, bool is_circular)
{ … }
static int acp_dma_stop(void __iomem *acp_mmio, u8 ch_num)
{ … }
static void acp_set_sram_bank_state(void __iomem *acp_mmio, u16 bank,
bool power_on)
{ … }
static int acp_init(void __iomem *acp_mmio, u32 asic_type)
{ … }
static int acp_deinit(void __iomem *acp_mmio)
{ … }
static irqreturn_t dma_irq_handler(int irq, void *arg)
{ … }
static int acp_dma_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int acp_dma_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static u64 acp_get_byte_count(struct audio_substream_data *rtd)
{ … }
static snd_pcm_uframes_t acp_dma_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static snd_pcm_sframes_t acp_dma_delay(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int acp_dma_prepare(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int acp_dma_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{ … }
static int acp_dma_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{ … }
static int acp_dma_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_component_driver acp_asoc_platform = …;
static int acp_audio_probe(struct platform_device *pdev)
{ … }
static void acp_audio_remove(struct platform_device *pdev)
{ … }
static int acp_pcm_resume(struct device *dev)
{ … }
static int acp_pcm_runtime_suspend(struct device *dev)
{ … }
static int acp_pcm_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops acp_pm_ops = …;
static struct platform_driver acp_dma_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;