mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Removed snd_ctl_pcm_surround_next_device function.
This commit is contained in:
		
							parent
							
								
									b8abb93bb7
								
							
						
					
					
						commit
						b72c78f887
					
				
					 10 changed files with 9 additions and 96 deletions
				
			
		| 
						 | 
				
			
			@ -982,42 +982,3 @@ int _snd_pcm_surround_open(snd_pcm_t **pcmp, const char *name, snd_config_t *con
 | 
			
		|||
	}
 | 
			
		||||
	return snd_pcm_surround_open(pcmp, name, card, device, type, stream, mode);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int snd_pcm_surround_next_device(snd_ctl_t *ctl, snd_pcm_surround_type_t type, int *device)
 | 
			
		||||
{
 | 
			
		||||
	int err;
 | 
			
		||||
	snd_ctl_card_info_t *info;
 | 
			
		||||
	snd_card_type_t ctype;
 | 
			
		||||
	surround_open_t *po;
 | 
			
		||||
 | 
			
		||||
	assert(device);
 | 
			
		||||
	snd_ctl_card_info_alloca(&info);
 | 
			
		||||
	if ((err = snd_ctl_card_info(ctl, info)) < 0)
 | 
			
		||||
		return err;
 | 
			
		||||
	ctype = snd_ctl_card_info_get_type(info);
 | 
			
		||||
	for (po = open_table; po->type != SND_CARD_TYPE_NONE; po++) {
 | 
			
		||||
		if (po->type == ctype) {
 | 
			
		||||
			switch (type) {
 | 
			
		||||
			case SND_PCM_SURROUND_40:
 | 
			
		||||
				if (po->flags & SURR_FLG_NO_4CH)
 | 
			
		||||
					return -ENODEV;
 | 
			
		||||
				break;
 | 
			
		||||
			case SND_PCM_SURROUND_51:
 | 
			
		||||
				if (po->flags & SURR_FLG_NO_6CH)
 | 
			
		||||
					return -ENODEV;
 | 
			
		||||
				break;
 | 
			
		||||
			}
 | 
			
		||||
			if ((err = po->scount(ctl, info, type)) < 0)
 | 
			
		||||
				return err;
 | 
			
		||||
			if (err == 0)
 | 
			
		||||
				return -ENODEV;
 | 
			
		||||
			if (*device == 0)
 | 
			
		||||
				*device = 0;
 | 
			
		||||
			(*device)++;
 | 
			
		||||
			if (*device >= err)
 | 
			
		||||
				*device = -1;
 | 
			
		||||
			return 0;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return -ENODEV;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue