summaryrefslogtreecommitdiffstats
path: root/src/modules/alsa/alsa-sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-01-21 02:02:30 +0100
committerLennart Poettering <lennart@poettering.net>2009-01-21 02:02:30 +0100
commite8f93b125e0e0776024ae78a2bdd33daf4442326 (patch)
tree92913c03477f5e5f44814138a520ad6ef9959b78 /src/modules/alsa/alsa-sink.c
parent7ca0e00a2c81bed61b0f5d0185b2458c416991fb (diff)
make implementation of module-alsa-card complete
Diffstat (limited to 'src/modules/alsa/alsa-sink.c')
-rw-r--r--src/modules/alsa/alsa-sink.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c
index e890ef76..e6b3e0e5 100644
--- a/src/modules/alsa/alsa-sink.c
+++ b/src/modules/alsa/alsa-sink.c
@@ -1201,7 +1201,7 @@ finish:
pa_log_debug("Thread shutting down");
}
-pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const pa_alsa_profile_info *profile) {
+pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_card *card, const pa_alsa_profile_info *profile) {
struct userdata *u = NULL;
const char *dev_id = NULL;
@@ -1372,11 +1372,11 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const pa_alsa_profile_in
if (snd_pcm_info(u->pcm_handle, info) >= 0) {
char *md;
- int card;
+ int card_idx;
- if ((card = snd_pcm_info_get_card(info)) >= 0) {
+ if ((card_idx = snd_pcm_info_get_card(info)) >= 0) {
- md = pa_sprintf_malloc("hw:%i", card);
+ md = pa_sprintf_malloc("hw:%i", card_idx);
if (strcmp(u->device_name, md))
if (pa_alsa_prepare_mixer(u->mixer_handle, md) >= 0)
@@ -1407,8 +1407,9 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const pa_alsa_profile_in
}
pa_sink_new_data_init(&data);
- data.driver = __FILE__;
+ data.driver = driver;
data.module = m;
+ data.card = card;
pa_sink_new_data_set_name(&data, name);
data.namereg_fail = namereg_fail;
pa_sink_new_data_set_sample_spec(&data, &ss);