lkml.org 
[lkml]   [2020]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] ASoC: amd :High hw_level while simultaneous capture
Date
[AMD Official Use Only - Internal Distribution Only]



-----Original Message-----
From: Mark Brown <broonie@kernel.org>
Sent: Tuesday, May 5, 2020 5:21 PM
To: Agrawal, Akshu <Akshu.Agrawal@amd.com>
Cc: RAVULAPATI, VISHNU VARDHAN RAO <Vishnuvardhanrao.Ravulapati@amd.com>; Liam Girdwood <lgirdwood@gmail.com>; Jaroslav Kysela <perex@perex.cz>; Takashi Iwai <tiwai@suse.com>; Mukunda, Vijendar <Vijendar.Mukunda@amd.com>; Colin Ian King <colin.king@canonical.com>; Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>; moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM... <alsa-devel@alsa-project.org>; open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: amd :High hw_level while simultaneous capture

On Tue, May 05, 2020 at 05:10:20PM +0530, Akshu Agrawal wrote:

> 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

What is a "high hw_level" and how does this patch address it? As far as I can see this patch reorders some of the initialzation but it's not entirely obvious what the issue was or how this fixes it.

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.

Thanks,
Vishnu

\
 
 \ /
  Last update: 2020-05-05 14:19    [W:0.525 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site