I plugged in a mobile headset (in-ear speakers with mic) but this keeps popping up.
Unknown Audio Device
What kind of device did you plug in?
Headphones | Headset | Microphone
Cancel | Sound Settings
Is there any place in the file-system where I can hardcode this setting ?
anjanesh@anjanesh-Latitude-3560:~$ dpkg -l | grep -i jack
ii libjack-jackd2-0:amd64 1.9.9.5+20130622git7de15e7a-1ubuntu1 amd64 JACK Audio Connection Kit (libraries)Ubuntu 14.04 LTS on my Dell Latitude 3560 laptop.
71 Answer
I have found the source of this window. It is unity-settings-daemon's plugin located in line 99 of plugins/media-keys/what-did-you-plug-in/dialog-window.c (in dialog_create function, called later by wdypi_dialog_run):
88 gtk_window_set_title(GTK_WINDOW(d->dialog), _("Unknown Audio Device"));
...
99 d->label = gtk_label_new(_("What kind of device did you plug in?"));
...
103 d->hp_btn = create_icon_button(WDYPI_DIALOG_HEADPHONES, _("Headphones"), "audio-headphones");
...
106 d->hs_btn = create_icon_button(WDYPI_DIALOG_HEADSET, _("Headset"), "audio-headset");
...
110 d->mic_btn = create_icon_button(WDYPI_DIALOG_MICROPHONE, _("Microphone"), "audio-input-microphone");
...
115 d->cancel_btn = gtk_dialog_add_button(GTK_DIALOG(d->dialog), _("Cancel"), GTK_RESPONSE_CANCEL);
116 d->settings_btn = gtk_dialog_add_button(GTK_DIALOG(d->dialog), _("Sound Settings…"), GTK_RESPONSE_YES);This dialog is shown by PulseAudio event see line 2720 of plugins/media-keys/gsd-media-keys-manager.c: on_control_card_info_updated calls pa_backend_card_changed (then it calls get_headset_ports) :
static headset_ports get_headset_ports(const pa_card_info *c)
{ headset_ports h = {NULL, NULL, NULL}; int i; for (i = 0; i < c->n_ports; i++) { pa_card_port_info *p = c->ports[i]; if (!strcmp(p->name, "analog-output-headphones")) h.headphones = p; else if (!strcmp(p->name, "analog-input-microphone-headset")) h.headsetmic = p; else if (!strcmp(p->name, "analog-input-microphone")) h.headphonemic = p; } return h;
}and finally shows dialog with on_wdypi_popup and wdypi_dialog_run.
In the installed system this phrase ("What kind of device did you plug in?") is found in:
unity-settings-daemon: /usr/lib/unity-settings-daemon/usd-test-media-keys
unity-settings-daemon: /usr/lib/unity-settings-daemon-1.0/libmedia-keys.soAccording to source code clicking on "Sound Settings" will open unity-control-center sound.
Note: the libjack-jackd2-0:amd64 package is pre-installed on clean Ubuntu 14.04 LTS.
$ aptitude why libjack-jackd2-0:amd64
i gstreamer1.0-plugins-good Depends libjack-jackd2-0 (>= 1.9.5~dfsg-14) | libjack-0.116
$ aptitude why gstreamer1.0-plugins-good
i rhythmbox Depends gstreamer1.0-plugins-good (>= 1.0.6)Sound is maintained by PulseAudio and then by Unity Settings Daemon.
0