* Closing the pcm streams
@ 2016-02-18 18:46 Andy Ng
2016-02-19 4:28 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Andy Ng @ 2016-02-18 18:46 UTC (permalink / raw)
To: alsa-devel
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?
Thank you
Andy
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Closing the pcm streams
2016-02-18 18:46 Closing the pcm streams Andy Ng
@ 2016-02-19 4:28 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2016-02-19 4:28 UTC (permalink / raw)
To: Andy Ng; +Cc: alsa-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-19 4:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 18:46 Closing the pcm streams Andy Ng
2016-02-19 4:28 ` Vinod Koul
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).