mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Some drivers (via82xx) doesn't start recording until we read something.
This is ugly, but unfortunately required. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@453 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									fc93e4b3a7
								
							
						
					
					
						commit
						289c914b47
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -368,6 +368,15 @@ int pa__init(pa_core *c, pa_module*m) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_modargs_free(ma);
 | 
					    pa_modargs_free(ma);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					     * Some crappy drivers do not start the recording until we read something.
 | 
				
			||||||
 | 
					     * Without this snippet, poll will never register the fd as ready.
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    if (u->source) {
 | 
				
			||||||
 | 
					        char buf[u->sample_size];
 | 
				
			||||||
 | 
					        read(u->fd, buf, u->sample_size);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fail:
 | 
					fail:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue