[vlc-commits] commit: ALSA: use plughw rather than hw for manually selected output ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Jul 18 17:52:32 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 18 18:46:07 2010 +0300| [063bfc5c7ebca857aeeb1c7f4bed1c9c66ce9edb] | committer: Rémi Denis-Courmont 

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=063bfc5c7ebca857aeeb1c7f4bed1c9c66ce9edb
---

 modules/audio_output/alsa.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 62693b3..146e11d 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 );



More information about the vlc-commits mailing list