public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org, linux-media@vger.kernel.org,
	Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [alsa-devel] Linux 4.2 ALSA snd-usb-audio inconsistent lock state warn in PCM nonatomic mode
Date: Wed, 2 Sep 2015 08:54:15 -0600	[thread overview]
Message-ID: <55E70D97.1010206@osg.samsung.com> (raw)
In-Reply-To: <55E5E625.5010403@ladisch.de>

On 09/01/2015 11:53 AM, Clemens Ladisch wrote:
> Shuah Khan wrote:> On 09/01/2015 02:42 AM, Clemens Ladisch wrote:
>>> Shuah Khan wrote:
>>>> +++ b/sound/usb/stream.c
>>>> pcm->private_data = as;
>>>> pcm->private_free = snd_usb_audio_pcm_free;
>>>> pcm->info_flags = 0;
>>>> + pcm->nonatomic = true;
>>>
>>> Why do you think you need nonatomic mode in the USB audio driver?
>>
>> I have been working on adding Media Controller support for this chip
>> as chip specific feature in ALSA. This will allow sharing resources
>> such as the tuner across the drivers that control the device (DVB,
>> Video, snd-usb-audio). Media Controller framework uses a mutex to
>> protect access to resources, hence there is a need to hold this mutex
>> from SNDRV_PCM_TRIGGER_START and SNDRV_PCM_TRIGGER_STOP which could run
>> in IRQ context.
> 
> Resources should be managed in the hw_params/hw_free callbacks.
> 

snd_usb_hw_params() and snd_usb_hw_free() are the two places
I could add resource access logic and try if that works for
what I am trying to do. Thanks for the tip.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

      reply	other threads:[~2015-09-02 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-31 22:48 Linux 4.2 ALSA snd-usb-audio inconsistent lock state warn in PCM nonatomic mode Shuah Khan
2015-09-01  4:47 ` Takashi Iwai
     [not found] ` <55E564ED.4050609@ladisch.de>
2015-09-01 17:40   ` [alsa-devel] " Shuah Khan
2015-09-01 17:53     ` Clemens Ladisch
2015-09-02 14:54       ` Shuah Khan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E70D97.1010206@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox