summaryrefslogtreecommitdiffstats
path: root/sound/soc/amd/ps/acp63.h
diff options
context:
space:
mode:
authorVijendar Mukunda <Vijendar.Mukunda@amd.com>2023-06-12 15:28:59 +0530
committerMark Brown <broonie@kernel.org>2023-06-20 23:30:29 +0100
commit298d4f7b176538d41356d145c044442b8456a14e (patch)
tree91b2ecadbf27951d7d4672f2b36ce0e55f1fc67c /sound/soc/amd/ps/acp63.h
parentf722917350ee0b802a62d888f4e8b23bd5f1f641 (diff)
downloadlinux-stable-298d4f7b176538d41356d145c044442b8456a14e.tar.gz
linux-stable-298d4f7b176538d41356d145c044442b8456a14e.tar.bz2
linux-stable-298d4f7b176538d41356d145c044442b8456a14e.zip
ASoC: amd: ps: add support for SoundWire DMA interrupts
Move to request_threaded_irq and use thread for handling SoundWire DMA interrupts. Whenever audio data equal to the SoundWire FIFO watermark level are produced/consumed, interrupt is generated. Acknowledge the interrupt and wake up the irq thread. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20230612095903.2113464-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/amd/ps/acp63.h')
-rw-r--r--sound/soc/amd/ps/acp63.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/amd/ps/acp63.h b/sound/soc/amd/ps/acp63.h
index 5f7ddcc31842..e96e6dc9d90f 100644
--- a/sound/soc/amd/ps/acp63.h
+++ b/sound/soc/amd/ps/acp63.h
@@ -165,6 +165,20 @@ enum acp_config {
ACP_CONFIG_15,
};
+enum amd_sdw0_channel {
+ ACP_SDW0_AUDIO0_TX = 0,
+ ACP_SDW0_AUDIO1_TX,
+ ACP_SDW0_AUDIO2_TX,
+ ACP_SDW0_AUDIO0_RX,
+ ACP_SDW0_AUDIO1_RX,
+ ACP_SDW0_AUDIO2_RX,
+};
+
+enum amd_sdw1_channel {
+ ACP_SDW1_AUDIO1_TX,
+ ACP_SDW1_AUDIO1_RX,
+};
+
struct pdm_stream_instance {
u16 num_pages;
u16 channels;
@@ -229,6 +243,8 @@ struct sdw_dma_ring_buf_reg {
* @sdw0_dev_index: SoundWire Manager-0 platform device index
* @sdw1_dev_index: SoundWire Manager-1 platform device index
* @sdw_dma_dev_index: SoundWire DMA controller platform device index
+ * @sdw0-dma_intr_stat: DMA interrupt status array for SoundWire manager-SW0 instance
+ * @sdw_dma_intr_stat: DMA interrupt status array for SoundWire manager-SW1 instance
* @acp_reset: flag set to true when bus reset is applied across all
* the active SoundWire manager instances
*/
@@ -246,6 +262,8 @@ struct acp63_dev_data {
u16 sdw0_dev_index;
u16 sdw1_dev_index;
u16 sdw_dma_dev_index;
+ u16 sdw0_dma_intr_stat[ACP63_SDW0_DMA_MAX_STREAMS];
+ u16 sdw1_dma_intr_stat[ACP63_SDW1_DMA_MAX_STREAMS];
bool acp_reset;
};