pa_xfree(control_device);
}
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY|(u->use_tsched ? PA_SINK_DYNAMIC_LATENCY : 0));
pa_sink_new_data_done(&data);
pa_xfree(control_device);
}
+ if (pa_modargs_get_proplist(ma, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY|(u->use_tsched ? PA_SOURCE_DYNAMIC_LATENCY : 0));
pa_source_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"name=<name for the card/sink/source, to be prefixed> "
- "card_name=<name for card> "
- "sink_name=<name for sink> "
- "source_name=<name for source> "
+ "card_name=<name for the card> "
+ "card_properties=<properties for the card> "
+ "sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
+ "source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"device_id=<ALSA card index> "
"format=<sample format> "
"rate=<sample rate> "
static const char* const valid_modargs[] = {
"name",
"card_name",
+ "card_properties",
"sink_name",
+ "sink_properties",
"source_name",
+ "source_properties",
"device_id",
"format",
"rate",
add_disabled_profile(data.profiles);
+ if (pa_modargs_get_proplist(ma, "card_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_card_new_data_done(&data);
+ goto fail;
+ }
+
u->card = pa_card_new(m->core, &data);
pa_card_new_data_done(&data);
PA_MODULE_USAGE(
"name=<name of the sink, to be prefixed> "
"sink_name=<name for the sink> "
+ "sink_properities=<properties for the sink> "
"device=<ALSA device> "
"device_id=<ALSA card index> "
"format=<sample format> "
static const char* const valid_modargs[] = {
"name",
"sink_name",
+ "sink_properties",
"device",
"device_id",
"format",
PA_MODULE_USAGE(
"name=<name for the source, to be prefixed> "
"source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"device=<ALSA device> "
"device_id=<ALSA card index> "
"format=<sample format> "
static const char* const valid_modargs[] = {
"name",
"source_name",
+ "source_properties",
"device",
"device_id",
"format",
PA_MODULE_USAGE(
"name=<name for the card/sink/source, to be prefixed> "
"card_name=<name for the card> "
+ "card_properties=<properties for the card> "
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"address=<address of the device> "
"profile=<a2dp|hsp> "
"rate=<sample rate> "
static const char* const valid_modargs[] = {
"name",
"card_name",
+ "card_properties",
"sink_name",
+ "sink_properties",
"source_name",
+ "source_properties",
"address",
"profile",
"rate",
data.name = get_name("sink", u->modargs, u->address, &b);
data.namereg_fail = b;
+ if (pa_modargs_get_proplist(u->modargs, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ return -1;
+ }
+
u->sink = pa_sink_new(u->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY | (u->profile == PROFILE_HSP ? PA_SINK_HW_VOLUME_CTRL : 0));
pa_sink_new_data_done(&data);
data.name = get_name("source", u->modargs, u->address, &b);
data.namereg_fail = b;
+ if (pa_modargs_get_proplist(u->modargs, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&data);
+ return -1;
+ }
+
u->source = pa_source_new(u->core, &data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY | (u->profile == PROFILE_HSP ? PA_SOURCE_HW_VOLUME_CTRL : 0));
pa_source_new_data_done(&data);
}
/* Run from main thread */
-static int add_card(struct userdata *u, const char *default_profile, const pa_bluetooth_device *device) {
+static int add_card(struct userdata *u, const pa_bluetooth_device *device) {
pa_card_new_data data;
pa_bool_t b;
pa_card_profile *p;
enum profile *d;
const char *ff;
char *n;
+ const char *default_profile;
+
+ pa_assert(u);
+ pa_assert(device);
pa_card_new_data_init(&data);
data.driver = __FILE__;
data.name = get_name("card", u->modargs, device->address, &b);
data.namereg_fail = b;
+ if (pa_modargs_get_proplist(u->modargs, "card_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_card_new_data_done(&data);
+ return -1;
+ }
+
data.profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
/* we base hsp/a2dp availability on UUIDs.
*d = PROFILE_OFF;
pa_hashmap_put(data.profiles, p->name, p);
- if (default_profile) {
+ if ((default_profile = pa_modargs_get_value(u->modargs, "profile", NULL))) {
if (pa_hashmap_get(data.profiles, default_profile))
pa_card_new_data_set_profile(&data, default_profile);
else
goto fail;
/* Add the card structure. This will also initialize the default profile */
- if (add_card(u, pa_modargs_get_value(ma, "profile", NULL), device) < 0)
+ if (add_card(u, device) < 0)
goto fail;
/* Connect to the BT service and query capabilities */
PA_MODULE_LOAD_ONCE(TRUE);
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_USAGE(
- "sink_name=<name of sink> "
+ "sink_name=<name for the sink> "
+ "sink_properties=<properties for the card> "
"server_name=<jack server name> "
"client_name=<jack client name> "
"channels=<number of channels> "
- "connect=<connect ports?> "
- "channel_map=<channel map>");
+ "channel_map=<channel map> "
+ "connect=<connect ports?>");
#define DEFAULT_SINK_NAME "jack_out"
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"server_name",
"client_name",
"channels",
- "connect",
"channel_map",
+ "connect",
NULL
};
pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Jack sink (%s)", jack_get_client_name(u->client));
pa_proplist_sets(data.proplist, "jack.client_name", jack_get_client_name(u->client));
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
pa_sink_new_data_done(&data);
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(TRUE);
PA_MODULE_USAGE(
- "source_name=<name of source> "
+ "source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"server_name=<jack server name> "
"client_name=<jack client name> "
"channels=<number of channels> "
- "connect=<connect ports?>"
- "channel_map=<channel map>");
+ "channel_map=<channel map> "
+ "connect=<connect ports?>");
#define DEFAULT_SOURCE_NAME "jack_in"
static const char* const valid_modargs[] = {
"source_name",
+ "source_properties",
"server_name",
"client_name",
"channels",
- "connect",
"channel_map",
+ "connect",
NULL
};
pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Jack source (%s)", jack_get_client_name(u->client));
pa_proplist_sets(data.proplist, "jack.client_name", jack_get_client_name(u->client));
+ if (pa_modargs_get_proplist(ma, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &data, PA_SOURCE_LATENCY);
pa_source_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"slaves=<slave sinks> "
"adjust_time=<seconds> "
"resample_method=<method> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
"channel_map=<channel map>");
#define DEFAULT_SINK_NAME "combined"
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"slaves",
"adjust_time",
"resample_method",
"format",
- "channels",
"rate",
+ "channels",
"channel_map",
NULL
};
if (slaves)
pa_proplist_sets(data.proplist, "combine.slaves", slaves);
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
pa_sink_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"server=<address> cookie=<filename> "
"format=<sample format> "
- "channels=<number of channels> "
- "rate=<sample rate>");
+ "rate=<sample rate> "
+ "channels=<number of channels>");
#define DEFAULT_SINK_NAME "esound_out"
};
static const char* const valid_modargs[] = {
+ "sink_name",
+ "sink_properties",
"server",
"cookie",
- "rate",
"format",
+ "rate",
"channels",
- "sink_name",
NULL
};
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "esd");
pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "EsounD Output on %s", espeaker);
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY|PA_SINK_NETWORK);
pa_sink_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"master=<name of sink to remap> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
"channel_map=<channel map> "
"plugin=<ladspa plugin name> "
"label=<ladspa plugin label> "
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"master",
"format",
- "channels",
"rate",
+ "channels",
"channel_map",
"plugin",
"label",
pa_proplist_sets(sink_data.proplist, "device.ladspa.copyright", d->Copyright);
pa_proplist_setf(sink_data.proplist, "device.ladspa.unique_id", "%lu", (unsigned long) d->UniqueID);
+ if (pa_modargs_get_proplist(ma, "sink_properties", sink_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&sink_data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &sink_data, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY);
pa_sink_new_data_done(&sink_data);
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_CLASS, "abstract");
if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
- pa_log("Invalid properties.");
+ pa_log("Invalid properties");
pa_sink_new_data_done(&data);
goto fail;
}
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"file=<path of the FIFO> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate>"
+ "channels=<number of channels> "
"channel_map=<channel map>");
#define DEFAULT_FILE_NAME "fifo_output"
};
static const char* const valid_modargs[] = {
+ "sink_name",
+ "sink_properties",
"file",
- "rate",
"format",
+ "rate",
"channels",
- "sink_name",
"channel_map",
NULL
};
pa_sink_new_data_set_sample_spec(&data, &ss);
pa_sink_new_data_set_channel_map(&data, &map);
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY);
pa_sink_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"file=<path of the FIFO> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
"channel_map=<channel map>");
#define DEFAULT_FILE_NAME "/tmp/music.input"
};
static const char* const valid_modargs[] = {
+ "source_name",
+ "source_properties",
"file",
+ "format",
"rate",
"channels",
- "format",
- "source_name",
"channel_map",
NULL
};
pa_source_new_data_set_sample_spec(&data, &ss);
pa_source_new_data_set_channel_map(&data, &map);
+ if (pa_modargs_get_proplist(ma, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &data, PA_SOURCE_LATENCY);
pa_source_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
- "description=<description for the sink> "
+ "sink_properties=<properties for the sink> "
"server=<address> "
"format=<sample format> "
- "channels=<number of channels> "
- "rate=<sample rate>");
+ "rate=<sample rate> "
+ "channels=<number of channels>");
#define DEFAULT_SINK_NAME "raop"
};
static const char* const valid_modargs[] = {
+ "sink_name",
+ "sink_properties",
"server",
- "rate",
"format",
+ "rate",
"channels",
- "sink_name",
- "description",
+ "description", /* supported for compatibility reasons, made redundant by sink_properties= */
NULL
};
else
pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "RAOP sink '%s'", server);
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY|PA_SINK_NETWORK);
pa_sink_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"master=<name of sink to remap> "
"master_channel_map=<channel map> "
"format=<sample format> "
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"master",
"master_channel_map",
- "rate",
"format",
+ "rate",
"channels",
"channel_map",
"remix",
pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_MASTER_DEVICE, master->name);
pa_proplist_sets(sink_data.proplist, PA_PROP_DEVICE_CLASS, "filter");
+ if (pa_modargs_get_proplist(ma, "sink_properties", sink_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&sink_data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &sink_data, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY);
pa_sink_new_data_done(&sink_data);
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
- "rate=<sample rate> "
"source_name=<name for the source> "
+ "source_properties=<properties for the source> "
+ "rate=<sample rate> "
"frequency=<frequency in Hz>");
#define DEFAULT_SOURCE_NAME "sine_input"
};
static const char* const valid_modargs[] = {
- "rate",
"source_name",
+ "source_properties",
+ "rate",
"frequency",
NULL
};
pa_proplist_setf(data.proplist, "sine.hz", "%u", frequency);
pa_source_new_data_set_sample_spec(&data, &ss);
+ if (pa_modargs_get_proplist(ma, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &data, PA_SOURCE_LATENCY);
pa_source_new_data_done(&data);
PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"device=<audio device file name> "
"record=<enable source?> "
"playback=<enable sink?> "
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"source_name",
+ "source_properties",
"device",
"record",
"playback",
pa_source_new_data_set_channel_map(&source_new_data, &map);
pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_STRING, u->device_name);
pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_API, "solaris");
- pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Solaris PCM source");
+ pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Solaris PCM source");
pa_proplist_sets(source_new_data.proplist, PA_PROP_DEVICE_ACCESS_MODE, "serial");
pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) u->buffer_size);
+ if (pa_modargs_get_proplist(ma, "source_properties", source_new_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&source_new_data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &source_new_data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY|PA_SOURCE_HW_VOLUME_CTRL);
pa_source_new_data_done(&source_new_data);
pa_xfree(name_buf);
pa_sink_new_data_set_channel_map(&sink_new_data, &map);
pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_STRING, u->device_name);
pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_API, "solaris");
- pa_proplist_setf(sink_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Solaris PCM sink");
+ pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Solaris PCM sink");
pa_proplist_sets(sink_new_data.proplist, PA_PROP_DEVICE_ACCESS_MODE, "serial");
+ if (pa_modargs_get_proplist(ma, "sink_properties", sink_new_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&sink_new_data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &sink_new_data, PA_SINK_HARDWARE|PA_SINK_LATENCY|PA_SINK_HW_VOLUME_CTRL|PA_SINK_HW_MUTE_CTRL);
pa_sink_new_data_done(&sink_new_data);
#ifdef TUNNEL_SINK
PA_MODULE_DESCRIPTION("Tunnel module for sinks");
PA_MODULE_USAGE(
+ "sink_name=<name for the local sink> "
+ "sink_properties=<properties for the local sink> "
"server=<address> "
"sink=<remote sink name> "
"cookie=<filename> "
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
- "sink_name=<name for the local sink> "
"channel_map=<channel map>");
#else
PA_MODULE_DESCRIPTION("Tunnel module for sources");
PA_MODULE_USAGE(
+ "source_name=<name for the local source> "
+ "source_properties=<properties for the local source> "
"server=<address> "
"source=<remote source name> "
"cookie=<filename> "
"format=<sample format> "
"channels=<number of channels> "
"rate=<sample rate> "
- "source_name=<name for the local source> "
"channel_map=<channel map>");
#endif
"rate",
#ifdef TUNNEL_SINK
"sink_name",
+ "sink_properties",
"sink",
#else
"source_name",
+ "source_properties",
"source",
#endif
"channel_map",
if (u->sink_name)
pa_proplist_sets(data.proplist, "tunnel.remote.sink", u->sink_name);
+ if (pa_modargs_get_proplist(ma, "sink_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &data, PA_SINK_NETWORK|PA_SINK_LATENCY|PA_SINK_HW_VOLUME_CTRL|PA_SINK_HW_MUTE_CTRL);
pa_sink_new_data_done(&data);
if (u->source_name)
pa_proplist_sets(data.proplist, "tunnel.remote.source", u->source_name);
+ if (pa_modargs_get_proplist(ma, "source_properties", data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &data, PA_SOURCE_NETWORK|PA_SOURCE_LATENCY);
pa_source_new_data_done(&data);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"source_name=<name for the source> "
+ "source_properties=<properties for the source> "
"device=<OSS device> "
"record=<enable source?> "
"playback=<enable sink?> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
+ "channel_map=<channel map> "
"fragments=<number of fragments> "
"fragment_size=<fragment size> "
- "channel_map=<channel map> "
"mmap=<enable memory mapping?>");
#define DEFAULT_DEVICE "/dev/dsp"
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"source_name",
+ "source_properties",
"device",
"record",
"playback",
pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) (u->in_hwbuf_size));
pa_proplist_setf(source_new_data.proplist, PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE, "%lu", (unsigned long) (u->in_fragment_size));
+ if (pa_modargs_get_proplist(ma, "source_properties", source_new_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_source_new_data_done(&source_new_data);
+ goto fail;
+ }
+
u->source = pa_source_new(m->core, &source_new_data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY);
pa_source_new_data_done(&source_new_data);
pa_xfree(name_buf);
pa_proplist_setf(sink_new_data.proplist, PA_PROP_DEVICE_BUFFERING_BUFFER_SIZE, "%lu", (unsigned long) (u->out_hwbuf_size));
pa_proplist_setf(sink_new_data.proplist, PA_PROP_DEVICE_BUFFERING_FRAGMENT_SIZE, "%lu", (unsigned long) (u->out_fragment_size));
+ if (pa_modargs_get_proplist(ma, "sink_properties", sink_new_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&sink_new_data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &sink_new_data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
pa_sink_new_data_done(&sink_new_data);
pa_xfree(name_buf);