linux-stable/sound/soc/amd/raven
Ravulapati Vishnu vardhan rao a523e1538f
ASoC: amd: Replacing MSI with Legacy IRQ model
When we try to play and capture simultaneously we see that
interrupts are genrated but our handler is not being acknowledged,
After investigating further more in detail on this issue we found
that IRQ delivery via MSI from the ACP IP is unreliable and so sometimes
interrupt generated will not be acknowledged so MSI model shouldn't be used
and using legacy IRQs will resolve interrupt handling issue.

This patch replaces MSI interrupt handling with legacy IRQ model.

Issue can be reproduced easily by running below python script:

import subprocess
import time
import threading

def do2():
  cmd = 'aplay -f dat -D hw:2,1 /dev/zero -d 1'
    subprocess.call(cmd, stdin=subprocess.PIPE,
			stderr=subprocess.PIPE, shell=True)
    print('Play Done')

def run():
	for i in range(1000):
		do2()

def do(i):
    cmd = 'arecord -f dat -D hw:2,2 /dev/null -d 1'
    subprocess.call(cmd, stdout=subprocess.PIPE,
			stderr=subprocess.PIPE, shell=True)
    print(datetime.datetime.now(), i)

t = threading.Thread(target=run)
t.start()
for i in range(1000):
	do(i)

t.join()

After applying this patch issue is resolved.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Link: https://lore.kernel.org/r/20201222115929.11222-1-Vishnuvardhanrao.Ravulapati@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-12-28 14:22:27 +00:00
..
acp3x-i2s.c ASoC: amd: use asoc_substream_to_rtd() 2020-07-23 19:07:30 +01:00
acp3x-pcm-dma.c ASoC: amd: use asoc_substream_to_rtd() 2020-07-23 19:07:30 +01:00
acp3x.h ASoC: AMD: Clear format bits before setting them 2020-03-30 15:32:35 +01:00
chip_offset_byte.h ASoC: amd: Switch to SPDX identifier 2018-11-15 11:19:04 -08:00
Makefile ASoC: amd: Refactoring of DAI from DMA driver 2019-12-31 00:22:12 +00:00
pci-acp3x.c ASoC: amd: Replacing MSI with Legacy IRQ model 2020-12-28 14:22:27 +00:00