mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Added missing DRAINING state to snd_pcm_state_name()
This commit is contained in:
		
							parent
							
								
									09d82fa2ba
								
							
						
					
					
						commit
						7d335794f1
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -99,7 +99,7 @@ int snd_pcm_close(snd_pcm_t *pcm)
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
	assert(pcm);
 | 
						assert(pcm);
 | 
				
			||||||
	if (pcm->setup) {
 | 
						if (pcm->setup) {
 | 
				
			||||||
		if (pcm->mode & SND_PCM_NONBLOCK || 
 | 
							if ((pcm->mode & SND_PCM_NONBLOCK) || 
 | 
				
			||||||
		    pcm->stream == SND_PCM_STREAM_CAPTURE)
 | 
							    pcm->stream == SND_PCM_STREAM_CAPTURE)
 | 
				
			||||||
			snd_pcm_drop(pcm);
 | 
								snd_pcm_drop(pcm);
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
| 
						 | 
					@ -201,12 +201,13 @@ int snd_pcm_hw_free(snd_pcm_t *pcm)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int err;
 | 
						int err;
 | 
				
			||||||
	assert(pcm->setup);
 | 
						assert(pcm->setup);
 | 
				
			||||||
	assert(snd_pcm_state(pcm) <= SND_PCM_STATE_PREPARED);
 | 
					 | 
				
			||||||
	if (pcm->mmap_channels) {
 | 
						if (pcm->mmap_channels) {
 | 
				
			||||||
		err = snd_pcm_munmap(pcm);
 | 
							err = snd_pcm_munmap(pcm);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			return err;
 | 
								return err;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						assert(snd_pcm_state(pcm) == SND_PCM_STATE_SETUP ||
 | 
				
			||||||
 | 
						       snd_pcm_state(pcm) == SND_PCM_STATE_PREPARED);
 | 
				
			||||||
	err = pcm->ops->hw_free(pcm->op_arg);
 | 
						err = pcm->ops->hw_free(pcm->op_arg);
 | 
				
			||||||
	pcm->setup = 0;
 | 
						pcm->setup = 0;
 | 
				
			||||||
	if (err < 0)
 | 
						if (err < 0)
 | 
				
			||||||
| 
						 | 
					@ -592,6 +593,7 @@ static const char *snd_pcm_state_names[] = {
 | 
				
			||||||
	STATE(PREPARED),
 | 
						STATE(PREPARED),
 | 
				
			||||||
	STATE(RUNNING),
 | 
						STATE(RUNNING),
 | 
				
			||||||
	STATE(XRUN),
 | 
						STATE(XRUN),
 | 
				
			||||||
 | 
						STATE(DRAINING),
 | 
				
			||||||
	STATE(PAUSED),
 | 
						STATE(PAUSED),
 | 
				
			||||||
	STATE(SUSPENDED),
 | 
						STATE(SUSPENDED),
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue