From: RĂ©mi Denis-Courmont Date: Sun, 18 Jul 2010 15:46:07 +0000 (+0300) Subject: ALSA: use plughw rather than hw for manually selected output X-Git-Tag: 1.2.0-pre1~5781 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=063bfc5c7ebca857aeeb1c7f4bed1c9c66ce9edb;p=vlc ALSA: use plughw rather than hw for manually selected output plughw provides transparent userspace format conversion if needed. That is much safer. In fact, I doubt VLC would support all raw hardware drivers - some have rather weird format requirements. --- diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index 62693b3f41..146e11d802 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -1005,13 +1005,13 @@ static void GetDevicesForCard( vlc_object_t *obj, module_config_t *p_item, continue; } - if( asprintf( &psz_device, "hw:%d,%d", i_card, i_pcm_device ) == -1 ) - break; + if( asprintf( &psz_device, "plughw:%u,%u", i_card, i_pcm_device ) == -1 ) + continue; if( asprintf( &psz_descr, "%s: %s (%s)", psz_card_name, snd_pcm_info_get_name(p_pcm_info), psz_device ) == -1 ) { free( psz_device ); - break; + continue; } msg_Dbg( obj, " %s", psz_descr );