Ticket #139: pulseaudio-hal-alsa-devices-1.diff

File pulseaudio-hal-alsa-devices-1.diff, 1.2 kB (added by juergbi, 3 years ago)

Patch to add all ALSA devices

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

     
    176176        goto fail; 
    177177 
    178178    device = libhal_device_get_property_int(u->context, udi, "alsa.device", &error); 
    179     if (dbus_error_is_set(&error) || device != 0) 
     179    if (dbus_error_is_set(&error)) 
    180180        goto fail; 
    181181 
    182182    card = libhal_device_get_property_int(u->context, udi, "alsa.card", &error); 
     
    190190        *sink_name = pa_sprintf_malloc("alsa_output.%s", strip_udi(udi)); 
    191191         
    192192        module_name = "module-alsa-sink"; 
    193         args = pa_sprintf_malloc("device=hw:%u sink_name=%s", card, *sink_name); 
     193        args = pa_sprintf_malloc("device=hw:%u,%u sink_name=%s", card, device, *sink_name); 
    194194    } else { 
    195195        *source_name = pa_sprintf_malloc("alsa_input.%s", strip_udi(udi)); 
    196196         
    197197        module_name = "module-alsa-source"; 
    198         args = pa_sprintf_malloc("device=hw:%u source_name=%s", card, *source_name); 
     198        args = pa_sprintf_malloc("device=hw:%u,%u source_name=%s", card, device, *source_name); 
    199199    } 
    200200 
    201201    pa_log_debug("Loading %s with arguments '%s'", module_name, args);