lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] dmaengine: dw: resolve recursion lock when audio playback
From
On Mon, Sep 28, 2015 at 6:23 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 26 September 2015 at 05:38, yitian <yitian.bu@tangramtek.com> wrote:
>> when audio playback is running, user space will call
>> snd_pcm_lib_write1() function, it will first get pcm stream lock,
>> after that it may call function snd_pcm_update_hw_ptr(), the call
>> stack will be as below:
>> snd_pcm_lib_write1 <-- got pcm stream lock
>> --> snd_pcm_update_hw_ptr
>> --> dwc_tx_status
>> --> dwc_scan_descriptors
>> --> callback
>> --> dmaengine_pcm_dma_complete
>> --> snd_pcm_period_elapsed <-- get stream lock again
>> recursion lock occurs in snd_pcm_period_elapsed function.
>> remove dwc_scan_descriptors from dwc_tx_status can fix this issue.
>>
>> Signed-off-by: Yitian Bu <yitian.bu@tangramtek.com>
>> ---
>> drivers/dma/dw/core.c | 6 +-----
>> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> I am not sure if this is a sane way of doing that, and we were scanning
> the descriptors for some valid reason..

Actually one of the patches in a pile sitting in my private repo is
also including similar change. In my case the reason is to support
cyclic transfers natively.

> Though, I am on vacation for few days now and will be able to look
> at the details later.

Have a good rest then!

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2015-09-28 09:21    [W:2.227 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site