Bug 85369 - Problem setting activeport on device using DBus
Summary: Problem setting activeport on device using DBus
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-23 14:24 UTC by John
Modified: 2014-11-14 12:29 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
fix (1.68 KB, patch)
2014-11-02 18:50 UTC, Tanu Kaskinen
Details | Splinter Review

Description John 2014-10-23 14:24:53 UTC
The function handle_set_active_port in src/modules/dbus/iface-device.c requires the requested port to be submitted as a path of the form /org/pulseaudio/core1/sink0/port0, which is consistent with what handle_get_active_port returns.  However inside in that function there is a call 

if (!(new_active = pa_hashmap_get(d->ports, new_active_path))) {

but the d->ports is indexed by the name of the device, not the path, so it cannot find a matching port.  As you can't pass the name of the device as an argument, it is therefore not possible to select the port over dbus.
Comment 1 Tanu Kaskinen 2014-11-02 18:49:27 UTC
Thanks for reporting! I'll attach a patch that hopefully fixes this.
Comment 2 Tanu Kaskinen 2014-11-02 18:50:13 UTC
Created attachment 108804 [details] [review]
fix
Comment 3 Tanu Kaskinen 2014-11-14 12:29:30 UTC
I applied the patch to master now.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.