mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	print ALSA error messages on failure
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@483 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									cc3fe432af
								
							
						
					
					
						commit
						a9950d4ab2
					
				
					 2 changed files with 10 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -173,6 +173,7 @@ int pa__init(pa_core *c, pa_module*m) {
 | 
			
		|||
    unsigned periods, fragsize;
 | 
			
		||||
    snd_pcm_uframes_t period_size;
 | 
			
		||||
    size_t frame_size;
 | 
			
		||||
    int err;
 | 
			
		||||
    
 | 
			
		||||
    if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
 | 
			
		||||
        pa_log(__FILE__": failed to parse module arguments\n");
 | 
			
		||||
| 
						 | 
				
			
			@ -199,13 +200,13 @@ int pa__init(pa_core *c, pa_module*m) {
 | 
			
		|||
    u->module = m;
 | 
			
		||||
    
 | 
			
		||||
    snd_config_update_free_global();
 | 
			
		||||
    if (snd_pcm_open(&u->pcm_handle, dev = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK) < 0) {
 | 
			
		||||
        pa_log(__FILE__": Error opening PCM device %s\n", dev);
 | 
			
		||||
    if ((err = snd_pcm_open(&u->pcm_handle, dev = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK)) < 0) {
 | 
			
		||||
        pa_log(__FILE__": Error opening PCM device %s: %s\n", dev, snd_strerror(err));
 | 
			
		||||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (pa_alsa_set_hw_params(u->pcm_handle, &ss, &periods, &period_size) < 0) {
 | 
			
		||||
        pa_log(__FILE__": Failed to set hardware parameters\n");
 | 
			
		||||
    if ((err = pa_alsa_set_hw_params(u->pcm_handle, &ss, &periods, &period_size)) < 0) {
 | 
			
		||||
        pa_log(__FILE__": Failed to set hardware parameters: %s\n", snd_strerror(err));
 | 
			
		||||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue