Commit ba202a7b authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown

ASoC: Intel: catpt: Define DSP operations

Implement dsp lifecycle functions such as core RESET and STALL,
SRAM power control and LP clock selection. This also adds functions for
handling transport over DW DMA controller.
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200929141247.8058-5-cezary.rojewski@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 64b9b1b0
......@@ -99,6 +99,10 @@ struct catpt_dev {
struct resource dram;
struct resource iram;
struct resource *scratch;
struct list_head stream_list;
spinlock_t list_lock;
struct mutex clk_mutex;
};
int catpt_dmac_probe(struct catpt_dev *cdev);
......@@ -111,6 +115,16 @@ int catpt_dma_memcpy_fromdsp(struct catpt_dev *cdev, struct dma_chan *chan,
dma_addr_t dst_addr, dma_addr_t src_addr,
size_t size);
void lpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable);
void wpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable);
int lpt_dsp_power_up(struct catpt_dev *cdev);
int lpt_dsp_power_down(struct catpt_dev *cdev);
int wpt_dsp_power_up(struct catpt_dev *cdev);
int wpt_dsp_power_down(struct catpt_dev *cdev);
int catpt_dsp_stall(struct catpt_dev *cdev, bool stall);
void catpt_dsp_update_srampge(struct catpt_dev *cdev, struct resource *sram,
unsigned long mask);
int catpt_dsp_update_lpclock(struct catpt_dev *cdev);
irqreturn_t catpt_dsp_irq_handler(int irq, void *dev_id);
irqreturn_t catpt_dsp_irq_thread(int irq, void *dev_id);
......@@ -129,4 +143,24 @@ int catpt_dsp_send_msg(struct catpt_dev *cdev, struct catpt_ipc_msg request,
int catpt_coredump(struct catpt_dev *cdev);
#include <sound/memalloc.h>
#include <uapi/sound/asound.h>
struct snd_pcm_substream;
struct catpt_stream_template;
struct catpt_stream_runtime {
struct snd_pcm_substream *substream;
struct catpt_stream_template *template;
struct catpt_stream_info info;
struct resource *persistent;
struct snd_dma_buffer pgtbl;
bool allocated;
bool prepared;
struct list_head node;
};
#endif
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment