Ticket #115: pa-skip-modem.diff

File pa-skip-modem.diff, 0.9 KB (added by iwienand, 5 years ago)

patch to skip modems

  • src/modules/module-hal-detect.c

     
    132132    char *type; 
    133133    alsa_type_t t; 
    134134 
     135    /* check if this is a modem, careful because some devices don't 
     136       have this alsa flag */ 
     137    if (libhal_device_property_exists(ctx, udi, "alsa.pcm_class", error)) 
     138    { 
     139        type = libhal_device_get_property_string(ctx, udi, 
     140                             "alsa.pcm_class", error); 
     141        if (dbus_error_is_set(error)) 
     142            return FALSE; 
     143        if (type && !strcmp(type, "modem")) { 
     144            libhal_free_string(type); 
     145            return ALSA_TYPE_OTHER; 
     146        } 
     147    } 
     148 
    135149    type = libhal_device_get_property_string(ctx, udi, "alsa.type", error); 
    136150    if (!type || dbus_error_is_set(error)) 
    137151        return FALSE;