]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ASoC: amd :High hw_level while simultaneous capture
authorAkshu Agrawal <akshu.agrawal@amd.com>
Wed, 6 May 2020 10:26:00 +0000 (15:56 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 6 May 2020 13:43:33 +0000 (14:43 +0100)
commit5a8117840a8c654c3cdf2f465e9406112d7e492d
treede72129b9183f6b6ea86e4311a9db2f724e72f08
parentf2b1e1cbd352129cfdbc1af52059482d74b4e81a
ASoC: amd :High hw_level while simultaneous capture

Simultaneous capture on dmic and headset mic is having
issue with high hw_level being reported.

Issue Can be reproduced by:
arecord -D hw:2,0 -f dat -d 60 /tmp/test0 &
arecord -D hw:2,2 -f dat -d 60 /tmp/test1 &
cat /proc/asound/card2/pcm?c/sub0/status

Actual issue is :
When we open one capture stream on one instance lets say I2S_SP and then
once again if we open other capture on other instance lets say I2S_BT while
first capture is in progress and when we try to read the status of both
running instances by below command cat /proc/asound/card2/pcm?c/sub0/status
we observe that avail_max is being doubled on first opened
capture(I2S_SP in the example).

This is because our previous implementation was like when any instance is
opened it gets initialized in dma_open irrespective of on what instance it
called open.

For example:
First I2S_SP called opened it initializes both SP/BT capture streams
irrespective of on which instance the stream opened.next time I2S_BT
called opened and it initializes both SP/BT this corrupts the behaviour .

So with this patch the stream gets initialized only on specific instance
when ever it gets opened calls hw_params.

This rectifies the issue.

Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com>
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200506102602.140790-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/raven/acp3x-pcm-dma.c