fill in dev_id properly

This commit is contained in:
Lennart Poettering 2009-01-21 02:01:44 +01:00
parent 28f05e0435
commit 7ca0e00a2c
2 changed files with 13 additions and 2 deletions

View file

@ -1039,7 +1039,7 @@ finish:
pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const pa_alsa_profile_info *profile) {
struct userdata *u = NULL;
const char *dev_id;
const char *dev_id = NULL;
pa_sample_spec ss;
pa_channel_map map;
uint32_t nfrags, hwbuf_size, frag_size, tsched_size, tsched_watermark;
@ -1116,6 +1116,11 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const pa_alsa_profil
if (profile) {
if (!(dev_id = pa_modargs_get_value(ma, "device_id", NULL))) {
pa_log("device_id= not set");
goto fail;
}
if (!(u->pcm_handle = pa_alsa_open_by_device_id_profile(
dev_id,
&u->device_name,