Merge lp:~diwic/unity-settings-daemon/lp1521664 into lp:unity-settings-daemon

Proposed by David Henningsson
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 4120
Merged at revision: 4121
Proposed branch: lp:~diwic/unity-settings-daemon/lp1521664
Merge into: lp:unity-settings-daemon
Diff against target: 55 lines (+11/-8)
2 files modified
plugins/media-keys/gsd-media-keys-manager.c (+3/-3)
plugins/media-keys/what-did-you-plug-in/pa-backend.c (+8/-5)
To merge this branch: bzr merge lp:~diwic/unity-settings-daemon/lp1521664
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+279410@code.launchpad.net

Commit message

Update PulseAudio port names to fix LP: #1521664

Description of the change

Update PulseAudio port names to fix LP: #1521664

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

seems fine to me but is the TODO something that could be done now?

review: Approve
Revision history for this message
David Henningsson (diwic) wrote :

I think so. I just have to think it through a bit more thoroughly, so it does not cause any regression if I just remove that part.

Revision history for this message
Sebastien Bacher (seb128) wrote :

k, do you want to wait on that to be resolved before merging or should we land that one and do a follow up later if needed? if we do the change earlier in the cycle is probably better than later, give more feedback cycles

Revision history for this message
David Henningsson (diwic) wrote :

I think we should merge this part of it without waiting for the TODO item to be fully resolved.

Revision history for this message
Sebastien Bacher (seb128) wrote :

wfm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/media-keys/gsd-media-keys-manager.c'
2--- plugins/media-keys/gsd-media-keys-manager.c 2015-10-08 14:28:20 +0000
3+++ plugins/media-keys/gsd-media-keys-manager.c 2015-12-03 09:34:29 +0000
4@@ -2819,15 +2819,15 @@
5 break;
6 case WDYPI_DIALOG_HEADPHONES:
7 pa_backend_set_port(pb, "analog-output-headphones", true);
8- pa_backend_set_port(pb, "analog-input-microphone-internal", false);
9+ pa_backend_set_port(pb, "analog-input-internal-mic", false);
10 break;
11 case WDYPI_DIALOG_HEADSET:
12 pa_backend_set_port(pb, "analog-output-headphones", true);
13- pa_backend_set_port(pb, "analog-input-microphone-headset", false);
14+ pa_backend_set_port(pb, "analog-input-headset-mic", false);
15 break;
16 case WDYPI_DIALOG_MICROPHONE:
17 pa_backend_set_port(pb, "analog-output-speaker", true);
18- pa_backend_set_port(pb, "analog-input-microphone", false);
19+ pa_backend_set_port(pb, "analog-input-headphone-mic", false);
20 break;
21 default:
22 break;
23
24=== modified file 'plugins/media-keys/what-did-you-plug-in/pa-backend.c'
25--- plugins/media-keys/what-did-you-plug-in/pa-backend.c 2014-02-15 08:33:21 +0000
26+++ plugins/media-keys/what-did-you-plug-in/pa-backend.c 2015-12-03 09:34:29 +0000
27@@ -42,10 +42,13 @@
28 const pa_card_port_info *headphones, *headsetmic, *headphonemic;
29 } headset_ports;
30
31-/* In PulseAudio ports will show up with the following names:
32+/*
33+ TODO: Check if we still need this with the changed PA port names
34+
35+ In PulseAudio ports will show up with the following names:
36 Headphones - analog-output-headphones
37- Headset mic - analog-input-microphone-headset
38- Jack in mic-in mode - analog-input-microphone
39+ Headset mic - analog-input-headset-mic (was: analog-input-microphone-headset)
40+ Jack in mic-in mode - analog-input-headphone-mic (was: analog-input-microphone)
41
42 However, since regular mics also show up as analog-input-microphone,
43 we need to check for certain controls on alsa mixer level too, to know
44@@ -71,9 +74,9 @@
45 pa_card_port_info *p = c->ports[i];
46 if (!strcmp(p->name, "analog-output-headphones"))
47 h.headphones = p;
48- else if (!strcmp(p->name, "analog-input-microphone-headset"))
49+ else if (!strcmp(p->name, "analog-input-headset-mic"))
50 h.headsetmic = p;
51- else if (!strcmp(p->name, "analog-input-microphone"))
52+ else if (!strcmp(p->name, "analog-input-headphone-mic"))
53 h.headphonemic = p;
54 }
55 return h;

Subscribers

People subscribed via source and target branches