From: Shuah Khan <shuahkh@osg.samsung.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org, Shuah Khan <shuahkh@osg.samsung.com>,
linux-media@vger.kernel.org
Subject: Re: [alsa-devel] Linux 4.2 ALSA snd-usb-audio inconsistent lock state warn in PCM nonatomic mode
Date: Tue, 1 Sep 2015 11:40:47 -0600 [thread overview]
Message-ID: <55E5E31F.6040802@osg.samsung.com> (raw)
In-Reply-To: <55E564ED.4050609@ladisch.de>
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?
>
Short answer is that the need is not a generic one, but a device
specific need to add a fewature. Now the longer version below.
This is for a for AU0828 Hauppauge HVR950Q media device. snd-usb-audio
driver provides Audio Capture support on this device with DVB and Video
drivers driving the device for Digital and Video functions.
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.
The Media Controller mutex can't be converted to a spinlock as it would
break I2C drivers. During review, the idea to run PCM in non-atomic mode
came up as a way to solve the problem. The actual solution would
run PCM in nonatomic context only for the AU0828 Hauppauge HVR950Q chip.
The above change is a quick try to see if PCM nonatomic works with this
device. I have to figure out another way to solve the problem as this
isn't an option.
Hope this helps answer your question. If you would like more information
on the ALSA Media Controller work for this device, I can provide links
to the previous patch series.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
next prev parent reply other threads:[~2015-09-01 17:40 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 ` Shuah Khan [this message]
2015-09-01 17:53 ` [alsa-devel] " Clemens Ladisch
2015-09-02 14:54 ` Shuah Khan
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=55E5E31F.6040802@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