[alsa-devel] [PATCH] - remove "front" , "surround" , "rear" , "surround40" , "surround51" from output of arecord -L

Raymond Yau superquad.vortex2 at gmail.com
Tue Jun 29 06:05:06 CEST 2010


Since arecord -L will list "front", .....  devices which are not suitable
for recording (e.g. HDA has softvol plugin in front device , emu10k1 and
other drivers has hook ctl and lock )




    while (*n != NULL) {
        name = snd_device_name_get_hint(*n, "NAME");
        descr = snd_device_name_get_hint(*n, "DESC");
        io = snd_device_name_get_hint(*n, "IOID");
+        if ( stream == SND_PCM_STREAM_CAPTURE )
+               if (( strstr(descr,"speaker") > 0 ) || (
strstr(descr,"Output") > 0 ))
+                        goto __end;
        if (io != NULL && strcmp(io, filter) != 0)
            goto __end;
        printf("%s\n", name);
        if ((descr1 = descr) != NULL) {


More information about the Alsa-devel mailing list