Changes in v2: - Moved pa_device_prototype from device-prototype.[ch] to card.[ch]. - Since we don't have pa_router anymore, replaced the pa_router.set_card_profile() callback with a hook: PA_CORE_HOOK_CARD_SET_PROFILE. - Changed the ownership of device prototypes from the card back end implementation to pa_card. - Related to that, I added pa_card_new_data_add_profile(), which should be used instead of adding profiles directly with pa_hashmap_put(). - Changed pa_device_prototype structure so that instead of having a sink and a source pointer, it now has a direction and a void pointer (which can point either to a sink or a source). I started to like this approach more, it's at least more obvious that a prototype can't point to both a sink and a source. - Removed n_sinks and n_sources from pa_card_profile. - Related to that, I also split the device_prototypes field of the previous version into two: sink_prototypes and source_prototypes. This allows using the hashmap sizes as replacements for n_sinks and n_sources. - Changed the handling of device prototypes in the Bluetooth device module when the "SCO over PCM" mode is used. Since no sinks or sources will be created for HSP/HFGW in that mode, it doesn't really make sense to create device prototypes for the HSP and HFGW profiles. - Added a bug fix for populating the profile information in the SCO over PCM mode. This is not directly related to the main scope of this patch set, but the bug was in code that I was going to change anyway. Tanu Kaskinen (10): Add PA_CORE_HOOK_CARD_SET_PROFILE card: Add recreate_devices_on_profile_change flag card: Add pa_card_new_data_add_profile() card, sink, source: Introduce pa_device_prototype alsa: Add device prototype support bluetooth: Fix profile information in the SCO over PCM mode bluetooth: Add device prototype support card: Remove n_sinks and n_sources from pa_card_profile New module: module-skoa-router alsa: Remove the stream rescue policy from module-alsa-card src/Makefile.am | 8 ++ src/daemon/default.pa.in | 3 + src/daemon/system.pa.in | 3 + src/modules/alsa/alsa-mixer.c | 1 - src/modules/alsa/alsa-mixer.h | 2 + src/modules/alsa/alsa-sink.c | 3 + src/modules/alsa/alsa-source.c | 3 + src/modules/alsa/module-alsa-card.c | 59 ++++----- src/modules/bluetooth/module-bluetooth-device.c | 90 +++++++++---- src/modules/bluetooth/module-bluetooth-policy.c | 2 +- src/modules/dbus/iface-card-profile.c | 8 +- src/modules/dbus/iface-card.c | 2 +- src/modules/macosx/module-coreaudio-device.c | 2 +- src/modules/module-card-restore.c | 2 +- src/modules/module-skoa-router.c | 167 ++++++++++++++++++++++++ src/modules/module-switch-on-port-available.c | 6 +- src/pulsecore/card.c | 90 ++++++++++++- src/pulsecore/card.h | 59 ++++++++- src/pulsecore/cli-command.c | 2 +- src/pulsecore/core.h | 31 +++++ src/pulsecore/protocol-native.c | 6 +- src/pulsecore/sink.c | 14 ++ src/pulsecore/sink.h | 4 + src/pulsecore/source.c | 14 ++ src/pulsecore/source.h | 4 + 25 files changed, 503 insertions(+), 82 deletions(-) create mode 100644 src/modules/module-skoa-router.c -- 1.8.3.1