mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	pcm: dmix: Don't clear scpm->info flag
spcm->info bits should be a copy of the slave PCM info as is.
While we clear the unsupported SND_PCM_INFO_PAUSE bit there, it should
be rather cleared only for the exposed info to apps, not spcm->info.
Fixes: 982786e9eb ("Fix bogus pause flag on dmix")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
			
			
This commit is contained in:
		
							parent
							
								
									2adc30e983
								
							
						
					
					
						commit
						fc58f8fcc3
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		| 
						 | 
					@ -1018,7 +1018,7 @@ int snd_pcm_direct_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	dshare->timer_ticks = hw_param_interval(params, SND_PCM_HW_PARAM_PERIOD_SIZE)->max / dshare->slave_period_size;
 | 
						dshare->timer_ticks = hw_param_interval(params, SND_PCM_HW_PARAM_PERIOD_SIZE)->max / dshare->slave_period_size;
 | 
				
			||||||
	params->info = dshare->shmptr->s.info;
 | 
						params->info = dshare->shmptr->s.info;
 | 
				
			||||||
	params->info &= ~SND_PCM_INFO_RESUME;
 | 
						params->info &= ~(SND_PCM_INFO_RESUME | SND_PCM_INFO_PAUSE);
 | 
				
			||||||
#ifdef REFINE_DEBUG
 | 
					#ifdef REFINE_DEBUG
 | 
				
			||||||
	snd_output_puts(log, "DMIX REFINE (end):\n");
 | 
						snd_output_puts(log, "DMIX REFINE (end):\n");
 | 
				
			||||||
	snd_pcm_hw_params_dump(params, log);
 | 
						snd_pcm_hw_params_dump(params, log);
 | 
				
			||||||
| 
						 | 
					@ -1032,7 +1032,7 @@ int snd_pcm_direct_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t * params)
 | 
				
			||||||
	snd_pcm_direct_t *dmix = pcm->private_data;
 | 
						snd_pcm_direct_t *dmix = pcm->private_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	params->info = dmix->shmptr->s.info;
 | 
						params->info = dmix->shmptr->s.info;
 | 
				
			||||||
	params->info &= ~SND_PCM_INFO_RESUME;
 | 
						params->info &= ~(SND_PCM_INFO_RESUME | SND_PCM_INFO_PAUSE);
 | 
				
			||||||
	params->rate_num = dmix->shmptr->s.rate;
 | 
						params->rate_num = dmix->shmptr->s.rate;
 | 
				
			||||||
	params->rate_den = 1;
 | 
						params->rate_den = 1;
 | 
				
			||||||
	params->fifo_size = 0;
 | 
						params->fifo_size = 0;
 | 
				
			||||||
| 
						 | 
					@ -1156,8 +1156,6 @@ int snd_pcm_direct_resume(snd_pcm_t *pcm)
 | 
				
			||||||
/* copy the slave setting */
 | 
					/* copy the slave setting */
 | 
				
			||||||
static void save_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
 | 
					static void save_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	spcm->info &= ~SND_PCM_INFO_PAUSE;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	COPY_SLAVE(access);
 | 
						COPY_SLAVE(access);
 | 
				
			||||||
	COPY_SLAVE(format);
 | 
						COPY_SLAVE(format);
 | 
				
			||||||
	COPY_SLAVE(subformat);
 | 
						COPY_SLAVE(subformat);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue