mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	alsa: try to resume after suspend before recovering
Fixes no audio after suspending with some audio drivers. See #2001
This commit is contained in:
		
							parent
							
								
									f123b58f1f
								
							
						
					
					
						commit
						e34d9d209a
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -1646,6 +1646,9 @@ static int alsa_recover(struct state *state, int err)
 | 
				
			||||||
	case SND_PCM_STATE_SUSPENDED:
 | 
						case SND_PCM_STATE_SUSPENDED:
 | 
				
			||||||
		spa_log_info(state->log, "%s: recover from state %s",
 | 
							spa_log_info(state->log, "%s: recover from state %s",
 | 
				
			||||||
				state->props.device, snd_pcm_state_name(st));
 | 
									state->props.device, snd_pcm_state_name(st));
 | 
				
			||||||
 | 
							res = snd_pcm_resume(state->hndl);
 | 
				
			||||||
 | 
							if (res >= 0)
 | 
				
			||||||
 | 
							        return res;
 | 
				
			||||||
		err = -ESTRPIPE;
 | 
							err = -ESTRPIPE;
 | 
				
			||||||
		break;
 | 
							break;
 | 
				
			||||||
	default:
 | 
						default:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue