On 20/01/25 23:25, Mark Brown wrote:
> On Mon, Jan 20, 2025 at 03:31:19PM +0530, Vijendar Mukunda wrote:
>
>> +static irqreturn_t acp70_irq_thread(int irq, void *context)
>> +{
>> + struct sdw_dma_dev_data *sdw_dma_data;
>> + struct acp70_dev_data *adata = context;
>> + u32 stream_index;
>> +
>> + sdw_dma_data = dev_get_drvdata(&adata->sdw_dma_dev->dev);
>> +
>> + for (stream_index = 0; stream_index < ACP70_SDW0_DMA_MAX_STREAMS; stream_index++) {
>> + if (adata->sdw0_dma_intr_stat[stream_index]) {
>> + if (sdw_dma_data->sdw0_dma_stream[stream_index])
>> + snd_pcm_period_elapsed(sdw_dma_data->sdw0_dma_stream[stream_index]);
>> + adata->sdw0_dma_intr_stat[stream_index] = 0;
>> + }
>> + }
>> + for (stream_index = 0; stream_index < ACP70_SDW1_DMA_MAX_STREAMS; stream_index++) {
>> + if (adata->sdw1_dma_intr_stat[stream_index]) {
>> + if (sdw_dma_data->sdw1_dma_stream[stream_index])
>> + snd_pcm_period_elapsed(sdw_dma_data->sdw1_dma_stream[stream_index]);
>> + adata->sdw1_dma_intr_stat[stream_index] = 0;
>> + }
>> + }
>> + return IRQ_HANDLED;
>> +}
> I appreciate that this pattern is already (identically...) in the ps
> driver but I'm not seeing anything here that looks like it can't run in
> interrupt context - is there a special reason for deferring to thread
> context?
Soundwire dai links are created as non-atomic. Invoking period elapsed
from interrupt context, causes locking related issues. Its expected
to run all code in process context.
Compared to PS, In ACP70, no of DMA's got increased for Soundwire
Manager 1 instance.
>
>> +static irqreturn_t acp70_irq_handler(int irq, void *dev_id)
>> +{
> This really does seem *very* similar to the acp63 code...
Compared to PS, in ACP70 wake interrupt logic added.
New register fields got introduced inACP70 compared to PS.
Please refer below patch.
https://lore.kernel.org/lkml/20250120100130.3710412-18-Vijendar.Mukunda@xxxxxxx/
Let this patch series go as initial version for ACP70 platform.
We will revisit the code and implement common helper functions in the next cycle.
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]