Commit graph

583 commits

Author SHA1 Message Date
David Henningsson 8d032a8f65 ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)
Dell Latitude 5x30 and 6x30 series of machines all have
a single 4-pin headset jack. Enabling line in mode for such jack
is very confusing (you would only get mono input, and would have to
use non-standard adapters), so remove the option by default.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-09 14:40:14 +02:00
David Henningsson 29adc4b9e6 ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol event
For less duplication of code between codecs, and to make it easier
in the future to improve code for all codecs simultaneously.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-06 16:43:40 +02:00
Takashi Iwai 62cbde1868 ALSA: hda - Add mic-mute LED control for HP laptop
Some of new HP laptops have a LED for microphone (or recording) mute,
and it's controlled by GPIO pin 3.

Bind this with the capture switch to turn it on/off properly by the
mixer change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-14 12:23:50 +02:00
Takashi Iwai 0528842690 Merge branch 'for-linus' into for-next
To merge HD-audio fixes back to 3.7 development line
2012-09-11 16:46:36 +02:00
David Henningsson 298efee7f5 ALSA: hda - fix control names for multiple speaker out on IDT/STAC
For multiple speaker outs, the names were previously
"Speaker,0", "Speaker,1", "Center"/"LFE", "Speaker,3". This is
inconsistent, confusing, and is not picked up correctly by PulseAudio.
Instead use "Front", "Surround", "Center"/"LFE", "Side" which
is more standard.

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046734
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06 12:01:55 +02:00
Takashi Iwai ab548d2dba ALSA: hda - Fix missing Master volume for STAC9200/925x
With the commit [2faa3bf: ALSA: hda - Rewrite the mute-LED hook with
vmaster hook in patch_sigmatel.c], the former Master volume control
was converted to PCM.  This was supposed to be covered by the vmaster
control.  But due to the lack of "PCM" slave definition, this didn't
happen properly.  The patch fixes the missing entry.

Reported-by: Andrew Shadura <bugzilla@tut.by>
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06 10:10:11 +02:00
Takashi Iwai a184d4e459 Merge branch 'for-linus' into for-next
Need to merge the fixes regarding EPSS.

Conflicts:
	sound/pci/hda/hda_codec.c
2012-08-28 09:26:59 -07:00
Takashi Iwai c36b5b054a ALSA: hda - Don't trust codec EPSS bit for IDT 92HD83xx & co
These codecs seem reporting EPSS but require longer delay for the
proper D3 transition.  For example, D3_STOP_CLOCK_OK bit won't be set
correctly even after D3.

In this patch, codec->epss flag is overridden for avoid the
misbehavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-28 09:26:16 -07:00
Takashi Iwai 8a5354140a ALSA: hda - Call snd_hda_jack_report_sync() generically in hda_codec.c
Instead of calling the jack sync in the init callback of each codec,
call it generically at initialization and resume.  By calling it at
the last of resume sequence, a possible race between the jack sync and
the unsol event enablement in the current code will be closed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-22 16:48:17 +02:00
David Henningsson 042b92c185 ALSA: hda - Do not set GPIOs for speakers on IDT if there are no speakers
This fixes an issue with a machine where there were no speakers,
but GPIO0 had to be data=1 for the headphone to be functioning.

I'm not sure if we need a more advanced patch to solve all possible cases,
but if so, this patch would still provide a minor optimisation.

BugLink: https://bugs.launchpad.net/bugs/1040077
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-22 16:26:05 +02:00
David Henningsson 5e68fb3cab ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxx
Instead of blindly initializing a volume knob widget, first check
that there actually is a volume knob widget.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-16 14:14:56 +02:00
Takashi Iwai 1f43f6c1bc ALSA: hda - Fix mute-LED GPIO initialization for IDT codecs
The IDT codecs initializes the GPIO setup for mute LEDs via
snd_hda_sync_vmaster_hook().  This works in most cases except for the
very first call, which is called before PCM and control creations.
Thus before Master switch is set manually via alsactl, the mute LED
may show the wrong state, depending on the polarity.

Now it's fixed by calling the LED-status update function manually when
no vmaster is set yet.

Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-31 10:50:20 +02:00
Takashi Iwai ff8a1e274c ALSA: hda - Fix polarity of mute LED on HP Mini 210
The commit a3e199732b made the LED working again on HP Mini 210 but
with a wrong polarity.  This patch fixes the polarity for this
machine, and also introduce a new model string "hp-inv-led".

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923

Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-31 10:19:17 +02:00
Takashi Iwai a3e199732b ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210
BIOS on HP Mini 210 doesn't provide the proper "HP_Mute_LED" DMI
string, thus the driver doesn't initialize the GPIO, too.  In the
earlier kernel, the driver falls back to GPIO1, but since 3.3 we've
stopped this due to other wrongly advertised machines.

For fixing this particular case, add a new model type to specify the
default polarity explicitly so that the fallback to GPIO1 is handled.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923

Cc: <stable@vger.kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-26 08:21:53 +02:00
Takashi Iwai 68cb2b5592 ALSA: Convert to new pm_ops for PCI drivers
Straightforward conversion to the new pm_ops from the legacy
suspend/resume ops.

Since we change vx222, vx_core and vxpocket have to be converted,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-03 08:23:03 +02:00
Takashi Iwai 6e1c39c6b0 ALSA: hda - Fix power-map regression for HP dv6 & co
The recent fix for power-map controls (commit b0791dda81) caused
regressions on some other HP laptops.  They have fixed pins but these
pins are exposed as jack-detectable.  Thus the driver tries to control
the power-map dynamically per jack detection where it never gets on.

This patch adds the check of connection and it assumes the no jack
detection is available for fixed pins no matter what pin capability
says.

BugLink: http://bugs.launchpad.net/bugs/1013183
Reported-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-26 17:43:06 +02:00
Takashi Iwai c882246d84 ALSA: hda/idt - Cache the power-map bits
For avoiding unnecessary codec read/write verbs at each jack detection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 09:12:12 +02:00
Takashi Iwai bfc89dec97 ALSA: hda/idt - Clean up power-map check code
Turn off the power-map for unused ports and check the jack-detection
capability in the first place.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 09:02:26 +02:00
Takashi Iwai f153c6af87 Merge branch 'fix/hda' into topic/hda 2012-05-15 08:58:49 +02:00
Takashi Iwai 7560931fbd ALSA: hda - Evaluate gpio_led hints at the right moment
The hints regarding the mute-LED must be evaluated during the codec
parsing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 08:58:38 +02:00
Takashi Iwai b0791dda81 ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptops
BIOS on some HP laptops don't set the speaker-pins as fixed but expose
as jacks, and this confuses the driver as if these pins are
jack-detectable.  As a result, the machine doesn't get sounds from
speakers because the driver prepares the power-map update via jack
unsol events which never come up in reality.  The bug was introduced
in some time in 3.2 for enabling the power-mapping feature.

This patch fixes the problem by replacing the check of the persistent
power-map bits with a proper is_jack_detectable() call.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240

Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15 08:14:36 +02:00
Takashi Iwai 607d4f7f05 ALSA: hda - Remove pre_resume and post_suspend ops
Since the recent commit, the resume procedure is always performed at
the resume time.  This makes the pre_resume hack for VREF mute LED on
some HP laptops superfluous.  As this is the only user of pre_resume
(and there is no user of post_suspend) ops, let's kill them again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-09 10:32:35 +02:00
Takashi Iwai 128bc4ba8c ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.c
Just code shuffles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08 18:01:33 +02:00
Takashi Iwai 4740860b53 ALSA: hda - Add snd_hda_get_default_vref() helper function
Add a new helper function to guess the default VREF pin control bits
for mic in.  This can be used to set the pin control value safely
matching with the actual pin capabilities.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20 13:06:53 +02:00
Takashi Iwai cdd03cedc5 ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functions
For setting the pin-control values more safely to match with the
actual pin capability bits, a copule of new helper functions,
snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are
introduced.  These are simple replacement of the codec verb write with
AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out
superfluous pin-control bits if they don't fit with the corresponding
pin capabilities.

Some codecs are screwed up or ignore the command when such a wrong bit
is set.  These helpers will avoid such secret errors.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20 12:38:48 +02:00
Takashi Iwai 3e843196c6 ALSA: hda/sigmatel - Fix inverted mute LED
While refactoring the mute-LED handling for HP laptops, I messed up
the polarity check in a wrong way.  The red (or the mute-LED if any)
should appear in the muted state, corresponding to GPIO on.

Reported-by: Mikko Vinni <mmvinni@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19 12:04:03 +02:00
Takashi Iwai 350eba43fc ALSA: hda - Fix build with CONFIG_PM=n
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-16 16:15:33 +01:00
Takashi Iwai 7907ae3e50 ALSA: hda - Fix build of patch_sigmatel.c without CONFIG_SND_HDA_POWER_SAVE
Now the mute-LED is controlled without powersave hack, and the ifdefs must
be removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-14 08:20:20 +01:00
Takashi Iwai f29735cbef ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()
Since it's not always safe to assume that the vmaster hook is purely the
mute-LED control, add the flag indicating whether to expose the mute-LED
enum control or not.  Currently, conexant codec sets this off for non-HP
laptops where EAPD may be used really as EAPD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13 07:55:10 +01:00
Takashi Iwai d2f344b5e0 ALSA: hda - Add "Mute-LED Mode" enum control
Create snd_hda_add_vmaster_hook() and snd_hda_sync_vmaster_hook()
helper functions to handle the mute-LED in vmaster hook more
commonly.  In the former function, a new enum control "Mute-LED Mode"
is added.  This provides user to choose whether the mute-LED should be
turned on/off explicitly or to follow the master-mute status.

Reviewed-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13 07:46:50 +01:00
Takashi Iwai 2faa3bf15b ALSA: hda - Rewrite the mute-LED hook with vmaster hook in patch_sigmatel.c
The mute-LED is controlled in patch_sigmatel.c by (ab-)using the
powersave hook.  This can be now rewritten with the vmaster hook
instead, which is much simpler and can work even without
CONFIG_SND_HDA_POWER_SAVE kconfig.

A drawback is that the mute-LED corresponds _only_ to the Master mixer
switch instead of checking the whole DACs.  But usually this shouldn't
be a big problem as PA enables the mixer elements accordingly.

Also, this patch changes the code to create vmaster always even on
STAC9200 and STAC925x.  The former "Master" on these chips are renamed
as "PCM" now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12 14:52:42 +01:00
Takashi Iwai 7c589750a7 Merge branch 'fix/hda' into topic/hda
Speaker-Out renames are merged.

Conflicts:
	sound/pci/hda/patch_realtek.c
2012-03-02 09:00:33 +01:00
Takashi Iwai 7bff172a35 ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecs
A bug report with an old Sony laptop showed that we can't rely on BIOS
setting the pins of headphones but the driver should set always by
itself.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-29 09:41:39 +01:00
Vitaliy Kulikov 5556e14708 ALSA: hda - Fix audio playback support on HP Zephyr system
Enables port E of IDT 92HD91 codec as output and sets correct output
phase between ports E and D and high pass filter.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28 07:29:40 +01:00
Takashi Iwai 374a69e76e Merge branch 'fix/hda' into topic/hda
Necessary for working on the jack-detection suppression feature.
2012-02-13 12:05:30 +01:00
Takashi Iwai a1e0c3cf7f ALSA: hda - Fix mute-LED VREF value for new HP laptops
The new HP laptops turns off the mute LED with VREF50 or VREF80, but
not in HIZ unlike the previous models.  Since VREF50 (also 80) works
with the previous models, let's use VREF50 for all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-09 09:33:46 +01:00
Takashi Iwai 9322ca5497 ALSA: hda - Add suffix argument to snd_hda_add_vmaster()
In most cases, the slave strings for vmaster are identical between
volumes and switches except for "xxx Volume" and "xxx Switch" suffix.
Now snd_hda_add_vmaster() takes the optional suffix argument so that
each string can be composed with the given suffix, and we can share the
slave name strings in both volume and switch calls nicely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03 14:28:01 +01:00
Gustavo Maciel Dias Vieira a6a600d10a ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSID
HP laptop models with buggy BIOS are apparently frequent, including
machines with different codecs. Set the polarity of the mute led based
on the SSID and include an entry for the HP Mini 110-3100.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Tested-by: Predrag Ivanovic <predivan@open.telekom.rs>
Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-25 10:00:12 +01:00
Takashi Iwai b4ead019af ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptops
The recent change of the power-widget handling for IDT codecs caused
the silent output from the docking-station line-out jack.  This was
partially fixed by the commit f2cbba7602
"ALSA: hda - Fix the lost power-setup of seconary pins after PM resume".
But the line-out on the docking-station is still silent when booted
with the jack plugged even by this fix.

The remainig bug is that the power-widget is set off in stac92xx_init()
because the pins in cfg->line_out_pins[] aren't checked there properly
but only hp_pins[] are checked in is_nid_hp_pin().

This patch fixes the problem by checking both HP and line-out pins
and leaving the power-map correctly.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23 18:23:36 +01:00
Albert Pool b9ecc4ee28 snd-hda-intel: better Alienware M17x R3 quirk
I have been told that this way the rear headphone connector is
working as well; with model=alienware only laptop speakers work.
The subsystem of both controller and codec is 1028:0490.

Signed-off-by: Albert Pool <albertpool@solcon.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-20 10:27:23 +01:00
David Henningsson ffe535edb9 ALSA: HDA: Fix internal microphone on Dell Studio 16 XPS 1645
More than one user reports that changing the model from "both" to
"dmic" makes their Internal Mic work.

Cc: stable@kernel.org
Tested-by: Martin Ling <martin-launchpad@earth.li>
BugLink: https://bugs.launchpad.net/bugs/795823
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-16 12:15:26 +01:00
Takashi Iwai f2cbba7602 ALSA: hda - Fix the lost power-setup of seconary pins after PM resume
When multiple headphone or other detectable output pins are present,
the power-map has to be updated after resume appropriately, but the
current driver doesn't check all pins but only the first pin (since
it's enough to check it for the mute-behavior).  This resulted in the
silent output from the secondary outputs after PM resume.

This patch fixes the problem by checking all pins at (re-)init time.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11 12:34:11 +01:00
Takashi Iwai 78c058df6a Merge branch 'test/hda-jack' into topic/hda
Conflicts:
	sound/pci/hda/patch_hdmi.c
	sound/pci/hda/patch_via.c
2011-12-20 15:42:57 +01:00
Takashi Iwai db9c6f842f Merge branch 'fix/hda' into topic/hda 2011-12-20 15:32:39 +01:00
Gustavo Maciel Dias Vieira 97e287626a ALSA: hda: remove unused quirk for inverted mute led
Commit b99a776d0b removed all effects of
the STAC92HD83* model quirk "hp". However, it left the model selection
and documentation behind, confusing users with inverted mute
leds. Completely remove this quirk and its documentation.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-14 09:08:45 +01:00
Gustavo Maciel Dias Vieira e2ef36c688 ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
Some HP laptop models do not have a properly filled OEM string used
to set the gpio and polarity of the mute led. Make the mute led
configuration work for this case.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-13 14:50:52 +01:00
Vitaliy Kulikov 6a557c9473 ALSA: hda - GPIO to control mute LED may be enabled on HP systems with no such HW
This may lead to problems (like loss of sound) as GPIO pin may be used
for different function (SPDIF OUT, EAPD etc) on those systems. This patch
disables default mute LED GPIO configuration on all new codecs as all new
HP systems are expected to provide explicit mute LED configuration in SMBIOS.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-13 10:22:29 +01:00
Takashi Iwai a020428364 ALSA: hda - Fix remaining VREF mute-LED NID check in post-3.1 changes
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-06 13:21:43 +01:00
Takashi Iwai b5212878ab Merge branch 'fix/hda-idt-fix' into fix/hda 2011-12-06 13:19:25 +01:00
Takashi Iwai f1a73746c6 ALSA: hda - Fix GPIO LED setup for IDT 92HD75 codecs
Some HP laptops with IDT 92HD75 codecs may use a GPIO > 4 for the mute
LED, but currently the driver doesn't check this properly, and confuses
the mute LED behavior.  This ended up with the silent output  on some
HP laptops due to  having another GPIO used as external amp control.

This patch fixes the problem by checking the max GPIO count and
comparing with the given value from DMI entry instead of magic fixed
value 4 and 8, and adding a new field to indicate the VREF mute-LED
behavior.

Reported-and-tested-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-12-06 13:18:46 +01:00