mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	namehint: Another fix to properly evaluate hw devices
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
		
							parent
							
								
									0244370be6
								
							
						
					
					
						commit
						c049d48407
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -439,11 +439,12 @@ static int add_card(struct hint_list *list, int card)
 | 
				
			||||||
			err = next_devices[list->iface](list->ctl, &device);
 | 
								err = next_devices[list->iface](list->ctl, &device);
 | 
				
			||||||
			if (device < 0)
 | 
								if (device < 0)
 | 
				
			||||||
				err = -EINVAL;
 | 
									err = -EINVAL;
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									max_device = device;
 | 
				
			||||||
			while (err >= 0 && device >= 0) {
 | 
								while (err >= 0 && device >= 0) {
 | 
				
			||||||
				err = next_devices[list->iface](list->ctl, &device);
 | 
									err = next_devices[list->iface](list->ctl, &device);
 | 
				
			||||||
				if (device > max_device)
 | 
									if (err >= 0 && device > max_device)
 | 
				
			||||||
					max_device = device;
 | 
										max_device = device;
 | 
				
			||||||
				ok++;
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			ok = 0;
 | 
								ok = 0;
 | 
				
			||||||
			for (device = 0; err >= 0 && device <= max_device; device++) {
 | 
								for (device = 0; err >= 0 && device <= max_device; device++) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue