]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/alsa.c
Release the display mode when we are done with it.
[vlc] / modules / audio_output / alsa.c
index 4642df8f59464d2c5422a0ea37ca78462d20bab4..69190c7ffacf177a5cbf2df4ec98250405ce09d6 100644 (file)
@@ -338,7 +338,7 @@ static int Open( vlc_object_t *p_this )
     }
 
     /* Choose the IEC device for S/PDIF output:
-       if the device is overriden by the user then it will be the one
+       if the device is overridden by the user then it will be the one
        otherwise we compute the default device based on the output format. */
     char *psz_iec_device = NULL;
     if( AOUT_FMT_NON_LINEAR( &p_aout->output.output ) )
@@ -463,7 +463,7 @@ static int Open( vlc_object_t *p_this )
           the time it returns, probe if the device is available in loop for 1s.
           We cannot use blocking mode since the we would wait indefinitely when
           switching from a dmx device to surround51. */
-        if( i == 0 )
+        if( i == 1 )
         {
             msg_Err( p_aout, "audio device %s is already in use",
                      psz_device );
@@ -645,8 +645,6 @@ retry:
     /* Get Initial software parameters */
     snd_pcm_sw_params_current( p_sys->p_snd_pcm, p_sw );
 
-    snd_pcm_sw_params_set_sleep_min( p_sys->p_snd_pcm, p_sw, 0 );
-
     snd_pcm_sw_params_set_avail_min( p_sys->p_snd_pcm, p_sw,
                                      p_aout->output.i_nb_samples );
     /* start playing when one period has been written */