From: Vinod Koul <vinod.koul@intel.com>
To: Andy Ng <andreas2025@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Closing the pcm streams
Date: Fri, 19 Feb 2016 09:58:09 +0530 [thread overview]
Message-ID: <20160219042809.GL19598@localhost> (raw)
In-Reply-To: <CAAVaN8wroWe7xQCAnSsx_G0ruuRLiDivL2oXuFZ7U9YGGTsRow@mail.gmail.com>
On Thu, Feb 18, 2016 at 06:46:04PM +0000, Andy Ng wrote:
> Hello,
>
> I am working on a system that a DSP provides the audio algorithms and
> in case where the DSP crashes, I would like to shutdown nicely any
> opened PCM streams.
> The DSP has an RPC protocol to the external world. I use a small
> watchdog on ARM to monitor the "health" of the DSP. When the DSP goes
> down, I reset it. However, I would like to close down smoothly the PCM
> streams and inform the user that there was an error while playing. Is
> there any way to inform the ALSA kernel framework in the kernel that a
> specific PCM stream gone bad? Where is the best point to reset ALSA
> kernel framework?
In your driver...
You can call snd_pcm_stop() on all the streams and then return an error on
commands, usermode may close and restart again
--
~Vinod
prev parent reply other threads:[~2016-02-19 4:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 18:46 Closing the pcm streams Andy Ng
2016-02-19 4:28 ` Vinod Koul [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=20160219042809.GL19598@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andreas2025@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).