mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Added functions:
snd_ctl_rawmidi_prefer_subdevice snd_rawmidi_open_subdevice Fixed functions: snd_pcm_hw_open - fixed prefer subdevice code
This commit is contained in:
		
							parent
							
								
									8a625fd63b
								
							
						
					
					
						commit
						0e561770c6
					
				
					 10 changed files with 93 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -239,6 +239,19 @@ static int snd_ctl_shm_rawmidi_info(snd_ctl_t *ctl, snd_rawmidi_info_t * info)
 | 
			
		|||
	return err;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int snd_ctl_shm_rawmidi_prefer_subdevice(snd_ctl_t *ctl, int subdev)
 | 
			
		||||
{
 | 
			
		||||
	snd_ctl_shm_t *shm = ctl->private;
 | 
			
		||||
	snd_ctl_shm_ctrl_t *ctrl = shm->ctrl;
 | 
			
		||||
	int err;
 | 
			
		||||
	ctrl->u.rawmidi_prefer_subdevice = subdev;
 | 
			
		||||
	ctrl->cmd = SND_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE;
 | 
			
		||||
	err = snd_ctl_shm_action(ctl);
 | 
			
		||||
	if (err < 0)
 | 
			
		||||
		return err;
 | 
			
		||||
	return err;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int snd_ctl_shm_read(snd_ctl_t *ctl, snd_ctl_event_t *event)
 | 
			
		||||
{
 | 
			
		||||
	snd_ctl_shm_t *shm = ctl->private;
 | 
			
		||||
| 
						 | 
				
			
			@ -265,6 +278,7 @@ struct snd_ctl_ops snd_ctl_shm_ops = {
 | 
			
		|||
	pcm_info: snd_ctl_shm_pcm_info,
 | 
			
		||||
	pcm_prefer_subdevice: snd_ctl_shm_pcm_prefer_subdevice,
 | 
			
		||||
	rawmidi_info: snd_ctl_shm_rawmidi_info,
 | 
			
		||||
	rawmidi_prefer_subdevice: snd_ctl_shm_rawmidi_prefer_subdevice,
 | 
			
		||||
	read: snd_ctl_shm_read,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue