From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
shiiba <naoya.shiiba.nx@renesas.com>,
Takashi Iwai <tiwai@suse.de>, Liam Girdwood <lgirdwood@gmail.com>,
komatsu <toshiaki.komatsu.ud@renesas.com>,
Mark Brown <broonie@kernel.org>,
Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Subject: Re: Question about device recovery when under/over run error case
Date: Tue, 19 Jan 2016 12:21:55 +0900 [thread overview]
Message-ID: <569DABD3.4080707@sakamocchi.jp> (raw)
In-Reply-To: <87si1u46d9.wl%kuninori.morimoto.gx@renesas.com>
Hi,
On Jan 19 2016 12:08, Kuninori Morimoto wrote:
>>>>>> Userspace can get to know the XRUN state by calling some APIs. Then,
>>>>>> it can recover PCM substream by executing SNDRV_PCM_IOCTL_PREPARE
>>>>>> ioctl.
>>>>>
>>>>> I think we can use snd_pcm_stop_xrun() for this purpose.
>>>>
>>>> Right. But beware of locking by this function. Unlike snd_pcm_stop()
>>>> this function takes the stream lock by itself.
>>>
>>> Thanks !
>>> I see. I will investigate it.
>>
>> The 'lock' is what I mentioned in former message to you:
>>
>> [alsa-devel] Can I stop sound from driver as system error ?
>> http://mailman.alsa-project.org/pipermail/alsa-devel/2015-December/102010.html
>
> Yes, I had asked same question to ML, I'm sorry about that.
> And, can I confirm about your concern ?
> I guess you are worrying about dead-lock by stop xrun, but is that correct ?
Recent SoC tends to accumurate much IPs with variety functionalities.
If your SoC, R-Car, has such IPs and snd-soc-rcar utilize it, I can
assume that snd-soc-rcar require to wait for some events after operating
to the IPs. Or snd-soc-rcar require to manage race conditions between
many PCM substreams.
In this case, current structure of snd-soc-rcar may cause problems (at
least, in the end of last year), because it pushes many operations into
'struct snd_pcm_ops.trigger'. This callback is executed in both of
process context and interrupt context and drivers should not wait for
events or should not manage race conditions.
This is my concern about it.
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2016-01-19 3:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 4:45 Question about device recovery when under/over run error case Kuninori Morimoto
2016-01-18 5:03 ` Takashi Sakamoto
2016-01-18 6:04 ` Kuninori Morimoto
2016-01-18 8:29 ` Takashi Iwai
2016-01-19 0:04 ` Kuninori Morimoto
2016-01-19 1:15 ` Takashi Sakamoto
2016-01-19 3:08 ` Kuninori Morimoto
2016-01-19 3:21 ` Takashi Sakamoto [this message]
2016-01-19 4:42 ` Kuninori Morimoto
2016-01-19 12:33 ` Takashi Sakamoto
2016-01-20 1:17 ` Kuninori Morimoto
2016-01-20 3:19 ` Takashi Sakamoto
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=569DABD3.4080707@sakamocchi.jp \
--to=o-takashi@sakamocchi.jp \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=hiroyuki.yokoyama.vx@renesas.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=naoya.shiiba.nx@renesas.com \
--cc=tiwai@suse.de \
--cc=toshiaki.komatsu.ud@renesas.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.