mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Fixed missing direction matching
This commit is contained in:
		
							parent
							
								
									da51a809a9
								
							
						
					
					
						commit
						edaf7fdf2c
					
				
					 1 changed files with 9 additions and 6 deletions
				
			
		| 
						 | 
					@ -595,20 +595,23 @@ static int snd_pcm_share_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
 | 
				
			||||||
		err = _snd_pcm_hw_params_set_subformat(params, spcm->subformat);
 | 
							err = _snd_pcm_hw_params_set_subformat(params, spcm->subformat);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			goto _err;
 | 
								goto _err;
 | 
				
			||||||
		err = _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_RATE,
 | 
							err = _snd_pcm_hw_param_set_minmax(params, SND_PCM_HW_PARAM_RATE,
 | 
				
			||||||
					    spcm->rate, 0);
 | 
											   spcm->rate, 0, 
 | 
				
			||||||
 | 
											   spcm->rate, 1);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			goto _err;
 | 
								goto _err;
 | 
				
			||||||
		err = _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_PERIOD_TIME,
 | 
							err = _snd_pcm_hw_param_set_minmax(params, SND_PCM_HW_PARAM_PERIOD_TIME,
 | 
				
			||||||
					    spcm->period_time, 0);
 | 
											   spcm->period_time, 0,
 | 
				
			||||||
 | 
											   spcm->period_time, 1);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			goto _err;
 | 
								goto _err;
 | 
				
			||||||
		err = _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_BUFFER_SIZE,
 | 
							err = _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_BUFFER_SIZE,
 | 
				
			||||||
					    spcm->buffer_size, 0);
 | 
										    spcm->buffer_size, 0);
 | 
				
			||||||
		if (err < 0)
 | 
							if (err < 0)
 | 
				
			||||||
			goto _err;
 | 
								goto _err;
 | 
				
			||||||
		err = _snd_pcm_hw_param_set(params, SND_PCM_HW_PARAM_TICK_TIME,
 | 
							err = _snd_pcm_hw_param_set_minmax(params, SND_PCM_HW_PARAM_TICK_TIME,
 | 
				
			||||||
					    spcm->tick_time, 0);
 | 
											   spcm->tick_time, 0,
 | 
				
			||||||
 | 
											   spcm->tick_time, 1);
 | 
				
			||||||
	_err:
 | 
						_err:
 | 
				
			||||||
		if (err < 0) {
 | 
							if (err < 0) {
 | 
				
			||||||
			SNDERR("slave is already running with incompatible setup");
 | 
								SNDERR("slave is already running with incompatible setup");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue