Functionality of pcm_notify in snd-aloop?

Kai Vehmanen kai.vehmanen at linux.intel.com
Tue Apr 28 18:19:18 CEST 2020


Hey,

On Tue, 28 Apr 2020, Takashi Iwai wrote:

> I believe the missing piece here is a generic way to tell user-space
> that the stream got invalidated.  This would be useful not only for
> aloop but can be applied in general when a stream becomes temporarily
> unavailable (e.g. the HDMI monitor disconnected or the DSP route
> switched).

ack on that. I've been preparing this patch to add -ENODATA to alsa-lib 
documentation:
"[RFC] pcm: add documentation for -ENODATA error code handling"
https://github.com/kv2019i/alsa-lib/commit/87b298106e04054489ee93b26a610e37f99a3171

Have not yet had time to send a proper version to the list, but it's 
addressing specifically this need. This would serve as the interface for 
SOF DSP to tell that a given PCM node will not be providing data (as the 
DSP topology is not fully connected) [1].

To test the above, I've used a small hack to aplay/arecord that keeps 
trying to restart the PCM after a delay, in case -ENODATA is returned:
https://github.com/kv2019i/alsa-utils/commit/a2ba541ea0b3e86a65687de88a41f10cf0a8ddc2

[1] https://github.com/thesofproject/sof/issues/2564

Br, Kai


More information about the Alsa-devel mailing list