Commit Graph

2762 Commits

Author SHA1 Message Date
Takashi Iwai 04f5ade6af ALSA: hda - Introduce snd_hda_get_pin_label()
Create a new helper function snd_hda_get_pin_label() for getting a label
string for both input and output pins.  hda_get_input_pin_label() is
obsoleted by this function, and the callers are replaced appropriately
now by this patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 11:10:16 +01:00
Takashi Iwai 8b940fc457 Merge branch 'fix/hda' into topic/hda 2011-11-16 11:05:55 +01:00
Wu Fengguang 2d1b439bdb ALSA: hda - move eld->spk_alloc fixup to hdmi_update_eld()
It looks more natural and saves two lines of code.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 10:44:58 +01:00
Wu Fengguang 744626dada ALSA: hda - delayed ELD repoll
The Intel HDMI chips (ironlake at least) are found to have ~250ms delay
between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes
actually readable. During the time the ELD buffer is mysteriously all 0.

Fix it by scheduling a delayed work to re-read ELD buffer after 300ms.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 10:44:42 +01:00
Wu Fengguang b95d68b817 ALSA: hda - fix ELD memory leak
memset(eld) clears eld->proc_entry which will leak the struct
snd_info_entry when unloading module.

Fix it by
- memset only the fields before eld->eld_buffer
- set eld->eld_valid to true _after_ all eld fields have been filled

Cc: <stable@kernel.org>
Cc: Pierre-louis Bossart <pierre-louis.bossart@intel.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-16 10:44:21 +01:00
Takashi Iwai 19723079db ALSA: hda/realtek - Move ALC880 model=lg-lw to auto-parser
ALC880 model=lg-lw works fine with the auto-parser as is.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-15 14:46:25 +01:00
Takashi Iwai ee3b29693c ALSA: hda/realtek - Move ALC880 model=medion-rim to auto-parser
Translate ALC880 medion-rim static configs to the auto-parser with the
additional GPIO2 verb and COEF setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-15 14:26:54 +01:00
Takashi Iwai 5671087ffa ALSA: hda/realtek - Move ALC885 macpro and imac24 models to auto-parser
The ALC882 macpro and imac24 static configs can be transferred to the
auto-parser with the additional GPIO setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 17:43:17 +01:00
Takashi Iwai b25396994b ALSA: hda/realtek - Re-add the model string selection for ALC88x
In the commit [c3e837bb: ALSA: hda/realtek - Rewrite ALC882 acer-aspire-*
models with the auto-parser], the check of the model option got removed
mistakenly.  Re-added the board_config check again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 17:32:17 +01:00
Takashi Iwai 3ccbf1c376 ALSA: hda/realtek - Remove left-over chunks in alc882_quirks.c
Remove unused variables.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 17:20:49 +01:00
Takashi Iwai e29d377814 ALSA: hda/realtek - Create mono volume controls for mono-outputs
When the pin or the DAC doesn't support the stereo, create a mono
control instead of creating a stereo control blindly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 17:13:23 +01:00
Jesper Juhl e53de8f00c ALSA: hda/realtek: remove redundant semicolon
Having just one semicolon after a break statement is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 10:41:46 +01:00
Charles Chin afef2cfa0e ALSA: hda - pwr_nids cleanup for IDT codecs
Clean up and fix pwr_nids for 92HD71 / 73 / 83 family codecs; remove
pwr_mapping which was incorrect.

The original pwr_nids support of 92HD83xxx was incorrect and never
actually worked before.  Now we should have things working correctly
without having to hack by DID anymore.

It is also not necessary to explicitly turn on all the pins near the
beginning of patch_stac92hd83xxx() now, the pins will go though
initialization properly.

Tested on 92HD66 / 71 / 73 / 75 / 83 / 89 / 91 demo boards.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-11 08:05:28 +01:00
Takashi Iwai c3e837bbcc ALSA: hda/realtek - Rewrite ALC882 acer-aspire-* models with the auto-parser
Now we can move the big acer-aspire-* static quirks to the auto-paresr
with some additional pin-configs and verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 16:01:47 +01:00
Takashi Iwai 07b18f69a7 ALSA: hda/realtek - Create multi-io jacks more aggresively
So far the driver creates the multi-io jacks only when a single output
jack, i.e. no multiple speakers are assigned.  This patch adds the
similar multi-io detection even with multiple speakers are assigned
primarily, so that 5.1-speakers + HP/mic/LI combination can work.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 15:42:54 +01:00
Takashi Iwai da691064d1 Merge branch 'fix/hda' into topic/hda 2011-11-10 12:41:37 +01:00
Takashi Iwai 2f451d2a2a ALSA: hda - Re-enable the check NO_PRESENCE misc bit
We disabled the check of NO_PRESENCE bit of the default pin-config
in commit f4419172 temporarily.  One problem was that the first
implementation was wrong -- the bit after the shift must be checked.
However, this would still give many regressions on machines with broken
BIOS.  They set this bit wrongly even on active pins.

A workaround is to check whether all pins contain this bit.  As far as
I've checked, broken BIOSen set this bit on all pins, no matter whether
active or not.  In such a case, the driver should ignore this bit check.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 12:36:46 +01:00
Takashi Iwai aeb4b88ec0 ALSA: hda - Don't add elements of other codecs to vmaster slave
When a virtual mater control is created, the driver looks for slave
elements from the assigned card instance.  But this may include the
elements of other codecs when multiple codecs are on the same HD-audio
bus.  This works at the first time, but it'll give Oops when it's once
freed and re-created via reconfig sysfs.

This patch changes the element-look-up strategy to limit only to the
mixer elements of the same codec.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 12:32:08 +01:00
Takashi Iwai 68ef0561ef ALSA: hda/realtek - Drop ALC882 desktop model quirks
Now we're touching the desktop static configs for ALC88x codecs.
These are mostly OK with the auto-parser, but some models need careful
handling; ALC889 intel mobo requires the COEF setup, and W2JC needs
GPIO1 and COEF.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 18:28:35 +01:00
Takashi Iwai eb844d51cc ALSA: hda/realtek - Remove ALC882 targa-* models
All ALC882 targa-* models can be replaced with the auto-parser just
with the additional GPIO3 setup.  And it's generically applied to all
MSI boards unless other quirks are present.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 18:03:07 +01:00
Takashi Iwai ac9b1cddf1 ALSA: hda/realtek - Reorder alc882_fixup_tbl[]
No, I'm not Mr. Monk, but can't resist...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 17:58:32 +01:00
Takashi Iwai 8812c4f961 ALSA: hda/realtek - Move ALC882 model=acer-aspire to auto-parser
The ALC882 model=acer-aspire requires the additional COEF setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 17:58:30 +01:00
Takashi Iwai 25da1f86b4 ALSA: hda/realtek - Drop ALC882 model=acer quirk
This quirk is anyway not used any more, so no problem to remove.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 17:57:52 +01:00
Takashi Iwai b3ca3bf5e8 ALSA: hda/realtek - Drop ALC882 model=clevo-m720 quirk
This works well without any special handling with the auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 17:57:51 +01:00
Takashi Iwai 145fa008a2 ALSA: hda/realtek - Drop ALC882 3stack-hp, 6stack-dell and clevo-m540r models
These static configs are no longer needed by replacement with the
auto-parser.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 17:57:50 +01:00
Takashi Iwai 7a6069bf64 ALSA: hda/realtek - Replace ALC882 arima, medion and laptop-eapd quirks
Move these quitks to the auto-parser.  They just need some EAPD setups
in addition.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 17:57:45 +01:00
Takashi Iwai ed63a88775 ALSA: hda/realtek - Drop ALC882 mitac and fujitsu-xa3530 static configs
These are working well with the auto-parser although they have
relatively complex setup.  Let's go forward.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 15:12:20 +01:00
Takashi Iwai f01f587bb7 ALSA: hda/realtek - Drop ALC882 lenovo and haier-w66 static configs
Remove all ALC882 static configurations for all Lenovo and Haier-w66
quirks.  They work fine with the auto-parser now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 15:12:19 +01:00
Takashi Iwai 8af2d066d1 ALSA: hda/realtek - Drop lenovo-sky, asus-m90v, fujitsu-pi2515 quirks
These machines are working well with the auto-parser without static
configurations.  More diet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 15:12:18 +01:00
Takashi Iwai 177943a39a ALSA: hda/realtek - Drop ALC882 asus-a7j and asus-a7m models
These models work fine with the auto-parser with the additional COEF
setup.  The iMac 7,1 (106b:3200) also uses the same quirk, so remove it
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 15:11:16 +01:00
Takashi Iwai 596830ee1d ALSA: hda/realtek - Look through codec SSID for fix-up lists
Not only PCI SSIDs but also look through codec SSIDs for fix-up table
entries.  MacBook tend to give the same PCI SSID but unique codec SSIDs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 15:08:41 +01:00
Takashi Iwai 0e7cc2e745 ALSA: hda/realtek - Move ALC888 ASUS EEE1601 config to auto-parser
The ASUS EEE1601 works almost fine with the auto-parser but the static
configuration has a certain specific COEF verb.  Add this to the fix-up
list so that we can drop the whole EEE1601 static config from
alc882_quirks.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 12:42:48 +01:00
Takashi Iwai 6fdfa36128 ALSA: hda/realtek - Drop ALC882 model=asus-p5q static config
It works well with the auto-parser and the default BIOS setup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 12:32:50 +01:00
Takashi Iwai 4586b2b583 Merge branch 'fix/hda' into topic/hda 2011-11-09 12:28:12 +01:00
Julian Wollrath f7f9bdfadf ALSA: hda - fix internal mic on Dell Vostro 3500 laptop
Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the
new model dell-vostro-3500.

Signed-off-by: Julian Wollrath <jwollrath@web.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 11:03:29 +01:00
David Henningsson 8d1c963a2e ALSA: HDA: Remove quirk for Toshiba T110
According to the bug reporter, model=auto is needed to make the
internal microphone work.

BugLink: https://bugs.launchpad.net/bugs/819699
Reported-by: Andrej (agno01)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 08:51:28 +01:00
Takashi Iwai 5c0ebfbe56 ALSA: hda/realtek - Rewrite ALC882 model=vaio-tt with auto-parser
Providing a pincfg fix for VAIO-TT with ALC889 codec to work with the
auto-parser, and drop the static configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:37 +01:00
Takashi Iwai 42399f7a71 ALSA: hda/realtek - Remove all ALC262-quirk codes
Now that model=ultra is supported well by the auto-parser, we can get rid
of the whole alc262_quirks.c and its related codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:36 +01:00
Takashi Iwai 24de183ed0 ALSA: hda/realtek - Add the support of shared HP/Mic
A machine like Q1-ultra which has only a single HP but no mic-jack, we
can re-task the headhpone as an external mic jack.  This was done formerly
in ALC262 model=ultra quirk, and now the auto-parser supports this mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:36 +01:00
Takashi Iwai 82e14a4754 ALSA: hda/realtek - Drop ALC262 model=basic static configs
Now most of ALC262 stuff has been moved to the auto-parser, and no longer
need for keeping model=basic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:36 +01:00
Takashi Iwai 46900b5c55 ALSA: hda/realtek - Drop ALC262 model=hippo static quirks
Both entries for ALC262 model=hippo work well with the auto-parser and
the default BIOS setup.  No static configs are needed, so drop them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:36 +01:00
Takashi Iwai 6fb9c82c47 ALSA: hda/realtek - Drop ALC262 model=hippo static quirks
This model (actually BenQ Joybook) works fine with the default auto-parser
and the BIOS setup.  Just drop the static quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:35 +01:00
Takashi Iwai 3dcd3be330 ALSA: hda/realtek - Convert ALC262 model=fujitsu to auto-parser
It works well with the auto-parse and the default BIOS setup when an
additional COEF setup (for benq) is used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:35 +01:00
Takashi Iwai b42590b865 ALSA: hda/realtek - Convert ALC262 benq and benq-t31 to fixup-lists
The conversion from ALC262 model=benq and model=benq-t31 static configs
to auto-parser requires the manual COEF setups for corresponding models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:35 +01:00
Takashi Iwai c470150c53 ALSA: hda/realtek - Convert ALC262 lenovo-3000 quirks to fixup-list
The static quirks for ALC262 Lenovo 3000 can be covered by the auto-
parser with a fixup of the mic-pin to VREF50 and the additional COEF
verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:35 +01:00
Takashi Iwai 80f6b77366 ALSA: hda/realtek - Drop ALC262 model=nec quirk
This laptop works also fine with the auto-parser and the BIOS setup.
A good boy.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:35 +01:00
Takashi Iwai ee0eb25119 ALSA: hda/realtek - Drop ALC262 model=toshiba-s06
This laptop works fine with the current auto-parser and the BIOS setup,
so let's drop the static configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:34 +01:00
Takashi Iwai 12837c983d ALSA: hda/realtek - Convert ALC262 model=toshiba-rx1 to a fixup-list
Use the auto-parser for ALC262 model=toshiba-rx1 with the fixed pin-
configs.  The BIOS table seems incorrect, so many pin entries are
overwritten to match with the former quirk.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:34 +01:00
Takashi Iwai ea4e7af122 ALSA: hda/realtek - Convert alc262 model=tyan to a fixup-list
Use the auto-parser for ALC262 model=tyan with a pin-config fix-up and
drop the static configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 08:59:34 +01:00
Takashi Iwai dccc1810f4 ALSA: hda - Mute unused capture sources for Realtek codecs
When a Realtek codec has a matrix-style capture-source selection, we
need to scan all connections instead of only imux items.  Otherwise some
input might be kept unmuted.  Although the corresponding input must be
dead so there should be no input from it, it's still safer to mute the
route completely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 07:52:19 +01:00