Skip to contentSkip to conversation

ALSA: compress: Add SNDRV_PCM_STATE_PREPARED state explanation

PATCH Applied Vinod Koul 2 participants 3 messages Mar 4, 2016

Subsystems (2)
lore
Share & tools
lore

Vinod Koul

author
#0 lore raw

PATCH 1/2 ALSA: compress: Add SNDRV_PCM_STATE_PREPARED state explanation

Stream states were explained in the code comments but SNDRV_PCM_STATE_PREPARED was missed so add it

---
 sound/core/compress_offload.c | 3 +++
 1 file changed, 3 insertions(+)
sound/core/compress_offload.c +3 -0
index 7fac3cae8abd..51a8eb495f54 100644
@@ -74,6 +74,9 @@ struct snd_compr_file {
  * SNDRV_PCM_STATE_SETUP: When stream has been initialized. This is done by
  *	calling SNDRV_COMPRESS_SET_PARAMS. running streams will come to this
  *	state at stop by calling SNDRV_COMPRESS_STOP, or at end of drain.
+ * SNDRV_PCM_STATE_PREPARED: When a stream has been written to (for
+ *	playback only). User after setting up stream writes the data buffer
+ *	before starting the stream.
  * SNDRV_PCM_STATE_RUNNING: When stream has been started and is
  *	decoding/encoding and rendering/capturing data.
  * SNDRV_PCM_STATE_DRAINING: When stream is draining current data. This is done
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 2/2 ALSA: compress: fix some typos

Found few typos while looking at code, so fix them

---
 sound/core/compress_offload.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/compress_offload.c +2 -2
index 51a8eb495f54..c4b14b5f1b35 100644
@@ -69,10 +69,10 @@ struct snd_compr_file {
 
 /*
  * a note on stream states used:
- * we use follwing states in the compressed core
+ * we use following states in the compressed core
  * SNDRV_PCM_STATE_OPEN: When stream has been opened.
  * SNDRV_PCM_STATE_SETUP: When stream has been initialized. This is done by
- *	calling SNDRV_COMPRESS_SET_PARAMS. running streams will come to this
+ *	calling SNDRV_COMPRESS_SET_PARAMS. Running streams will come to this
  *	state at stop by calling SNDRV_COMPRESS_STOP, or at end of drain.
  * SNDRV_PCM_STATE_PREPARED: When a stream has been written to (for
  *	playback only). User after setting up stream writes the data buffer
Signature · 1 line
1.9.1
Applied
#2 lore raw
In reply to Vinod Koul
Quoted 5 lines · Vinod Koul

Stream states were explained in the code comments but SNDRV_PCM_STATE_PREPARED was missed so add it

Applied both patches. Thanks.

Takashi

Quoted 21 lines
---
 sound/core/compress_offload.c | 3 +++
 1 file changed, 3 insertions(+)
sound/core/compress_offload.c +3 -0
index 7fac3cae8abd..51a8eb495f54 100644
@@ -74,6 +74,9 @@ struct snd_compr_file {
  * SNDRV_PCM_STATE_SETUP: When stream has been initialized. This is done by
  *	calling SNDRV_COMPRESS_SET_PARAMS. running streams will come to this
  *	state at stop by calling SNDRV_COMPRESS_STOP, or at end of drain.
+ * SNDRV_PCM_STATE_PREPARED: When a stream has been written to (for
+ *	playback only). User after setting up stream writes the data buffer
+ *	before starting the stream.
  * SNDRV_PCM_STATE_RUNNING: When stream has been started and is
  *	decoding/encoding and rendering/capturing data.
  * SNDRV_PCM_STATE_DRAINING: When stream is draining current data. This is done
Signature · 1 line
1.9.1