- var_Create( p_aout, "audio-device", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
-
- if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
- {
- msg_Err( p_aout, "cannot reset OSS audio device" );
- var_Destroy( p_aout, "audio-device" );
- return;
- }
-
- if ( config_GetInt( p_aout, "spdif" )
- && AOUT_FMT_NON_LINEAR( &p_aout->output.output ) )
- {
- i_format = AFMT_AC3;
-
- if( ioctl( p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) >= 0
- && i_format == AFMT_AC3 )
- {
- val.psz_string = N_("A/52 over S/PDIF");
- var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val );
- }
- }
-
- /* Go to PCM mode. */
- i_format = AFMT_S16_NE;
- if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 ||
- ioctl( p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0 )
- {
- return;
- }
+ var_Create( p_aout, "audio-device", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
+ text.psz_string = _("Audio Device");
+ var_Change( p_aout, "audio-device", VLC_VAR_SETTEXT, &text, NULL );