History log of /linux-master/sound/pci/hda/patch_sigmatel.c
Revision Date Author Comments
# f342ac00 05-Apr-2023 Oswald Buddenhagen <oswald.buddenhagen@gmx.de>

ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards

The BIOS botches this one completely - it says the 2nd S/PDIF output is
used, while in fact it's the 1st one. This is tested on DP45SG, but I'm
assuming it's valid for the other boards in the series as well.

Also add some comments regarding the pins.
FWIW, the codec is apparently still sold by Tempo Semiconductor, Inc.,
where one can download the documentation.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230405201220.2197826-2-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c17f8fd31 05-Apr-2023 Oswald Buddenhagen <oswald.buddenhagen@gmx.de>

ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard

Like the other boards from the D*45* series, this one sets up the
outputs not quite correctly.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230405201220.2197826-1-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4c8d695c 06-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda: beep: Simplify keep-power-at-enable behavior

The recent fix for IDT codecs to keep the power up while the beep is
enabled can be better integrated into the beep helper code.
This patch cleans up the code with refactoring.

Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabled")
Link: https://lore.kernel.org/r/20220906092306.26183-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 51bdc8bb 05-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel: Fix unused variable warning for beep power change

The newly added stac_check_power_status() caused a compile warning
when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it.

Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabled")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220905130630.2845-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 414d38ba 04-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel: Keep power up while beep is enabled

It seems that the beep playback doesn't work well on IDT codec devices
when the codec auto-pm is enabled. Keep the power on while the beep
switch is enabled.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1200544
Link: https://lore.kernel.org/r/20220904072750.26164-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f8b32a6d 17-Aug-2021 Nathan Chancellor <nathan@kernel.org>

ALSA: hda/sigmatel - Sink stac_shutup() into stac_suspend()

When CONFIG_PM is not set, there is an unused function warning:

sound/pci/hda/patch_sigmatel.c:4383:13: warning: unused function
'stac_shutup' [-Wunused-function]
static void stac_shutup(struct hda_codec *codec)
^
1 warning generated.

Sink the contents of stac_shutup() into stac_suspend() since
stac_shutup() is only called in that one location now.

Fixes: 327b34f2a97d ("ALSA: hda: Nuke unused reboot_notify callback")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210818012705.311963-1-nathan@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 327b34f2 13-Aug-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Nuke unused reboot_notify callback

As reboot_notify callback is no longer used by the codec core, let's
get rid of the unused code. Conexant codec needs a slight code change
as it used to call the reboot_notify at the codec removal, too.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
Link: https://lore.kernel.org/r/20210813081230.4268-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e65bf997 17-Mar-2021 Jaroslav Kysela <perex@perex.cz>

ALSA: HDA - remove the custom implementation for the audio LED trigger

With the new snd-ctl-led module, we have a generic way
to trigger audio LEDs based on the sound control changes.

Remove the custom implementation from the HDA driver.

Move the LED initialization before snd_hda_gen_parse_auto_config()
call in all drivers to create marked controls there.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210317172945.842280-5-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7fabbc5 05-Aug-2020 Randy Dunlap <rdunlap@infradead.org>

ALSA: pci: delete repeated words in comments

Drop duplicated words in sound/pci/.
{and, the, at}

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/20200806021926.32418-1-rdunlap@infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9ab0cb30 17-Jul-2020 Takashi Iwai <tiwai@suse.de>

ALSA: Replace the word "slave" in vmaster API

Follow the recent inclusive terminology guidelines and replace the
word "slave" in vmaster API. I chose the word "follower" at this time
since it seems fitting for the purpose.

Note that the word "master" is kept in API, since it refers rather to
audio master volume control.

Also, while we're at it, a typo in comments is corrected, too.

Link: https://lore.kernel.org/r/20200717154517.27599-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1d37c57 18-Jun-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel: Use the new vmaster mute LED helper

Convert the mute LED handling in Sigmatel/IDT codec to the new vmaster
mute helper. A point to be cautiously handled is that the value
passed to the callback is inverted; the vmaster passes "enabled"
(0 = mute), while LED classdev passes "brightness" (1 = mute).

A positive side-effect by this change is that the driver gets also the
enum controls for the mute behavior like other drivers already had.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23a2b469 18-Jun-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel: Convert to cdev-variant of mic-mute LED controls

This patch converts the remaining user of
snd_hda_gen_add_micmute_led() in IDT/Sigmatel codec driver into the
new snd_hda_gen_add_micmute_led_cdev().

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# caf3c043 03-Jan-2020 Michał Mirosław <mirq-linux@rere.qmqm.pl>

ALSA: hda - constify and cleanup static NodeID tables

Make hda_nid_t tables static const, as they are not intended to be
modified by callees.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/5150c94101c9534f4c8e987324f6912c16d459f6.1578043216.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35ace5e8 03-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Constify snd_kcontrol_new items

Most of snd_kcontrol_new definitions are read-only and passed as-is.
Let's declare them as const for further optimization.

There should be no functional changes by this patch.

Link: https://lore.kernel.org/r/20200103081714.9560-37-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5f2cb361 12-Dec-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Unify get_response handling

Now most of the get_response handling became quite similar between
HDA-core and legacy drivers, and the only differences are:

- the handling of extra-long polling delay for some codecs
- the debug message for the stalled communication

and both are worth to share in the common code.

This patch unifies the code into snd_hdac_bus_get_response(), and use
this from the legacy get_response callback. It results in a good
amount of code reduction in the end.

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20191212191101.19517-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 31fa571c 13-Aug-2019 YueHaibing <yuehaibing@huawei.com>

ALSA: hda/sigmatel - remove unused variable 'stac9200_core_init'

sound/pci/hda/patch_sigmatel.c:981:30: warning:
stac9200_core_init defined but not used [-Wunused-const-variable=]

It is never used, so can be removed.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d0fa1179 20-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32

Based on 1 normalized pattern(s):

this driver is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this driver is distributed in the hope
that it will be useful but without any warranty without even the
implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 18 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520170857.186505395@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d153135e 04-Oct-2018 Michael Pobega <mpobega@neverware.com>

ALSA: hda/sigmatel - Disable automute for Elo VuPoint

The Elo VuPoint 15MX has two headphone jacks of which neither work by
default. Disabling automute allows ALSA to work normally with the
speakers & left headphone jack.

Future pin configuration changes may be required in the future to get
the right headphone jack working in tandem.

Signed-off-by: Michael Pobega <mpobega@neverware.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# be57bfff 22-Aug-2018 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA: hda: move hda_codec.h to include/sound

As suggested by Takashi, move this header file to make it easier
to include from e.g. the Intel Skylake driver in follow-up patches

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# b4af16d6 22-Aug-2018 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA: hda: move hda_codec.h to include/sound

As suggested by Takashi, move this header file to make it easier
to include from e.g. the Intel Skylake driver in follow-up patches

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3bf29db7 18-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel - Use common helper for mic mute LED

To simplify the code and to get the mic-mute LED behavior control, use
the new helper function for controlling the mic mute LED instead of
open-codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fdbf0488 16-Aug-2017 Bhumika Goyal <bhumirks@gmail.com>

ALSA: hda: make snd_kcontrol_new const

Make these const as they are only passed as the 3rd argument to the
function snd_hda_gen_add_kctl, which is of type const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1fc2e41f 22-May-2017 Alexander Tsoy <alexander@tsoy.me>

ALSA: hda - apply STAC_9200_DELL_M22 quirk for Dell Latitude D430

This model is actually called 92XXM2-8 in Windows driver. But since pin
configs for M22 and M28 are identical, just reuse M22 quirk.

Fixes external microphone (tested) and probably docking station ports
(not tested).

Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 078502b5 13-Feb-2017 Darren Stevens <darren@stevens-zone.net>

ALSA: hda/patch_sigmatel: Add AmigaOne X1000 pinconfigs

The AmigaOne X1000 has a Sigmatel STAC92HD700 attached to the HD Audio
on an ATI SB600. Add the required settings to enable sound.

Signed-off-by: Darren Stevens <darren@stevens-zone.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2ebab40e 09-Feb-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix bad dereference of jack object

The hda_jack_tbl entries are managed by snd_array for allowing
multiple jacks. It's good per se, but the problem is that struct
hda_jack_callback keeps the hda_jack_tbl pointer. Since snd_array
doesn't preserve each pointer at resizing the array, we can't keep the
original pointer but have to deduce the pointer at each time via
snd_array_entry() instead. Actually, this resulted in the deference
to the wrong pointer on codecs that have many pins such as CS4208.

This patch replaces the pointer to the NID value as the search key.
As an unexpected good side effect, this even simplifies the code, as
only NID is needed in most cases.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 196543d5 09-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply HP headphone fixups more generically

It turned out that many HP laptops suffer from the same problem as
fixed in commit [c932b98c1e47: ALSA: hda - Apply pin fixup for HP
ProBook 6550b]. But, it's tiresome to list up all such PCI SSIDs, as
there are really lots of HP machines.

Instead, we do a bit more clever, try to check the supposedly dock and
built-in headphone pins, and apply the fixup when both seem valid.
This rule can be applied generically to all models using the same
quirk, so we'll fix all in a shot.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=107491
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c932b98c 04-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply pin fixup for HP ProBook 6550b

HP ProBook 6550b needs the same pin fixup applied to other HP B-series
laptops with docks for making its headphone and dock headphone jacks
working properly. We just need to add the codec SSID to the list.

Bugzilla: https://bugzilla.kernel.org/attachment.cgi?id=191971
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b9a94a9c 01-Oct-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - convert to hda_device_id

Finally we have a proper infrastructure to generate the modaliases
automatically, let's move to hda_device_id from the legacy
hda_codec_preset that contains basically the same information.

The patch function hook is stored in driver_data field, which is long,
and we need an explicit cast. Other than that, the conversion is
mostly straightforward. Each entry is even simplified using a macro,
and the lengthy (and error-prone) manual modaliases got removed.

As a result, we achieved a quite good diet:
14 files changed, 407 insertions(+), 595 deletions(-)

Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7e10080 04-Oct-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable power_save_node for IDT 92HD73xx chips

The recent widget power saving introduced some unavoidable click
noises on old IDT 92HD73xx chips while it still seems working on the
compatible new chips. In the bugzilla, we tried lots of tests and
workarounds, but they didn't help much. So, let's disable the feature
for these specific chips as the least (but safest) fix.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104981
Cc: <stable@vger.kernel.org> # v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b9d9c9ef 27-Jul-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply fixup for another Toshiba Satellite S50D

Toshiba Satellite S50D has another model with a different PCI SSID
(1179:fa93) while the previous fixup was for 1179:fa91. Adjust the
fixup entry with SND_PCI_QUIRK_MASK() to match with both devices.

Reported-by: Tim Sample <timsample@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ab42ff4 15-Jun-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine

On a HP Envy TouchSmart laptop, there are 2 speakers (main speaker
and subwoofer speaker), 1 headphone and 2 DACs, without this fixup,
the headphone will be assigned to a DAC and the 2 speakers will be
assigned to another DAC, this assignment makes the surround-2.1
channels invalid.

To fix it, here using a DAC/pin preference map to bind the main
speaker to 1 DAC and the subwoofer speaker will be assigned to another
DAC.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 225068ab 29-May-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set patch_ops before calling auto-parser

... so that the parser code can overwrite some optional ops. For
Realtek and others, it can be set solely in the spec allocator, so it
results in a good code cleanup, too.

With this change, we can finally remove the local stream_pm setup and
rely on the generic parser's automatic setting.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd6a6503 27-May-2015 Jie Yang <yang.jie@intel.com>

ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS

We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c545f799 27-May-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable power_save_node for IDT92HD71bxx

We've got a regression report that 4.1-rc causes noises on a Dell
laptop. Similar like Realtek codec, this seems also triggered by the
recent power_save_node feature. As this kind of issue is quite hard
to debug without actual hardware, disable the power_save_node flag for
this codec as a workaround.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98971
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 49fb1897 27-May-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set stream_pm ops automatically by generic parser

This allows user to test power_save_node feature via sysfs or patch
firmware even on the codecs that don't specify it. It'll also save a
few lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a551d914 25-Feb-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use regmap for command verb caches, too

Like the previous patches, this patch converts also to the regmap, at
this time, the cached verb writes are the target. But this conversion
needs a bit more caution than before.

- In the old code, we just record any verbs as is, and restore them at
resume. For the regmap scheme, this doesn't work, since a few verbs
like AMP or DIGI_CONVERT are asymmetrical. Such verbs are converted
either to the dedicated function (snd_hda_regmap_xxx_amp()) or
changed to the unified verb.

- Some verbs have to be declared as vendor-specific ones before
accessing via regmap.

Also, the minor optimization with codec->cached_write flag is dropped
in a few places, as this would confuse the operation. Further
optimizations will be brought in the later patches, if any.

This conversion ends up with a drop of significant amount of codes,
mostly the helper codes that are no longer used.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7639a06c 03-Mar-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move a part of hda_codec stuff into hdac_device

Now some codes and functionalities of hda_codec struct are moved to
hdac_device struct. A few basic attributes like the codec address,
vendor ID number, FG numbers, etc are moved to hdac_device, and they
are accessed like codec->core.addr. The basic verb exec functions are
moved, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 967b1307 20-Mar-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rename power_mgmt flag with power_save_node

David suggested that the name "power_mgmt" is too ambiguous. Rename
the flag with a bit clearer one "power_save_node".

Also, add the corresponding description to HD-Audio.txt, too.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6b275b14 20-Mar-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix power of pins used for mute LED with vrefs

Some pins are used for controlling the LED with the VREF value.
This patch changes the power behavior of such pins to be constantly
up. A new state, pin_fixed, is introduced to nid_path to indicate
that the path contains the fixed pin. This improves also the
readability a bit for other static routes, too.

Then a helper function snd_hda_gen_fix_pin_power() is called from the
codec driver for such fixed pins, and it will create fake paths
containing only these pins with pin_fixed=1 flag.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6feb5d0 16-Mar-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support advanced power state controls

This patch enables the finer power state control of each widget
depending on the jack plug state and streaming state in addition to
the existing power_down_unused power optimization. The new feature is
enabled only when codec->power_mgmt flag is set.

Two new flags, pin_enabled and stream_enabled, are introduced in
nid_path struct for marking the two individual power states: the pin
plug/unplug and DAC/ADC stream, respectively. They can be set
statically in case they are static routes (e.g. some mixer paths),
too.

The power up and down events for each pin are triggered via the
standard hda_jack table. The call order is hard-coded, relying on the
current implementation of jack event chain (a la FILO/stack order).

One point to be dealt carefully is that DAC/ADC cannot be powered
on/off while streaming. They are pinned as long as the stream is
running. For controlling the power of DAC/ADC, a new patch_ops is
added. The generic parser provides the default callback for that.

As of this patch, only IDT/Sigmatel codec driver enables the flag.
The support on other codecs will follow.

An assumption we made in this code is that the widget state (e.g. amp,
pinctl, connections) remains after the widget power transition (not
about FG power transition). This is true for IDT codecs, at least.
But if the widget state is lost at widget power transition, we'd need
to implement additional code to sync the cached amp/verbs for the
specific NID.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 55ed9cd1 19-Feb-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Replace bus pm_notify with the standard runtime PM framework

Now the final bit of runtime PM cleanup: instead of manual
notification of the power up/down of the codec via hda_bus pm_notify
ops, use the standard runtime PM feature.

The child codec device will kick off the runtime PM of the parent
(PCI) device upon suspend/resume automatically. For managing whether
the link can be really turned off, we use the bit flags
bus->codec_powered instead of the earlier bus->power_keep_link_on.
flag. Each codec driver is responsible to set/clear the bit flag, and
the controller device can be turned off only when all these bits are
cleared.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d8a766a1 17-Feb-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Bind codecs via standard bus

Now we create the standard HD-audio bus (/sys/bus/hdaudio), and bind
the codec driver with the codec device over there. This is the first
step of the whole transition so that the changes to each codec driver
are kept as minimal as possible.

Each codec driver needs to register hda_codec_driver struct containing
the currently existing preset via the new helper macro
module_hda_codec_driver(). The old hda_codec_preset_list is replaced
with this infrastructure. The generic parsers (for HDMI and other)
are also included in the preset with the special IDs to bind
uniquely.

In HD-audio core side, the device binding code is split to
hda_bind.c. It provides the snd_hda_bus_type implementation to match
the codec driver with the given codec vendor ID. It also manages the
module auto-loading by itself like before: when the matching isn't
found, it tries to probe the corresponding codec modules, and finally
falls back to the generic drivers. (The special ID mentioned above is
set at this stage.)

The only visible change to outside is that the hdaudio sysfs entry now
appears in /sys/bus/devices, not as a sound class device.

More works to move the suspend/resume and remove ops will be
(hopefully) done in later patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6426460e 19-Feb-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec

BIOS doesn't seem to set up pins for 5.1 and the SPDIF out, so we need
to give explicitly here.

Reported-and-tested-by: Misan Thropos <misanthropos@gmx.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4227de2a 04-Feb-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set up GPIO for Toshiba Satellite S50D

Toshiba Satellite S50D laptop with an IDT codec uses the GPIO4 (0x10)
as the master EAPD.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=915858
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c507de88 05-Jan-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix wrong gpio_dir & gpio_mask hint setups for IDT/STAC codecs

stac_store_hints() does utterly wrong for masking the values for
gpio_dir and gpio_data, likely due to copy&paste errors. Fortunately,
this feature is used very rarely, so the impact must be really small.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa699c49 11-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous callbacks from STAC/IDT codecs

Now we can register multiple callbacks to each jack, most of hooks
used in STAC/IDT codecs can be removed by enabling the powermap update
callback for all relevant pins. Along with this, the call of
stac_init_power_map() can be moved back to stac_parse_auto_config()
and the own build_controls callback can be removed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a4f69d5 11-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Allow multiple callbacks for jack

So far, hda_jack infrastructure allows only one callback per jack, and
this makes things slightly complicated when a driver wants to assign
multiple tasks to a jack, e.g. the standard auto-mute with a power
up/down sequence. This can be simplified if the hda_jack accepts
multiple callbacks.

This patch is such an extension: the callback-specific part (the
function and private_data) is split to another struct from
hda_jack_tbl, and multiple such objects can be assigned to a single
hda_jack_tbl entry.

The new struct hda_jack_callback is passed to each callback function
now, thus the patch became bigger than expected. But these changes
are mostly trivial.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bda17b82 11-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Make snd_hda_jack_detect_enable_callback() returning the jack object

STAC/IDT driver calls snd_hda_jack_tbl_get() again after calling
snd_hda_jack_detect_enable_callback(). For simplifying this, let's
make snd_hda_jack_detect_enable_callback() returning the pointer while
handling the error with the standard IS_ERR() & co.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 62f949bf 11-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Get rid of action field from struct hda_jack_tbl

The action value assigned to each hda_jack_tbl entry is mostly
superfluous. The actually used values are either the widget NID or a
value specific to the callback.

The former case can be simply replaced by a reference to widget NID
itself. The only place doing the latter is STAC/IDT codec driver for
the powermap handling. But, the code doesn't need to check the action
field at all -- the function jack_update_power() is called either with
a specific pin or with NULL. So the check of jack->action can be
removed completely there, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7a9744cb 10-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid pin powermap without jack detection

When a driver is set up without the jack detection explicitly (either
by passing a model option or via a specific fixup), the pin powermap
of IDT/STAC codecs is set up wrongly, resulting in the silence
output. It's because of a logic failure in stac_init_power_map().
It tries to avoid creating a callback for the pins that have other
auto-hp and auto-mic callbacks, but the check is done in a wrong way
at a wrong time. The stac_init_power_map() should be called after
creating other jack detection ctls, and the jack callback should be
created only for jack-detectable widgets.

This patch fixes the check in stac_init_power_map() and its callee
at the right place, after snd_hda_gen_build_controls().

Reported-by: Adam Richter <adam_richter2004@yahoo.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d89c6c0c 01-Sep-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add TLV_DB_SCALE_MUTE bit for relevant controls

The DACs on Sigmatel/IDT codecs do mute at the lowest volume level,
and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each
volume control element like Speaker and Headphone as well as Master.
Along with the translation to the generic parser, however, the TLV bit
was lost for the slave controls (e.g. Speaker) but set only to
Master. In theory this should have sufficed, but apps, particularly
PA, do care the slave volume bits, so we seem to see a regression in
the volume controls.

This patch adds a flag to hda_gen_spec to specify the DAC mute
feature, and adds the TLV bit properly for all relevant volume
controls. Also, the TLV bit for vmaster is set in hda_generic.c, so
that we can get rid of all tricks from the codec driver side.

As the similar hack is applied to Conexant 5051 stuff, we can get rid
of it as well.

BugLink: https://bugs.launchpad.net/bugs/1357928
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7440850c 29-Jul-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix an external mic jack problem on a HP machine

ON the machine, two pin complex (0xb and 0xe) are both routed to
the same external right-side mic jack, this makes the jack can't work.

To fix this problem, set the 0xe to "not connected".

BugLink: https://bugs.launchpad.net/bugs/1350148
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f5662e1c 22-Jul-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Refactor quirk picking and change quirk priority

Previously, calling one quirk function first and another later
would make the latter one take priority, this is now changed
to make the former take priority.

By adding two special values for fixup_id we can also get rid of the
fixup_forced flag.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8695a003 15-Jul-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add the pin fixup for HP Envy TS bass speaker

NID 0x10 seems corresponding to the bass speaker.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8b3dfdaf 24-Jun-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13

HP Spectre 13 has the IDT 92HD95 codec, and BIOS seems to set the
default high-pass filter in some "safer" range, which results in the
very soft tone from the built-in speakers in contrast to Windows.
Also, the mute LED control is missing, since 92HD95 codec still has no
HP-specific fixups for GPIO setups.

This patch adds these missing features: the HPF is adjusted by the
vendor-specific verb, and the LED is set up from a DMI string (but
with the default polarity = 0 assumption due to the incomplete BIOS on
the given machine).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=74841
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6194b99d 06-Jun-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Kill the rest of snd_print*() usages

Pass the codec object so that we can replace all the rest of
snd_print*() usages with the proper device-specific print helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e7fc4960 20-May-2014 Toralf Förster <toralf.foerster@gmx.de>

ALSA: hda - fix format type mismatch in sound/pci/hda/patch_sigmatel.c

Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e8b99a1d 27-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel - Allow auto-switching for dock line-in of HP laptops

Many HP laptops with STAC codecs have a docking station port and BIOS
sets the pins for the input on the dock as a line in. Because the
generic parser doesn't handle a line in pin as auto-switchable, this
resulted in the manual capture source selection on these laptops.

However, from the usability POV, the automatic switching is easier.
This patch adds the line_in_auto_switch hint in the fixup function for
these laptops. Even if no dock port is present, this should be
harmless as the generic parser allows the auto-switching only in a
limited situation (all three pins are located in different
positions).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4e76a883 24-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Replace with standard printk

Use dev_err() and co for messages from HD-audio controller and codec
drivers. The codec drivers are mostly bound with codec objects, so
some helper macros, codec_err(), codec_info(), etc, are provided.
They merely wrap the corresponding dev_xxx().

There are a few places still calling snd_printk() and its variants
as they are called without the codec or device context.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 37c367ec 24-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for HP Folio 13 mute LED

HP Folio 13 may have a broken BIOS that doesn't set up the mute LED
GPIO properly, and the driver guesses it wrongly, too. Add a new
fixup entry for setting the GPIO pin statically for this laptop.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1de7ca5e 19-Feb-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Enable front audio jacks on one HP desktop model

The front headphone and mic jackes on a HP desktop model (Vendor Id:
0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this
machine has 8 physical ports, 6 of them are routed to rear jackes
and all of them work very well, while the remaining 2 ports are
routed to front headphone and mic jackes, but the corresponding
pin complex node are not defined correctly.

After apply this fix, the front audio jackes can work very well.

[trivial fix of enum definition by tiwai]

BugLink: https://bugs.launchpad.net/bugs/1282369
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Gerald Yang <gerald.yang@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7fe30711 30-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix inconsistent Mic mute LED

The current code for controlling mic mute LED in patch_sigmatel.c
blindly assumes that there is a single capture switch. But, there can
be multiple multiple ones, and each of them flips the state, ended up
in an inconsistent state.

For fixing this problem, this patch adds kcontrol to be passed to the
hook function so that the callee can check which switch is being
accessed. In stac_capture_led_hook(), the state is checked as a
bitmask, and turns on the LED when all capture switches are off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dfc6e469 13-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply codec power_filter to FG nodes

Apply the codec->power_filter to the FG nodes in general for reducing
hackish set_power_state ops override in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 873ce8ad 26-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Drop bus->avoid_link_reset flag

Use bus->power_keep_link_on instead. The controller shouldn't go to
D3 when the link isn't reset, so essentially avoiding the link reset
means avoiding the runtime PM.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d009f3de 14-Nov-2013 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - load EQ params into IDT codec on HP bNB13 systems

Adds linear EQ filtering for integrated speaker protection

Signed-off-by: Vitaliy Kulikov <vitaliy.kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95f74c41 23-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mute LED on HP laptops in runtime suspend

When HP laptops with mute and mic-record LEDs go to runtime suspend,
these LEDs are turned on forcibly no matter whether GPIO pis are on or
off. This strange behavior seems triggered by resetting the HD-audio
bus link at azx_rutime_suspend(). So, just add a new hda_bus flag to
avoid the link reset at runtime suspend and set it for these HP
machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 697aebab 01-Aug-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing fixup for Mac Mini with STAC9221

A fixup for Apple Mac Mini was lost during the adaption to the generic
parser because the fallback for the generic ID 8384:7680 was dropped,
and it resulted in the silence output (and maybe other problems).

Unfortunately, just adding the missing subsystem ID wasn't enough, in
this case. The subsystem ID of this machine is 0000:0100 (what Apple
thought...?), and since snd_hda_pick_fixup() doesn't take the vendor
id zero into account, the driver ignored this entry. Now it's fixed
to regard the vendor id zero as a valid value.

Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eefb8be4 29-Jul-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove analog mic pin override from STAC9228 dell-bios quirk

The current fixup for dell-bios model with STAC9228 codec contains the
override of pin 0x0c for analog mic. But this is actually just adding
a bogus pin and confuses the parser. Better to remove it for the
auto-mic switching.

Meanwhile, for a possible regression, keep the old configuration as
model=dell-bios-amic, so that people can test it again quickly.

Tested on Dell 1420n laptop.

Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f3e351ee 19-Jul-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n Laptop

The quirk for Dell laptops with STAC9228 overrides the pin default
config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit
on. I'm not quite sure why this was done so, but can guess that this
was introduced for avoiding this to be muted by another headphone
plug. Now, after transition to the generic parser, this workaround
rather causes a problem (notably as unexpected speaker mutes) because
the pin is seen as if it's always plugged in.

Since the generic parser can handle multiple headphone plugging
gracefully, we can get rid of this override now.

Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1ea9a69d 18-Jul-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix EAPD GPIO control for Sigmatel codecs

The EAPD GPIO is dynamically turned on/off for some machines with
Sigmatel codecs, but this didn't work as expected, and it resulted in
spontaneous lost of speaker outputs per HP plugging or power-saving.

This patch fixes the bug by simply including spec->eapd_mask into
spec->gpio_mask and spec->gpio_data bits.

Reported-and-tested-by: Eric Shattow <lucent@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 58e22201 25-Jun-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous stac_resume()

The stac_resume() is exactly what the default resume code does, so
we don't have to define and use it doubly. Let's cut it off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4059a42c 28-May-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable mic-mute LED on more HP laptops

The newer HP laptops have SSID 103c:20xx and 103c:21xx, and these
usually have the mic-mute LED on Fn-F8. Let's enable it, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f390dad4 20-Mar-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Enable "Headset Mic" name for some Dell Latitude devices

Now that we have a "Headset Mic" name, let's use it for some devices
we know for sure has a headset mic jack.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7504b6cd 18-Mar-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move beep attach/detach calls in hda_generic.c

Instead of calling snd_hda_attach_beep_device() and
snd_hda_detach_beep_device() in each codec driver, move them to the
generic parser. The codec driver just needs to set spec->beep_nid for
activating the digital beep.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 303985f8 14-Mar-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Disable IDT eapd_switch if there are no internal speakers

If there are no internal speakers, we should not turn the eapd switch
off, because it might be necessary to keep high for Headphone.

BugLink: https://bugs.launchpad.net/bugs/1155016
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ba615b86 13-Mar-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't apply EAPD power filter as default

So far, the driver doesn't power down the widget at going down to D3
when the widget node has an EAPD capability and EAPD is actually set
on all codecs unless codec->power_filter is set explicitly.
This caused a problem on some Conexant codecs, leading to click
noises, and we set it as NULL there. But it is very unlikely that the
problem hits only these codecs.

Looking back at the development history, this workaround for EAPD was
introduced just for some laptops with STAC9200 codec, then we applied
it blindly for all. Now, since it's revealed to have an ill effect,
we should disable this workaround per default and apply only for the
known requiring systems.

The EAPD workaround is implemented now as snd_hda_codec_eapd_power_filter(),
and this has to be set explicitly by the codec driver when needed.
As of now, only patch_stac9200() sets this one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f9afed1f 05-Feb-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply mic-mute LED fixup for new HP laptops

It's mostly harmless to apply it for new models even if they have no
mic mute LED (just toggling an unused GPIO pin).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4e637c6e 31-Jan-2013 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - add support for IDT 92HD95 HDA codec

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 664389db 28-Jan-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix powermap for external mics on IDT codecs

This patch fixes a regression of the external mic not working on
HP Probook 4520s.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f4f678d2 24-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable power down of unused widgets for IDT codecs

IDT codecs can work well with this new feature, so let's enable it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9419ab6b 24-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add power state filtering

Add a hook to struct hda_codec for filtering the target power state of
each widget when powering up/down. The current hackish EAPD check is
implemented as the default hook pointer, too.

This allows codec drivers to implement own power filter. In the
upcoming changes, the generic parser will have the better power filter
based on the active paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 42875479 22-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Revive SPDIF mux for IDT/STAC codecs

The stuff that was dropped while transition to the generic parser is
now recovered.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2748746f 21-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add aamix NID to IDT 92HD codecs

IDT codecs have analog-loopback mixer widgets, but we haven't cared
about it, so far. Let's set them. This will avoid also possible
wrong routes for the input paths.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6efcc526 21-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous header inclusions

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 49920427 18-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel - Add bass speaker support for HP ENVY Spectre XT

The pin configuration for the bass speaker needs to be corrected in a
fixup.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a90229e0 18-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Consolidate cap_sync_hook and capture_switch_hook

Two hooks in hda_gen_spec, cap_sync_hook and capture_switch_hook, play
very similar roles. The only differences are that the former is
called more often (e.g. at init or switching capsrc) while the latter
can take an on/off argument.

As a more generic implementation, consolidate these two hooks, and
pass snd_ctl_elem_value pointer as the second argument. If the
secondary argument is non-NULL, it can take the on/off value, so the
caller handles it like the former capture_switch_hook. If it's NULL,
it's called in the init or capsrc switch case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 36c9db7a 17-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use generic parser for STAC/IDT codec driver

Finally we reached here. All codecs driver (except for CA0132, which
has really device-specific requirements) have been converted to use
the generic parser.

This patch appears bigger than others since it also involves with the
code shuffling, but mostly the cut-off of parser codes and adapt to
the generic parser flags. Most of fixup codecs haven't been changed
but just removed a few unnecessary codes.

The only missing stuff is the SPDIF mux control. It'll be added again
later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f6655d52 17-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Minor cleanup/fixes for patch_sigmatel.c fixup transition

- spec->hp_detect has to be overridden in HDA_FIXUP_ACT_PARSE, not in
PRE_PARSE.
- Remove err == 0 check but return directly -EINVAL from
stac92xx_parse_auto_config()
- Set spec->default_polarity for 92HD71bxx
- Some code shuffles

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b473e85 15-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel - Remove superfluous fields from sigmatel_spec

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c698fe2 15-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel - Move w/a for HP Mini 110 LED to fixup table

Instead of checking the codec SSID in find_mute_led_cfg() for HP Mini
110, set the proper spec->default_polairty in the fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 89bb3e74 15-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/sigmatel - Remove PCI id check in find_mute_led_cfg()

The PCI vendor ID check in find_mute_led_cfg() is now superfluous
because the function is called in the fixup table entries of HP
machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 372f8c75 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for IDT92HD83xxx

Finally all codecs in patch_sigmatel.c have been converted to use the
standard fixup helpers. This change also includes trivial cleanups
like the call of common setup for GPIO LED or the removal of unused
function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 55e30141 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for IDT92HD73xx

This one is rather a simple conversion. The fixups for Dell machines
are implemented by fixup functions in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0f6fcb73 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for IDT92HD71Bxx

This time, the only intrusive changes are for HP machines.
As the mute LED fixup and the bass speaker switch are required only
for HP machines, we can move these checks into the fixup entries; the
former is applied generically to all HP machines while the latter for
only certain models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 29ac8363 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for STAC927x

This conversion is a bit tricky. Since STAC927x may take two
different volume-knob initialization values depending on the model, a
new flag, spec->volknob_init, is introduced to indicate whether it's
the standard volume-knob initialization or not.

Also, Dell BIOS model is now directly mapped onto the fixup table
instead of parsing in the function. This resulted in a new model ref,
STAC_927X_DELL_BIOS_SPDIF, which is a chained entry.

Also, for reducing the fixups, virtual entries like
STAC_927X_DELL_DMIC and STAC_D965_VERBS are introduced.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0a427846 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for STAC922x

Rather straightforward conversion, except for ones for Intel Mac.
As Intel Mac have only unique codec SSIDs, we need to remap the fixup
again for the codec SSID and call the new fixup there.

Also, we can reduce model enums like STAC_MACMINI, which are model
aliases for backward compatibility, since they can be pointed directly
via hda_model_fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fe6322ca 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for STAC9205

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fc268c10 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for STAC9872

Now for STAC9872. It has a small fixup table, fortunately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2077d40 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for STAC925x

Similar like the previous commit, convert patch_stac925x() to use the
standard fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d39a3ae8 14-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use standard fixup table for STAC9200

Convert patch_stac9200() to use the standard fixup table instead of
manual switch-case with board_config.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bc759721 11-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add snd_hda_get_int_hint() helper function

It'll be used in hda_generic.c, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 09b70e85 10-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Protect user-defined arrays via mutex

The pincfgs, init_verbs and hints set by sysfs or patch might be
changed dynamically on the fly, thus we need to protect it.
Add a simple protection via a mutex.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8ae5865e 13-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix pin configuration of HP Pavilion dv7

Fix the quirk entry for HP Pavilion dv7 in order to make the bass
speaker working.

Reported-and-tested-by: Tomas Pospisek <tpo2@sourcepole.ch>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 361dab3e 09-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Call snd_array_init() early and only once

This is a preliminary patch for introducing a protection to access
races of snd_array instances. Call snd_array_init() appropriately
at the initialization time and don't call it twice.

Also the allocations of codec-spec structs are cleaned up by helper
functions in patch_sigmatel.c and patch_analog.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e15f1b43 21-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove shutup calls in free callbacks

The free callback is called at the state where no extra verbs are
executed, thus calling *_shutup() is useless, as it's checking the
shutdown flag. Remove such superfluous calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ee81abb6 08-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply a proper chmap for built-in 2.1 speakers

When 2.1 speakers are detected, use the corresponding channel map
instead of the standard map with front+rear surrounds.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f37bc7a8 08-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Give standard "Bass Speaker" mixer for 2.1 speakers

When two built-in speakers are found on the machine, we can suppose
it's rather a 2.1 speaker system with a bass output instead of
front/surround channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5afc13af 25-Oct-2012 Gustavo Maciel Dias Vieira <gustavo@sagui.org>

ALSA: hda - Fix mute-LED setup for HP dv5 laptop

The BIOS on HP dv5 doesn't have the DMI string to guide the setup of
mute led GPIO and polarity. Associate this laptop with the hp-inv-led
model.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Tested-by: Vinícius Angiolucci <angiolucci@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dcda5806 12-Oct-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add workaround for conflicting IEC958 controls

When both an SPDIF and an HDMI device are created on the same card
instance, multiple IEC958 controls are created with indices=0, 1, ...
But the alsa-lib configuration can't know which index corresponds
actually to which PCM device, and both the SPDIF and the HDMI
configurations point to the first IEC958 control wrongly.

This patch introduces a (hackish and ugly) workaround: the IEC958
controls for the SPDIF device are re-labeled with device=1 when HDMI
coexists. The device=1 corresponds to the actual PCM device for
SPDIF, so it's anyway a better representation. In future, HDMI
controls should be moved with the corresponding PCM device number,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8d032a8f 08-Oct-2012 David Henningsson <david.henningsson@canonical.com>

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>


# 29adc4b9 25-Sep-2012 David Henningsson <david.henningsson@canonical.com>

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>


# 62cbde18 14-Sep-2012 Takashi Iwai <tiwai@suse.de>

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>


# 298efee7 06-Sep-2012 David Henningsson <david.henningsson@canonical.com>

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>


# ab548d2d 06-Sep-2012 Takashi Iwai <tiwai@suse.de>

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>


# c36b5b05 28-Aug-2012 Takashi Iwai <tiwai@suse.de>

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>


# 8a535414 22-Aug-2012 Takashi Iwai <tiwai@suse.de>

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>


# 042b92c1 22-Aug-2012 David Henningsson <david.henningsson@canonical.com>

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>


# 5e68fb3c 16-Aug-2012 David Henningsson <david.henningsson@canonical.com>

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>


# 1f43f6c1 31-Jul-2012 Takashi Iwai <tiwai@suse.de>

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>


# ff8a1e27 31-Jul-2012 Takashi Iwai <tiwai@suse.de>

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>


# a3e19973 26-Jul-2012 Takashi Iwai <tiwai@suse.de>

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>


# 68cb2b55 02-Jul-2012 Takashi Iwai <tiwai@suse.de>

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>


# 6e1c39c6 26-Jun-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix power-map regression for HP dv6 & co

The recent fix for power-map controls (commit b0791dda813) 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>


# c882246d 15-May-2012 Takashi Iwai <tiwai@suse.de>

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>


# bfc89dec 15-May-2012 Takashi Iwai <tiwai@suse.de>

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>


# 7560931f 14-May-2012 Takashi Iwai <tiwai@suse.de>

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>


# b0791dda 15-May-2012 Takashi Iwai <tiwai@suse.de>

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>


# 607d4f7f 09-May-2012 Takashi Iwai <tiwai@suse.de>

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>


# 128bc4ba 07-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.c

Just code shuffles.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4740860b 20-Apr-2012 Takashi Iwai <tiwai@suse.de>

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>


# cdd03ced 19-Apr-2012 Takashi Iwai <tiwai@suse.de>

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>


# 3e843196 18-Apr-2012 Takashi Iwai <tiwai@suse.de>

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>


# 350eba43 16-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix build with CONFIG_PM=n

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7907ae3e 14-Mar-2012 Takashi Iwai <tiwai@suse.de>

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>


# f29735cb 13-Mar-2012 Takashi Iwai <tiwai@suse.de>

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>


# d2f344b5 12-Mar-2012 Takashi Iwai <tiwai@suse.de>

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>


# 2faa3bf1 11-Mar-2012 Takashi Iwai <tiwai@suse.de>

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>


# 7bff172a 29-Feb-2012 Takashi Iwai <tiwai@suse.de>

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>


# 5556e147 27-Feb-2012 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

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>


# a1e0c3cf 09-Feb-2012 Takashi Iwai <tiwai@suse.de>

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>


# 9322ca54 03-Feb-2012 Takashi Iwai <tiwai@suse.de>

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>


# a6a600d1 24-Jan-2012 Gustavo Maciel Dias Vieira <gustavo@sagui.org>

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>


# b4ead019 23-Jan-2012 Takashi Iwai <tiwai@suse.de>

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 f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33
"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>


# b9ecc4ee 19-Jan-2012 Albert Pool <albertpool@solcon.nl>

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>


# ffe535ed 16-Jan-2012 David Henningsson <david.henningsson@canonical.com>

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>


# f2cbba76 10-Jan-2012 Takashi Iwai <tiwai@suse.de>

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>


# 97e28762 04-Dec-2011 Gustavo Maciel Dias Vieira <gustavo@sagui.org>

ALSA: hda: remove unused quirk for inverted mute led

Commit b99a776d0b17ae0f3a54e86009887a00ac4889d0 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>


# e2ef36c6 13-Dec-2011 Gustavo Maciel Dias Vieira <gustavo@sagui.org>

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>


# 6a557c94 12-Dec-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

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>


# a0204283 06-Dec-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix remaining VREF mute-LED NID check in post-3.1 changes

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f1a73746 04-Dec-2011 Takashi Iwai <tiwai@suse.de>

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>


# 31ef2257 01-Dec-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Integrate input-jack stuff into kctl-jack

Instead of managing input-jack stuff separately, call all stuff inside
the kctl-jack creation, deletion and report. The caller no longer needs
to care about input-jack.

The better integration between input-jack and kctl-jack should be done
in the upper layer in near future, but for now, it's implemented locally
for more tests.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88d68602 01-Dec-2011 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Fix S3/S4 problem on machines with VREF-pin mute-LED

The verb command in stac92xx_post_suspend caused the audio to stop
working after resuming from S3 mode on HP laptops with the VREF-pin
mute-LED control. Removing relevant post_suspend registering.

Although removing D3 on AFG is no optimal solution, the impact should
be small in comparison with the broken S3/S4.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 542c9a0a 29-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid touching mute-VREF pin for IDT codecs

Some HP laptops use a pin VREF for controlling the mute LED, and such a
pin shouldn't be powered off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dbd1b547 19-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add pin fix for Alienware M17x R3

Reported-by: Albert Pool <albertpool@solcon.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 201e06ff 16-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Give more unique names by snd_hda_get_pin_label()

The function now gives more unique names for the output pins by adding
some prefix and suffix for the location and the channels. Otherwise, it
can pass the index number.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aad37dbd 02-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge input-jack helpers to hda_jack.c

We can use the very same table in hda_jack.c for managing the list for
input-jack elements, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3a93897e 27-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Manage unsol tags in hda_jack.c

Manage the tags assigned for unsolicited events dynamically together
with the jack-detection routines. Basically this is almost same as what
we've done in patch_sigmatel.c. Assign the new tag number for each new
unsol event, associate with the given NID and the action type, etc.

With this change, now all pins looked over in snd_hda_jack_add_kctls()
are actually enabled for detection now even if the pins aren't used for
jack-retasking by the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 01a61e12 27-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create jack-detection kcontrols

Create kcontrols for pin jack-detections, which work similarly like
jack-input layer. Each control will notify when the jack is plugged or
unplugged, and also user can read the value at any time via the normal
control API.

The control elements are created with iface=CARD, so that they won't
appear in the mixer apps.

So far, only the pins that enabled the jack-detection are registered.
For covering all pins, the transition of the common unsol-tag handling
would be needed. Stay tuned.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1835a0f9 27-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Cache the jack-detection value

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>


# 04f5ade6 27-Oct-2011 Takashi Iwai <tiwai@suse.de>

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>


# afef2cfa 11-Nov-2011 Charles Chin <Charles.Chin@idt.com>

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>


# f7f9bdfa 09-Nov-2011 Julian Wollrath <jwollrath@web.de>

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>


# 9009b0e4 03-Nov-2011 Charles Chin <Charles.Chin@idt.com>

ALSA: hda/sigmatel - Automatically retrieve digital I/O widgets

Revise stac92xx_parse_auto_config to automatically scan for digital input
and output converters.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad5d8755 02-Nov-2011 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Add support for 92HD65 / 92HD66 family of codecs

These codecs have SPDIF-in, which is new to the 92HD83xxx compatible
families, so a bit of logic is added to support them.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35c11777 02-Nov-2011 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Disable power-widget control for IDT 92HD83/93 as default

The power-widget control in patch_stac92hd83xxx() never worked properly,
thus it's safer to turn it off as default for now.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da155d5b 14-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

sound: Add module.h to the previously silent sound users

Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up. So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>


# 6c5c04e5 12-Oct-2011 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Remove bad code for IDT 92HD83 family patch

The purpose of this patch is to remove a section of "bad" code that
assigns the last DAC to ports E or F in order to support notebooks
with docking in earlier days, around ALSA 1.0.19 - 21. This is not
necessary now and actually breaks some configurations that use these
ports as other devices. This have been tested on several different
configurations to make sure that it is working for different combinations.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 48718eab 05-Oct-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDT

If we run out of DACs when trying to assign a DAC to a secondary
headphone, prefer the DAC of the first headphone to the primary
(usually line out) DAC.

BugLink: http://bugs.launchpad.net/bugs/845275
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb335a40 03-Oct-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix naming of input jacks for IDT parser

The Sigmatel/IDT parser should have the same naming convention
for input jacks as the other codecs have.

BugLink: http://bugs.launchpad.net/bugs/859704
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6656b15d 24-Sep-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: No power nids on 92HD93

This patch is necessary to make internal speakers work on this chip.

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/854468
Tested-by: Alex Wolfson <alex.wolfson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 46724c2e 20-Sep-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add support for IDT 92HD93

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/854468
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 96b63597 10-Aug-2011 Wang Shaoyan <wangshaoyan.pt@taobao.com>

ALSA: hda - Add CONFIG_SND_HDA_POWER_SAVE to stac_vrefout_set()

In commit 45eebda7, it add new function stac_vrefout_set, but it
is only used in code between CONFIG_SND_HDA_POWER_SAVE macro, so
add the macro to avoid such warning:

sound/pci/hda/patch_sigmatel.c:676:12: warning: 'stac_vrefout_set' defined but not used

Signed-off-by: Wang Shaoyan <wangshaoyan.pt@taobao.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 45eebda7 26-Jul-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Add support for vref-out based mute LED control on IDT codecs

This patch also registers all necessary callbacks to support mute LED
only when such control is enabled. And it keeps codec AFG in D0 or D1
state all the time when aggressive power managemnt is enabled for vref-out
control (and mute LED) work correctly.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2a43952a 26-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PM

It makes little sense to enable power-saving without PM.
This removes SND_HDA_NEEDS_RESUME define so that we can use CONFIG_PM
in all places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7df1ce1a 25-Jul-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Make sure mute led reflects master mute state

This patch adds checking of mute state on all outputs besides just
speakers to calculate the master mute state for mute led support.
It also renames and splits the function that does it for better code
clarity.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d02667e6 22-Jul-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Fix invalid mute led state on resume of IDT codecs

Codec state is not restored immediately on resume but on the first
access when power-save is enabled. That leads to an invalid mute led
state after resume until either sound is played or some control is
changed. This patch adds a possibility for a vendor specific patch to
restore codec state immediately after resume if required. And it adds
code to restore IDT codecs state immediately on resume on HP systems
with mute led support.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0c27c180 22-Jul-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Add support of the 4 internal speakers on certain HP laptops

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8d087c76 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create snd_hda_get_conn_index() helper function

Create snd_hda_get_conn_index() helper function for obtaining the
connection index of the widget. Replaced the similar codes used in
several codec-drivers with this common helper.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 74b654c9 01-Jun-2011 Stephen Warren <swarren@nvidia.com>

ALSA: hda: Virtualize SPDIF out controls

The SPDIF output controls apply to converter widgets. A future change
will create a PCM device per pin widget, and hence a set of SPDIF output
controls per pin widget, for certain HDMI codecs. To support this, we
need the ability to virtualize the SPDIF output controls. Specifically:

* Controls can be "unassigned" from real hardware when a converter is
not used for the PCM the control was created for.
* Control puts only write to hardware when they are assigned.
* Controls can be "assigned" to real hardware when a converter is picked
to support output for a particular PCM.
* When a converter is assigned, the hardware is updated to the cached
configuration.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1f83ac5a 16-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Handle dock line-in as auto-detectable for IDT codecs

When a docking-station has a line-in jack, we can handle it also as
a detectable jack just like mic-in. This will improve the usability
of HP laptops with a docking-station.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e35d9d6a 17-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check unsol-cap in is_jack_detectalbe()

Also replace more open-codes with this function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e033ebfb 15-May-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Use one dmic only for Dell Studio 1558

There are no signs of a dmic at node 0x0b, so the user is left with
an additional internal mic which does not exist. This commit removes
that non-existing mic.

Cc: stable@kernel.org (2.6.32+)
BugLink: http://bugs.launchpad.net/bugs/731706
Reported-by: James Page <james.page@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2b63536f 01-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Constify fixup and other array data in patch_sigmatel.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dda14410 02-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Constify some API function arguments

Also fixed the assignment of multiout.dac_nids to satisfy const.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d507cd66 26-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable sync_write workaround for AMD generically

The workaround for AMD chipset via sync_write flag seems needed for
machines with Realtek codecs. So, it's better to activate it
generically in hda_intel.c from the beginning.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 885f42e1 21-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable sync_write for AMD chipset with IDT 92HD8x codecs

The AMD chipset seems unstable in the normal operation mode, and it
seems requring more sensible access for each verb. Enabling sync_write
mode and allowing bus-reset is a sort of workaround for these chipset
stability issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd9abc7a 07-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't query connections for widgets have no connections

Fixes the kernel warnings with IDT codecs like
hda_codec: connection list not available for 0x1e

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# 699d8995 10-Mar-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs

This patch replaces use of the harcoded arrays of pins, muxes, digital
mics and adcs with the auto-generated ones using codec parsing and
auto-discovers all actually connected digital mic pins on 92HD8X-like
codecs

This patch also adds the support for d-mic on pin 0x20.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 094a4245 09-Mar-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs

When the mux for digital mic is different from the mux for other mics,
the current auto-parser doesn't handle them in a right way but provides
only one mic. This patch fixes the issue.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd372fb3 03-Mar-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Make common input-jack helper functions

Since multiple codec drivers already use the input-jack stuff, let's
make common helper functions to reduce the duplicated codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4dfb8a45 22-Feb-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Add support for new IDT 92HD98 and 92HD99 codecs

Also fix number of 92HD87 pins to exclude invalid pins.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cbbf50b2 14-Jan-2011 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Fix initialization for HP 2011 notebooks

Fixes for HP 2011 notebooks: enable dock ports and disable BTL
initialization in the driver.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ea734963 17-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - consitify string arrays

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 80c67852 13-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection

When only one mic is available and it's an analog mic, the current
IDT/STAC parser may give an Oops.

Reference: bko#25692
https://bugzilla.kernel.org/show_bug.cgi?id=25692

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# bdfe6f45 03-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add internal mic for IDT 92HD88B

BugLink: http://bugs.launchpad.net/bugs/696493

According to datasheet (and real-world testing), IDT 92HD88B can
have internal mics at NID 0x11 and 0x20, so enable them accordingly.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2d7ec12b 23-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix conflict of d-mic capture volume controls

When the d-mics are assigned to the same purpose of another analog mic
pins, the driver doesn't compute the index properly, resulting in an
error with "existing control". This patch fixes it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1db7ccdb 03-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix beep-tone on IDT 92HD87/88 codecs

It sounds like a non-linear beep tone on my test machines...

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1e1675e9 03-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable beep for IDT92HD87 / 88 codecs

These codecs have the digital beep widget in NID 0x21.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0defe09c 01-Dec-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use "alienware" model quirk for another SSID

BugLink: https://launchpad.net/bugs/683695

The original reporter states that headphone jacks do not appear to
work. Upon inspecting his codec dump, and upon further testing, it is
confirmed that the "alienware" model quirk is correct.

Reported-and-tested-by: Cody Thierauf
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d090f597 22-Nov-2010 Takashi Iwai <tiwai@suse.de>

ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"

This reverts commit f41cc2a85d52ac6971299922084ac5ac59dc339d.

The patch broke the digital mic pin handling wrongly.
Reference: bko#23162
https://bugzilla.kernel.org/show_bug.cgi?id=23162

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 89feca1a 13-Oct-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Enable digital mic on IDT 92HD87B

BugLink: http://launchpad.net/bugs/673075

According to the datasheet of 92HD87B, there is a digital mic
at nid 0x11, so enable it in order to be able to use the mic.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 335e3b86 22-Oct-2010 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Change BTL amp level on some HP notebooks

Some HP laptops have lower amplifier levels for speakers in comparison
with headphone outputs. This patch changes the BTL amp level for these
machines to balance both the speaker and headphone output levels.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a74ccea5 22-Oct-2010 Clemens Ladisch <clemens@ladisch.de>

ALSA: hda - Fix wrong TLV mute bit for STAC/IDT codecs

The bit value set for TLV mute was wrong in commit
de8c85f7840e5e29629de95f5af24297fb325e0b, which resulted in bogus
dB ranges that screw up PulseAudio. Corrected with the right constant.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1cc9e8f4c 18-Oct-2010 Charles <charles@Test-PC.(none)>

ALSA: hda - Fix codec muted after rebooting from Windows

Windows may leave pin power-down registers set after reboot, and
this resulted in muted output on Linux. Reset these registers
at initialization properly.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# de8c85f7 15-Oct-2010 Clemens Ladisch <clemens@ladisch.de>

ALSA: HDA: Sigmatel: work around incorrect master muting

The HDA specification does not allow for a codec to mute itself just
because the volume is reduced, so _of course_ somebody had to go and do
it. This wouldn'\''t hurt too much when the volume is adjusted by hand,
but programs like PA that try to set the volume automatically could
inadvertently mute the output.

To work around this, change the TLV dB information for the Master volume
on all Sigmatel HDA codecs to indicate the the minimal volume setting
actually mutes.

Reported-by: Colin Guthrie <gmane@colin.guthr.ie>
Reported-by: "Alexander E. Patrakov" <patrakov@gmail.com>
Tested-by: Colin Guthrie <cguthrie@mandriva.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b2167d5 05-Oct-2010 Luke Yelavich <luke.yelavich@canonical.com>

ALSA: hda - Add another HP DV6 quirk

BugLink: https://bugs.launchpad.net/bugs/653420

Add another HP DV6 notebook (103c:363e) to use STAC_HP_DV5.

Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f41cc2a8 24-Sep-2010 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC

Fix bug in switching between dmic and mic when both use the same mux.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9e5341b9 21-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Introduce hda_call_check_power_status() helper

Replace the explicit ifdef check and call of check_power_status ops with
a new helper function, hda_call_check_power_status().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 99ae28be 17-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Make snd_hda_get_input_pin_attr() helper

Make the helper function to give the input-pin attribute for jack
connectivity and location. This simplifies checks of input-pin jacks
a bit in some places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9907790a 17-Sep-2010 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Fix automatic MIC switching and include dock MIC for IDT codecs

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 10a20af7 09-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve the input source name labels

This patch improves the input-source label strings to be generated from
the pin information instead of fixed strings per AUTO_PIN_* type.
This gives more suitable labels, especially for mic and line-in pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 86e2959a 09-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}

We can assign multiple pins to a single role now, let's reduce the
redundant FRONT_MIC and FRONT_LINE. Also, autocfg->input_pins[] is
no longer used, so this is removed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5786e85 09-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Keep char arrays in input_mux items

Keep char array in the input_mux item itself instead of pointing to
an external string. This is a preliminary work for improving the
input-mux name based on the pin role.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 263d0328 08-Sep-2010 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Improve input control names for IDT/STAC codecs

Changing the way the input controls are named using port connection
type and jack location info.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ab5a6ebe 08-Sep-2010 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Adding support for new IDT 92HD90BXX and 92HD91BXX codecs

Adding support for digital MIC in 92HD83/90/91XXX codecs family.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eea7dc93 30-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use new inputs[] field to parse input-pins for STAC/IDT codecs

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d8ec5f3 19-Aug-2010 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Add support for IDT 92HD89XX codecs

Just added new codec ids. These are almost compatible with existing ones.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8a345a04 10-Aug-2010 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Adding support for new IDT 92HD87XX codecs

Added the entries for 92HD87B1/3 and 92HD87B2/4 codecs.
These are compatible with existing 83xxx codecs.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 48315590 06-Aug-2010 Steven Eastland <seastland@gmail.com>

ALSA: hda - New snd-hda-intel model/pin config for hp dv7-4000

This provides a new model and pin config for the snd-hda-intel
92HD83XXX codec for hp laptop model dv7-4000, enabling the subwoofer.

Signed-off-by: Steven Eastland <seastland at gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1b0e372d 03-Aug-2010 Daniel J Blueman <daniel.blueman@gmail.com>

ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs

Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs.
These codecs use the standard beep frequency calculation although the
datasheet says it's linear frequency.

Other IDT/STAC codecs might have the same problem. They should be
fixed individually later.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 66668b6f 23-May-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix model quirk for Dell M1730

BugLink: https://launchpad.net/bugs/576160

Symptom: Currently (2.6.32.12) the Dell M1730 uses the 3stack model
quirk. Unfortunately this means that capture is not functional out-
of-the-box despite ensuring that capture settings are unmuted and
raised fully.

Test case: boot from Ubuntu 10.04 LTS live cd; capture does not
work.

Resolution: Correct the model quirk for Dell M1730 to rely on the
BIOS configuration.

This patch also trivially sorts the quirk into the correct section
based on the comments.

Reported-and-Tested-By: <picdragon99@msn.com>
Tested-By: Daren Hayward
Tested-By: Tobias Krais
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2a6ce6e5 12-May-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add hp-dv4 model for IDT 92HD71bx

It turned out that HP dv series have inconsistent the mute-LED GPIO
mapping among various models. dv4/7 seem to use GPIO 0 while dv 5/6
seem to use GPIO 3. The previous commit
26ebe0a28986f4845b2c5bea43ac5cc0b9f27f0a
ALSA: hda - Fix mute-LED GPIO pin for HP dv series
breaks dv5/6.

This patch adds the new quirk model, hp-dv4, to handle HP dv4/7
separately from HP dv5/6.

Tested-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com> (for dv6-1110ax)
Acked-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26ebe0a2 11-May-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mute-LED GPIO pin for HP dv series

Old HP dv series seem to use the GPIO pin 0 for controlling the mute LED
although the pin is a large package, where the newer models use GPIO 3
in such a case. For fixing the regression from the previous kernels,
set spec->gpio_led statically for these model quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d26f446 06-May-2010 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda - fix DG45ID SPDIF output

This reverts part of commit 52dc438606d1e, in order to fix a regression:
broken SPDIF output on Intel DG45FC motherboard (IDT 92HD73E1X5 codec).

--- DG45FC-IDT-codec-2.6.32 (SPDIF OK)
+++ DG45FC-IDT-codec-2.6.33 (SPDIF broken)

Node 0x22 [Pin Complex] wcaps 0x400301: Stereo Digital
Pincap 0x00000010: OUT
- Pin Default 0x40f000f0: [N/A] Other at Ext N/A
- Conn = Unknown, Color = Unknown
- DefAssociation = 0xf, Sequence = 0x0
- Pin-ctls: 0x00:
+ Pin Default 0x014510a0: [Jack] SPDIF Out at Ext Rear
+ Conn = Optical, Color = Black
+ DefAssociation = 0xa, Sequence = 0x0
+ Pin-ctls: 0x40: OUT
Connection: 3
0x25* 0x20 0x21
Node 0x23 [Pin Complex] wcaps 0x400301: Stereo Digital
Pincap 0x00000010: OUT
- Pin Default 0x01451140: [Jack] SPDIF Out at Ext Rear
+ Pin Default 0x074510b0: [Jack] SPDIF Out at Ext Rear Panel
Conn = Optical, Color = Black
- DefAssociation = 0x4, Sequence = 0x0
- Misc = NO_PRESENCE
- Pin-ctls: 0x40: OUT
+ DefAssociation = 0xb, Sequence = 0x0
+ Pin-ctls: 0x00:
Connection: 3
0x26* 0x20 0x21

Cc: <stable@kernel.org>
Cc: Alexey Fisher <bug-track@fisher-privat.net>
Tested-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5c1bccf6 22-Apr-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio 1558

BugLink: https://launchpad.net/bugs/568600

The OR has verified that the dell-m6 model quirk is necessary for audio
to be audible by default on the Dell Studio XPS 1645.

This change is necessary for 2.6.32.11 and 2.6.33.2 alike.

Reported-by: Andy Ross <andy@plausible.org>
Tested-by: Andy Ross <andy@plausible.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aac78daf 21-Apr-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio XPS 1645

BugLink: https://launchpad.net/bugs/553002

The OR has verified that the dell-m6 model quirk is necessary for audio
to be audible by default on the Dell Studio XPS 1645.

This change is necessary for 2.6.32.11 and 2.6.33.2 alike.

Reported-by: Robert Chambers
Tested-by: Robert Chambers
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e3d2530a 20-Mar-2010 Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>

ALSA: hda - Add PCI quirk for HP dv6-1110ax.

Adding this PCI quirk fixes the board config detection.
This also fixes jack sensing by using "hp_detect=1" via properly detected
board config.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dce17d4f 09-Feb-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix default polarity of mute-LED GPIO on 92HD83x/88x codecs

The previous commit caused a regression on HP laptops with 92HD83x/88x
codecs. The default polarity of mute-LED GPIO is inverted on these
devices.

Reference: Novell bnc#578190
https://bugzilla.novell.com/show_bug.cgi?id=578190

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b99a776d 08-Feb-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove static gpio_led setup via model

We have now a better mute-LED GPIO detection, and no need to assign the
values statically per model option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c21bd025 08-Feb-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge HP mute-LED status callback on both IDT 92HD7x and 8x codecs

Merge the mute-LED status callback function for both IDT 92HD7x and 8x
codecs to one function. Also it's changed to check all DACs, and called
in the initialization to sync with the current status.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 07f80449 08-Feb-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Detect HP mute-LED GPIO setup from GPIO counts

The GPIO pin number for the mute LED control on HP laptops can be
determined more easily by checking the number of available GPIO pins
of the codec chip. On a small package with up to 3 GPIOs, GPIO 0 is
used while GPIO 3 is used for others.

This fixes the missing mute GPIO for some HP laptops with new codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 04b5efe5 04-Feb-2010 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Fix docking output for IDT 92HD8xx codecs

This patch fixes docking output support for IDT 92HD81/83/88 family codecs.
Typically one of ports 0xE or 0xF is used for docking output, while only
port 0xF is common on all the three codec families. We don't want the
pin to select the analog mixer here.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a9694faa 04-Feb-2010 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Adding support for another IDT 92HD83XXX codec

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 36706005 28-Jan-2010 Charles Chin <Charles.Chin@idt.com>

ALSA: hda - Add support for IDT 92HD88 family codecs

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e108c7b7 28-Jan-2010 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Add mute LED check for HP laptops with IDT 92HD83xxx codec

This patch adds HP mute LED support for IDT 92HD81/3 family of the codecs.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d38cce70 15-Jan-2010 Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>

ALSA: hda - Fix mute led GPIO on HP dv-series notebooks

On my laptop (HP dv6-1110ax), there are no OEM strings in SMBIOS of type
"HP_Mute_LED*". Hence, the GPIO for the mute button LED doesn't get set
properly. I didn't find the strings in my cousin's laptop (HP dv9500t CTO)
either.

As per the documentation of find_mute_led_gpio(), these strings occur
in HP B-series systems - so, before scanning the SMBIOS strings, we need to
check if we're dealing with a B-series system.
Need to get confirmation from HP if this logic takes care of all the
systems. I'm trying to poke a friend there.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 014c41fc 27-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use strict_strtoul()

Rewrite the codes to use strict_strtoul() instead of simple_strtoul().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92ee6162 27-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add snd_hda_shutup_pins() helper function

Add a common helper function for clearing pin controls before suspend.
Use the pincfg array instead of looking through all widget tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 043958e6 26-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs

gpio_led, gpio_led_polarity and gpio_mute are added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a252c81a 25-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c

Use snd_hda_jack_detect() again for jack-sensing.
The triggering problem can be worked around with codec->no_trigger_sense
flag now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95e70e87 23-Dec-2009 Anisse Astier <anisse@astier.eu>

ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 75d1aeb9 22-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add Bass Speaker switch for HP dv7

The bass speaker is controlled via GPIO5.

Tested-by: Wael Nasreddine <mla@nasreddine.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d8d881dd 21-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix NULL dereference with enable_beep=0 option

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5e26dfd0 10-Dec-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAG

The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move
get_amp_nid_() call to the snd_hda_ctl_add() function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9e3fd871 08-Dec-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)

The purpose of this changeset is to show information about amplifier
setting in the codec proc file. Something like:

Control: name="Front Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Control: name="Front Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=2, ofs=0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 52dc4386 12-Dec-2009 Oleksij Rempel <linux@rempel-privat.de>

ALSA: hda - Overwrite pin config on intel DG45ID board.

The pin config provided by BIOS have some problems:
0x0221401f: [Jack] HP Out at Ext Front <-- other association and sequence
0x02a19020: [Jack] Mic at Ext Front <-- other association
0x01113014: [Jack] Speaker at Ext Rear <-- line out (not speaker)
0x01114010: [Jack] Speaker at Ext Rear <-- line out
0x01a19030: [Jack] Mic at Ext Rear <-- other association
0x01111012: [Jack] Speaker at Ext Rear <-- line out
0x01116011: [Jack] Speaker at Ext Rear <-- line out
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x01451140: [Jack] SPDIF Out at Ext Rear
0x40f000f0: [N/A] Other at Ext N/A

just overwrite it.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c357aab0 10-Dec-2009 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs

This patch fixes an error in processing of the HP BIOS configuration to enable
GPIO based mute LED indicator control. That error causes driver to enable
such control on all HP systems with the 92HD75 IDT codecs and results in
unnecessary toggling of the GPIO on mute control manipulation.

It also adds support of the future HP BIOS configuration extension for the
named control. New configuration string has a format HP_Mute_LED_P_G
where P can be 0 or 1 and defines mute LED GPIO control state (low/high)
that corresponds to the NOT muted state of the master volume
and G is the index of the GPIO to use (0..9)

Lastly, it adds more systems to the support of the audio implementation
as found on HP B-series systems

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bfc99025 26-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't trigger pin-sense for STAC/IDT codecs

STAC/IDT codecs seem to behave weird when SET_PIN_SENSE verb is issued
before reading the jack-detection although the TRIG_REQ pin capability
is given by the hardware.

Since snd_hda_jack_detect() issues the SET_PIN_SENSE verb simply judging
from the pincap, we have to revert the change in the commit
d56757abc11a21996d9839c0d4e3b2c3666cd318
ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()
to plain GET_PIN_SENSE verb without triggering.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b4e81876 18-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mute-LED sync on HP laptops with IDT92HD83xxx codecs

The mute-LED isn't synchronized with the actual mute state on some
HP laptops with IDT 92HD83xxx codecs. A similar hack using
check_power_status callback is added for this codec, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8af3aeb4 18-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix detection of dual headphones

The dual-headphone mode with STAC/IDT codecs is useful only for machines
that have two (or more) built-in headphones.

But, some HP laptops give multiple headphone pin configs, one for the
built-in and another for the separate (likely a docking station) one.
This results in a missing speaker volume control.

This patch adds more check for the dual-headphone mode to avoid this
problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d56757ab 18-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Replace the rest of jack-detections with snd_hda_jack_detect()

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9c96fa59 16-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Get rid of magic digits for subdev hack

Define a proper const for a magic 31bit flag for subdev / NID setup
with a brief comment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d02d1b6 12-Nov-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping

This patch adds support for dynamically created controls to proc codec file
(Control: lines).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3911a4c1 11-Nov-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment

This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 123c07ae 21-Oct-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda_intel: Digital PC Beep - change behaviour for input layer

Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.

Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8ef5837a 14-Nov-2009 Daniel J Blueman <daniel.blueman@gmail.com>

ALSA: hda - Dell Studio 1557 hd-audio quirk

Add the Dell Studio 15 (model 1557, Core i7) laptop to the hd-audio
quirk list, enabling audio.

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb8d1a34 10-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add reboot notifier to each codec

Add reboot notifier to each codec so that it can do some workarounds
needed for reboot.

So far, patch_sigmatel.c calls its shutup routine for avoiding noises
at reboot on some HP machines.

References: Novell bnc#544779
http://bugzilla.novell.com/show_bug.cgi?id=544779

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 167eae5a 06-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reset pins of IDT/STAC codecs at free

Some laptops cause annoying clicks or noises at shutdown/reboot since
the speaker pin is set still high. Apply the same procedure used for
the suspend to avoid such clicks/noises for freeing the codec, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 78987bdc 05-Nov-2009 Randy Dunlap <randy.dunlap@oracle.com>

ALSA: hda, move hp_bseries_system

Function hp_bseries_system() is always used, outside of
CONFIG_ boundaries/controls, so move it.

sound/pci/hda/patch_sigmatel.c:5458: error: implicit declaration of function 'hp_bseries_system'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d355c82a 03-Nov-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"

To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.

Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5bdaaada 03-Nov-2009 Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

ALSA: hda - Enable GPIO control for mute LED on HP systems

This patch enables GPIO to control mute LED indicator on the HP systems
with the special string in BIOS and applies it with the correct polarity on
HP B-series systems.

It also restores configuration of the pin intended as the second Headphone
on HP B-series systems but configured as something else in the BIOS to
pass MS DTM.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ccca7cdc 13-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix volume-knob setup for Dell laptops with STAC9228

The volume-knob widget needs to be set with 0x7f instead of 0xff
for Dell laptops with STAC9228 codec, too, like the previous commit.

Reference: Novell bnc#545013
http://bugzilla.novell.com/show_bug.cgi?id=545013

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54930531 11-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mute sound with STAC9227/9228 codecs

On FSC laptops, the sound gets muted gradually when the volume is chnaged.
This is due to the wrong volume-knob widget setup. The delta bit (bit 7)
shouldn't be set for these devices.

This patch adds a new quirk to set the value 0x7f to the widget 0x24
instead of 0xff.

Reference: Novell bnc#546006
http://bugzilla.novell.com/show_bug.cgi?id=546006

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 02d33322 01-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs

When the auto-mic switching between an analog and a digital mic is
needed with IDT codecs, the current driver doesn't reset the connection
of the digital mux.

This patch fixes the behavior by checking both mux connections properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 69b5655a 14-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix Dell S14 pin setup

The pin setup for Dell S14 quirk is rather wrong for the latest driver.
Fixed pin 0x0a, 0x0b, 0x0d and 0x0f.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 44da531e 14-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix IDT92HD83* codec setup

Remove unnecessary (and buggy) init sequences left for IDT92HD83*
codecs in the previous fixes. The DACs are now dynamically connected,
thus shouldn't be set statically in init verbs. Also, the mono_nid
is detected dynamically, thus shouldn't be set staticaly, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6e34c033 14-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support for HP dv6

Add the quirk entry for HP dv6. Also add a workaround for the headphone
detection by setting hp_detect=1 beforehand. Without this, the driver
won't do auto-muting because BIOS doesn't give any HP pin but only a
line-out pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5f380eb1 14-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs

It's possible that hp_detect is set even though no headphone pin is
detected. The driver issues, however, an unsol event only to hp_pins[0],
which can be invalid.

This patch adds the check of the valid pin to send an unsol event
at initialization and resume callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fc64b26c 14-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set default GPIO for IDT92HD71bxx

A smiliar fix for IDT 92HD71Bxx codecs like the previous commit for
other IDT/STAC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# af6ee302 14-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set default GPIO for STAC/IDT codecs

IDT92HD73xx and STAC927x codecs use GPIO0 bit as EAPD on many machines.
However, currently we don't set it unless the model is specified just
for safety reason. But, most machines do need this bit, so this safety
handling is rather annoying.

This patch enables GPIO0 setup as default for them. Many HP / Dell
laptops should work even without model override with this change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 842ae638 01-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support of Alienware M17x laptop

Added the quirk for Alienware M17x with IDT 92HD73* codec chip.
It has two HP and one line-out jack, one mic jack, a built-in
speaker and a built-in mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a967890 01-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove dead codes from patch_sigmatel.c

Due to the previous fix of input source for IDT92HD73xx, the amp mux
and amp vol stuff became unused. Let's rip off dead codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2aec171 01-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix input source selection of IDT92HD73xx

Fix the mux_nids to select directly the input source instead of mux
mixers so that it works with the current mux enum handler for IDT
92HD73xx codecs.

Also, clean up useless / unnecessary mixer controls and init verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 96f845de 28-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create "Digital Mic Capture Volume" correctly for IDT codecs

So far, the digital mic capture volume wasn't created. This is because
IDT codecs have output amps for digital mics, not input amps, while
input amps should be used for other analog pins. Thus the automatic
capture volume creation should check both directions for digital mics.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae709440 19-Aug-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda: add model for Intel DG45ID/DG45FC boards

The BIOS pin configs are in fact correct and shall not be overwritten.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7570ef18 15-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing num_adc_nids definition for IDT92HD8xxx

The previous fix removed the definition of num_adc_nids wrongly, and
this resulted in the missing input-source control. Now readded again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 667067d8 13-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix / clean up IDT92HD83xxx codec parser

A few improvements for IDT 92HD83xxx codec pareser:
- Remove unused / deprecated mixer-amp controls
- Handle d-mics as normal inputs since this codec has no separate
MUXes for analog and digital
- Don't create duplicated controls for capture volumes with Mux
capture volumes

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1c4bdf9b 13-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable line-out detection only with speakers

Enable line-out detection for IDT/STAC codecs only when speaker pins
exist. In some cases, the speaker itself is identified as line-out,
and this confuses the situation. Only the extra line-outs should do
auto-muting.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da2a2aaa 09-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix Oops due to STAC/IDT auto-mic changes

The previous auto-mic patch for STAC/IDT codecs causes the Oops on
machines without digital mic pins. This patch fixes the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1972d025 06-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirks for some HP laptops

The new HP laptops have PCI SSID 103c:701x and requires model=hp-dv5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 16ffe32c 04-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix line-out jack handling with STAC/IDT codec

When the line-out jack is plugged/unplugged, the driver needs to check
the headphone plug, not only the line-out jack itself. Otherwise the
headphone or the speaker may be wrongly muted/unmuted.

As a result, both STAC_HP_EVENT and STAC_LO_EVENT need to call the
same function, stac92xx_hp_detect().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 15cfa2b3 03-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix line-out jack detection

The commit fefd67f31ee7f5259344e36a237d59b47e8715cf
ALSA: hda - Add line-out jack detection on IDT/STAC codecs
enabled wrong pins for jack detections. Fixed to the correct ones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 84d3dc20 30-Jul-2009 Chengu Wang <wangchengu@gmail.com>

ALSA: hda: Correct EAPD for Dell Inspiron 1525

The commit 24918b61b55c21e09a3e07cd82e1b3a8154782dc statically changes
the model from dell-bios to dell-3stack to solve the sound decreasing
regression (http://lkml.org/lkml/2008/9/12/203), however it leads to another
problem that the 2nd headphone jack doesn't work
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3987). So I think
the commit 249**2dc is just a workaround. I would like to give a true solution
here.

The datasheet for STAC9228 says, GPIO2 is the same pin as VOL DOWN, and
the EAPD pin is GPIO0. This is why the sound decreases if we set EAPD as
GPIO2. This patch changes EAPD to GPIO0 to solve the problem.

Signed-off-by: Chengu Wang <wangchengu@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fefd67f3 30-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add line-out jack detection on IDT/STAC codecs

Add the automatic mute of speakers via line-out jack plugging on
STAC/IDT codecs. The feature is enabled when the HP detect is present.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5207e10e 30-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Integrate Digital Input Source to Input Source

STAC/IDT codecs provide both "Input Source" and "Digital Input Source"
controls to choose the analog input source and the digital input source.
But this is far user-unfriendly.

This patch merges the input source selections into one "Input Source"
control. To have separate digital and analog input source controls,
you can pass "separate_dmux = 1 " hint string.

At the same time, this patch gets rid of analog mixer stuff that was
already disabled in previous patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bf677bd8 30-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix typos of Capture controls.

The commit 6479c63188290beae83ade3243b9d6eb47d394b6
ALSA: hda - Create Capture controls dynamically
introduced typos of "Capture". Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 71443b0b 29-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - No analog mix input source as default for IDT92HD71bxx

The analog mix is disabled now as default (unless "analog_mixer" hint
is given), so it shoudn't appear in the digital input source as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 15b4f296 29-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing DMUX initialization for auto-mic with STAC/IDT

Added the missing initialization of DMUX connection (to analog input)
for auto-mic mode with STAC/IDT codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26a27980 29-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove static connection in IDT 92HD71bxx

We don't need any more static connection to the port F (which is often
used for docking stations) since its connection is done dynamically via
DAC assignment now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3d21d3f7 29-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support auto-mic switching with IDT/STAC codec

Support the automatic mic-switching with some devices with IDT/STAC
codecs. The condition is that the device has only two inputs, one
for an external mic and one for an internal mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 62558ce1 29-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid overwrite of jack events with STAC/IDT

Since only one event can be associated to a (pin) widget, it's safer
to avoid the multiple mapping. This patch fixes the behavior of the
STAC/IDT codec driver.

Now stac_get_event() doesn't take the type argument but simply returns
the first hit element. Then enable_pin_detect() checks the validity
of the type, and returns non-zero only if a valid entry. The caller
can call stac_issue_unsol_event() after checking the return value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 50c62f06 28-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't create analog mixer for IDT92HD71bxx

The analog mixer unit on IDT 92HD71Bxx codecs is almost useless
since we use only the direct connections from DAC to pin.

Remove the controls to avoid unneeded confusion as default now.
This can be still back via "analog_mixer = 1" hint.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6479c631 28-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create Capture controls dynamically

Instead of static snd_kcontrol_new arrays, create "Capture Volume"
and "Capture Switch" controls dynamically based on the mixer attr
values (made via HDA_COMPOSE_AMP_VAL()).
This reduces the code size and gives more flexibility to change
the number of controls later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 44179323 28-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't create unneeded digital input source for IDT 92HD71x

The current driver creates always the digital input source mixer
elements for IDT 92HD71x codecs no matter whether digital mics are
present. This patch adds the proper check to avoid the creation of
these controls if unnecessary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9a11f1aa 28-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reword information messages for BIOS auto-probing mode

The sentense "Unknown model for xxx, ..." makes people too nervous
and drives them to a direction to a wrong "fix" by giving any
mismatching model option.

Let's rephrase the messages to be more nice and easy (at least that
won't make people suspect conspiracies).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 626f5cef 27-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Dell Studio 1555

Added a quirk entry for Dell Studio 1555.

Reference: Novell bnc#525244
https://bugzilla.novell.com/show_bug.cgi?id=525244

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a22d543a 26-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Introduce get_wcaps_type() macro

Add a helper macro to retrieve the widget type from wiget cap bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 16a433d8 22-Jul-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda-intel: Cleanups for widget connection list handling

This patch adds a check to snd_hda_get_connections() routine for
presence of AC_WCAP_CONN_LIST. Also, make sure that negative error
codes from noted route are handled on all places as errors.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 86de7416 22-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use snprintf() to be safer

Use snprint() for creating the jack name string instead of sprintf()
in patch_sigmatel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 05ff7e11 21-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reduce click noise at power-saving

Add some tricks to reduce the click noise at powering down to D3
in the power saving mode on STAC/IDT codecs.
The key seems to be to reset PINs before the power-down, and some
delay before entering D3. The needed delay is significantly long,
but I don't know why.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b04add95 20-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix pin-setup for Sony VAIO with STAC9872 codecs

The recent rewrite of the codec parser for STAC9872 caused a regression
for some Sony VAIO models that don't give proper pin default configs
by BIOS. Even using model=vaio doesn't work because the pin definitions
are set after the pin overrides.

This patch fixes the pin definitions in patch_stac9872() to be put
in the right place before the pin overrides. Also the patch adds the
new quirk entry for VAIO F/S to have the correct pin default configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 42b95f0c 20-Jul-2009 Hao Song <baritono.tux@gmail.com>

ALSA: hda - Add quirk for Gateway T6834c laptop

Gateway T6834c laptops need EAPD always on while the default behavior
for the STAC9205 reference board is to turn it off upon every HP plug.
By using the special "eapd" model, which is first introduced for Gateway
T1616 laptops for this same reason, this peculiarity can be properly
handled.

Signed-off-by: Hao Song <baritono.tux@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 02358fcf 03-Jul-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - move 8086:fb30 quirk (stac9205) to the proper section

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c8145b8 22-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Make jack-plug notification selectable

Make the jack-plug notification via input layer selectable via Kconfig.
This is often unnecessary, and the similr function will be provided
using the ALSA control API in near future anyway.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b8621516 22-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix unsigned comparison in patch_sigmatel.c

Fix the comparison of unsigned int that causes a compile warning below
by changing to the right signed type:
patch_sigmatel.c: In function ‘stac92xx_vref_set’:
patch_sigmatel.c:658: warning: comparison of unsigned expression < 0 is always false

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a5c0f886 10-Jun-2009 Simos Xenitellis <simos.lists@googlemail.com>

ALSA: hda - add quirk for STAC92xx (SigmaTel STAC9205)

A quirk is required for 8086:284b (rev 03) [Subsystem: 161f:2073].
The following has been tested with Alsa 1.0.20 (git master).

Background details can be found at
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4561
http://forum.ubuntu-gr.org/viewtopic.php?f=38&t=5290

Tested-by: Theodora Iliopoulou <th30dr@gmail.com>
Signed-off-by: Simos Xenitellis <simos@gnome.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b20f3b83 01-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Limit codec-verb retry to limited hardwares

The reset of a BUS controller during operations is somehow risky and
shouldn't be done inevitably for devices that have apparently no such
codec-communication problems.

This patch adds the check of the hardware and limits the bus-reset
capability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7c922de7 01-Jun-2009 Nickolas Lloyd <ultrageek.lloyd@gmail.com>

ALSA: hda - Jack Mode changes for Sigmatel boards

This patch changes Line In as Out Switch and Mic In as Out Switch to
enums for consistency, and causes all mic and line in ports to be probed
and controls to be added appropriately.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ba84bfcd 30-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix reverted LED setup for HP

The commit 86d190e77c44cb057742dcc871b12ebd4633c387 reverted the bit
flip of LED GPIO for HP DX and DV4-1222nr. Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 86d190e7 26-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Minor clean up of patch_sigmatel.c

- Remove unneeded semicolons
- Introduce spec->gpio_led to specify the GPIO bit for LED control

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 679d92ed 24-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add 5stack-no-fp model for STAC927x

The recent fix for the headphone volume control on IDT/STAC codecs
resulted in the removal of invalid "Side" volume eventually. But,
if the front panel doesn't exist, this setup could be regarded as a
sort of regression, as reported in kernel bug #13250.

Now as a workaround, a new model 5stack-no-fp is added so that the user
without the front panel can choose this one explicitly.

Reference: bko#13250
http://bugzilla.kernel.org/show_bug.cgi?id=13250

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fa797966 18-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix digital beep tone calculation

The digital beep tone is calculated in two different ways depending
on the codec chip. The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs. Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.

This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.

Reference: bko#13162
http://bugzilla.kernel.org/show_bug.cgi?id=13162

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2fc99890 15-May-2009 Nickolas Lloyd <ultrageek.lloyd@gmail.com>

ALSA: hda - add controls to toggle DC bias on mic ports

This patch adds a mixer control for the STAC92XX boards to control the
DC bias of mic ports, allowing recording from both powered and
non-powered sources. It replaces the "Mic Output Switch" with "Mic Jack
Mode" to switch between Mic, Line In, and Line Out.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5dd17cb9 07-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix line-in on Mac Mini Core2 Duo

BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 514bf54c 03-May-2009 James Gardiner <renidragsemaj@yahoo.com>

ALSA: hda - Addition for HP dv4-1222nr laptop support

Signed-off-by: James Gardiner <renidragsemaj@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ffd0e56c 15-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs

When the headphone can have no unique DAC, the current code doesn't
check the HP-detection although it should. Put the hp-detection check
before the DAC check to fix this bug.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95c09099 14-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid call of snd_jack_report at release

Don't call snd_jack_report at release of sigmatel and conexnat codecs
which results in Oops at unloading the module.

The Oops is triggered by the power-up sequence during the free due to
the pincfg restoration. Since the power-up sequence is involved with
the unsol handling, the jack reporting may be issued during that.
The Oops occurs with this jack reporting because the jack instances
have been already released but the codec doesn't do the proper
book-keeping.

This patch adds the book-keeping of jack instances to avoid the access
to bogus pointers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fd60cc89 06-Apr-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda - Add VREF powerdown sequence for another board

Add powerdown sequence for VREF using a shared jack when the headphone
is present and the microphone isn't on.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ff2e7337 01-Apr-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: Add 92HD81B1C device id

Added device id in struct for codec 92HD81B1C (0x111d76d5).

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 14bafe32 23-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use cached calls to get widget caps and pin caps

Replace with the standard function calls to use caches for reading
the widget caps and pin caps.

hda_proc.c is still using the direct verbs to get raw values as
much as possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1327a32b 23-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Cache pin-cap values

Added snd_hda_query_pin_caps() to read and cache pin-cap values
to avoid too frequently issuing the same verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 58d8395b 13-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add another HP model with IDT92HD71bx codec

HP laptops require GPIO0 on as EAPD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 307282c8 12-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add model=vaio for STAC9872

Add the default pin config for model=vaio (in case of broken BIOS).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6fce61ae 10-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix coding style issues in last two patches

Also re-ordered the quirk entries per SSID.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 443e26d0 09-Mar-2009 Christoph Plattner <christoph.plattner@gmx.at>

ALSA: hda - Rework on patch_sigmatel.c for HP HDX16/HDX18

Code rework, comments of mail tiwai@suse.de (2009-03-09) incorporated.
Code tested on HP HDX16 (not tested on HDX18 yet).

Signed-off-by: Christoph Plattner <christoph.plattner@gmx.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae6241fb 08-Mar-2009 Christoph Plattner <christoph.plattner@gmx.at>

ALSA: hda - Added HP HDX16/HDX18 notebook support for HDA codecs (82HD71)

Added codec recognition of HP HDX platforms and added support of the
MUTE LED (orange/white). For this feature the CONFIG_SND_HDA_POWER_SAVE
is needed to use event handling for mute control.

Signed-off-by: Christoph Plattner <christoph.plattner@gmx.at>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 139e071b 05-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Assign HP and speaker DACs before mic/line-in

Assign DACs to HP and speaker before mic-in/line-in shared outputs.
This improves the usability as it results in more intuitive mixer
names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ee58a7ca 05-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Connect to primary DAC if no individual DAC is available

In stac92xx_auto_fill_dac_nids[], connect to the primary DAC if no
individual DAC is available for each pin. This ensures that the pin
works somehow at least.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 668b9652 06-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create multiple HP / speaker controls with index

Create multiple "Headphone" and "Speaker" controls with non-zero index
numbers instead of "Headphone2", etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dc04d1b4 06-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create output controls according to pin types for IDT/STAC

Improve the parser to pick up more intuitive control names for the
outputs judging from the pin type, instead of fixed names assigned
to channels.

Also, revive the multi-HP workaround since this change fixes the
problem with the multi-HP detection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c50ff7c0 06-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix headphone-detect regression with multiple HP jacks

The recent changes over the DAC detection mechanism in patch_sigmatel.c
breaks the HP detection on the machines with multiple HP jacks.
It's basically because of the workaround to support the multi-channel
output. Since the HP detection is more important feature, disable
the HP-swap workaroud temporarily.

Reference: Novell bnc#482052
https://bugzilla.novell.com/show_bug.cgi?id=482052

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 14b97595 06-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix typos in slave controls in patch_sigmatel.c

"Headphone Playback ..." appears twice in slave_vols[] and slave_sws[].
They should be "Headphone Playback2 ..."

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6565e4fa 02-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add more hint options for IDT/Sigmatel codecs

Allow more options to be set/reset via hwdep hint entry.
hp_detect, gpio_mask, gpio_dir, gpio_data, eapd_mask and eapd_switch
can be checked.

For example, to disable hp_detect on the fly,
# echo "hp_detect=0" > /sys/class/sound/hwC0D0/hints

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d78d7a90 02-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create "Analog Loopback" controls optionally

Don't create "Analog Loopback" controls as default since these controls
are usually more harmful than useful for normal users.
Only created when "loopback = yes" hint is given.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ea18aa46 27-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix digital mic on dell-m4-1 and dell-m4-3

Fix num_dmuxes initialization for dell-m4-1 and dell-m4-3 models
of IDT 92HD71bxx codec, which was wrongly set to zero.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1607b8ea 26-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add model=auto for STAC/IDT codecs

Added the model=auto to STAC/IDT codecs to use the BIOS default setup
explicitly. It can be used to disable the device-specific model quirk
in the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 330ee995 20-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove IDT codec-specific pin save/restore functions

Removed its own save/restore functions and replaced with the common code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2ae466f8 16-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Cleanup IDT92HD7x HP quirks

Clean up IDT92HD7x quirks for HP laptops with SND_PCI_QUIRK_MASK().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2ea57a8 16-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Fix speaker output on HP DV4 1155-SE

Force speaker pin config with model=hp-dv5 model for cases when bios
doesn't set it up properly. All reported hp laptops using model=hp-dv5
model have speaker at pin 0x0d with same config, so it's safe to add
this within hp-dv5 model.

Reference: alsa-devel mailing list thread on
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-February/014390.html

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9411e21c 13-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add snd_hda_multi_out_dig_cleanup()

Added the helper function snd_hda_multi_out_dig_cleanup() to clean up
the digital outputs with multi setup. This call is needed in cases
the codec supports multiple digital outputs as slaves. Otherwise the
slave widgets aren't properly cleaned up.

For a single digital output (e.g. in patch_conexant.c), this call isn't
needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92258a3e 12-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Change HP dv7 (103c:30f4) quirk from hp-m4 to hp-dv5 model

Change HP dv7 quirk: although reported to work with hp-m4 model
(https://bugzilla.novell.com/show_bug.cgi?id=445321), the original
report doesn't contain info about testing of internal microphone.

Recently I received a report about internal mic not working
(https://qa.mandriva.com/show_bug.cgi?id=44855#c193), this must be
related with the forced line in on pin 0x0e done with hp-m4 model. Thus
change the current quirk from STAC_HP_M4 to STAC_HP_DV5, later reported
to be fixed on a provided kernel with this change
(https://qa.mandriva.com/show_bug.cgi?id=44855#c196).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8bb0ac55 12-Feb-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Add STAC_DELL_S14 quirk

Add STAC_DELL_S14 quirk for new laptop series. Removed un-needed pins
in pin_nids for stac92hd83xxx. Also reorganized connection selection
code for the respective ports per quirk define.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c98041f7 11-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Cleanup setting of pin_configs in patch_stac927x

After commit "ALSA: hda - Fix restore of pin configs at resume for
STAC/IDT codecs", the introduced stac_save_pin_cfgs function checks
already for pins == NULL case, saving then default pin configs from
machine with stac92xx_save_bios_config_regs. So we can remove the
extra checks when stac927x_brd_tbl[spec->board_config] == NULL.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0852d7a6 11-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Detect multiple digital-out pins

Detect multiple digital-out pins in snd_hda_parse_pin_defconfig().
The dig_out_pin and dig_out_type fields become arrays.

The codec parser still doesn't use this multiple pins detection, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dea0a509 09-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up quirk lists

Clean up quirk lists with bit masks.
Also, sorted in numerical order for alc662_cfg_tbl[].

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23c7b521 08-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Don't touch non-existent port f on 4-port 92hd71bxx codecs

When checking for input amps on pins 0x0a, 0x0d and 0x0f, and
initializing them for 92hd71xxx codec models, we must skip nid 0x0f
for 4-port models too like with 5-port models, as it is unused
(nid 0x0f is vendor reserved in 4-port models).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8663ae55 08-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Bind new ecs mobo id (1019:2950) to model=ecs202

This adds a new sound quirk entry (model=ecs202) for an ecs motherboard
with IDT STAC9221 codec (1019:2950).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 45c1d85b 04-Feb-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Added stac378x digital slave out struct

Added the ADATOut nid to a slave digital outs struct to allow output
via the DigOut pin.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 29d4ab4d 04-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Don't call stac92xx_parse_auto_config with wrong dig_in

Don't use uneeded/wrong third parameter for stac92xx_parse_auto_config
in patch_stac92hd71bxx (no SPDIF in).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6df703ae 04-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Dynamic detection of dmics/dmuxes/smuxes in stac92hd71bxx

Detect the number of connected ports and number of smuxes dynamically,
looking at pin configs, using new introduced functions
stac92hd71bxx_connected_ports and stac92hd71bxx_connected_smuxes. Also
use proper input mux configuration for 4port and 5port models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 616f89e7 04-Feb-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Additional pin nids for STAC92HD71Bx and STAC92HD75Bx codecs

Current code for STAC92HD71Bx and STAC92HD75Bx doesn't consider pin
complexes 0x20 and 0x27. Also for 4 port models, nids 0x0e and 0x0f
are vendor reserved. This commit changes code so it'll consider the
additional pin complexes for models that have it, and avoid reserved
nids to be touched on 4 port models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 42de55cb 30-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for another HP dv5 model

Added model=hp-dv5 for another HP dv5 model with AMD chip (103c:3600)

Reference: kernel bug#12440
http://bugzilla.kernel.org/show_bug.cgi?id=12440

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca8d33fc 26-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: 92hd71xxx disable unmute support for codecs that don't have input amps

Some revisions of the 92hd71xxx codec families don't have input amps
on ports 0xa, 0xd and 0xf, so probe the widget caps on port 0xa and
check for support, if found run snd_hda_sequence_write_cache() on the
stac92hd71xxx_unmute_core_init verb list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e3c75964 23-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create "Input Source" control dynamically for STAC/IDT

Instead of fixed kcontrol_new element, build "Input Source" controls
dynamically. If the number of input-source items is 0 or 1, we don't
need to create such a control.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 00a602db 23-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix PCM reference NID for STAC/IDT analog outputs

The reference NID for the analog outputs of STAC/IDT codecs is set
to a fixed number 0x02. But this isn't always correct and in many
codecs it points to a non-existing NID.

This patch fixes the initialization of the PCM reference NID taken
from the actually probed DAC list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8056d47e 23-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add model=ref for Intel board with STAC9221

An intel board (8086:0204) works only with model=ref.

Reference: Novell bug #406529
https://bugzilla.novell.com/show_bug.cgi?id=406529

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 577aa2c1 22-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: add reference board SND_PCI_QUIRK

Add another LanParty reference board SND_PCI_QUIRK to quirk lists of
all codec families.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 32ed3f46 22-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Add STAC92HD83XXX_PWR_REF quirk

Some revisions of the 92hd8xxx codec's not supporting port power
downs in which the using of it causes capture and also randomly
playback streams to not function at all. Thus by disabling it by
default and adding a option to enable it manually will fix all issue
on current and future revisions.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 87e88a74 22-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: revert change to 92hd83xxx power mapping

Port 0xe power mapping was incorrect set to 0x80 changed to the correct
value 0x40.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d9a4268e 22-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Gateway %1616 laptop

Gateway T1616 laptop needs EAPD always on while the current STAC9205
code turns off per HP plug. Added a new model "eapd" to keep it on.

Reference: Novell bnc#467597
https://bugzilla.novell.com/show_bug.cgi?id=467597

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8ce84198 22-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid to set the pin control again if already set

Check the present pin control bit and avoid the write if it's already
set in patch_sigmatel.c. This will reduce the number of verb execs at
jack plugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e0c0e943 21-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add model entry for HP dv4

Added model=hp-dv5 for HP dv4 (103c:30f7).

Reference: kernel bug #12440
http://bugzilla.kernel.org/show_bug.cgi?id=12440

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1e137f92 20-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up old VAIO hack codes for STAC9872

Get rid of old VAIO static hack codes for STAC9872 and use the BIOS
auto-parser for all models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 65557f35 20-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: 83xxx port 0xe DAC selection

On the 92hd8xxx codecs port 0xe needs the connection selected to be the
last DAC in the list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c441982 20-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Assign proper digital I/O type for STAC/IDT

Assign the proper PCM digital I/O type (HDA_PCM_TYPE_*) for the digital
I/O on STAC/IDT codecs. HDA_PCM_TYPE_HDMI is assigned for the HDMI I/O.

A similar framework is implemented to patch_realtek.c, but it's not
set up and still using only HDA_PCM_TYPE_SPDIF yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# caa10b6e 20-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve auto-probing of STAC9872 codec

Use the standard STAC/IDT auto-probing routine for non-static
STAC9872 codec probing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7c7767eb 20-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Halve too large volume scales for STAC/IDT codecs

STAC/IDT codecs have often too large volume scales such as -96dB,
and exposing this as is results in too large scale in percentage
representation.

This patch adds the check of the volume scale and halves the
volume range if it's too large automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 989738c4 17-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: fix invalid power mapping masks

Fixed invalid power mappings for ports 0xd and 0xe on 93hd83xxx codecs.
They were shifted right one too many bits.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c9280d68 15-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix (yet more) STAC925x issues

The codec-parsing of STAC925x was utterly broken due to its unique
design unlike other STAC codecs. It has a volume control only in NID
0x0e (similar as STAC9200), but the parser assumes that the amp is
available on each DAC widget.

The patch fixes the whole wrong stories: fix the initial volume,
assign the fixed "Master" volume, and avoid to create wrong volume
controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 428549f5 15-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid amp value for STAC925x

The value set in the commit 2465fb6605b4f8f3964b132017bf4078d1265fe9
is actually wrong. The value range is from 0 to 0x1f while the patch
sets to 0x7f. Let's fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1b0652eb 14-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix HP dv5 mic input

Fix HP dv5 (103c:3603) built-in mic input.

Reference: kernel bug 12440
http://bugzilla.kernel.org/show_bug.cgi?id=12440

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org


# 2465fb66 14-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing initialization of NID 0x0e for STAC925x

The selector widget 0x0e isn't initialized properly in the whole probe
process, thus it can be a wrong value depending on the BIOS setup.

This patch adds the init verb to set it to the max & unmuted.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9248f269 14-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix stac92hd83xxx_amp_nids[]

Fix the bug introduced in commit c15c5060fc32d7de7cde76aa61e98bae1334d82e:
sound/pci/hda/patch_sigmatel.c: In function ‘patch_stac92hd83xxx’:
sound/pci/hda/patch_sigmatel.c:4765: warning: assignment from incompatible pointer type

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8317e0b0 13-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't reset HP pinctl in patch_sigmatel.c

Resetting HP pinctl at the unplugged state may cause a sort of regression
on some devices because of their wrong pin configuration.

A simple workaround is to disable the pin reset. This is ugly and may be
not good from the power-saving POV (if any), but damn simple.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org


# c15c5060 13-Jan-2009 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: stac92hd8xxx amp mixers

Added amp nid for stac92hd8xxx families of codecs so the input amp
mixer is created.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2acc9dcb 09-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent headphone output on Panasonic CF-74

CF-74 does the headphone/speaker switching on hardware, thus the driver
shouldn't do any software-toggling of pins. Otherwise it results in a
silent headphone output.

This patch simply resets the hp_detect flag to fix the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dafb70ce 13-Jan-2009 Giuseppe Bilotta <giuseppe.bilotta@gmail.com>

ALSA: hda - Add quirk for another HP dv5

Add the model=hp-m4 quirk for another HP dv5 (103c:3603)
Reference: kernel bug#12440
http://bugzilla.kernel.org/show_bug.cgi?id=12440

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org


# f9d088b2 13-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix a typo

Fix a typo in stac92hd83xxx_cfg_tbl[]. The actual number is identical
thus there is no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 574f3c4f 23-Dec-2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Add missing terminators in patch_sigmatel.c

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 74b7ff48 20-Dec-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: fix incorrect mixer index values for 92hd83xx

Fixed incorrect mixer index values for 92hd83xx codec's audio
input mixer.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f8ccbf65 20-Dec-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: dinput_mux check

Add check to determine if dinput_mux is set by any of patch_stac*() functions,
otherwise a invalid pointer my be referenced causing gibberish to mixer values.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 69dfaefe 20-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for another HP dv7

Added the model=hp-m4 quirk for another HP dv7 (103c:30fc) with IDT
92HD71b* codec.

Reference: Novell bnc#461108
https://bugzilla.novell.com/show_bug.cgi?id=461108

Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb632128 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Power up always when no jack detection is available

When no jack detection is available, the pins should be always
turned on since it can't be turned on/off dynamically via unsol
events.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 91589232 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix unused variable warnings in patch_sigmatel.c

Fixed "unused varible" warnings in patch_sigmatel.c that have been
introduced by the last changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 76624534 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use more distinct name for a unique volume in STAC/IDT

When the line_out has only one DAC and it's unique (i.e. not shared
by other outputs), assign a more reasonable and distinct mixer name
such as "Headphone" or "Speaker".

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c21ca4a8 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rework on STAC/IDT auto-configuration code

The current auto-configuration code has several problems especially
for the new IDT codecs, e.g. wrong assignment of pins and DACs or
coupled volume for speaker and headphone.

This patch is a fairly large rewrite of the auto-configuration code.
Some remaks

- mic_switch and line_switch contain NIDs instead of bool
- dac_list isn't fixed for IDT 92HD* codecs now, they are all probed
- extra HP and speakers are stored in extra_dacs[].

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8f55c1e5 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove non-working headphone control for Dell laptops

The previous commit re-enabled hp_nid setup for IDT92HD73*, but
it's unneeded indeed for Dell laptops that have multiple headphones.
Setting the extra hp_nid results in a non-working "Headpohne" mixer
control. Thus hp_nid should be 0 for these dell models.

Also, the automatic addition of hp_nid should check whether it's
a dual-HP model or not. For dual-HPs, the pins are already checked
by the early workaround.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4f2d23e1 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use snd_hda_ctl_add() in patch_sigmatel.c

Fixed the call of snd_ctl_add() by replacing with snd_hda_ctl_add()
so that this mixer element can be tracked for re-configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9e43f0de 17-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add no-jd model for IDT 92HD73xx

Added the model without the jack-detection for some desktops that
have really no jack-detection. The recent driver caused regressions
regarding the sound output on such machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 85f13b67 19-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: Revert "ALSA: hda: removed unneeded hp_nid references"

This reverts commit 07f455f779acfb3eba4921fd1399761559b10fa9.
ALSA: hda: removed unneeded hp_nid references

Removed unneeded hp_nid references for 92hd73xx codec family.

This caused the silent output on some Intel desktops due to missing
routing of widget 0x0a and 0x0d.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fa620e97 19-Dec-2008 Joerg Schirottke <master@kanotix.com>

ALSA: hda - Add quirk for Dell Studio 17

Added the matching model=dell-m6 for Dell Studio 17 laptop.

Signed-off-by: Joerg Schirottke <master@kanotix.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e28d8322 17-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent HP output on D975

Some desktops seems to have no HP/mic jack detection on the front panel,
which results in the silent output in the recent driver, because the
driver mutes the output (to save power) when no plug is detected.

This patch adds a new model that disables the jack-detection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 12dde4c6 05-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Proper power-map toggling for input pins

The current code overrides the event type on input pins always to
PWR_EVENT. Although this still works (PWR_EVENT and INSERT_EVENT
are handled samely), it'd be better to avoid such overrides.

Also, currently the unsol events are registered even for fixed pins
which will never raise the pin-detection event.

This patch fixes both issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6e3ea25 04-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix pin-detection in patch_sigmatel.c

The pin-detection function used in patch_sigmatel.c shouldn't be specific
to HP pin because it's used for input pins in general, too.

This patch fixes the detection function, removes the HP check from it
and moves to stac92xx_hp_detect().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c2f767b 01-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove unnecessary caches for power states in patch_sigmatel.c

The power-state changes in patch_sigmatel.c are accessed via *_cached()
but they shouldn't be really cached. Fixed to the normal write.

Also, stac92hd71xx_suspend and resume are no longer necessary as the
power-state changes are handled properly in the common routine.
Removed these hacks now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c9b46f91 01-Dec-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use amp cache for SPDIF mute controls in patch_sigmatel.c

The amp switch of SPDIF outputs have to be cached in the amp cache
instead of codec cache. Otherwise it conflicts with the IEC958
playback switch control in hda_codec.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 58eec423 11-Aug-2008 Mauro Carvalho Chehab <mchehab@kernel.org>

ALSA: hda - More fixes on Gateway entries

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9cb36c2a 11-Aug-2008 Mauro Carvalho Chehab <mchehab@kernel.org>

ALSA: patch_sigmatel: Add missing Gateway entries and autodetection

Gateway autodetection and entries are incomplete.

This patch adds the entries found at the .INI file for their driver version
5.10.5082.0.

It also uses the proper code to seek for notebook ID, since this is based on
codec subsystem ID on those devices.

This should provide a proper pinup for several gateways notebooks:
Gateway M465-E Notebook [Part #1008637]
Gateway M465-G Notebook [Part #1008667]
Gateway NX260X Notebook [Part #1008794]
Gateway NX100X Notebook [Part #1008798]
Gateway E-100M Notebook [Part #1008799]
Gateway E-100M G Notebook [Part #1008800]
Gateway M255-E Notebook [Part #1008801]
Gateway M255-G Notebook [Part #1008803]
Gateway M285-E Convertible Notebook [Part #1008804]
Gateway M285-G Convertible Notebook [Part #1008805]
Gateway CX210S Convertible Notebook [Part #1008807]
Gateway CX210X Convertible Notebook [Part #1008808]
Gateway E-100M SB Notebook [Part #1008973]
Gateway M255-E SB Notebook [Part #1008989]
Gateway M285-E SB Convertible Notebook [Part #1008990]
Gateway M465-E Notebook [Part #1009022]
Gateway CX2724 Convertible Notebook [Part #1009036]
Gateway MX1025 Notebook [Part #1009046]
Gateway CX2720 Convertible Notebook [Part #1009063]
Gateway CX2724h Convertible Notebook [Part #1009089]
Gateway MX1023 Notebook [Part #1009097]
Gateway MX1023h Notebook [Part #1009098]
Gateway NX260X Notebook [Part #1009112]
Gateway E-100M Notebook [Part #1009126]
Gateway MX7533 Notebook [Part #1009146] [Part #1009163]
Gateway CX210X Convertible Notebook [Part #1009346]
Gateway NX570X Notebook [Part #1009442]
Gateway NX570X Notebook [Part #1009448]
Gateway NX270S Notebook [Part #1009550]
Gateway MX6448 Notebook [Part #1013912R]
Gateway MX6453 Notebook [Part #1013913R]
Gateway MX6216 Notebook [Part #1013916R]
Gateway MX6931 Notebook [Part #1013918R]
Gateway CX2726 Convertible Notebook [Part #1013921R]
Gateway MP8708 Notebook [Part #1013924R]
Gateway MX6446 Notebook [Part #1013927R]
Gateway MX6930 Notebook [Part #1013928R]
Gateway MX6447 Notebook [Part #1013932R]
Gateway MX6454 Notebook [Part #1013943R]
Gateway MX6439 Notebook [Part #1013947R] [Part #1013955R] [Part #1013971R]
Gateway MX6930h Notebook [Part #1013973R] [Part #1013974R] [Part #1013975R]
Gateway MX6955 Notebook [Part #1014028R]
Gateway MX6956 Notebook [Part #1014033R]
Gateway MX6959 Notebook [Part #1014061R]
Gateway MX6957 Notebook [Part #1014065R]
Gateway MX6960 Notebook [Part #1014068R]
Gateway MX6958 Notebook [Part #1014072R]
Gateway NX570X Notebook [Part #1014077R]
Gateway NX570XL Notebook [Part #1014078R]
Gateway NX570QS Notebook [Part #1014079R]
Gateway MX6961 Notebook [Part #1014080R] [Part #1014106R]
Gateway MX6961h Notebook [Part #1014112R]
Gateway NX270S Notebook [Part #1014120R]
Gateway MX6431 Notebook [Part #1014121R]
Gateway MX8710 Notebook [Part #2905895R]
Gateway MX3702 Notebook [Part #2905898R]
Blade-K8F GW UMA Single Core Motherboard w/RS485M and 1394 - Quanta (FRU) [Part #4006133R]

Since some entries conflict with existing pinups, I'm providing a separate
patch to fix those entries.

Tested only with Gateway MX6453.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2d34e1b3 28-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add IDT/STAC-specific proc output

Added power-map and analog-loopback information to proc output for
IDT/STAC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1289e9e8 27-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Modularize HD-audio driver

Split the monolithc HD-audio driver into several pieces:
- snd-hda-intel HD-audio PCI controller driver; loaded via udev
- snd-hda-codec HD-audio codec bus driver
- snd-hda-codec-* Specific HD-audio codec drivers

When built as modules, snd-hda-codec (that is invoked by snd-hda-intel)
looks up the codec vendor ID and loads the corresponding codec module
automatically via request_module().

When built in a kernel, each codec drivers are statically hooked up
before probing the PCI.

This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module
information for each driver, and driver-linking codes between
codec-bus and codec drivers.

TODO:
- Avoid EXPORT_SYMBOL*() when built-in kernel
- Restore __devinit appropriately depending on the condition

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 661cd8fb 25-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check model for Dell 92HD73xx laptops

Check the model type instead of PCI SSID for detection of the mic types
on Dell laptops with IDT 92HD73xx codecs. In this way, a new laptop
can be tested via model module option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c65574ab 21-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - mark Dell studio 1535 quirk

Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95026623 23-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - No 'Headphone as Line-out' swich without line-outs

STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine. For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c6e4c666 25-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Assign unsol tags dynamically in patch_sigmatel.c

Since we need to handle many unsolicited events assigned to different
widgets, allocate the event dynamically using the existing events
array, and use the tag appropriately instead of combination of fixed
number and widget nid. (Note that widget nid can be over 4 bits!)

Also, replaced the call of unsol_event handler with a dedicated
function to be more readable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f73d3585 25-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix AFG power management on IDT 92HD* codecs

The AFG pin power-mapping isn't properly set for the fixed I/O pins
on IDT 92HD* codecs. This resulted in the low power mode after the
boot until any jack detection is executed, thus no output from the
speaker.

This patch fixes the power mapping for the fixed pins, and also fixes
the GPIO bits and digital I/O pin settings properly in stac92xx_ini().

Reference: Novell bnc#446025
https://bugzilla.novell.com/show_bug.cgi?id=446025

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a9cb5c90 23-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - No 'Headphone as Line-out' swich without line-outs

STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine. For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d6752a53 21-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - mark Dell studio 1535 quirk

Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b94d3539 21-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix double free of jack instances

The jack instances created in patch_sigmatel.c may be double-freed.
The device management code checks the invalid element, and thus there
is no real breakage, but it spews annoying warning messages.
But, we can't simply remove the release calls of these jack instances
because they have to be freed when the codec is re-configured.

Now, a new flag, bus->shutdown is introduced to indicate that the bus
is really being unloaded, i.e. the objects managed by the device
manager will be automatically deleted. We release these objects only
when this flag isn't set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b0fc5e04 21-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a quirk for Dell Studio 15

Added the matching model=dell-m6 for Dell Studio 15 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3a7abfd2 20-Nov-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Add STAC_DELL_M4_3 quirk

Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the
board config switch to assign number of digital muxes, microphones,
and SPDIF muxes via the PCI quirk defined.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0253fdcd 16-Nov-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: STAC_DELL_M6 EAPD

Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

This patch fixes the regressions, the silent output on HP of some Dell
laptops (see Novell bnc#446025):
https://bugzilla.novell.com/show_bug.cgi?id=446025

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c6798d2b 18-Nov-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: EAPD mute on suspend

Moved support for EAPD mute on suspend from stac92hd71xx_suspend
to the generic stac92xx_suspend function.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c5d08bb5 18-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix resume of GPIO unsol event for STAC/IDT

Use cached write for setting the GPIO unsolicited event mask to be
restored properly at resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 80bf2724 18-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirks for HP Pavilion DV models

Added the quirk entries for HP Pavilion DV5 and DV7 with model=hp-m4.

Reference: Novell bnc#445321, bnc#445161
https://bugzilla.novell.com/show_bug.cgi?id=445321
https://bugzilla.novell.com/show_bug.cgi?id=445161

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 41c3b648 18-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix GPIO initialization in patch_stac92hd71bxx()

Fixed the GPIO mask and co initialization in patch_stac92hd71bxx()
so that the gpio_maks for HP_M4 model is set properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# af9f341a 18-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix restore of pin configs at resume for STAC/IDT codecs

Fixed the restore of pin configs at resume for some STAC/IDT codec
models. These models set explicitly the pin configs after the default
init configs, and these aren't restored properly at resume.

This patch introduces two changes:
- Allocate always pin_configs array in stac_spec so that the driver
can overwrite the value freely
- Introduce stac_change_pin_config() to change the pin config value

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2c885878 18-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use init callback in stac92xx_resume()

Call the init callback and remove duplicated codes in stac92xx_resume().
This also fixes the missing initialization such as digital I/O pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e4973e1e 18-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create jack detection elements in build_controls

The jack detection input elements should be created in build_controls
callback instead of init callback because init can be called multiple
times by suspend/resume and power-saving.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0cea0d0 16-Nov-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: STAC_DELL_M6 EAPD

Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8e5f262b 15-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check model type instead of SSID in patch_92hd71bxx()

Check board preset model instead of codec->subsystem_id in
patch_92hd71bxx() so that other hardwares configured via the model
option work like the given model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c39555d6 14-Nov-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: STAC_VREF_EVENT value change

Changed value for STAC_VREF_EVENT from 0x40 to 0x00 because the
unsol response value is only 6-bits width and the former value
was 1<<6 which is an overrun.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 127e82e3 14-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support Headphone and Speaker volumes control on VAIO

Split the bound Master control to individual Headphone and Speaker
volume controls for VAIO with STAC982x codecs.
The Master controls is still created as a vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d4e9bb3 12-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add digital beep playback switch for STAC/IDT codecs

The digital beep widget may have no mute control, and always enabling
the beep is ofen pretty annoying, especially on laptops.

This patch adds a mixer control "PC Beep Playback Switch" when there
is no mixer amp mute is found, and controls it on software.

Reference: Novell bnc#444572
https://bugzilla.novell.com/show_bug.cgi?id=444572

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d7a89436 12-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix IDT/STAC multiple HP detection

Due to the recent change for multiple HP as line-out switch, only
one of the multiple headphons (usually a wrong one) is toggled
and the other pins are still disabled. This causes the silent output
problem on some Dell laptops.

Also, the hp_switch check is screwed up when a line-in or a mic-in
jack exists. This is added as an additional output, but hp_switch
check doesn't take it into account.

This patch fixes these issues: simplify hp_switch check by using
the NID instead of bool, and clean up / fix the toggle of HP pins
in unsol event handler code.

Reference: Novell bnc#443267
https://bugzilla.novell.com/show_bug.cgi?id=443267

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4f1e6bc3 11-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix input pin initialization for STAC/IDT codecs

The input pins are sometimes not initialized properly because
of the optimization check of the current pinctl code.

Force to initialize the mic input pins so that they can be set up
properly even if they were in a weird state. But keep other input
pins if already set up as input, since this could be an extra mic
pin.

Reference: Novell bnc#443738
https://bugzilla.novell.com/show_bug.cgi?id=443738

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 355a0ec4 11-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing analog-mux mixer creation for STAC9200

The creation of analog-mux mixer element is missing in
patch_stac9200() due to the dynamic allocation patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6b3ab21e 03-Nov-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: make a STAC_DELL_EQ option

Add support for explicitly enabling the EQ distortion hack for
systems without software biquad support.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1e99bd9 29-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix SPDIF mute on IDT/STAC codecs

The SPDIF mute switch code seems broken. It doesn't set unmute bits
properly. Also it contains the duplicated lines (merge error?) to be
cleaned up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 74aeaabc 24-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: add support for jack detection on IDT codecs.

This patch adds support to the IDT codec families to report jack status
to the jack abstraction layer. This required some reorganization in the
stac92xx_unsol_event function in which the index value is changed to
reporting the nid with the event.

Also adds an sigmatel_jack struct to keep track of the nid relation
to the jack abstraction layer instance. Also adds functions to set and
retrieve data values for each nid, this is used in stac92xx_unsol_event
to retrieve the GPIO mask for STAC_VREF_EVENT.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da74ae3e 21-Oct-2008 Harvey Harrison <harvey.harrison@gmail.com>

ALSA: hda - correct bracketing in spdif test in patch_sigmatel.c

Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ebaa0470 16-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Release jack instance for dynamic reconfigure

The jack instance has to be release manually in free callback
in patch_sigmatel.c for dynamic reconfiguration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 45a6ac16 15-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: add support for jack detection on IDT/Sigmatel

Added support for jack detection reporting to userspace for
IDT/Sigmatel codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d21995e3 13-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: fix nid variable warning

Fixed compiler warning with possible uninitialized variable 'nid'.

CC [M] /home/mranostay/git/alsa-driver/pci/hda/patch_sigmatel.o
/home/mranostay/git/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c: In function
‘stac92xx_parse_auto_config’:
/home/mranostay/git/alsa-driver/pci/hda/../../alsa-kernel/pci/hda/patch_sigmatel.c:2815: warning: ‘nid’ may be used
uninitialized in this function

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d13bd412 30-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Manage kcontrol lists

Manage all kcontrol elements created in the hda-intel driver.
This makes it possible to remove and reconfigure the controls
of each codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 603c4019 30-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use generic array helpers

Use generic array helpers to simplify array handling in snd-hda-intel.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 687cb98e 11-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: corrected invalid mixer values

Corrected invalid mixer index values on the 92hd71bxxx codec branch.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b33c767 10-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: add mixers for analog mixer on 92hd75xx codecs

Add support for mixers on the analog mixer on some 92hd75xx codecs,
along with adding a 'Mixer' entry for it's connection on the dmux.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 72474be6 09-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: VREF powerdown for headphones

Add support for powering down VREF on standard headphone insertion, also
powers up the VREF on a headset insertion.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b9aea715 09-Oct-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: STAC_HP_M4

Set the third microphone to a default config of a 'Line In' to be
added the Input Source Mux's.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 00ef50c2 27-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: SPDIF stream muting support

Added support for muting S/DPIF outs using the 'Digital Playback Source' muxs on
supporting codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9a9e2359 26-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: HP laptop quirk

Added HP laptop SND_PCI_QUIRK for STAC_HP_M4.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b2c4f4d7 26-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: 92xx S/PDIF In support

Add support for S/PDIF IN on reference boards quirks. Also disable the
IEC958 capture switch on boards with GPIO0 enabled.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# fedb7569 23-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: use last DAC defined for hp_pin

Patch allows the last DAC in the dac_nids for the hp_nid if there is an
available one this isn't in use by a line_out entry or if hp_nid isn't already
defined. This solves the issues with the 'Headphone Playback' mixer
controls on the 92hd73xxx branch and possibly others.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 24918b61 29-Sep-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix model for Dell Inspiron 1525

Dell Inspiron 1525 seems to have a buggy BIOS setup and screws up
the recent codec parser, as reported by Oleksandr Natalenko:
http://lkml.org/lkml/2008/9/12/203

This patch adds the working model, dell-3stack, statically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 65973632 16-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: SPDIF mux fixes for STAC927x

Corrected bounds-checking in stac92xx_auto_create_mux_input_ctls() and added a spec->spdif_labels
pointer for custom SPDIF mux labels for non-standard codec connections.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2a9c7816 13-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: 92hd73xx fixes

Added support for defining the number of amps and the creation
of the private_dimux dynamically for the 92hd73xx codec family.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
[Fixed a typo by tiwai]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f7cf0a7c 13-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: fixed hp_nid DAC for DELL_M6

This patch sets the HP out not used by the "Headphone to Line Out" switch to the
hp_nid.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 89385035 11-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Input port AMP controls

Added support for controlling hardware gain amps on input ports
using a volume control mixer with a mux selecting the port being controlled.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 6a14f585 11-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Added a STAC_HP_M4 quirk

Added a new quirk for STAC_HP_M4 series for an 92hd75xxx family laptop.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e99d32b3 09-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda - add missing slave_dig_outs for 92HD73bxx

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e3487970 08-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: SPDIF mux name change

Changed the mux naming scheme from "IEC9258 Mux" to "IEC958 Playback Source" to match
the coding style.

Signed-by-off: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 0ffa9807 08-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: digital slave support for IDT codecs

Added slave_dig_outs entries for several IDT codecs that have multiple
SPDIF outs, and enabled these SPDIF outs in several pin configs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 07f455f7 06-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: removed unneeded hp_nid references

Removed unneeded hp_nid references for 92hd73xx codec family.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# d9737751 06-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: SPDIF mux controls

Dynamically create mux controls for SPDIF outs on certain IDT/Sigmatel codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 20f5f95d 01-Sep-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Distortion fix for dell_m6_core_init

Added the EQ distortion fix to the dell_m6_core_init.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8daaaa97 14-Aug-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: 92HD75xx fixes

Fixed several noise issues with DACs and ADCs on some 92HD75xxx based codecs
with certain revision id's.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4682eee0 14-Aug-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: dynamically create capture mux controls

Dynamically create capture mux volume controls when a output amp is detected.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 8c650087 04-Aug-2008 Mauro Carvalho Chehab <mchehab@kernel.org>

ALSA: hda: Add support for ECS/PC Chips boards with Sigmatel codecs

Thanks to Sistema Fenix (http://www.sistemafenix.com.br/) and CDI Brasil
(www.cdibrasil.com.br/) for sponsoring this development.

Signed-off-by: Gilberto <gilberto@sistemafenix.com.br>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# d0513fc6 27-Jul-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: added 92HD81/83 support

Added support for 92HD81/83 family of codecs.
This also includes a pwr_mapping array for pins that have more than
one amp to power down.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 536319af 21-Jul-2008 Nicolas Boichat <nicolas@boichat.ch>

ALSA: Allow to force model to intel-mac-v3 in snd_hda_intel (sigmatel).

Currently, even if you pass model=intel-mac-v3 as a module parameter to
snd_hda_intel, the function patch_stac922x (patch_sigmatel.c) will still
try to auto-detect the model type. This is a problem on my MacBook Pro 1st
generation, which needs intel-mac-v3, but sometimes incorrectly reports
0x00000100 as subsystem id, which causes the switch in patch_stac922x to
select intel-mac-v4.

To fix this, I added a new model called intel-mac-auto, so in case no
module parameter is passed, and an Intel Mac board is detected, the
model will be automatically detected, while no detection will be done
if the model is forced to intel-mac-v3.

This problem has been around for quite a while, and I used to fix it
by moving the case statement for 0x00000100 in patch_stac922x so that
intel-mac-v3 is chosen.

Another way to fix the problem would be to check if a module parameter
was set directly in patch_stac922x, using something like this:
if (spec->board_config == STAC_INTEL_MAC_V3 &&
!codec->bus->modelname) {

But I think it is less elegant (if you prefer that way, I can prepare a
patch).

Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1cd2224c 18-Jul-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: digital pc-beep support hd-audio codecs

Added digital pc-beep support using linear tone generation for hd-codecs along
with initial support for several IDT codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f7c5dda2 10-Jul-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: 92hd71bxx PC Beep

Added volume controls for the analog PC Beep on 92hd71bxx codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 7e257405 08-Jul-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda - removed redundant gpio_mask

An gpio_mask value was defined twice needlessly.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# aafc4412 13-Jun-2008 Matt Ranostay <mranostay@gmail.com>

ALSA: hda: Add support for 92HD73xxx codecs

Added support for new family of IDT codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4549915c 12-Jun-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix stac9205_cfg_tbl

Sort stac9205_cfg_table in the order of id numbers, and removed the
duplicated (obsoleted) entries for 0x01fc and 0x01fd. This doesn't
change the driver behavior since the old entries are all secondary.

The duplication occured due to commit dfe495d0, and the old entries
were introduced by commit ae0a8ed8.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 587755f1 25-May-2008 Mauro Carvalho Chehab <mchehab@kernel.org>

[ALSA] hda - Fix capture mute Widget for stac9250/9251

Fix capture mute widget for STAC9250/9251 codecs. The widget 0x09
has no mute but 0x14 does actually.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>


# 7bd3c0f7 01-May-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Support IDT 92HD206 codec

Added the support for IDT 92HD206 codec chip.
It's compatible with STAC927x.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7c2ba97b 16-Apr-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Add 5.1 support for second headphone jack

Several 92hd7xxx and STAC9228 laptops have multiple headphone jacks,
the second headphone jack should be used for the 5.1 surround sound.
Add support for 'Headphone as Line Out' switch, which allows it be used
in 5.1 surround sound.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0fc9dec4 14-Apr-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: EAPD power management

Power management support for EAPD enabled laptops, when headphones
are sensed it pulls the EAPD GPIO line low to power it down.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 780c8be4 14-Apr-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Correct SPDIF out default config

Several laptops have have the SPDIF out defined as 'Digital other out'
when it should be 'SPDIF out' in the default config.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 07bcb316 19-Mar-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: 92hd71bxxx DMIC nid

Added missing DMIC verb to dell_4_1_pin_configs[].

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 888afa15 18-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - keep the format verb at closing PCM streams

Keep the format verb at closing PCM streams.
Introduced snd_hda_codec_cleanup_stream() for the parcicular purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 117f257d 18-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix spekaer output of Panasonic CF-74

Add a new model "panasonic" for Panasonic CF-74 with STAC9200 codec
to fix the speaker output.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2626a263 14-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix orphan Headphone controls in STAC codecs

Currently, the headphone controls are created as Master wrongly in
some cases, and this prevents the virtual master controls.
The patch fixes the problem by simply using "Headphone" always for
headphone controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d654a660 14-Mar-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: 92HD73xxx distortion fix

Fixed issue on some laptops that if the Master mixer and DAC mixers are
turned all the way up that will cause distortion. This is fixed by limiting
the max volume with the volume knob nid.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7747ecce 10-Mar-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Reorganized DAC outputs

Changed so that internal speakers point to the Front mixer instead of Surround.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 40ac8c4f 29-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix the array over-range access with stac92hd71bxx codec

Add the check of the array range for dac_nids to prevent the over-range
access.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 52fe0f9d 28-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: add verbs for 92hd73xxx laptops

Added core_init[] for several 92hd73xxx laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bce6c2b5 28-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: disable power management on fixed ports

Power management can't be enabled on fixed ports, since the presence
will always return false and prevent output.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3c9a3203 29-Feb-2008 Harvey Harrison <harvey.harrison@gmail.com>

[ALSA] sound: hda: missing includes of hda_patch.h

Move the array declaration to hda_codec.c where it is used and add includes
where the individual presets are declared.

Fixes the following sparse warnings:
sound/pci/hda/patch_realtek.c:13744:25: warning: symbol 'snd_hda_preset_realtek' was not declared. Should it be static?
sound/pci/hda/patch_cmedia.c:729:25: warning: symbol 'snd_hda_preset_cmedia' was not declared. Should it be static?
sound/pci/hda/patch_analog.c:3656:25: warning: symbol 'snd_hda_preset_analog' was not declared. Should it be static?
sound/pci/hda/patch_sigmatel.c:3995:25: warning: symbol 'snd_hda_preset_sigmatel' was not declared. Should it be static?
sound/pci/hda/patch_si3054.c:286:25: warning: symbol 'snd_hda_preset_si3054' was not declared. Should it be static?
sound/pci/hda/patch_atihdmi.c:156:25: warning: symbol 'snd_hda_preset_atihdmi' was not declared. Should it be static?
sound/pci/hda/patch_conexant.c:1721:25: warning: symbol 'snd_hda_preset_conexant' was not declared. Should it be static?
sound/pci/hda/patch_via.c:1962:25: warning: symbol 'snd_hda_preset_via' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 64ed0dfd 29-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Use int instead of long in patch_sigmatel.c

The HD-audio parameters are at most 32bit int.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8b551785 29-Feb-2008 Harvey Harrison <harvey.harrison@gmail.com>

[ALSA] sound: patch_sigmatel.c fix shadowed variable warning

Temp variable in the loop shadows the second argument (which is otherwise
unused in this function). Change this to defcfg as it is used to hold
the default config.
sound/pci/hda/patch_sigmatel.c:2759:18: warning: symbol 'cfg' shadows an earlier one
sound/pci/hda/patch_sigmatel.c:2734:26: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aea7bb0a 25-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix initial DAC numbers of 92HD71bxx codecs

Fix the initial num_dacs of 92HD71bxx codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae0afd81 22-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Mic as output fix

Added logic to check if AUTO_PIN_FRONT_MIC is available for output
switch, if AUTO_PIN_MIC isn't.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 03d7ca17 20-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC927x analog mic

Some laptops have a internal analog microphone that is not setup by the BIOS.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a7662640 20-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: 92HDxxxx PCI Quirks

Added PCI_QUIRKS for laptop that have the 92HDxxx family of codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7989fba9 20-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC927x invalid association value

STAC_DELL_BIOS quirks were setting the association value wrong
for port 0x0f, which prevented it from being included in hp_outs[].

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4451089e 20-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: fix STAC927x power management

Fix issue on STAC927x codecs that first DAC was getting powered down
even if was being used.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1c82ed1b 18-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] Keep private TLV entry in vmaster itself

Use a private array for TLV entries of virtual master controls instead
of (supposed) static array. This cleans up the existing codes.

Also, now vmaster assumes the simple dB-range TLV that is the only type
it can handle.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9a08160b 12-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add "IEC958 Default PCM" switch

Added a new mixer switch to enable/disable the sharing of the default
PCM stream with analog and SPDIF outputs. When "IEC958 Default PCM"
switch is on, the PCM stream is routed both to analog and SPDIF outputs.
This is the behavior in the earlier version.

Turning this switch off has a merit for some codecs, though. Some codec
chips don't support 24bit formats for SPDIF but only for analog outputs.
In this case, you can use 24bit format by disabling this switch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b76c850f 06-Feb-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC927x power down inactive DACs

On several laptops that have STAC9228 codecs have unused DACs,
this powers them down to a D3 state.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ba72ba1 06-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-intel - Fix PCM device number assignment

In the current scheme, PCM device numbers are assigned incrementally
in the order of codecs. This causes problems when the codec number
is irregular, e.g. codec #0 for HDMI and codec #1 for analog. Then
the HDMI becomes the first PCM, which is picked up as the default
output device. Unfortuantely this doesn't work well with normal
setups.

This patch introduced the fixed device numbers for the PCM types,
namely, analog, SPDIF, HDMI and modem. The PCM devices are assigned
according to the corresponding PCM type. After this patch, HDMI will
be always assigned to PCM #3, SPDIF to PCM #1, and the first analog
to PCM #0, etc.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bf277785 03-Feb-2008 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA - Add support for the OQO Model 2

This patch adds support for the OQO Model 2 Ultra Mobile PC.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cace16f1 30-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: fix Mic in as output

Some laptop has an internal analog microphone that is 'fixed'.
This patch prevents creating a 'Mic In as Output' switch for
ports that can't be outputs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4fe5195c 29-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Add GPIO mute support to STAC9205

Support added for detecting HP jack presence via GPIO on several laptop docks.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# edb54a55 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Control SPDIF as slave

Add SPDIF playback switch to the slave element list so that it
can be toggled via the master control as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b5895dc8 25-Jan-2008 Matthew Ranostay <mranostay@embededalley.com>

[ALSA] hda: STAC92xx Line In/Mic as output check

This patch checks to see the Line In/Mic port have the ability
to do output before creating the the control switches.
The 92hd71bxx series of codecs has this issue with the port 0xe,
which only allows input.

Signed-off-by: Matthew Ranostay <mranostay@embededalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e2e7d624 24-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC9205 GPIO line fix

Fixed issue that the incorrect GPIO line was being pulled high
for some STAC9205 based laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 09a99959 24-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Add dynamic mono mixer support for STAC92xx codecs

Allows for dynamically creating mono out mixer controls and well
as mono mux controls.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b22b4821 21-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Mono mux mixer support

Add support for the mono mux on several 92HD7xxx codecs.
Creates a dynamic mixer for the mux selection.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 52987656 16-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-intel - Add workarounds for STAC codecs

Some machines with STAC codecs seem to have problems (e.g. no audible
playback) when the delay in codec-read routine is too short.
I still don't figure out which command sequence causes this problem
(due to lack of test hardware), but it's known that increasing the
delay fixes. So, added a stupid workaround here temporarily...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 76e1ddfb 15-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-code - Clean up STAC GPIO enablement code

There are two similar GPIO-enablement codes in patch_sigmatel.c.
Let's clean up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 3fa2ef74 11-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Add new STAC9205 PCI_QUIRK

Added a new STAC 9205 quirk for Vostro 1500.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a64135a2 10-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: 92HD7XXX power management support

Added support for advanced power management support for output ports on
92HD7xxx family of codecs. Inactive output ports are powered down when
the pin sense doesn't detect a connection, and powered back up when a
connection is sensed.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2134ea4f 10-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add virtual master controls

Add master controls using vmaster to codecs that have no real hardware
master volume registers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2f32d909 10-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC9228 VT fixes

Moved 2 systems PCI_QUIRK values to STAC_DELL_BIOS. Also the second
front HP jack is incorrect defined in the BIOS VT's for some laptops,
this patch corrects this.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a780c0ae 08-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: 92HD71BXX Mono Mute Support

Added a mono output mute mixer for the 92hd71bxx family of codecs, this
also removes the need for the mono out node to explicitly unmuted in the
core init.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9004acc7 08-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove sound/driver.h

This header file exists only for some hacks to adapt alsa-driver
tree. It's useless for building in the kernel. Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it. This should be really killed in
future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 0678accd 07-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Dynamically create digital gain mixers

Dynamically create digital gain mixers for dmics that have out-amp
support. Also some 92HD73xx's codecs don't have DMIC gains, so this also
prevents creating dead mixers.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# c481fca3 06-Jan-2008 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC927x VREF fix

Some laptops incorrectly assume the front input jack as a line in
instead of a microphone in. Which in turn disables the voltage
reference, in which non-amplified input is not possible. This patch
enables VREF80 for the input jack.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 1697055e 18-Dec-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix invalid access to non-existing dmux on STAC

The digital mux on STAC codecs doesn't always exist although the
driver builds dmux enum mixer elements unconditionally.
Now the driver creates 'digital input source' mixer elements only
when dmux is available.
Also, the patch adds the missing dmux definition for STAC925x.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 8e9068b1 17-Dec-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC927x DMIC Cleanup

Cleaned up STAC927x and added several subsystem id's for more laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 541eee87 13-Dec-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Added more 92HD71 codecs

Added more codecs to the 92HD71 family, as well as support for several
that don't have an analog mixer.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 71685b90 13-Dec-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: 92HD73 DMIC Amps

Changed hardware gain mixers for the digital mic's from HDA_OUTPUT to
HDA_INPUT.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e1f0d669 13-Dec-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Added STAC92HD73 support

Added support for new STAC92HD73 family of codecs. Additionally added
features for multiple analog loopbacks, and multiple dmux mixers.
Regression testing for the analog loopback changes for STAC9205 and
STAC9274D completed with any issues, as well for the dmux changes.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f673dc82 19-Nov-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Revert volume knob controls in STAC codecs

Volume knob controls with STAC codecs seem to cause problems with some
devices. Volumes change very slowly or silent suddenly. It's likely
due to conflict between the software and the hardware volume knob
setup.
Since we'll have a virtual master control in future, it's safer to
remove this control completely right now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 68ea7b2f 15-Nov-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Check value range in ctl callbacks

Check the value ranges in ctl put callbacks properly so that
invalid values won't be stored or written to registers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 40c1d308 12-Nov-2007 Jiang Zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - Avoid wrong speaker-auto mute via mic jack

When a mic jack is set up as the multiple I/O, it may issue the automute
function wrongly. This patch fixes the wrong automute detection.

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# bcecd9bd 11-Nov-2007 Jiang Zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - Add workaround for multiple HPs

Dell laptops have multiple HP jacks that can be used for multi-channel
outputs. The current auto pincfg handles the speaker as the primary
output and thus cannot handle the multi-channel configuration for such
cases. This patch adds a workaround to fix this issue by swapping the
HP and speaker during multi-channel setup routines.

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 7f9310c1 11-Nov-2007 Jiang Zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - Update dell-m82 model pin config

Updated dell-m82 model pin config table. The old config doesn't work
with Dell 1210 and co.

Signed-off-by: Jiang Zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b222fe50 07-Nov-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC9228 Subsystem update

Added more laptops subsystem id's that have STAC9228 DMIC support.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9b35947f 07-Nov-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC92HD71 codec mixer

Added analog loopback support and missing ADC capture mixer for the
STAC92HD71 codec family.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e035b841 06-Nov-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Added new IDT codec family

Added initial support for the STAC92HD71BXX family of codecs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f1f208d0 05-Nov-2007 Matthew Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC9228 DMIC

Added support for the dmics and enabled EAPD for several laptops with
STAC9228 cards.

Signed-off-by: Matthew Ranostay <mranostay@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 83eef75b 21-Oct-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: STAC9228 updated DMUX nid

Changed the dmux for STAC9228 from ADC1MUX to ADC0MUX to avoid confusion.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 47744f63 19-Oct-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Add dmux to STAC 9228

Added a dmux to the STAC9228 cards with DMIC support. And added a
STAC_DIGITAL_INPUT_SOURCE macro for repeating mixer code.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 7f16859a 18-Oct-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda-codec - Add STAC9228 DMIC support

Added the missing STAC9228 DMIC support.
Also added a new vendor id tag for IDT.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 6020c008 19-Nov-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Revert volume knob controls in STAC codecs

Volume knob controls with STAC codecs seem to cause problems with some
devices. Volumes change very slowly or silent suddenly. It's likely
due to conflict between the software and the hardware volume knob
setup.
Since we'll have a virtual master control in future, it's safer to
remove this control completely right now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9a2a763e 18-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix conflict of Master volume in STAC92xx codec

The addition of volume knob as Master volume resulted in conflict with
the existing one by stac92xx_auto_create_hp_ctls().
This patch fixes the conflict, and still keeps the Master control for
codecs without volume knob as much as possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f6e9852a 16-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add array terminator for dmic in STAC codec

Reported by Jan-Marek Glogowski.
The dmic array is passed to snd_hda_parse_pin_def_config() and
should be zero-terminated.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9066f244 16-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix STAC922x volume knob control

Reported by zhejiang <zhe.jiang@intel.com>
'I found that STAC_VOLKNOB hardwired the KNOB nid to 0x24.
It is okay for stac9205 and stac927x.
But the VolumeKnob nid of stac9220-9221 is 0x16.'

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a3a2f429 11-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix input_mux numbers for vaio stac92xx

My bad, I forgot to update the num_items field when added a new item
to vaio_mux items table, so the last item 'PCM' disappeared.
Now it has the right number 3.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5e915bb3 10-Oct-2007 Tim Gardner <tim.gardner@canonical.com>

[ALSA] hda-codec - Re-add quirk support for Dell XPS 1330 and Inspiron 1420


Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 1194b5b7 10-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Gateway laptops with STAC9200

Fix the output of Gateway laptops with STAC9200 codec chip.
They require the EAPD control for some pins. These pins shouldn't be
powered down.
To enable EAPD control, a new model 'gateway' was added to STAC9200.
The known PCI SSIDs are included in the quirk list.
The fix was originally suggested by Brian Hinz, in ALSA bug#2948.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# b44ef2f1 17-Sep-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: More subsystem id BIOS changes

More laptop BIOS changes the subsystem id for STAC9205 cards if the
microphone is toggled on/off in the settings.
The patch removes the old STAC_9205_M43xx and use STAC_9205_DELL_M43.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# e45e459e 10-Sep-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: BIOS changing subsystem id

Some laptop BIOS change the subsystem id for STAC9205 cards if the
microphone isn't toggled on/off in the settings.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# af6c016e 05-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix wrong pin config order in STAC92xx dell models

The last patch to change/add Dell models have wrong pin config orders.
This patch fixes the pin positions.
Taken from ALSA bug#3319,
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3319

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 9e05b7a3 03-Sep-2007 Maxim Levitsky <maximlevitsky@gmail.com>

[ALSA] hda-codec - Fix support for sigmatel codecs that have 2 or more ADCs

1) Create seperate mixer controls for each ADC
2) Make number of substreams of capture PCM device be equal to
number of ADCs

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6e6b88ff 03-Sep-2007 Maxim Levitsky <maximlevitsky@gmail.com>

[ALSA] hda-codec - make volume knob, the master volume for sigmatel codecs

VolumeKnob is present on most sigmatel codecs, it allows to decrease
volume of all DACs at once, it is a kind of post-procesing volume.
Note that all output amps of sigmatel only decrease volume, and all
input amps only increase volume.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5f10c4a9 03-Sep-2007 Maxim Levitsky <maximlevitsky@gmail.com>

[ALSA] hda-codec - add support for analog loopback to STAC9204/9205/922x/927x

The analog loopback routes the sound just before it enters ADC0
to output of DAC0.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0fb87bb4 03-Sep-2007 Maxim Levitsky <maximlevitsky@gmail.com>

[ALSA] hda-codec - add support for swapping center/LFE channels to STAC codecs

Center/LFE channels are located on same jack, so it can be usefull
to swap them.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c480f79b 03-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Avoid zero NID in line_out_pins[] of STAC codecs

The STAC codes adds line_out_pins[] for shared mic/line-inputs accordingly.
But, the current code may give a hole with NID=0 in some setting, which
results in an error at probe. This patch fixes the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# dc81bed1 03-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix wrong pin-setup at resume of STAC codecs

The resume procedure for STAC codecs overrides the cached values and
results in the wrong (reset) PIN state. The patch gets rid of the
overriding part and simplifies the resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ca7c5a8b 30-Aug-2007 Maxim Levitsky <maximlevitsky@gmail.com>

[ALSA] hda-codec - code cleanups in patch_sigmatel.c

Clean up the mixer entries for Input Source using a macro.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# dfe495d0 23-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Dell laptops support with STAC codecs

Fixed Dell laptops support with STAC92xx codecs.
Many pin-config models are introduced. See ALSA-Configuration.txt
for details.
The patch taken from ALSA bug#3319, originally by Jorg Prante:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3319

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 72e7b0dd 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add auto-mute function to Sony VAIO with STAC9872

Added auto-mute function with HP jack to Sony VAIO laptop with STAC9872
codec. The patch taken from ALSA bug#3275.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ae0a8ed8 13-Aug-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] This patch adds more support for Dell systems with Stac9205 codecs.

Tested against a couple of different systems (with different pin
configs), but the others should also work. Also cleaned up some of the
9205 patch code.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cb53c626 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-intel - Add POWER_SAVE option

Added CONFIG_SND_HDA_POWER_SAVE kconfig. It's an experimental option
to achieve an aggressive power-saving. With this option, the driver
will turn on/off the power of each codec and controller chip dynamically
on demand.
The patch introduces a new module option 'power_save'. It specifies
the second of time-out for automatic power-down. As default, it's
10 seconds. Setting 0 means to suppress the power-saving feature.
The codec may have analog-input loopbacks, which are usually represented
by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'.
When these are on, we cannot turn off the mixer and the codec chip has
to be kept on. For bookkeeping these states, a new codec-callback is
introduced.
For the bus-controller side, a new callback pm_notify is introduced,
which can be used to turn on/off the contoller appropriately.
Note that this power-saving might cause slight click-noise at
power-on/off. Also, it might take some time to wake up the codec, and
might even drop some tones at the very beginning. This seems to be the
side-effect of turning off the controller chip.
This turn-off of the controller can be disabled by undefining
HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cca3b371 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Clean up bind-controls

We have already a generic bind-control helper, so let's clean up the codes
using it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 47fd830a 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - add snd_hda_codec_stereo() function

Added snd_hda_codec_amp_stereo() function that changes both of stereo
channels with the same mask and value bits. It simplifies most of
amp-handling codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 82beb8fd 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - optimize resume using caches

So far, the driver looked the table of snd_kcontrol_new used for creating
mixer elements and forces to call each of its put callbacks in PM resume
code. This is too ugly and hackish.
Now, the resume is simplified using the codec amp and command register
caches. The driver simply restores the values that have been written
in the cache table. With this simplification, most codec support codes
don't require any special resume callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4ff076e5 07-Aug-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add more Dell systems

This patch adds support for Dell E520 and a couple of other 965 based systems.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8259980e 31-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix GPIO in resume

Reinitialize GPIO in resume callback if necessary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a5ce8890 23-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] Clean up with common snd_ctl_boolean_*_info callbacks

Clean up codes using the new common snd_ctl_boolean_*_info() callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# aafc0339 29-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix input with STAC92xx

The recent fix for STAC92xx surround outputs broke the input pin
setting for shared line-in and mic jacks. This patch fixes the
breakage.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 87d48363 17-Jul-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: Enable SPDIF in/out on some stac9205 boards

Added support for some boards with SPDIF in/out, and cleaned up the GPIO
enable function.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 1b290a51 12-Jul-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: stac9202 mixer fix

Added support for line out controls for STAC9202 cards, and fixed issue
where master mixer control was being created twice for headphone and
speaker outs.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a4eed138 06-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix number of pin widgets with STAC codecs

Use ARRAY_SIZE() to calculate the number of pin widgets for each codec
chip.
This also fixes a typo in STAC9205 code that gives a wrong number (14
instead of 12), which resulted in fatal communication errors.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 1624cb9a 05-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix the recording selection on VAIO laptop

Fix the mismatch of init verb and capture mux with VAIO STAC9872.
Also, changed the item names to be more intuitive.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# df802952 02-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix the error in DAC assignment of STAC codec

The STAC codec support code has the automatic recognition of
additional side-output pins, and this may result in an error when
the assigned pin has no corresponding DAC connection.
The patch fixes the problem -- it corrects the line_outs again
without such additional pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 92a22beb 19-Jun-2007 Matt Ranostay <mranostay@gmail.com>

[ALSA] hda: add eapd support to additional idt codecs

Added support for EAPD on the 927x, and 9227-8 IDT HDA codecs.
Enabling EAPD powers the internal speaker amp otherwise there is no
sound on systems with an internal amp.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 76c08828 18-Jun-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model dell for Dell XPS M1210

Added a new model 'dell' for Dell XPS M1210 with STAC922x codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 807a4636 29-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix STAC922x capture boost level

STAC922x provides the capture boost level up to 4, but actually it
works only up to 2. Since the range of the mixer is automatically
defined from amp-capability bits, we need to override the value
beforehand. snd_hda_override_amp_caps() is introduced for this
purpose.
The function patch_stac922x() calls this for NID 0x12 (Mux Capture
Volume). This should fix another recording problem on Intel Macs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5d5d3bc3 29-May-2007 Ivan N. Zlatev <contact@i-nz.net>

[ALSA] hda-codec - Fix pin configs for Intel Macs

* adds the pinconfigs for all 5 Apple boards and 14 Subsystem IDs
(support for possibly all iMac, Mac, MacMini etc etc)
* adds 'intel-mac-v1' to v5 models which replace the current
* reflects changes in Alsa-Configuration.txt

Signed-off-by: Ivan N. Zlatev <contact@i-nz.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0dae0f83 20-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support of newer version of Intel iMac

Added the pin configs for newer version of Intel iMac.
The information provided by Ivan N. Zlatev <contact@i-nz.net>.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 897cc188 29-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix STAC922x capture boost level

STAC922x provides the capture boost level up to 4, but actually it
works only up to 2. Since the range of the mixer is automatically
defined from amp-capability bits, we need to override the value
beforehand. snd_hda_override_amp_caps() is introduced for this
purpose.
The function patch_stac922x() calls this for NID 0x12 (Mux Capture
Volume). This should fix another recording problem on Intel Macs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f9acba43 29-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix input with STAC92xx

The recent fix for STAC92xx surround outputs broke the input pin
setting for shared line-in and mic jacks. This patch fixes the
breakage.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7353e14d 29-May-2007 Steve Longerbeam <stevel@embeddedalley.com>

[ALSA] hda-codec - Fix pin configs for Gateway MX6453

Fix pin default configs for speaker associations and sequence
for Gateway MX6453 machine with STAC925x codecs.

Signed-off-by: Steve Longerbeam <stevel@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 49c605db 17-May-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA: Add more systems to Sigmatel codec

This patch adds more Dell systems and a Panasonic laptop with
STAC9200 codecs.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2c11f955 17-May-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA: Add support for Gateway NX860

This patch adds support for the Gateway NX860 system.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8286c53e 15-May-2007 Daniel T Chen <crimsun@ubuntu.com>

[ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty

Included is a patch against current alsa-kernel hg tip adding
quirks that Ubuntu Dapper/Edgy/Feisty contains.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7b043899 03-May-2007 Steve Longerbeam <stevel@embeddedalley.com>

[ALSA] hda-codec - bug fixes for stac92xx HDA codecs.

* fixed surround playback on stac922x. Pin direction control bits were
not being set correctly in stac92xx_set_pinctl(). Specifically it
would refuse to set the port as an output if the port was already
configured as an input. Last hunk (#8).
* fixed an input mux bug on 92xx codecs. When there is more than one
possible input calculated for the muxes, the actual mux widget never
gets set from its reset default, which is index 0, in the stac9221
case that is port E. So alsamixer/amixer/gnome-mixer report the Mic
as being the selected input source, but in fact is something else
(line-in port E in stac9221 case). Another problem with this is that
if you actually try to set the mux input to 'Mic', nothing happens
because *cur_val == idx (see snd_hda_input_mux_put). You have to
actually toggle input source to line-in then back to mic to actually
set the mux widget. Hunk #7.
* fixed some typos in patch_sigmatel.c. Hunk #6.
* fix to stac92xx_add_dyn_out_pins() that fixes surround playback on
codecs with less that 4 DACs (stac9205 for example). It reads the widget
caps cache created by hda_codec to count the total number of analog DACs
found. It then uses that to determine whether there will be enough
independent DACs available for line/mic switch controls. Hunk #1, #2,
and #3.
* improvements to stac92xx_auto_fill_dac_nids() to make it more general.
This fixes surround playback on some codecs in combination with the
fix to stac92xx_add_dyn_out_pins() above. It reads the full connection
list now, instead of just the first entry, and then locates an analog
DAC in the list. If one is found and it's free, assign it to that line-out.
If no free DAC is found for the line-out, return -ENODEV. It also makes
sure to actually select the chosen DAC if more than one DAC is input to
the pin. Hunks #4, #5.

Signed-off-by: Steve Longerbeam <stevel@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5d403b19 02-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix resume of STAC92xx codecs

Added a missing call to resume mixer controls for STAC92xx codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f16928fb 27-Apr-2007 Sylvain FORET <sylvain.foret@anu.edu.au>

[ALSA] snd_hda_intel: fix for intel imac

Add handling of Intel-iMac-specific pinconfig of the sound card.
Intel-iMac now handled as a separated subsystem.

Signed-off-by: Sylvain FORET <sylvain.foret@anu.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c45e20eb 17-Apr-2007 Abhijit Bhopatkar <bainonline@gmail.com>

[ALSA] hda-codec - Add first generation macbook subsystem ID

First generation MacBooks were getting ignored by sigmatel drivers
and wrongly being identified as MACMINI. This patch makes them
identify as MACBOOK.

Signed-off-by: Abhijit Bhopatkar <bainonline@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6b97eb45 05-Apr-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix SPDIF output

Fix SPDIF output (at least on Realtek codecs). The DIGI_CONVERT verbs
have to be reset before the PCM stream is set up. Otherwise the digital
setup is screwed up.
Also, check the AMP capability before setting AMP of the digital out
widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 02a5039f 19-Mar-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Macmini and Macbook pin configs

Original idea from Nicolas Boichat <nicolas@boichat.ch>.
The pin configurations of Macmini and MacBook (1st generation, at least)
seem identical with MacBook Pro (1st generation).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2549413e 11-Mar-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Code clean up of patch_sigmatel.c

- Remove superfluous array member in stac9205_dmic_nids[]
- Use ARRAY_SIZE() instead of hard-coded numbers

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 68e22543 12-Mar-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add Sony VGC-LA1 to patch_sigmatel.c

This patch adds the Sony Vaio VGC-LA1 to the stac9872_cfg_tbl.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6f0778d8 14-Mar-2007 Nicolas Boichat <nicolas@boichat.ch>

[ALSA] hda-codec - Add support for MacBook Pro 1st generation

Fix audio on Macbook Pro 1st generation.

Signed-off-by: Nicolas Boichat <nicolas@boichat.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0a07acaf 13-Mar-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix speaker output on MacPro

Initialize the first line-out widget as the output pin in stac92xx_init().
Some devices like MacPro seem to set this widget as INPUT as default,
and confuses the driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 3fc24d85 16-Feb-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Define pin configs for MacBooks

Define pin configs for MacBook and MacBook Pro with STAC92xx codecs.
The latter is detected automatically by checking codec SSID now.
Also, fixed the documentation regarding available modeliof sigmatel
codec chips.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f0f96745 13-Feb-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add LFE support on Dell M90

Added LFE support on Dell M90 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 46f02ca3 12-Feb-2007 Mikael Nilsson <mikael@nilsson.name>

[ALSA] hda-codec - Patch for enabling LFE on more Dell laptops

Fix LFE controls for Dell Inspiron E1705/9400 and XPS M1710 laptops.

Signed-off-by: Mikael Nilsson <mikael@nilsson.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 9e507abd 08-Feb-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Oops with probing sigmatel codec chips

When a device is unkown, the driver tries to set up the codec based on
the BIOS information. Then it may result in Oops if BIOS is broken.
The patch fixes the issue, falling back to a reference model in such a
case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 877b866d 30-Jan-2007 Cory T. Tusar <ctusar@videon-central.com>

[ALSA] hda-codec - Dell Latitude D820 + D/Port

Support port replicator headphone output on Dell Latitude D820 + D/Port.

Signed-off-by: Cory T. Tusar <ctusar@videon-central.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8e21c34c 08-Jan-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Sigmatel STAC9202/9250/9251 codecs

This patch adds support for Gateway laptops based on the
Sigmatel STAC9250 codecs, as well as basic support for
STAC9202/9250/9251 codecs. Some Gateway systems require
probe_mask=1 to work. More work to be done prior to alsa 1.0.14
final.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 33382403 18-Dec-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: add sigmatel 9205 eapd support

Adds support for handling EAPD on 9205 codecs

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f5fcc13c 24-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Use snd_pci_quirk_lookup() for board config lookup

Use snd_pci_quirk_lookup() for looking up a board config table.
The config table is sorted in numerical order of PCI SSIDs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# d1d985f0 23-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix obsolete *_t typedefs

Fixed obsolete *_t typedefs. Now completely removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ddc2cec4 19-Nov-2006 Adrian Bunk <bunk@stusta.de>

[ALSA] make sound/pci/hda/patch_sigmatel.c:stac92xx_dmic_labels[] static

This patch makes the needlessly global stac92xx_dmic_labels[] static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8b65727b 26-Oct-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: add dig mic support for sigmatel codecs

Adds support for digital microphone pin widgets on SigmaTel codecs.
Enables support only on the 9205 codecs for now.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# e7377071 06-Nov-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: fix sigmatel dell system detection

Fixes Dell system detection on 9200 codecs. The support
to detect certain Dell machines was merged in the
9205 table where it will be unused on the various Dell
9200-based codec systems. This moves the subsystem IDs
to the correct 9200 table.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# eb995a8c 21-Sep-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix headphone auto-toggle on sigmatel codec

Fix/optimize the headphone auto-toggle function on sigmatel codecs.
The headphone pins are kept as output. When headhpones are unplugged,
you cannot hear anyway ;)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 314634bc 21-Sep-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix mic input with STAC92xx codecs

Fixed mic input with STAC92xx codecs. The mic pin was sometimes set to
OUTPUT by the headphone jack detection.
Also, try to assign a secondary mic as front-mic (or vice versa)
in the auto-detection if possible.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# eb06ed8f 20-Sep-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Support multiple headphone pins

Some machines have multiple headpohne pins (usually on the lpatop
and on the docking station) while the current hda-codec driver
assumes a single headphone pin. Now it supports multiple hp pins
(at least for detection).
The sigmatel 92xx code supports this new multiple hp pins.
It detects all hp pins for auto-muting, too.
Also, the driver checks speaker pins in addition. In some cases,
all line-out, speaker and hp-pins coexist.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 160ea0dc 06-Sep-2006 Richard Fish <bigfish@asmallpond.org>

[ALSA] [snd-intel-hda] enable center/LFE speaker on some laptops

This patch adds LFE mixer controls for laptops with a stac9200 and a mono
speaker pin with amplifier.

Signed-off-by: Richard Fish <bigfish@asmallpond.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 93ed1503 01-Sep-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add 5 stack audio support for Intel 965 systems

This patch renames the 965_2112 function ids to 965_3ST, and
adds functional support for 965_5ST (5 stack 7.1 surround).

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2c7782b4 25-Aug-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Use model=ref for some Dell laptops

Force to choose model=ref for some Dell laptops with STAC9200 codec
chip for fixing the silent mic recording problem (possibly due to
a BIOS bug). Reference: ALSA bug#2038
So far, applied to Inspiron 630m, Latitude D620 and 120L.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 11b44bbd 23-Aug-2006 Richard Fish <bigfish@asmallpond.org>

[ALSA] hda-codec - restore HDA sigmatel pin configs on resume

This patch restores the Intel HDA Sigmatel codec pin configuration on
resume. Most of it is dedicated to saving the BIOS pin configuration
if necessary, so that even unrecognized chips can be resumed correctly.

Signed-off-by: Richard Fish <bigfish@asmallpond.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6d859065 22-Aug-2006 Guillaume Munch <diabo@free.fr>

[ALSA] hda-codec - Support for SigmaTel 9872

- AR11M and AR11S uses the same chip hence we claim to support the AR Series.
- Added commentary about STAC9225s which shares the same id as CXD9872RD.
- Added entry for 7662 but won't work automatically until pci_subdevice
is known.
- 'vaio' model now corresponds to CXD9872RD_VAIO for backward compat.
- Replaced STAC766x_VAIO with CXD9872RD_VAIO, STAC9872AK_VAIO, STAC9872K_VAIO
and CXD9872AKD_VAIO
- Added 'vaio-ar' model for potential future modifications.

Signed-off-by: Guillaume Munch <diabo@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 81d3dbde 22-Aug-2006 Tobin Davis <tobinx.b.davis@intel.com>

[ALSA] hda-codec - Add support for new Intel boards with Stac9227 codec

This patch adds full 5.1 audio support for Intel boards
with the SigmaTel 9227 codec chip (946, 963, 965 series).


Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 948a4db2 22-Aug-2006 Tobin Davis <tobinx.b.davis@intel.com>

[ALSA] hda-codec - add missing device ids for Intel 945 boards

This patch adds missing device ids for Intel 945 motherboards.


Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 68a6abd9 21-Aug-2006 Tobin Davis <tobinx.b.davis@intel.com>

[ALSA] hda-codec - Fix headphone output for some Intel 945 systems

This patch enables headphone output at initialization for Intel
945 based systems that don't have proper detection circuitry.

Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c2566524 17-Aug-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add missing TLV callbacks for HD-audio codecs

Added missing TLV callbacks for HD-audio codec supports.
Also cleaned up the tlv callback for ad1986a (no mutex is needed there).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 99ccc560 16-Aug-2006 Guillaume Munch <diabo@free.fr>

[ALSA] Add support for Sony Vaio AR 11B

This patch adds automatic detection for Sigmatel ID 7664,
the sound chip in Sony Vaio AR 11B (european name).
- patch_stac7661 becomes patch_stac766x
- .id = 0x83847664 is added

Signed-off-by: Guillaume Munch <diabo@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f3302a59 30-Jul-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: sigmatel 9205 family support

Adds support for the '9205 family' which includes some other
part numbers but 9205 is the first one. These are 4 channel
codecs, some have digital mic capability. Support for the digital
mic feature will come later.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 22a27c7f 06-Jul-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: fix sigmatel 9227/8/9 codec support

SigmaTel 9227/8/9 IDs must use the 927x patch.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7c3dec06 10-Jul-2006 Linus Torvalds <torvalds@macmini.osdl.org>

x86 MacMini: make built-in speaker sound actually work

The MacMini board table seems to largely look like any bog-standard
Intel 945 board.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 19039bd0 28-Jun-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add Intel D965 board support

Added the support for Intel D965 boards with STAC9227 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 62fe78e9 10-May-2006 Sam Revitch <samr7@cs.washington.edu>

[ALSA] hda-codec - Add support for Apple Mac Mini (early 2006)

Add support for some audio quirks of the Apple Mac Mini (early 2006)

Signed-off-by: Sam Revitch <samr7@cs.washington.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a59524fa 03-May-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: add sigmatel 9227/9228/9229 ids

Adds support for the 9227/9228/9229 sigmatel hda codecs.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a9393d70 03-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix mute switch on VAIO laptops with STAC7661

Fixed the master mute switch on VAIO laptops with STAC7661
codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d773781c 25-Apr-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix capture from line-in on VAIO SZ/FE laptops

Added the missing line-in capture on VAIO SZ/FE laptops with
STAC 7661 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a29b6c88 10-Apr-2006 Ashley Clark <aclark@ghoti.org>

[ALSA] hda-codec - Adds HDA support for Intel D945Pvs board with subdevice id 0x0707

Modules: HDA Codec driver

This patch adds the entry for the 5-stack pin-config for the STAC
chip on the Intel D945Pvs board with subdevice id 0x0707.

With this patch against 1.0.11rc4 in the linux kernel 2.6.17-rc1, I'm
able to successfully output over the optical port and analog ports.

Signed-off-by: Ashley Clark <aclark@ghoti.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 505cb341 26-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix unsol event initialization at resume of stac92xx

Fix the re-initialization of unsolicited events at resume of stac92xx codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c960a03b 23-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix VREF level of Mic inputs on STAC92xx codecs

Fixed VREF level of Mic inputs on STAC92xx codecs (ALSA bug#1953).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82bc955f 21-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix BIOS auto-configuration

Modules: HDA Codec driver,HDA generic driver

- Fix autoconfig speaker/hp detection
Now it allows multiple speaker pins (e.g. Dell laptops have such config)

- Use speaker or hp pins if no line-outs are available
This fixes the silence output on recent Dell laptops with STAC9200
(ALSA bug#1843)

- Fix analog/realtek/sigmatel autoconfig parser

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# db064e50 16-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for VAIO FE550G and SZ110

Modules: Documentation,HDA Codec driver

Add support for VAIO FE550G and SZ110 laptops with Sigmatel codec (7661).
The new model 'vaio' is added.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 353b9e66 16-Feb-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing model entries for Intel 945 boards

Modules: HDA Codec driver

Added the missing entries for Intel 945 boards.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 869264c4 25-Jan-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda: sigmatel fixes

Modules: HDA Codec driver

* Fix init sequence so manually retaskable jacks don't get added to
the line_out list.
* Update intel mobo config defaults to specify surround outputs
as line outs rather than speakers.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad0651f9 24-Jan-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix max_channels computation for STAC92xx codecs

Modules: HDA Codec driver

Fix max_channels computation for STAC92xx codecs in the case only
HP pin without line-out pins is detected in the default pin config.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3cc08dc6 23-Jan-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda-codec - add sigmatel 927x codec support

Modules: HDA Codec driver

Adds support for the SigmaTel STAC927x HDA codec family.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d62c40e0 23-Jan-2006 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda-codec - add D975XBK support to sigmatel patch

Modules: HDA Codec driver

Add SigmaTel HDA support for the Intel D975XBK motherboard.

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0fd1708a 13-Jan-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix capture on Sigmatel STAC92xx codecs

Modules: HDA Codec driver

Added the missing 'Capture Switch' control for Sigmatel STAC92xx codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a471b7d 07-Dec-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Small clean up and fixes

Modules: HDA Codec driver,HDA generic driver

- Common labels for input pins
- Fix and clean up of Realtek codec parsers

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# df694daa 05-Dec-2005 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add the support of ALC262,ALC883,ALC885,ALC861

Modules: HDA Codec driver,HDA generic driver

This patch adds the support of ALC262,ALC883,ALC885,ALC861 to driver
More models and improvements for ALC880, ALC260 and ALC882 codecs, too.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 403d1944 29-Nov-2005 Matt Porter <mporter@embeddedalley.com>

[ALSA] hda-codec - update sigmatel support and bug fixes

Modules: HDA Codec driver

- Explictly set pin control as input for all input pins
- Fix bug in 922x mixer (no mute on adc0vol)
- Remove broken ch_mode control
- Add support for jack retasking mixer controls to use rear line and
mic as surround outputs
- Add board tables to support autodetect and pin config defaults for
systems with broken bioses
- Add support for several Intel mobos
- Add support for DFI mobo with reference boards attached
(gets rid of compile time switch to use reference boards)

Signed-off-by: Matt Porter <mporter@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54d17403 21-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix connection list parsing

Modules: HDA Codec driver,HDA generic driver

- Fix connection list parsing (with ranged flag).
- Increase the max number of connections
- Introduce widget capabilities cache
- Power up/down widgets at init, suspend and resume

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c8b6bf9b 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove xxx_t typedefs: HD-Audio codec

Modules: HDA Codec driver,HDA generic driver

Remove xxx_t typedefs from the HD-Audio codec support codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e560d8d8 09-Sep-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Replace with kzalloc() - pci stuff

AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver
KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4e55096e 04-Jul-2005 Matt <matt@embeddedalley.com>

[ALSA] hda: add sigmatel hp detect support

HDA Codec driver
Adds support for detecting hp insertion/removal and enable/disable of
lineouts based on unsolicited events.

Signed-off-by: Matt <matt@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82fe0c58 30-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Use kstrdup

HDA Codec driver
Use the new kstrdup() function instead of in-house one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ff6fdc37 27-Jun-2005 Matt <matt@embeddedalley.com>

[ALSA] hda-codec - SigmaTel HDA resume support

HDA Codec driver
Adds resume support to the SigmaTel HDA patch. Please apply.

Signed-off-by: Matt <matt@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7d4b2fa 27-Jun-2005 Matt <matt@embeddedalley.com>

[ALSA] hda-codec - SigmaTel HDA multichannel support

HDA Codec driver
Adds 6/8 channel support to the SigmaTel HDA patch. Please apply.

Signed-off-by: Matt <matt@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dabbed6f 14-Jun-2005 Matt <matt@embeddedalley.com>

[ALSA] SigmaTel HDA SPDIF and input mux updates

HDA Codec driver
Adds SPDIF in/out support to the SigmaTel HDA codecs. Now builds
the input mux control element names from the defcfg regs.

Signed-off-by: Matt <matt@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2f2f4251 13-Apr-2005 Matt <matt@embeddedalley.com>

[ALSA] add sigmatel codec support

HDA generic driver,HDA Codec driver
Add initial SigmaTel codec support for 9200 and 922x. Note that
this hda patch relies on the configuration default registers to
be set correctly (normally by BIOS/firmware) in order for it to
set up pin widgets properly. There's a test switch in the patch
so it will work with the SigmaTel reference boards that are usually
plugged into a system that doesn't set the configuration default
registers. It supports 2 channel analog out and line/mic in. I
plan to add >2 channel support and spdif support shortly.
Please apply.

Signed-off-by: Matt <matt@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>