Introduce a table containing the pins and their jack-detection states
for avoiding the unnecessary verbs to check the pin status at each time.
When the unsol event is enabled via snd_hda_jack_detect_enable(), it
automatically adds the given NID to the table. Then the driver supposes
that the codec driver will set the dirty flag appropariately when an
unsolicited event is invoked for that pin.
The behavior for reading other pins that aren't registered in the table
doesn't change. Only the pins assigned to the table are cached, so far.
In near futre, this table can be extended to use the central place for
the unsolicited events of all pins, etc, and eventually include the
jack-detect kcontrols that replace the current input-jack stuff.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>