ALSA: hda - Create Headhpone Mic Jack Mode when really needed
authorTakashi Iwai <tiwai@suse.de>
Tue, 26 Nov 2013 07:33:45 +0000 (08:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:05:56 +0000 (11:05 -0800)
commit2efc09523dd0ad37f257a36ec4dd7d3f049bb02e
tree93ab9bd5ac7a407b308b6b2081fccfeb1a2edca6
parentb69acdfa4fb4d59c9f4ee2bc15c21ad0a663646c
ALSA: hda - Create Headhpone Mic Jack Mode when really needed

commit ced4cefc75fdb8be95eaee325ad0f6b2fc0a484b upstream.

When a headphone jack is configurable as input, the generic parser
tries to make it retaskable as Headphone Mic.  The switching can be
done smoothly if Capture Source control exists (i.e. there is another
input source).  Or when user explicitly enables the creation of jack
mode controls, "Headhpone Mic Jack Mode" will be created accordingly.

However, if the headphone mic is the only input source, we have to
create "Headphone Mic Jack Mode" control because there is no capture
source selection.  Otherwise, the generic parser assumes that the
input is constantly enabled, thus the headphone is permanently set
as input.  This situation happens on the old MacBook Airs where no
input is supported properly, for example.

This patch fixes the problem: now "Headphone Mic Jack Mode" is created
when such an input selection isn't possible.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65681
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_generic.c