All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] alsa-lib: -ENODATA documentation
@ 2020-05-29 12:28 Kai Vehmanen
  2020-05-29 12:28 ` [PATCH 1/2] pcm: add documentation for -ENODATA error code Kai Vehmanen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kai Vehmanen @ 2020-05-29 12:28 UTC (permalink / raw)
  To: alsa-devel, perex; +Cc: kai.vehmanen

Hello all,

here's patch to document -ENODATA error as a PCM error code.
We have recently merged patches to SOF firmware to use
this error code:
  https://github.com/thesofproject/sof/pull/2918

Some additional background on the use-case:
  https://github.com/thesofproject/sof/issues/2564

In thread "Functionality of pcm_notify in snd-aloop?"
https://mailman.alsa-project.org/pipermail/alsa-devel/2020-April/166974.html

.. we discussed the possibility for ALSA to provide a mechanism
for application to wait for the condition to change, but at least
for the currently known usages, the synchronization responsibility
will be in user-space (UCM file will describe the PCM dependencies).
Anyways, this is orthogonal to documenting -ENODATA, so sending
this now.

Kai Vehmanen (2):
  pcm: add documentation for -ENODATA error code
  pcm: fix spelling in documentation for -EBADFD

 src/pcm/pcm.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] pcm: add documentation for -ENODATA error code
  2020-05-29 12:28 [PATCH 0/2] alsa-lib: -ENODATA documentation Kai Vehmanen
@ 2020-05-29 12:28 ` Kai Vehmanen
  2020-05-29 12:28 ` [PATCH 2/2] pcm: fix spelling in documentation for -EBADFD Kai Vehmanen
  2020-06-05  9:56 ` [PATCH 0/2] alsa-lib: -ENODATA documentation Jaroslav Kysela
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Vehmanen @ 2020-05-29 12:28 UTC (permalink / raw)
  To: alsa-devel, perex; +Cc: kai.vehmanen

This error code can be used e.g. with echo reference PCM devices
(the SND_USE_CASE_MOD_ECHO_REF UCM token).

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 src/pcm/pcm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index 1064044c9812..488a8dd0493d 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -292,6 +292,14 @@ This error can happen when device is physically removed (for example
 some hotplug devices like USB or PCMCIA, CardBus or ExpressCard
 can be removed on the fly).
 
+\par -ENODATA
+
+This error can happen if the device data transfer is dependent on
+an external condition and that condition is not met. For example,
+PCM device for echo reference as described by SND_USE_CASE_MOD_ECHO_REF
+UCM token, may return -ENODATA if the linked playback stream has not been
+started.
+
 \section pcm_params Managing parameters
 
 The ALSA PCM device uses two groups of PCM related parameters. The hardware
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] pcm: fix spelling in documentation for -EBADFD
  2020-05-29 12:28 [PATCH 0/2] alsa-lib: -ENODATA documentation Kai Vehmanen
  2020-05-29 12:28 ` [PATCH 1/2] pcm: add documentation for -ENODATA error code Kai Vehmanen
@ 2020-05-29 12:28 ` Kai Vehmanen
  2020-06-05  9:56 ` [PATCH 0/2] alsa-lib: -ENODATA documentation Jaroslav Kysela
  2 siblings, 0 replies; 4+ messages in thread
From: Kai Vehmanen @ 2020-05-29 12:28 UTC (permalink / raw)
  To: alsa-devel, perex; +Cc: kai.vehmanen

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 src/pcm/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index 488a8dd0493d..79322b4eab0d 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -284,7 +284,7 @@ supports resume and the snd_pcm_prepare() call can be ommited.
 \par -EBADFD
 
 This error means that the device is in a bad state. It means that
-the handskahe between application and alsa-lib is corrupted.
+the handshake between application and alsa-lib is corrupted.
 
 \par -ENOTTY, -ENODEV
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] alsa-lib: -ENODATA documentation
  2020-05-29 12:28 [PATCH 0/2] alsa-lib: -ENODATA documentation Kai Vehmanen
  2020-05-29 12:28 ` [PATCH 1/2] pcm: add documentation for -ENODATA error code Kai Vehmanen
  2020-05-29 12:28 ` [PATCH 2/2] pcm: fix spelling in documentation for -EBADFD Kai Vehmanen
@ 2020-06-05  9:56 ` Jaroslav Kysela
  2 siblings, 0 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2020-06-05  9:56 UTC (permalink / raw)
  To: Kai Vehmanen, alsa-devel

Dne 29. 05. 20 v 14:28 Kai Vehmanen napsal(a):
> Hello all,
> 
> here's patch to document -ENODATA error as a PCM error code.
> We have recently merged patches to SOF firmware to use
> this error code:
>    https://github.com/thesofproject/sof/pull/2918
> 
> Some additional background on the use-case:
>    https://github.com/thesofproject/sof/issues/2564
> 
> In thread "Functionality of pcm_notify in snd-aloop?"
> https://mailman.alsa-project.org/pipermail/alsa-devel/2020-April/166974.html
> 
> .. we discussed the possibility for ALSA to provide a mechanism
> for application to wait for the condition to change, but at least
> for the currently known usages, the synchronization responsibility
> will be in user-space (UCM file will describe the PCM dependencies).
> Anyways, this is orthogonal to documenting -ENODATA, so sending
> this now.
> 
> Kai Vehmanen (2):
>    pcm: add documentation for -ENODATA error code
>    pcm: fix spelling in documentation for -EBADFD
> 
>   src/pcm/pcm.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 

I applied those two patches, and added a short description that there is
no recovery mechanism and an event mechanism to notify the link availability 
at the moment.

https://github.com/alsa-project/alsa-lib/commit/f3597737defe495f9c618b12507c9528c0ade1ee

						Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-05  9:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-29 12:28 [PATCH 0/2] alsa-lib: -ENODATA documentation Kai Vehmanen
2020-05-29 12:28 ` [PATCH 1/2] pcm: add documentation for -ENODATA error code Kai Vehmanen
2020-05-29 12:28 ` [PATCH 2/2] pcm: fix spelling in documentation for -EBADFD Kai Vehmanen
2020-06-05  9:56 ` [PATCH 0/2] alsa-lib: -ENODATA documentation Jaroslav Kysela

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.