History log of /linux-master/sound/pci/hda/patch_conexant.c
Revision Date Author Comments
# 4639c502 04-Feb-2024 bo liu <bo.liu@senarytech.com>

ALSA: hda/conexant: Add quirk for SWS JS201D

The SWS JS201D need a different pinconfig from windows driver.
Add a quirk to use a specific pinconfig to SWS JS201D.

Signed-off-by: bo liu <bo.liu@senarytech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240205013802.51907-1-bo.liu@senarytech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7aeb2590 08-Jan-2024 bo liu <bo.liu@senarytech.com>

ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140

When OMTP headset plugin the headset jack of CX8070 and SN6160 sound cards,
the headset type detection circuit will recognize the headset type as CTIA.
At this point, plugout and plugin the headset will get the correct headset
type as OMTP.
The reason for the failure of headset type recognition is that the sound
card creation will enable the VREF voltage of the headset mic, which
interferes with the headset type automatic detection circuit. Plugout and
plugin the headset will restart the headset detection and get the correct
headset type.
The patch is disable the VREF voltage when the headset is not present, and
will enable the VREF voltage when the headset is present.

Signed-off-by: bo liu <bo.liu@senarytech.com>
Link: https://lore.kernel.org/r/20240108110235.3867-1-bo.liu@senarytech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b871cb97 20-Mar-2023 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant: Partial revert of a quirk for Lenovo

The recent commit f83bb2592482 ("ALSA: hda/conexant: Add quirk for
LENOVO 20149 Notebook model") introduced a quirk for the device with
17aa:3977, but this caused a regression on another model (Lenovo
Ideadpad U31) with the very same PCI SSID. And, through skimming over
the net, it seems that this PCI SSID is used for multiple different
models, so it's no good idea to apply the quirk with the SSID.

Although we may take a different ID check (e.g. the codec SSID instead
of the PCI SSID), unfortunately, the original patch author couldn't
identify the hardware details any longer as the machine was returned,
and we can't develop the further proper fix.

In this patch, instead, we partially revert the change so that the
quirk won't be applied as default for addressing the regression.
Meanwhile, the quirk function itself is kept, and it's now made to be
applicable via the explicit model=lenovo-20149 option.

Fixes: f83bb2592482 ("ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model")
Reported-by: Jetro Jormalainen <jje-lxkl@jetro.fi>
Link: https://lore.kernel.org/r/20230308215009.4d3e58a6@mopti
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230320140954.31154-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 18d7e16c 08-Feb-2023 Bo Liu <bo.liu@senarytech.com>

ALSA: hda/conexant: add a new hda codec SN6180

The current kernel does not support the SN6180 codec chip.
Add the SN6180 codec configuration item to kernel.

Signed-off-by: Bo Liu <bo.liu@senarytech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1675908828-1012-1-git-send-email-bo.liu@senarytech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f83bb259 08-Aug-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model

There is another LENOVO 20149 (Type1Sku0) Notebook model with
CX20590, the device PCI SSID is 17aa:3977, which headphones are
not responding, that requires the quirk CXT_PINCFG_LENOVO_NOTEBOOK.
Add the corresponding entry to the quirk table.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220808073406.19460-1-tangmeng@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d16d69bf 11-Jul-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda/conexant: Apply quirk for another HP ProDesk 600 G3 model

There is another HP ProDesk 600 G3 model with the PCI SSID 103c:82b4
that requires the quirk HP_MIC_NO_PRESENCE. Add the corresponding
entry to the quirk table.

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220711101744.25189-1-tangmeng@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5faa0bc6 19-Jun-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant: Fix missing beep setup

Currently the Conexant codec driver sets up the beep NID after calling
snd_hda_gen_parse_auto_config(). It turned out that this results in
the insufficient setup for the beep control, as the generic parser
handles the fake path in snd_hda_gen_parse_auto_config() only if the
beep_nid is set up beforehand.

For dealing with the beep widget properly, call cx_auto_parse_beep()
before snd_hda_gen_parse_auto_config() call.

Fixes: 51e19ca5f755 ("ALSA: hda/conexant - Clean up beep code")
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216152
Link: https://lore.kernel.org/r/20220620104008.1994-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d5ea7544 07-Jun-2022 huangwenhui <huangwenhuia@uniontech.com>

ALSA: hda/conexant - Fix loopback issue with CX20632

On a machine with CX20632, Alsamixer doesn't have 'Loopback
Mixing' and 'Line'.

Signed-off-by: huangwenhui <huangwenhuia@uniontech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220607065631.10708-1-huangwenhuia@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca348e7f 05-May-2022 bo liu <bo.liu@senarytech.com>

ALSA: hda/conexant: add a new hda codec SN6140

The current kernel does not support the SN6140 codec chip.
Add the SN6140 codec configuration item to kernel.

Signed-off-by: bo liu <bo.liu@senarytech.com>
Link: https://lore.kernel.org/r/20220506025735.17731-1-bo.liu@senarytech.com
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>


# 95dc85db 13-Aug-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda: conexant: Turn off EAPD at suspend, too

Conexant codecs have a workaround for the noise at shutdown to turn
off EAPD, but it wasn't applied at suspend. In the later patch, we'll
switch from reboot_notify callback to the general suspend-at-shutdown,
so let's apply the workaround to the suspend case, too.

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


# 2e6a7312 28-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant: Re-order CX5066 quirk table entries

Just re-order the cx5066_fixups[] entries for HP devices for avoiding
the oversight of the duplicated or unapplied item in future.
No functional changes.

Also Cc-to-stable for the further patch applications.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210428112704.23967-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c6423ed2 01-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant: Apply quirk for another HP ZBook G5 model

There is another HP ZBook G5 model with the PCI SSID 103c:844f that
requires the same quirk for controlling the mute LED. Add the
corresponding entry to the quirk table.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212407
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210401171314.667-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56b26497 06-Mar-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant: Add quirk for mute LED control on HP ZBook G5

The mute and mic-mute LEDs on HP ZBook Studio G5 are controlled via
GPIO bits 0x10 and 0x20, respectively, and we need the extra setup for
those.

As the similar code is already present for other HP models but with
different GPIO pins, this patch factors out the common helper code and
applies those GPIO values for each model.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211893
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210306095018.11746-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d15f7331 18-Jan-2021 Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>

ALSA: hda: boolean values to a bool variable

Fix the following coccicheck warnings:

./sound/pci/hda/patch_conexant.c:570:2-20: WARNING:
Assignment of 0/1 to bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Link: https://lore.kernel.org/r/1610958469-65856-1-git-send-email-abaci-bugfix@linux.alibaba.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 744a11ab 28-Dec-2020 bo liu <bo.liu@senarytech.com>

ALSA: hda/conexant: add a new hda codec CX11970

The current kernel does not support the cx11970 codec chip.
Add a codec configuration item to kernel.

[ Minor coding style fix by tiwai ]

Signed-off-by: bo liu <bo.liu@senarytech.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201229035226.62120-1-bo.liu@senarytech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0dbbdad 08-Jul-2020 Gustavo A. R. Silva <gustavoars@kernel.org>

ALSA: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

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

Convert the mute LED handling in Conexant 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).

Also the assignment of the default vmaster hook is moved at a later
point after the mute hook is set up. This assures no nested hook.

Finally, since we enable the mute-LED kcontrols always in the helper
side, the extra vmaster_mute_enum flag set up is dropped.

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


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

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

This patch converts the remaining user of
snd_hda_gen_add_micmute_led() in Conexant 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-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ef7d84ca 22-Jan-2020 Peter Große <pegro@friiks.de>

ALSA: hda - Add docking station support for Lenovo Thinkpad T420s

Lenovo Thinkpad T420s uses the same codec as T420, so apply the
same quirk to enable audio output on a docking station.

Signed-off-by: Peter Große <pegro@friiks.de>
Link: https://lore.kernel.org/r/20200122180106.9351-1-pegro@friiks.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>


# e190de69 20-Nov-2019 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda - Add mute led support for HP ProBook 645 G4

Mic mute led does not work on HP ProBook 645 G4.
We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191120082035.18937-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f9ef724d 18-Aug-2019 Jeronimo Borque <jeronimo@borque.com.ar>

ALSA: hda - Fixes inverted Conexant GPIO mic mute led

"enabled" parameter historically referred to the device input or
output, not to the led indicator. After the changes added with the led
helper functions the mic mute led logic refers to the led and not to
the mic input which caused led indicator to be negated.
Fixing logic in cxt_update_gpio_led and updated
cxt_fixup_gpio_mute_hook
Also updated debug messages to ease further debugging if necessary.

Fixes: 184e302b46c9 ("ALSA: hda/conexant - Use the mic-mute LED helper")
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jeronimo Borque <jeronimo@borque.com.ar>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 871b9066 13-Aug-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add a generic reboot_notify

Make codec enter D3 before rebooting or poweroff can fix the noise
issue on some laptops. And in theory it is harmless for all codecs
to enter D3 before rebooting or poweroff, let us add a generic
reboot_notify, then realtek and conexant drivers can call this
function.

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


# 401714d9 13-Aug-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Let all conexant codec enter D3 when rebooting

We have 3 new lenovo laptops which have conexant codec 0x14f11f86,
these 3 laptops also have the noise issue when rebooting, after
letting the codec enter D3 before rebooting or poweroff, the noise
disappers.

Instead of adding a new ID again in the reboot_notify(), let us make
this function apply to all conexant codec. In theory make codec enter
D3 before rebooting or poweroff is harmless, and I tested this change
on a couple of other Lenovo laptops which have different conexant
codecs, there is no side effect so far.

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


# 3f880949 25-Jul-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add a conexant codec entry to let mute led work

This conexant codec isn't in the supported codec list yet, the hda
generic driver can drive this codec well, but on a Lenovo machine
with mute/mic-mute leds, we need to apply CXT_FIXUP_THINKPAD_ACPI
to make the leds work. After adding this codec to the list, the
driver patch_conexant.c will apply THINKPAD_ACPI to this machine.

Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.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>


# 167897f4 13-Mar-2019 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - add more quirks for HP Z2 G4 and HP Z240

Apply the HP_MIC_NO_PRESENCE fixups for the more HP Z2 G4 and
HP Z240 models.

Reported-by: Jeff Burrell <jeff.burrell@hp.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4cd3016c 07-Feb-2019 Jurica Vukadin <jurica.vukadin@rt-rk.com>

ALSA: hda - Add quirk for HP EliteBook 840 G5

This enables mute LED support and fixes switching jacks when the laptop
is docked.

Signed-off-by: Jurica Vukadin <jurica.vukadin@rt-rk.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 69939038 18-Jan-2019 Anthony Wong <anthony.wong@canonical.com>

ALSA: hda - Add mute LED support for HP ProBook 470 G5

Support speaker and mic mute LEDs on HP ProBook 470 G5.

BugLink: https://bugs.launchpad.net/bugs/1811254
Signed-off-by: Anthony Wong <anthony.wong@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 40906ebe 16-Dec-2018 Mantas Mikulėnas <grawity@gmail.com>

ALSA: hda: add mute LED support for HP EliteBook 840 G4

Tested with 4.19.9.

v2: Changed from CXT_FIXUP_MUTE_LED_GPIO to CXT_FIXUP_HP_DOCK because
that's what the existing fixups for EliteBooks use.

Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e7bb6ad5 11-Oct-2018 Jeremy Cline <jcline@redhat.com>

ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)

The Lenovo G50-30, like other G50 models, has a Conexant codec that
requires a quirk for its inverted stereo dmic.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1249364
Reported-by: Alexander Ploumistos <alex.ploumistos@gmail.com>
Tested-by: Alexander Ploumistos <alex.ploumistos@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jeremy Cline <jcline@redhat.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>


# f59cf9a0 27-Jul-2018 Park Ju Hyung <qkrwngud825@gmail.com>

ALSA: hda - Sleep for 10ms after entering D3 on Conexant codecs

On rare occasions, we are still noticing that the internal speaker
spitting out spurious noises even after adding the problematic codec
to the list.

Adding a 10ms artificial delay before rebooting fixes the issue entirely.

Patch for Realtek codecs also adds the same amount of delay after
entering D3.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d77a4b4a 27-Jul-2018 Park Ju Hyung <qkrwngud825@gmail.com>

ALSA: hda - Turn CX8200 into D3 as well upon reboot

As an equivalent codec with CX20724,
CX8200 is also subject to the reboot bug.

Late 2017 and 2018 LG Gram and some HP Spectre laptops are known victims
to this issue, causing extremely loud noises upon reboot.

Now that we know that this bug is subject to multiple codecs,
fix the comment as well.

Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9a6249d2 16-Jul-2018 Po-Hsu Lin <po-hsu.lin@canonical.com>

ALSA: hda: add mute led support for HP ProBook 455 G5

Audio mute led does not work on HP ProBook 455 G5,
this can be fixed by using CXT_FIXUP_MUTE_LED_GPIO to support it.

BugLink: https://bugs.launchpad.net/bugs/1781763
Reported-by: James Buren
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 401caff7 27-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Kill snd_hda_codec_update_cache()

snd_hda_codec_update_cache() used to serve for a slightly different
purpose from snd_hdac_write_cache(), but now both of them became
identical.

Let's unify and replace with the latter one consistently.

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


# 51e19ca5 20-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Clean up beep code

Like the previous commit for Realtek codec, the similar cleanup work
can be applied to Conexant codec, too. A slight difference is that
the call of cx_auto_parse_beep() is moved after
snd_hda_gen_parse_auto_config(). It's not strictly needed, but it'd
be good to make the creation of such beep mixers at the end, which
matches with the former situation.

Along with this conversion, cx_auto_build_controls() becomes just
calling snd_hda_gen_build_controls(), so it's simply replaced with
snd_hda_gen_build_controls.

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


# 0bed2aa3 18-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Sanity check of unexpected cap_sync_hook override

There are a couple of places setting cap_sync_hook in the codec
drivers, and they just overwrite the value. Add a sanity check via
WARN_ON() in case if an old non-NULL value is overridden and
forgotten.

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


# 184e302b 18-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Use the mic-mute LED helper

Convert to use the common helper for controlling the mic mute LED for
HP laptops, just as we've done for Realtek codecs. This will give the
mic mute LED enum as gratis.

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


# 7eef32c1 11-Jun-2018 Dennis Wassenberg <dennis.wassenberg@secunet.com>

ALSA: hda: add dock and led support for HP ProBook 640 G4

This patch adds missing initialisation for HP 2013 UltraSlim Dock
Line-In/Out PINs and activates keyboard mute/micmute leds
for HP ProBook 640 G4

Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2861751f 11-Jun-2018 Dennis Wassenberg <dennis.wassenberg@secunet.com>

ALSA: hda: add dock and led support for HP EliteBook 830 G5

This patch adds missing initialisation for HP 2013 UltraSlim Dock
Line-In/Out PINs and activates keyboard mute/micmute leds
for HP EliteBook 830 G5

Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 09b83d10 17-May-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Add hp-mic-fix model string

Add "hp-mic-fix" model string for Conexant codecs so that user can
test the quirk without recompiling.

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


# f16041df 17-May-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Add fixup for HP Z2 G4 workstation

HP Z2 G4 requires the same workaround as other HP machines that have
no mic-pin detection.

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


# a9c2dfc8 23-Apr-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use a macro for snd_array iteration loops

Introduce a new helper macro, snd_array_for_each(), to iterate for
each snd_array element. It slightly improves the readability than
lengthy open codes at each place.

Along with it, add const prefix to some obvious places.

There should be no functional changes by this.

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


# 099fd6ca 08-Mar-2018 Dennis Wassenberg <dennis.wassenberg@secunet.com>

ALSA: hda: add dock and led support for HP ProBook 640 G2

This patch adds missing initialisation for HP 2013 UltraSlim Dock
Line-In/Out PINs and activates keyboard mute/micmute leds
for HP ProBook 640 G2

Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aea80817 08-Mar-2018 Dennis Wassenberg <dennis.wassenberg@secunet.com>

ALSA: hda: add dock and led support for HP EliteBook 820 G3

This patch adds missing initialisation for HP 2013 UltraSlim Dock
Line-In/Out PINs and activates keyboard mute/micmute leds
for HP EliteBook 820 G3

Signed-off-by: Dennis Wassenberg <dennis.wassenberg@secunet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 322f74ed 21-Dec-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add MIC_NO_PRESENCE fixup for 2 HP machines

There is a headset jack on the front panel, when we plug a headset
into it, the headset mic can't trigger unsol events, and
read_pin_sense() can't detect its presence too. So add this fixup
to fix this issue.

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


# bbba6f9d 23-Aug-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)

Lenovo G50-70 (17aa:3978) with Conexant codec chip requires the
similar workaround for the inverted stereo dmic like other Lenovo
models.

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


# ba92b114 25-Jul-2017 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda - Add mute led support for HP ProBook 440 G4

Mic mute led does not work on HP ProBook 440 G4.
We can use CXT_FIXUP_MUTE_LED_GPIO fixup to support it.

BugLink: https://bugs.launchpad.net/bugs/1705586
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org> # v4.12+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3123d6a 05-May-2017 Florin Tudorache <florin_tudorache@live.com>

ALSA: hda - Add mute led support for HP EliteBook 840 G3

Signed-off-by: Florin Tudorache <florin_tudorache@live.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5cd5b1bd 18-Apr-2017 Jerónimo Borque <jeronimo@borque.com.ar>

ALSA: hda - Add HP ZBook 15u G3 Conexant CX20724 GPIO mute leds

The HP ZBook 15u G3 has a Conexant CX20724 with mute led on GPIO1 and
mic mute led on GPIO2.
Adding CXT_FIXUP_MUTE_LED_GPIO inspired on patch_realtek's one.

Signed-off-by: Jerónimo Borque <jeronimo@borque.com.ar>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc3a47a2 09-Mar-2017 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - add support for docking station for HP 840 G3

This tested patch adds missing initialization for Line-In/Out PINs for
the docking station for HP 840 G3.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f73cd43a 06-Dec-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Gate the mic jack on HP Z1 Gen3 AiO

HP Z1 Gen3 AiO with Conexant codec doesn't give an unsolicited event
to the headset mic pin upon the jack plugging, it reports only to the
headphone pin. It results in the missing mic switching. Let's fix up
by simply gating the jack event.

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


# 0eec8809 27-Sep-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add the top speaker pin config for HP Spectre x360

HP Spectre x360 with CX20724 codec has two speaker outputs while the
BIOS sets up only the bottom one (NID 0x17) and disables the top one
(NID 0x1d).

This patch adds a fixup simply defining the proper pincfg for NID 0x1d
so that the top speaker works as is.

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


# 56dc66ff 10-Mar-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply reboot D3 fix for CX20724 codec, too

Just like CX20722, CX7024 codec also requires the power down at reboot
in order to reduce the noise at reboot/shutdown.

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


# b03d61d6 03-Dec-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Enable power_save_node for CX20722

I've tested it on one device and it works fine, no clicks.

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


# bcdda2ec 27-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add Conexant CX8200 (14f1:2008) codec entry

It's supposed to be equivalent with CX20724.

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


# 3b7e2a7d 27-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Correct codec names for 14f1:50f1 and 14f1:50f3

The numbers aren't always linear, just like in the real world.
Correct to the right numbers stated in the datasheet (although we
can't trust the datasheet as well).

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>


# e8d65a8d 13-Oct-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix inverted internal mic on Lenovo G50-80

Add the appropriate quirk to indicate the Lenovo G50-80 has a stereo
mic input where one channel has reverse polarity.

Alsa-info available at:
https://launchpadlibrarian.net/220846272/AlsaInfo.txt

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


# f6b28e4d 21-Aug-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises

On shutdown/reboot of CX20722, first shut down all EAPDs, then
shut down the afg node to D3.

Failure to do so can lead to spurious noises from the internal speaker
directly after reboot (and before the codec is reinitialized again, i e
in BIOS setup or GRUB menus).

BugLink: https://bugs.launchpad.net/bugs/1487345
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@vger.kernel.org>
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>


# 6ffc0898 13-May-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add Conexant codecs CX20721, CX20722, CX20723 and CX20724

This patch adds support for Conexant HD Audio codecs
CX20721, CX20722, CX20723 and CX20724.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1454656
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
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>


# d068ebc2 02-Mar-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move some codes up to hdac_bus struct

A few basic codes for communicating over HD-audio bus are moved to
struct hdac_bus now. It has only command and get_response ops in
addition to the unsolicited event handling.

Note that the codec-side tracing support is disabled temporarily
during this transition due to the code shuffling. It will be
re-enabled later once when all pieces are settled down.

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


# ddb6ca75 11-Mar-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix built-in mic on Compaq Presario CQ60

Compaq Presario CQ60 laptop with CX20561 gives a wrong pin for the
built-in mic NID 0x17 instead of NID 0x1d, and it results in the
non-working mic. This patch just remaps the pin correctly via fixup.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=920604
Cc: <stable@vger.kernel.org>
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>


# 74f14b36 15-Dec-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Make add_stereo_mix_input flag tristate

... for distinguishing whether it's explicitly enabled via a user hint
or enabled by a driver as a fallback. Now the former case corresponds
to HDA_HINT_STEREO_MIX_ENABLE while the latter to
HDA_HINT_STEREO_MIX_AUTO.

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


# 3542aed7 12-Nov-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add mute LED control for Lenovo Ideapad Z560

Lenovo Ideapad Z560 has a mute LED that is controlled via EAPD pin
0x1b on CX20585 codec. (EAPD bit on corresponds to mute LED on.)
The machine doesn't need other EAPD, so the fixup concentrates on
controlling EAPD 0x1b following the vmaster state (but inversely).

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=665315
Reported-by: Szymon Kowalczyk <fazerxlo@o2.pl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 522a7fa8 07-Oct-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add inverted internal mic for Asus Aspire 4830T

Alsa-info at https://launchpadlibrarian.net/186697318/alsa-info.txt.37fYWkaJRc

Reported-by: Tomas Nilsson <tomas.k.nilsson@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8245b363 19-Sep-2014 Huacai Chen <chenhuacai@kernel.org>

ALSA: hda - Add fixup model name lookup for Lemote A1205

Lemote A1004 is already added in commit a2dd933d01f (ALSA: hda - Add
fixup name lookup for CX5051 and 5066 codecs), but Lemote A1205 has
missing.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: <stable@vger.kernel.org> # 3.15+
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>


# 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>


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

ALSA: hda - Fix digital mic on Acer Aspire 3830TG

Acer Aspire 3830TG with CX20588 codec has a digital built-in mic that
has the same problem like many others, the inverted signal in stereo.
Apply the same fixup to this machine, too.

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


# 61074c1a 14-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set TLV_DB_SCALE_MUTE bit for cx5051 vmaster

Conexnat HD-audio driver has a workaround for cx5051 (aka CX20561)
chip to add fake mute controls to each amp (commit 3868137e). This
implies the minimum-as-mute TLV bit in TLV for each corresponding
control. Meanwhile we build the virtual master from these, but the
TLV bit is missing, even though the slaves have it.

This patch simply adds the missing TLV_DB_SCALE_MUTE bit for vmaster,
as already done in patch_sigmatel.c.

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


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

ALSA: hda - Remove the obsoleted static quirk codes from patch_conexant.c

The static quirk code has been disabled for a while and it seems
working fine, so it's time to actually get rid of it.

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


# d604b399 28-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix registration of beep input device

The beep input device is registered via input_register_device(), but
this is called in snd_hda_attach_beep_device() where the sound devices
aren't registered yet. This leads to the binding to non-existing
object, thus results in failure. And, even if the binding worked
(against the PCI object), it's still racy; the input device appears
before the sound objects.

For fixing this, register the input device properly at dev_register
ops of the codec object it's bound with. Also, call
snd_hda_detach_beep_device() at dev_disconnection so that it's
detached at the right timing. As a bonus, since it's called in the
codec's ops, we can get rid of the further call from the other codec
drivers.

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>


# 1f85a0f0 15-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous inclusion of linux/pci.h

Some codec drivers still have it since using PCI_VENDOR_ID_*.

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


# 8a02c0cc 10-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move HDA_FIXUP_ACT_FREE call in snd_hda_gen_free()

Now Realtek and Conexant codec parsers just call snd_hda_gen_free().

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>


# 3760bc74 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Disable static quirks

Now all weird setups have been converted to fixups for the generic
parser, and we can disable the static quirks. This commit just turns
the build off. The bulky static quirk code still remains for a while,
in case we get an overlooked regression. It'll be removed at the next
kernel version.

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


# d50ce6c0 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Enable stereo mix input for CX20549 and CX20551

Both CX20549 and CX20551 codecs have a mixer widget and it can be
connected as the ADC source. Like AD and VIA codecs, enable the
add_stereo_mix_input flag for these codecs.

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


# 70540e24 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Add analog loopback mixing to CX20549

CX20549 has an aamixer widget at NID 0x17. Let's enable it.

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


# ea30e7df 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Apply cap of mix amp volume on CX20551 codec

For the generic parser, use the standard fixup matching.

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


# e5eac90d 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Use generic parser for HP 530

This laptop with CX20549 codec misses the internal mic at NID 0x12.

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


# 6dcbadef 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Use generic parser for Toshiba P105

We need to fix bogus pincfgs on this machine, but it works well else.

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


# ad7725d3 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Apply the amp cap override for CX20549 mixer

Apply the amp cap override for CX20549 mixer widget in case where the
generic parser is used, too.

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


# 3a00c660 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Re-implement OLPC XO workarounds via fixup

OLPC XO needs a few special handling. Now these are implemented as a
fixup to the generic parser.

Obviously, the DC BIAS mode had to be added manually. This is mainly
implemented in the mic_autoswitch hook, where the mic pins are
overwritten depending on the DC bias mode. This also required the
override of the mic boost control, since the mic boost is applied only
when the DC mode is disabled.

In addition, the mic pins must be set dynamically at recording time
because these also control the LED.

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


# a2dd933d 27-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add fixup name lookup for CX5051 and 5066 codecs

Like other codecs, apply a specific fixup given by a model string.

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


# b317b032 08-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Split Thinkpad ACPI-related code

Both patch_realtek.c and patch_conexant.c contain the fairy same code
snippet for supporting Thinkpad ACPI LED controls. Split them into
thinkpad_helper.c and include it from both places. Although this
isn't the best approach from the code size POV, the probability for
coexistence of both Realtek and Conexant codecs on a single machine is
pretty low, thus it'll end up with less memory footprint than
splitting to yet another module.

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


# d171ebc5 20-Dec-2013 Lv Zheng <lv.zheng@intel.com>

ALSA: hda - Fix wrong <acpi/acpi.h> inclusion in Thinkpad ACPI users.

CONFIG_ACPI dependent code should include <linux/acpi.h> instead of
directly including <acpi/acpi.h>. This patch cleans up such wrong
inclusions for Thinkpad ACPI users.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 31660e90 05-Dec-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Remove quirk for Dell Vostro 131

I've tested the old Dell Vostro 131 with the latest generic parser
and it works just fine, and as a bonus we get better jack detection
features in userspace. Therefore this quirk can be removed.

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


# 2fd3f170 26-Nov-2013 Hui Wang <jason77.wang@gmail.com>

ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Conexant codec

Most Thinkpad Edge series laptops use conexant codec, so far although
the codecs have different minor Vendor Id and minor Subsystem Id,
they all belong to the cxt5066 family, this change can make the
mute/mic-mute LEDs support more generic among cxt_5066 family.

This design refers to the similar solution for the realtek codec
ALC269 family in the patch_realtek.c.

Cc: Alex Hung <alex.hung@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Acked-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8f42d769 06-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support for CX20952

It's a superset of the existing CX2075x codecs, so we can reuse the
existing parser code.

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


# 08cf680c 16-Oct-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - add connection to thinkpad_acpi to control mute/micmute LEDs

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


# 4a437044 29-Sep-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix GPIO for Acer Aspire 3830TG

Acer Aspire 3830TG seems requiring GPIO bit 0 as the primary mute
control. When a machine is booted after Windows 8, the GPIO pin is
turned off and it results in the silent output.

This patch adds the manual fixup of GPIO bit 0 for this model.

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


# e4c3bce2 16-Jul-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Headphone mic support for an Asus/Conexant device

This Conexant codec has a single jack that can be used as either
headphone or mic (but not headset). The existing hp_mic functionality
does not apply here, because the mic and the HP are on separate pins.

Hence make a lighter version of what has been earlier done for Realtek
codecs.

BugLink: https://bugs.launchpad.net/bugs/1198030
Tested-by: Franz Hsieh <franz.hsieh@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88d57606 20-Jun-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Make Thinkpad X220-tablet use generic parser

Like the X220, this quirk was added to support docking station,
so enable the fixup instead.

According to Jan, the generic parser works equal or better
than the current parser. This was tested under a 3.9 kernel.

Reported-by: Jan Alexander Steffens <jan.steffens@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ff359b14 04-May-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs

The older Conexant codecs have up to two EAPDs and these are supposed
to be rather statically turned on. The new generic parser code
assumes the dynamic on/off per path usage, thus it resulted in the
silent output on some machines.

This patch fixes the problem by simply assuming the static EAPD on for
such old Conexant codecs as we did until 3.8 kernel.

Reported-and-tested-by: Christopher K. <c.krooss@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a555bb8c 29-Apr-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Move Thinkpad X220 to use auto parser

This enables better volume controls than the current model parser.
Also, because the original quirk for X220 was added to fix
docking station support, add the TP410 fixup instead.

Reported-by: Willian Jon McCann <william.jon.mccann@gmail.com>
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>


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

ALSA: hda/cirrus - Fix the digital beep registration

The argument passed to snd_hda_attach_beep_device() is a widget NID
while spec->beep_amp holds the composed value for amp controls.

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


# 31b6945a 17-Mar-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing beep detach in patch_conexant.c

This leaks the beep input device after module unload, which leads to
Oops.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55321
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>


# 8be69efa 14-Feb-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Remove speaker clicks on CX20549

This chip needs the speaker pin to go to D3 to avoid clicks,
so default_power_filter does not work here.

This was found on Thinkpad R61i/T61i but I guess it applies to
the entire chip. If not, quirks should be set for at least
PCI SSID 17aa:20ac.

Thanks to c4pp4 for testing.

BugLink: https://bugs.launchpad.net/bugs/886975
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
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>


# 42c364ac 21-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add Conexant CX20755/20756/20757 codec IDs

These are just compatible with other CX2075x codecs.

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


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

ALSA: hda/conexant - Set mixer NID 0x19 for CX20551 codec

Conexant CX20551 codec has a mixer in NID 0x19 and a few outputs have
to take the input through this widget.

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


# bf92d1d5 20-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rearrange for dropping static quirk codes in Coexant driver

Just shuffle the codes and add ifdefs for testing to drop the static
quirk codes from patch_conexant.c.

By commenting out ENABLE_CXT_STATIC_QUIRKS define at the beginning of
the file, you can disable the whole static codes.

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


# aed523f1 20-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use generic parser in Conexant codec driver

... and drop most of own parser code.

It doesn't replace any present static quirks, though.

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


# c9ce6b26 18-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move fixup code into struct hda_codec

Since the fixup code is used commonly, it's worth to move it to the
common place, struct hda_codec, instead of keeping in hda_gen_spec.

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


# 7ed4165e 19-Dec-2012 David Henningsson <david.henningsson@canonical.com>

Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"

This reverts commit 697c373e34613609cb5450f98b91fefb6e910588.

The original patch was meant to remove clicking, but in fact caused even
more clicking instead.

Thanks to c4pp4 for doing most of the work with this bug.

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


# 63a077e2 11-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522

Acer Aspire One 522 has the infamous digital mic unit that needs the
phase inversion fixup for stereo.

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

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


# dda415d4 30-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a helper function for simple enum kcontrols

The same type of code is being used in multiple places in various
codec drivers, so put it as a core library.

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>


# 239fb862 05-Oct-2012 Huacai Chen <chenhuacai@kernel.org>

ALSA: HDA: Make hda sound card usable for Loongson

Lemote A1004(Laptop) and A1205(All-In-One) use Conexant's hda codec,
this patch modify patch_conexant.c to add Lemote specific code.

Both A1004 and A1205 use the same pin configurations, but A1004 need
to increase the default boost of internal mic.

Signed-off-by: Jie Chen <chenj@lemote.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Signed-off-by: Hua Yan <yanh@lemote.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 74d3e697 02-Oct-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - fix indices on boost volume on Conexant

After the recent patch "ALSA: hda - use both input paths on Conexant
auto parser" suddenly we can have more than one "Mic Boost", this
happened on Acer Aspire One 722. Therefore we must add the possibility
to put an index on this "Mic Boost" just as we do for the other
"Mic Boost" earlier in the same function.

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


# e4db0952 25-Sep-2012 Felix Kaechele <felix@fetzig.org>

ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310

The Lenovo IdeaPad U310 has an internal mic where the right channel
is phase inverted.

Signed-off-by: Felix Kaechele <felix@fetzig.org>
Cc: <stable@vger.kernel.org>
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>


# 739572a5 20-Sep-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - use both input paths on Conexant auto parser

On the Thinkpad W520 - and probably several other machines with
Conexant 506x chips - the Dock Mic and Mic are connected to the
same two selector nodes. This patch will make Dock Mic take one
selector node and Mic take the other, when possible.

Without the patch, both paths would take the first selector,
leading to the normal Mic's volume being controlled by
"Dock Mic Boost".
(On other machines, this could instead fixup similar problems between
Mic and Line In, for example.)

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


# c40bd914 18-Sep-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - avoid non-standard "Docking" name in mixers

The standard name (and what PulseAudio picks up) is "Dock Mic",
not "Docking Mic" or "Docking-Station".

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


# 83012a7c 24-Aug-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up CONFIG_SND_HDA_POWER_SAVE

CONFIG_SND_HDA_POWER_SAVE is no longer an experimental feature and its
behavior can be well controlled via the default value and module
parameter. Let's just replace it with the standard CONFIG_PM.

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>


# bb10b09a 07-Aug-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - remove redundant auto quirks for conexant 506x

Now that the auto model is the default, these quirks are redundant
and can be removed.

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


# e9fc83cb 07-Aug-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - remove quirk for Dell Vostro 1015

This computer is confirmed working with model=auto on kernel 3.2.
Also, parsing fails with hda-emu with the current model.

Cc: stable@kernel.org (3.2+)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
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>


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

ALSA: hda - Fix memory leaks in Realtek & Conexant codec parsers

When moved to the helper code, forgot to release the verb arrays.

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


# b3c5dce8 21-Jun-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add inverted internal mic quirk for Lenovo S205

The Lenovo Ideapad S205 has an internal mic where the right channel
is phase inverted.

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


# 2e8b2b29 13-Jun-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't forget to call init verbs added by fixup list

During the split to the auto-parser helper functions, the actual call
of init verbs was lost.

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

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


# 2d825fd8 11-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Correct vendor IDs for new codecs

Never trust datasheet...

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


# 61d648fb 10-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add Conexant CX20751/2/3/4 codec support

These are almost compatible with the older Conexant codecs.

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


# 23d30f28 07-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move up the fixup helper functions to the library module

Move the fixup helper functions in patch_realtek.c to hda_auto_parser.c
so that they can be used in other codec drivers like patch_conexant.c.

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>


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

ALSA: hda/conexant - Set up the missing docking-station pins

ThinkPad 410,420,510,520 and X201 with cx50585 & co chips have the
docking-station ports, but BIOS doesn't initialize for these pins.
Thus, like the former X200, we need to set up the pins manually in the
driver.

The odd part is that the same PCI SSID is used for X200 and T400, thus
we need to prepare individual fixup tables for cx5051 and others.

Bugzilla entries:
https://bugzilla.redhat.com/show_bug.cgi?id=808559
https://bugzilla.redhat.com/show_bug.cgi?id=806217
https://bugzilla.redhat.com/show_bug.cgi?id=810697

Reported-by: Josh Boyer <jwboyer@redhat.com>
Reported-by: Jens Taprogge <jens.taprogge@taprogge.org>
Tested-by: Jens Taprogge <jens.taprogge@taprogge.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/conexant - Don't set HP pin-control bit unconditionally

Some output pins on Conexant chips have no HP control bit, but the
auto-parser initializes these pins unconditionally with PIN_HP.

Check the pin-capability and avoid the HP bit if not supported.

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


# 83b0c6ba 10-Apr-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix oops caused by recent commit "Fix internal mic for Lenovo Ideapad U300s"

Make sure we don't dereference the "quirk" pointer when it is null.

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


# 250f3274 06-Apr-2012 Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>

ALSA: hda - clean up CX20549 test mixer setup

name pins consistently (MIC1/LINE1/HP-OUT/CD) on all controls
affecting those pins.

remove duplicate SET_AMP_GAIN_MUTE to 0x17/index 0 and 0x17/index 1

really select MIC1, not Mixer out for recording

"Mixer out" for recording is not a "pin", adjust comment

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 51969d62 06-Apr-2012 Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>

ALSA: hda - CX20549 doesn't need pin_amp_workaround.

CX20549 (ctx5045) doesn't accept data on index 1 for output pins,
as shown in the following hda-var transaction:

$ hda-verb /dev/snd/hwC0D0 0x10 set_amp_gain 0xb126
nid = 0x10, verb = 0x300, param = 0xb126
value = 0x0
$ hda-verb /dev/snd/hwC0D0 0x10 get_amp_gain 0x8001
nid = 0x10, verb = 0xb00, param = 0x8001
value = 0x0

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6e03dae 06-Apr-2012 Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>

ALSA: hda - Remove CD control from model=benq for CX20549

The ID used for detection of the BenQ R55E actually identifies the
Quanta TW3 ODM design, which is also used for the Gigabyte W551 laptop
series. Schematics on the internet clearly indicate that the "Port C"
(analog input connected to record source #4 and mixer input #4) is
unconnected.

Playing an audio CD through analog playback (using cdplay from cdtools)
produces no sound, even with the mixer input labelled "CD" enabled, and
the volume control in the CD drive set to maximum. This indicates the
connection is really not present.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cbf2d28e 06-Apr-2012 Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>

ALSA: hda - fix record volume controls of CX20459 ("Venice")

The "input converter" widget of the CX20459 has only one input amplifier,
expose that one as "Capture Volume/Capture Switch". The actual record
source selection is already exposed through the separately installed
input mux.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3edbbb9e 06-Apr-2012 Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>

ALSA: hda - Rename capture sources of CX20549 to match common conventions

This includes renaming "Line In" to line, also in the mixer settings.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4f32456e 06-Apr-2012 Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>

ALSA: hda - Fix proc output for ADC amp values of CX20549

The CX20549 has only one single input amp on it's input converter
widget. Fix printing of values in the codec file in /proc/asound.

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 18dcd304 02-Apr-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix internal mic for Lenovo Ideapad U300s

The internal mic input is phase inverted on one channel.
To avoid people in userspace summing the channels together
and get zero result, use a separate mixer control for the
inverted channel.

BugLink: https://bugs.launchpad.net/bugs/903853
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
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>


# 527c73ba 11-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add EAPD control to Conexnat auto-parser

Added the vmaster hook for controlling EAPD dynamically to Conexant
auto-parser. When the Master is muted, EAPDs are turned off as well.
This will fix the missing mute-LED control on some machines in
addition to the more power-saving in the auto-parser mode.

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


# e49a3434 01-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Kill hyphenated names

Kill hyphens from "Line-Out" name strings, as suggested by Mark Brown.

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


# 07cafff2 19-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Clear unsol events on unused pins

It seems that Lenovo machines (or codec chip itself?) leave the unsol
event tags and the enablement-flag from other pins bogusly even on the
unused pins. Although this shouldn't be too critical, it's better to
clear them up sanely.

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


# 3868137e 27-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fake mute feature

Some codecs don't supply the mute amp-capabilities although the lowest
volume gives the mute. It'd be handy if the parser provides the mute
mixers in such a case.

This patch adds an extension amp-cap bit (which is used only in the
driver) to represent the min volume = mute state. Also modified the
amp cache code to support the fake mute feature when this bit is set
but the real mute bit is unset.

In addition, conexant cx5051 parser uses this new feature to implement
the missing mute controls.

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

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


# 3e93f5ef 28-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable docking-station SPDIF for Thinkpad

The docking-station of Thinkpad X200 & co supports also an SPDIF output,
and the corresponding pin 0x1c has to be enabled for using it.

Reported-and-tested-by: Sebastian Glita <sebastian.glita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a80581d0 11-Feb-2012 Justin P. Mattock <justinmattock@gmail.com>

Typos: change aditional to additional.

The below patch fixes some typos "aditional" to "additional", and also fixes
a comment with another word mispelled.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 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>


# 356268bd 03-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove fallback to model=ideapad for Lenovo with cx5066

The Lenovo laptops with cx5066 chips seem to work better with
model=auto. Let's get rid of the fallback to the wrong model.

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

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


# 4f2864a4 25-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable sync_write and reset for Conexant codecs

This is an attempt to fix S3-resume problems reported for a few
laptops with different Conexant codecs. They show the communication
stalls at some time in S3, and the driver falls back into the
single-cmd mode. This leads to the silent output or the lack of
auto-mute feature.

As a workaround, here enables the sync_write and the bus-reset flags
to make the communication more stable.

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

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


# 29c5fbbc 23-Jan-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Use model=auto for Thinkpad T510

The user reports that model=auto works fine for him. Using
model=auto bring in new features such as jack detection notification
to userspace.

Alsa info is available at http://paste.ubuntu.com/805351/

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


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

ALSA: hda - Use auto-parser for HP laptops with cx20459 codec

These laptops can work well with the auto-parser and their BIOS setups,
and in addition, the auto-parser fixes the problem with S3/S4 where
the unsol event handling is killed after resume due to fallback to the
single-cmd mode.

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

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>


# 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>


# 8d1c963a 08-Nov-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Remove quirk for Toshiba T110

According to the bug reporter, model=auto is needed to make the
internal microphone work.

BugLink: https://bugs.launchpad.net/bugs/819699
Reported-by: Andrej (agno01)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 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>


# 6b452142 14-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ADC input-amp handling for Cx20549 codec

It seems that Conexant CX20549 chip handle only a single input-amp even
though the audio-input widget has multiple sources. This has been never
clear, and I implemented in the current way based on the debug information
I got at the early time -- the device reacts individual input-amp values
for different sources. This is true for another Conexant codec, but it's
not applied to CX20549 actually.

This patch changes the auto-parser code to handle a single input-amp
per audio-in widget for CX20549. After applying this, you'll see only a
single "Capture" volume control instead of separate "Mic" or "Line"
captures when the device is set up to use a single ADC.

We haven't tested 20551 and 20561 codecs yet. If these show the similar
behavior like 20549, they need to set spec->single_adc_amp=1, too.

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


# 254f2968 14-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Keep EAPD turned on for old Conexant chips

In the old Conexant chips (5045, 5047, 5051 and 5066), a single EAPD
may handle both headphone and speaker outputs while it's assigned only
to one of them. Turning off dynamically leads to the unexpected silent
output in such a configuration with the auto-mute function.

Since it's difficult to know how the EAPD is handled in the actual h/w
implementation, better to keep EAPD on while running for such codecs.

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


# ca201c09 18-Oct-2011 Daniel Suchy <danny@danysek.cz>

ALSA: HDA: conexant support for Lenovo T520/W520

This is patch for Conexant codec of Intel HDA driver, adding new quirk
for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for
T520 (similar subsystem ID is used also in W520 model) and detects more
mixer features compared to generic (fallback) Lenovo quirk with
hardcoded options in Conexant codec.

Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any
problems.

Signed-off-by: Daniel Suchy <danny@danysek.cz>
Cc: <stable@kernel.org> [3.0+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 468c5458 25-Aug-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: hda: Conexant: Allow different output types to share DAC

Headphones has stopped working for the original reported (a regression
compared to 2.6.38). This is because Speaker and Headphones share the
same DAC, in which case no Headphones volume control was created.
This patch fixes so that both Speaker and Headphones volume
controls are created in such scenario.

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


# e92d4b08 24-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rewrite Lenovo X200 quirk with pincfg-fix using auto-parser

Introduce the pincfg table to patch_conexant.c for fixing up the extra
pin-configuration for auto-parser. As an example, Lenovo X200 model is
replaced with this new mechanism. (This also fixes the wrong mixer
elements for docking-station I/O in the previous model quirk
automagically.)

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


# 76755359 24-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/conexant - Enable ADC-switching for auto-mic mode, too

The ADC-switching can work also in the auto-mic mode, too.

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


# 1f015f5f 23-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix double-headphone/speaker paths for Cxt auto-parser

When multiple headphones or speakers are assigned but no individual
DACs are available, the driver should take the first HP/SPK DAC instead
of another primary output. The patch adds a bit-flag to dac field of
struct pin_dac_pair indicating that it's a slave DAC.

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


# 4d7fbdbc 26-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Allow codec-specific set_power_state ops

The procedure for codec D-state change may have exceptional cases
depending on the codec chip, such as a longer delay or suppressing D3.

This patch adds a new codec ops, set_power_state() to override the system
default function. For ease of porting, snd_hda_codec_set_power_to_all()
helper function is extracted from the default set_power_state() function.

As an example, the Conexant codec-specific delay is removed from the
default routine but moved to patch_conexant.c.

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


# 19110595 11-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Turn on extra EAPDs on Conexant codecs

Some machines seem to use EAPD control of the unused pin for controlling
the overall EAPD. Since the driver currently doesn't check the EAPD of
unused pins, the EAPD isn't enabled. For avoiding such a problem, turn
all extra EAPDs on as default.

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


# c82693db 28-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable auto-parser as default for Conexant codecs

Let's use auto-parser as default now.

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>


# 9966db22 21-Jun-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add model=auto quirk for Acer Aspire 3830TG

Since we're not using the new auto parser as a fallback yet,
add it manually as a quirk.

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


# f0ca89b0 21-Jun-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add a new Conexant codec ID (506c)

Conexant ID 506c was found on Acer Aspire 3830TG. As users report
no playback, sending to stable should be safe.

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


# 7ab1fc0a 10-Jun-2011 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop

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

The original reporter needs the model=auto quirk for his internal
speakers to be audible in the latest daily snapshot, so add an entry in
the quirk table for his PCI SSID.

A trivially different version of this patch using the model=asus quirk
should be applied to the 2.6.38 and 2.6.39 stable kernels. We don't use
the asus quirk in 3.0-rc2, because 3.0-rc2's autoparser is much
improved.

Reported-and-tested-by: tomdeering7
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
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>


# af4ccf4f 24-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use model=auto for Lenovo G555

The new auto-parser fixes problems on Lenovo G555.

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


# e2df82ff 24-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix speaker auto-mute in Cxt auto-parser

Fix some logic failures in auto-mute handling in Conexant auto-parser.
Also, modify codes to be a bit more understandable.

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


# 313d2c06 23-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initial capture-source with auto-mic for Cxt auto-parser

Fix the initialization of capture-source route when auto-mic is enabled
for Conexant auto-parser.

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


# 506a4196 23-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix auto-mic detection in Conexant codec-parser

Fix the auto-mic detection for Cxt auto-parser due to off-by-one
missing initialization.

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


# d2859fd4 23-May-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add quirk for Lenovo U350

Add model=asus quirk for Lenovo Ideapad U350 to make internal mic
work correctly.

Cc: stable@kernel.org (2.6.38+)
BugLink: http://bugs.launchpad.net/bugs/751681
Reported-by: Kent Baxley <kent.baxley@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Handle dock line-in as auto-detecable for Cxt auto-parser

Similar process like in patch_realtek.c and patch_sigmatel.c.

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


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

ALSA: hda - Add support of dock-mic detection to Conexant auto-parser

In addition to the normal external mic jack, check also the mic jack
on a docking-station as well, and select the input source appropriately.

The similar functionality was already implemented in patch_sigmatel.c.

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


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

ALSA: hda - Add automute-mode enum to Conexant auto-parser

Implement the same functionality as Realtek's auto-mute mode control.
Now Conexant auto-parser can also mutes line-out and provide the enum
control for different automute behavior.

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


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

ALSA: hda - Add missing Front/Surround/CLFE as slaves for Cxt auto-parser

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


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

ALSA: hda - Code refactoring in patch_conexant.c

Use a struct instead of each array for managing input-source info
for auto-parser.

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


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

ALSA: hda - Add support of auto-parser to cxt5066 codecs

Still experimental.
Not enabled as default unless model=auto is passed.

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


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

ALSA: hda - Don't create multiple same volume/boost controls in Cxt auto-parser

Check the routing more exactly for avoiding the duplicated controls for
the very same effect for multiple capture routes in Conexant auto-parser.

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


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

ALSA: hda - Build boost controls from selector widget in Cxt auto-parser

When the intermediate selector widget in the capture path provides the
boost volume, create the corresponding volume control.

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


# 9b842cd8 14-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't use auto-parser for cxt5045 / 5051 as default

Just for safety reason (for avoiding any possible regressions), don't
enable auto-parser as default for cxt5045 and 5051, as well as 5047.

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


# 1387cde5 14-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable codec->pin_amp_workaround always for Conexant auto-parser

It can (must for some) be used for all Conexnat codecs safely.

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


# 22ce5f74 14-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Search ADC NIDs dynamically in Conexant auto-parser

Instead of giving fixed arrays, look for ADC nids dynamically in the
tree in Conexant auto-parser code.

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


# fa5dadcb 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support of auto-parser to cxt5047 / CX20551 Waikiki

Similarly like other Conexant codecs, now model=auto is supported for
cxt5047.

But the auto-parser mode isn't activated as default yet, since BIOS
pin-configs seem often broken on machines with this codec. User need
to pass model=auto explicitly.

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


# 5c9887e0 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Parse more deep input-source routes in Conexant auto-parser

Handle not only a single-depth input-route but two-level depth routes
(PIN->MUX->ADC), too.

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


# f6100bb4 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up input-mux handling in Conexant auto-parser

Keep the registered input-pins in imux_pins[], and fix the inconsistent
use of sepc->auto_mic_ext.

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


# 1f8458a2 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add auto-parser support to cxt5045 / CX20549 Venice

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


# 6764bcef 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add auto-parser support to cxt5051 / CX20561 Hermosa

Extend the existing auto-parser for CX2064x for cxt5051 codec.
Now the auto-parser supports ADC-switching for this codec.

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


# 0ad1b5b6 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check AMP CAP at initialization of Conexant auto-parser

Some codecs have no mute caps in audio I/O widgets.

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


# da339866 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Turn on EAPD dynamically per jack plug in Conexant auto mode

Instead of keeping always EAPD on, turn on/off appropriately at jack
plugging in Conexant auto-parser mode.

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


# 2557f742 13-May-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix auto-mic for CX2064x codecs

The wrong id is assigned for external/internal mics in the auto-mic
selection parser.

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


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

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

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


# b2cb1292 04-Apr-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix dock mic for Lenovo X220-tablet

Without the "thinkpad" quirk, the dock mic in
Lenovo X220 tablet edition won't work.

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


# 84012657 31-Mar-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add dock mic quirk for Lenovo Thinkpad X220

This quirk is needed for the docking station mic of
Lenovo Thinkpad X220 to function correctly.

BugLink: http://bugs.launchpad.net/bugs/746259
Cc: stable@kernel.org
Tested-by: James Ferguson <james.ferguson@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
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>


# ebbd224c 23-Feb-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add ideapad quirk for two Dell machines

These two Dell machines have been reported working well with
the ideapad model.

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


# 6da8b516 07-Feb-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add a new Conexant codec 506e (20590)

Conexant 506e/20590 has the same graph as the rest of the 5066 family.

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

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


# 89724958 16-Feb-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Do not announce false surround in Conexant auto

Without this patch, one line-out and one speaker and
Conexant's auto parser would announce (non-working) surround
capabilities.

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


# 983345e5 15-Feb-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Conexant auto: Handle multiple connections to ADC node

Conexant 20641 has several inputs to its ADC node, with one selector
and individual amps for all inputs. This patch adds support in the
Conexant auto parser to handle that case.

It also means that the pin node's volume is being renamed to "Boost"
to avoid name clash with the new volume controls on the ADC node.

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


# 70f7db11 02-Feb-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix memory leaks in conexant jack arrays

The Conexant codec driver adds the jack arrays in init callback which
may be called also in each PM resume. This results in the addition of
new jack element at each time.

The fix is to check whether the requested jack is already present in
the array.

Reference: Novell bug 668929
https://bugzilla.novell.com/show_bug.cgi?id=668929

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


# 19593875 27-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix microphone(s) on Lenovo Edge 13

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

This Edge 13 model has an internal mic at 0x1a and should
therefore use the asus quirk.

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


# f6a2491c 24-Jan-2011 Andy Robinson <ajr55555@gmail.com>

ALSA: HDA: cxt5066 - Use asus model for Asus U50F, select correct SPDIF output

Changed the Asus A52J quirk to use the asus model instead of the
hp_laptop model, which fixes the external mic input. Added an Asus
U50F quirk to use the asus model. For the cxt5066 codecs, added
checking of the digital output pins to determine which digital output
nodes to use instead of always using node 0x21, since some systems
have node 0x12 connected to a SPDIF out jack.

[A slight modification for better readability by tiwai]

Signed-off-by: Andy Robinson <ajr55555@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a1d6906e 21-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add a new model "asus" for Conexant 5066/205xx

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

This new model, named "asus", is identical to the "hp_laptop" model,
except for the location of the internal mic, which is at pin 0x1a.
It is used for Asus K52JU and Lenovo G560.

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


# 02b6b5b6 21-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Refactor some redundant code for Conexant 5066/205xx

Four very similar procedures - one for each model - now
refactored into one. This isn't all duplicated code, but a step
in the right direction.

Signed-off-by: David Henningsson <david.henningsson@canonical.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>


# ca6cd851 08-Jan-2011 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use vostro model quirk for Dell Vostro 1014

BugLink: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5184

A user reported on the alsa-devel mailing list that he needs to use
the vostro model quirk to have audible playback, so apply it for his
PCI SSID.

Reported-and-tested-by: Fernando Lemos <fernandotcl@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 22f21d51 06-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add Lenovo vendor quirk for Conexant 205xx

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

Many new Lenovos need the ideapad quirk. Also, since the
auto parser for this chip is far from optimal, the regression
risk is low (although not zero).

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


# 5f99f86a 04-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Rename "Mic Boost" to "Mic Boost Volume"

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

If the "Volume" suffix is not given, alsa-lib gets confused and
loses the dB information at the simple element level.

Boosts generally affects both playback and capture, as they are
applied early in the chain. Hence no "Playback" or "Capture" in
the suffix.

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


# 8607f7c4 20-Dec-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Rename "Ext Mic" and "External Mic" to "Mic"

Usually external microphones are just labelled "Mic", so rename
"Ext Mic" and "External Mic" to "Mic" to clear up the namespace.

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


# 28c4edb7 20-Dec-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Rename "Int Mic" to "Internal Mic"

"Int Mic" and "Internal Mic" both mean the same thing, so rename
the former to the latter in order to clean up the namespace a little.

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


# fbb5bb56 12-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Mute speakers when line-out jack is plugged with Conexant auto mode

Mute speakers when a line-out jack is plugged as well as headphone jacks
with the new Conexant codec parser in the auto mode.

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


# 8a96b1e0 08-Dec-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Quirk for Dell Vostro 320 to make microphone work

BugLink: http://launchpad.net/497546

Confirmed that the ideapad model works better than the current
quirk for Dell Vostro 320.

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


# ef61d4e6 03-Dec-2010 Manoj Iyer <manoj.iyer@canonical.com>

ALSA: hda - Enable jack sense for Thinkpad Edge 13

Added a quirk to cxt5066_cfg_tbl to enable jack sense for ThinkPad Edge 13.

Reference: http://launchpad.net/bugs/685015

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a3de8ab8 02-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up cxt5066 port-D handling & co

Instead of hard-coded magic numbers, properly define and use macros
for improve the readability. Also, dell_automute is handled samely
as thinkpad, since it also sets port_d_mode, too.

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


# 3a253445 02-Dec-2010 John Baboval <john.baboval@virtualcomputer.com>

ALSA: hda - Fix ThinkPad T410[s] docking station line-out

On the docking station for the Lenovo T410 and T410s, the line-out
doesn't work. The trouble seems to be that it generates a plug event,
but then doesn't report that the jack is connected. So automute mutes
the jack when you plug something into it. The following patch (next
message) fixes it.

Signed-off-by: John Baboval <john.baboval at virtualcomputer.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6027277e 22-Nov-2010 Manoj Iyer <manoj.iyer@canonical.com>

ALSA: hda - Enable jack sense for Thinkpad Edge 11

Add a quirk entry for Thinkpad Edge 11 as well as other TP Edge models.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 673f7a89 21-Nov-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J

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

The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers. Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality. Testing was done
with an alsa-driver build from 2010-11-21.

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


# a1d71a2c 21-Nov-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J

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

The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers. Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality. Testing was done
with an alsa-driver build from 2010-11-21.

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


# 00cd0bb7 21-Oct-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply ideapad quirk to Acer laptops with Cxt5066

Multiple Acer laptops with the SSID 1025:04xx require the quirk
mode=ideapad, so let's use mask to apply to all these.

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


# c123e5e4 27-Sep-2010 Luke Yelavich <luke.yelavich@canonical.com>

ALSA: hda - Add quirk for another Acer laptop with a CX20585 codec

BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/647374

Set another Acer laptop (SSID 1025:043d) to use CXT5066_IDEAPAD

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


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

ALSA: hda - Check the external mic pin more strictly for Conexant chips

The external mic jack for auto-mic switch must be really an external
jack and with a presense-detection capability. This patch makes the
check more paranoia.

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>


# 5637edb2 17-Sep-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Sort CXT5066 quirk table

It was just a boring day.

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


# 1feba3b7 17-Sep-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix spelling (change VOSTO to VOSTRO)

It was just a boring day.

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


# 3b119f66 15-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Acer laptop with CX20585 codec

Its pin configuration is compatible with ideapad.

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


# f2e5731d 15-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Preliminary support for new Conexant audio codecs

This patch adds the preliminary support for new Conexant audio codecs with
14f1:5097, 14f1:5098, 14f1:50a1, 14f1:50a2, 14f1:50ab, 14f1:50ac,
14f1:50b8 and 14f1:50b9.

Unlike other Conexant parsers, this is designed to be mostly automatic,
parsing from BIOS pin configurations.

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


# 2ca9cac9 10-Sep-2010 Anisse Astier <anisse@astier.eu>

ALSA: hda - Add quirk for Toshiba C650D using a Conexant CX20585

Add a quirk for laptop Toshiba Satellite C650D to have proper external HP and
external Mic support.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d155641 07-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Lenovo T400s

Lenovo T400s requires the quirk to make automatic HP/mic switching working.

Reported-by: Frank Becker <fb@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 048e78a5 02-Sep-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add a new hp-laptop model for Conexant 5066, tested on HP G60

This new model adds the following functionality to HP G60:
- Automute of internal speakers
- Autoswitch of internal/external mics
- Remove SPDIF not physically present

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


# 6f0ef6ea 23-Aug-2010 Jerone Young <jerone.young@canonical.com>

ALSA: hda - Add support for Lenovo S10-3t

This patch adds quirk for the Lenovo S10-3t so the headphone &
microphone jacks will now work.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3e68fad 16-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Dell Vostro 1220

model=dell-vostro is needed for Dell Vostro 1220 with Coexnat 5067.

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

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


# f0cea797 13-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix dynamic ADC change working again

The commit eb541337b7a43822fce7d0c9d967ee149b2d9a96
ALSA: hda - Make converter setups sticky
changes the semantics of snd_hda_codec_cleanup_stream() not to clean up
the stream at that moment but delay the action. This broke the codes
expecting that the clean-up is done immediately, such as dynamic ADC
changes in some codec drivers.

This patch fixes the issue by introducing a lower helper,
__snd_hda_codec_cleanup_stream(), to allow the immediate clean up.
The original snd_hda_codec_cleanup_stream() is kept as is now.

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


# 850eab9d 09-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - add support for Conexant CX20584

The Conexant CX20584 with 141f:5068 seems compatible with other
cxt5066 code. Just add the missing id.

Tested-by: Cristopher Camacho Leandro <ccamacho@linuxmail.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 607bc3e4 03-Aug-2010 Jerone Young <jerone.young@canonical.com>

ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF

The Lenovo X301 does not have the ability to connect to a docking
station to use the SPDIF port. It also does not have the ability to do
SPDIF though the headphone jack or Display Port jacks.

This patch fixes it so this is not exposed for the X301 and users do
think it has the ability to do SPDIF.

I tested both headphone & display port jacks and it is not there. I have
tested this patch and it works great.

Also to add the other Thinkpads have different subsystem codec IDs.
Here are examples:

X301:
http://launchpadlibrarian.net/31561902/Card0.Codecs.codec.0.txt

X200:
http://launchpadlibrarian.net/49055036/Card0.Codecs.codec.0.txt

W500:
http://launchpadlibrarian.net/36276057/Card0.Codecs.codec.0.txt

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 697c373e 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs

Call snd_hda_shutup_pins() for power-saving and reboot-notifier in
patch_conexant.c as well as other codecs. This will reduce the pop
noise in power-save mode.

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

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


# ab85457f 19-Jul-2010 Jerone Young <jerone.young@canonical.com>

ALSA: hda - Add conexant quirk for AMD based Lenovo G series machines

This is a follow on patch adds support for AMD based Lenovo G series
machines, such as the Lenovo G555.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3507e2a8 08-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add beep mixer support to Conexant codecs

Added the beep mixer controls to Conexant codecs.
They simply control the digital beep generator widget.

For cx5047, I couldn't find any beep generator, so it's not implemented
there.

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


# f7154de2 17-Jun-2010 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - add ideapad model for Conexant 5051 codec

Lenovo IdeaPad Y430 has an additional subwoofer connected at pin 0x1b,
which isn't muted when headphone is plugged in. This adds additional
support to the extra subwoofer via new ideapad model.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# badf18b5 28-May-2010 Andreas Herrmann <andreas.herrmann3@amd.com>

ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec

On a Thinkpad Edge 13 "01972NG" I had the problem that speakers played
sound although headphones were plugged in. Using model=ideapad with
latest alsa-git kernel fixed this. So adding this quirk to use ideapad
for another Thinkpad Edge variant seems sensible.

Cc: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a39e33eb 26-May-2010 Jerone Young <jerone.young@canonical.com>

ALSA: hda - Add support for Thinkpad Edge conexant chip

This quirks in support for the Thinkpad Edge.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0ebf9e36 10-May-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix 0 dB for Lenovo models using Conexant CX20549 (Venice)

Reference: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-May/027525.html

As reported on the mailing list, we also need to cap to the 0 dB offset
for Lenovo models, else the sound will be distorted.

Reported-and-Tested-by: Tim Starling <tstarling@wikimedia.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1965c441 06-May-2010 Pierre-Louis Bossart <pierre-louis.bossart@intel.com>

ALSA: hda: enable SPDIF output for Conexant 5051/Lenovo docking stations

This patch enables the SPDIF output pin by default. It also enables
it for quirks related to Levono docking stations (x200 and 25041,
identified with the same 17aa:20f2 ID). Even though not all Lenovo
docking stations have SPDIF connectors, enabling the pin by default
shouldn't be a problem for anyone.
Other quirks remain unmodified.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0217f149 09-May-2010 Andrej Gelenberg <andrej.gelenberg@udo.edu>

ALSA: hda - add support for Lenovo ThinkPad X100e in conexant codec

Ideapad quirks working for my ThinkPad X100e (microphone is not tested).

Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8f0f5ff6 28-Apr-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice)

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

The OR's hardware distorts at PCM 100% because it does not correspond to
0 dB. Fix this in patch_cxt5045() for all Packard Bell models.

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


# 231f50bc 28-Apr-2010 Anisse Astier <anisse@astier.eu>

ALSA: hda - Add quirk for Dell Inspiron 19T using a Conexant CX20582

Add a quirk for all-in-one computer Dell Inspiron One 19 Touch to have proper
HP and Mic support.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c5366681 04-May-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite P500-PSPGSC-01800T

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

The OR verified that using the olpc-xo-1_5 model quirk allows the
headphones to be audible when inserted into the jack. Capture was
also verified to work correctly.

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


# 4442dd46 03-May-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite Pro T130-15F

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

The OR verified that using the olpc-xo-1_5 model quirk allows the
headphones to be audible when inserted into the jack. Capture was
also verified to work correctly.

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


# 7b2bfdbc 14-Apr-2010 Jens Taprogge <jens.taprogge@taprogge.org>

ALSA: hda - Add initial support for Thinkpad T410s HDA codec

attached please find a patch that adds support for at least the T410s
HDA codec. Most likely it will also add support for the T410 and T510
based models.

The patch was derived from Ideapad support. Support for the laptop's and
docking-station output connectors as well as the docking-station microphone
connector and the laptops internal devices has been tested. Since it has been
developed without a data-sheet available, support for digital outputs and the
laptop's microphone input may well be incorrect.

Microphone mute functionality is not included:
The microphone mute button seems to be reported through thinkpad_acpi key
0000101b. The mute button LED seems to be wired to thinkpad_acpi led
number 15.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 025f206c 21-Mar-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)

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

The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).

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


# cfd3d8dc 13-Feb-2010 Greg Alexander <greigs@galexander.org>

ALSA: hda - Add support for Lenovo IdeaPad U150

Add patch for the Conexant 5066 HDA codec to support the Lenovo IdeaPad U150

Signed-off-by: Greg Alexander <greigs@galexander.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 30ed7ed1 28-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix index of HP Compaq F700 mic amp

The amp used for the mic input on HP Compaq F700 with Cxt5051 codec
has no multiple inputs, thus its index should be 0 instead of 1.

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


# 23d2df5b 24-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Change headphone pin control with master volume on cx5051

The HP pin (0x16) control has to be changed dynamically depending on
the master volume switch as well as the speaker pin (0x1a). Otherwise
the headphone still sounds with master off.

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


# ecda0cff 24-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix SPDIF output widget for Cxt5051 codec

Fixed the wrongly set up for SPDIF output on Conexant 5051 codec.
It must point to the audio out widget instead of a pin.

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


# 6953e552 24-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - initialize mic port on cxt5051 codec dynamically

Initialize the mic ports B & C on Conexant 5051 codec dynamically
according to the mic jack detection, instead of static init arrays.

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


# 2c7a3fb3 24-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge playback controls for Cx5051 codec models

All cx5051 codec models have the same Master playback mixer definitions.
Merge them together.

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


# faddaa5d 23-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support for Toshiba Satellite M300

Added the support for Toshiba Satellite M300 with Conexant 5051 codec.
Since the laptop has no port C connection and the pin reports always
the jack sense true, we need to ignore port-C unsol event.

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


# 4e4ac600 23-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix HP dv6736 capture mixer name

Use the standard "Capture" mixer name for HP dv6736 with Cxt5051 codec.

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


# 5f6c3de6 23-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Minor fixes for Compaq Presario F700 quirk

Minor fixes for HP Compaq Presario F700 quirks with Cxt5051 codec:
- changed the capture mixer elements to the standard name.
- fixed the quirk name string without a space
- sorted the quirk list
- updated the documentation

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


# c4cfe66c 07-Jan-2010 Daniel Drake <dsd@laptop.org>

ALSA: hda - support OLPC XO-1.5 DC input

The XO's audio hardware is wired up to allow DC sensors (e.g. light
sensors, thermistors, etc) to be plugged in through the microphone jack.

Add sound mixer controls to allow this mode to be enabled and tweaked.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 75f8991d 07-Jan-2010 Daniel Drake <dsd@laptop.org>

ALSA: hda - Configure XO-1.5 microphones at capture time

The XO-1.5 has a microphone LED designed to indicate to the user when
something is being recorded.

This light is controlled by the microphone bias voltage and it is
currently coming on all the time.

This patch defers the microphone port configuration until when recording
is actually taking place, fixing the behaviour of the LED.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# cd9d95a5 08-Jan-2010 Ken Prox <kprox@users.sourceforge.net>

ALSA: hda - conexant - Fixed microphone mixer for HP Compaq Presario F700

Added patch for Hewlett-Packard Company Device Subsystem id - 103c:30ea.

Signed-off-by: Ken Prox <kprox@users.sourceforge.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# c0f8faf0 16-Dec-2009 Einar Rünkaru <einarry@smail.ee>

ALSA: hda - Make use of beep device found in Dell Vostro 1015n

Conexant CX20583-10Z has digital beep device with volume control.
Making use of them.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 254bba6a 16-Dec-2009 Einar Rünkaru <einarry@smail.ee>

ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015

Fixed initialization of internal mic and added internal mic boost control
Renamed analog mic boost control to ext mic boost contol.
Name pair analog/digital seems too confusing for a normal user.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
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>


# 854206b0 30-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix Cxt5047 test mode

The NID 0x1a of Conexant 5047 chip is a mic boost volume only with
the output amp unlike 5045 chip.

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


# 0b587fc4 25-Nov-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix max PCM level to 0 dB for Fujitsu-Siemens laptops using CX20549 (Venice)

BugLink: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4792

Cristian reported that these models have really bad sound above 6 dB
and proposed the original patch. I've updated the comment to reflect
this change.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Reported-by: Cristian Klein
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95a618bd 23-Nov-2009 Einar Rünkaru <einarry@smail.ee>

ALSA: hda - Make Dell Vostro 1015n mic and speaker switching work

Dell Vostro 1015n uses Conexant CX20583-10Z (0x14f1:5067). Patch is
based on "olpc-xo-1_5" branch. Dell uses digital mic.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
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>


# dbaccc0c 09-Nov-2009 Daniel Drake <dsd@laptop.org>

ALSA: hda - Tweak OLPC XO-1.5 microphone bias

Our contacts at Conexant suggested that we reduce the external
microphone bias to 50% in order to center the input signal with
the DC input range of the codec. This is because the microphone
port is DC coupled for potential use with sensors.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 798a8a15 04-Nov-2009 Daniel Drake <dsd@laptop.org>

ALSA: hda - Add OLPC XO-1.5 PCI ID

The XO-1.5 laptop now has a unique subvendor/subproduct ID, which can
be used to automatically select the correct CXT5066 configuration.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 22e14130 22-Sep-2009 Lukasz Marcinowski <nowymarluk@wp.pl>

ALSA: hda - CD-audio sound for hda-intel conexant benq laptop

After puting a cd-audio inside my laptop there was no sound out here,
so I decided to install alsa-driver with debug level and setup a
model=test, it didn't help, but then I look at source code and added
this few lines, now cd-audio is working both when playback/recording.

[Additional minor fixes of mixer element/item names by tiwai]

Signed-off-by: Lukasz Marcinowski <nowymarluk@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0fb67e98 16-Jul-2009 Daniel Drake <dsd@laptop.org>

ALSA: hda - Add CX20582 and OLPC XO-1.5 support

This adds support for the Conexant CX20582 codec, based on code from
http://www.linuxant.com/alsa-driver/alsa-driver-linuxant-1.0.19ppch12-1.noarch.rpm.zip

This is the codec to be shipped in the OLPC XO-1.5, so this patch also
includes an XO-specific profile. Resultant configuration:
http://dev.laptop.org/~dsd/20090713/codec0.txt
http://dev.laptop.org/~dsd/20090713/codec0.svg

As the Linuxant code is structured differently to the other codecs,
I was unable to cleanly reimplement everything in the generic and Dell
profiles as more info is needed (e.g. codec graphs). I simplified those
profiles so that hopefully it will not break anyone's audio. If it does,
it may be worth returning -ENODEV from patch_cx5066 on non-OLPC systems,
and then fixing snd_hda_codec_configure() to fall back on the generic
parser, at least until support for other systems is figured out.

Signed-off-by: Daniel Drake <dsd@laptop.org>
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>


# 1812e67c 27-May-2009 Tony Vroon <tony@linx.net>

ALSA: hda - Compaq Presario CQ60 patching for Conexant

A docking mic control is shown by default. The Compaq Presario
CQ60 laptop has no docking connector, so designate it as a
CXT5051_HP model.
This makes the phantom mixer slider disappear.

Signed-off-by: Tony Vroon <tony@linx.net>
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>


# 9421f954 12-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Print multiple out-amp values of pin widgets on Conext codecs

Add a flag to work around the non-standard amp-value handling on
Conexant codecs.

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


# 3b7523fc 12-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add comments for the previous fix for conexant codecs

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


# 5d75bc55 12-Mar-2009 Gregorio Guidi <gregorio.guidi@gmail.com>

ALSA: hda - fix headphone settings and master volume (Conexant CX20551)

Update the places where the 0x1d widget is used for Conexant 5047, fixing
mismatch introduced after changing the connection.

Signed-off-by: Gregorio Guidi <gregorio.guidi@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# df481e41 10-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up Cxt5047 parser

Clean up Conexant 5047 pareser code:
- Split mixer elements to separate arrays to reduce the duplicated
entires
- Fix mixer element names to the standard ones
- Remove unneeded cxt5047_hp2_unsol_event; the normal unsol_event
handler works fine.

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


# 5b3a7440 10-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix / clean up init verbs for Cxt5047 codec

Fix the initial connections of output pins 0x13 and 0x1d for Conexant
5047 codec to point to the mixer amp properly.

Removed unneeded (doubly) verbs from arrays, also removed the unneeded
changing of widget 0x1c, which is now completely unused.

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


# 3b628867 10-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous verbs for Cxt5047 laptop-eapd model

Remove superfluous verbs from cxt5047_toshiba_init_verbs[].
Also fix comments and minor coding style issues.

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


# b880c74a 10-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create "Capture Source" control dynamically in patch_conexant.c

Create "Capture Source" control dynamically for Conexant codecs.
If only one capture item is available, don't create such a control
since it's just useless.

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


# dd5746a8 10-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create vmaster for conexant codecs

Instead of binding volumes, create a virtual master volume for Conexant
codecs. This allows separate HP and speaker volume controls.

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


# 79d7d533 04-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix HP dv6736 mic input

Fix the mic input of HP dv6736 with Conexant 5051 codec chip.
This laptop seems have no mic-switching per jack connection.
A new model hp-dv6736 is introduced to match with the h/w implementation.

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

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


# 27e08988 12-Feb-2009 Aristeu Sergio Rozanski Filho <aris@ruivo.org>

ALSA: hda: add quirk for Lenovo X200 laptop dock

Currently the HP connector on X200 dock doesn't detect when a HP is connected
nor allows sound to be played using it. This patch fixes the problem by adding
a quirk for this specific model. It's possible that others have the same NID
(0x19) to report when dock HP is connected, but I don't have access to any.
Please Cc me in the reply since I'm not subscribed to alsa-devel@.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
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>


# 5801f992 26-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix compile warning with CONFIG_SND_JACK=n

sound/pci/hda/patch_conexant.c:352: warning: 'conexant_add_jack' defined but not used

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


# aa9d823b 27-Jan-2009 Joerg Schirottke <master@kanotix.com>

ALSA: hda - Add quirk for HP DV6700 laptop

Added the matching model=laptop for HP DV6700 laptop.

Signed-off-by: Joerg Schirottke <master@kanotix.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# acf26c0c 02-Jan-2009 Ulrich Dangel <uli@spamt.net>

ALSA: hda - cxt5051 report jack state

Signed-off-by: Ulrich Dangel <uli@spamt.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bc7a166d 02-Jan-2009 Ulrich Dangel <uli@spamt.net>

ALSA: hda - add basic jack reporting functions to patch_conexant.c

Added functions to report jack sense.
As CXT5051_PORTB_EVENT has the same value as CONEXANT_MIC_EVENT two input
devices for the microphone will be created if using CXT5051.

Signed-off-by: Ulrich Dangel <uli@spamt.net>
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>


# 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>


# 9e464154 11-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix FSC V5505 model

model=laptop-hpmicsense matches better to FSC V5505 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 86376df6 11-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing init for unsol events on micsense model

Fixed the missing initialization for unsolicited events on
Cx5045 micsense model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4090dffb 11-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix internal mic vref pin setup

Set the vref80 to the internal mic pin 0x12 for Cx5045.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 6a9dccd6 01-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: ALSA: hda - Fix speaker output on Toshiba P105

Toshiba Satellite P105 with cx5045 has no HP pin but only a
speaker pin and does the speaker-muting on hardware.
Thus the matching model is laptop-micsense.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 031005f7 26-Jun-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - disable amp override on non-HP machines

Some machines with Cx5045 seem to have no problem with the volume
over 0dB on NID 0x17. Disable amp overrides for other devices but HP.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 149b1544 12-Jun-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove unused mutex

Removed unused mutex from patch_*.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 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>


# 2de3c232 06-Mar-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - model for cx20549 to support laptop HP530

Currently the model laptop-hpsense use the 0x12 as ExtMic,
and use 0x14 as Internal IntMic.
But the hp530 only have one ExtMic, the Pin widget is 0x14.

In this patch, I changed the mixer item for them.
I still reserved the IntMic item, it will be helpful if
other machine may use this model.

ALSA bug#3821.

Signed-off-by: Jiang zhe <zhe.jiang@intel.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>


# 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>


# 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>


# b84f08d4 17-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Master volume on HP dv8000

HP dv8000 laptop has a problem with Master volume. It's due to the
connection of the widget 0x13. When it's connected from the analog
amp mixer (0x19), it works as expected mysteriously (ALSA bug#3775):
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3775

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


# cbef9789 22-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix SPDIF output on Conexant 5045 codec

Fixed the SPDIF output on Conexant Cx5045 codec. Added the missing
pin output setting and fixed the wrong NID for digital audio-out widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 0f6a5156 29-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for HP DV9553EG laptop

Added the proper model for HP DV9553EG laptop with Cxt5045.
ALSA bug#3534
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3534

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 461e2c78 25-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add Conexant 5051 codec support

Added the support for Conexant 5051 audio codec.
Right now there are two preset models, laptop and hp.
The whole patch is based on the information from the base patch by
Linuxant.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9f113e0e 22-Jan-2008 Marc Boucher <marc@linuxant.com>

[ALSA] hda-codec - Add missing input controls for Cxt5047 test model

The input volume/switch elements are missing in Cxt5047 test model.
Also the patch includes some code clean ups.

Signed-off-by: Marc Boucher <marc@linuxant.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 15908c36 22-Jan-2008 Marc Boucher <marc@linuxant.com>

[ALSA] hda-codec - Fix laptop models for Cxt5045

Change laptop models to three different models, laptop-hpsense,
laptop-micsense and laptop-hpmicsense. The first two correspond to
the old 'laptop' and 'fujitsu' models.
Reassigned the quirk table for the new models.

Signed-off-by: Marc Boucher <marc@linuxant.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f4beee94 17-Jan-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - Fix capture source for Cx5045 codec

For codec conexant 5045, I found that the name of 'Capture Source Items'
is different from the name of mixer.
The mixer is:
HDA_CODEC_VOLUME('Ext Mic Playback Volume', 0x17, 0x2, HDA_INPUT),
HDA_CODEC_MUTE('Ext Mic Playback Switch', 0x17, 0x2, HDA_INPUT),
But the capture source item is :
static struct hda_input_mux cxt5045_capture_source = {
.num_items = 2,
.items = {
{ 'IntMic', 0x1 },
{ 'LineIn', 0x2 },
}
};
I think that it's better to change the name of capture_source to avoid
misunderstanding.

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>


# 5218c892 17-Jan-2008 Jiang Zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - New model for conexant 5045 codec to support benq r55e

The benq r55e laptop have 3 jacks on the front panel.
One for HP, one for Line In and one for Mic In.
This patch implemented a new model to support it.

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>


# 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>


# 38f8b397 08-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model=laptop for HP 350 laptop

Added the proper model=laptop for HP 350 laptop with Cxt5045 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ac3e3741 17-Dec-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - sort pci quirk list

Sort pci quirk list in the order of PCI SSID.
This makes easier to find out the buggy duplicated entries.
Thanks to Andy Shevchenko for providing the sort script.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 48ecb7e8 17-Dec-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Avoid overload of PCM volume on Cx5045 codec

The PCM volume of Cx5045 codec has overload that isn't useful but
rather harmful. Add a hack to override the amp info to set the max
level 0 dB.

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>


# 61bae093 22-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for Fujitsu V5505

Added model=laptop for Fujitsu V5505 with Cxt5405 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 41923e44 22-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix possible array overflow

dac_nids arrays in each codec support code may have up to 5 items
when assigned from the auto-configurator. Some codec codes have
less numbers than the possible max. This patch defines the constant
and fixes the array definitions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# c8229c38 19-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Conexant 5045 volumes

Fixed the init verbs and added the missing volume controls so that
the driver works again with Conexant 5045 codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.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>


# 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>


# 8481da5a 03-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add support for HP Spartan

Added the model for HP Spartan with Conexant codec chip.
From: Claudio Matsuoka <cmatsuoka@gmail.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f8f794ab 24-Jun-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA - Change default configuration for Fujitsu Si3515

This patch changes the default configuration for the Fujitsu Siemens
Si3515 Laptop to the correct model=laptop.

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>


# b69f3748 18-Jun-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add Fujitsu Siemens v3515 support to patch_conexant

This patch adds support for the Fujitsu Seimens Amilo Pro v3515 notebook.

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>


# fb3409e7 17-May-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA: Fix headphone mute issue on non-eapd Conexant systems

This patch fixes an automute code issue for systems that do not rely
on eapd support.

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>


# 4d69d756 02-May-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for new HP DV series laptops

This patch adds support for 3 new HP laptops to the Conexant
'Venice' driver.

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>


# b7589ceb 24-Apr-2007 Tobin Davis <gruemaster@email.uophx.edu>

[ALSA] HDA-Intel: Fix headphone squeal on Conexant audio

This patch fixes the headphone squeal and noise on Conexant CX20551
(Waikiki) audio.

Signed-off-by: Tobin Davis <gruemaster@email.uophx.edu>
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>


# d3091fad 28-Mar-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix missing array terminators

Added missing array terminators in patch_conexant.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7f29673b 12-Mar-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Conexant improvements

This patch further improves on the Conexant Audio driver.
Adds support for Fujistu Siemens Si1520 series laptops.
Adds support for mic/line in on CX20549 based systems (aka 5045).
removes duplicated or unused controls (gpio, spdif) from test model.

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>


# dd87da1c 26-Feb-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Fix logic error in headphone mute for Conexant codecs

This patch fixes a logic error introduced in the previous patch.
Without it, speaker automute mutes the speakers when headphones are
removed and unmutes when headphones are plugged in.
This was reported by Gregorio Guidi after getting the earlier patch
off this mailing list.

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>


# 82f30040 12-Feb-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - More fixes for Conexant HD Audio support

Renamed Conexant 5045 to CX20549 (Venice) per Conexant Documentation
Renamed Conexant 5047 to CX20551 (Waikiki) per Conexant Documentation
Fixed automute on HP Laptops with CX20551 codec.
Fixed recording issues on Toshiba Satelite P100/P105 series laptops
Added HP DV8000, DV2000Z, Fujitsu Si1520 support
More work to be done on CX20549 based systems, but CX20551 Systems are
much better now.

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>


# 86d72bdf 28-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix compile warnings without CONFIG_SND_DEBUG

Fix compile warnings (unused variables) in patch_conexant.c
without CONFIG_SND_DEBUG.

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>


# 5cd57529 20-Nov-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add missing array to conexant driver

This patch adds a missing array to the conexant driver.

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>


# c9b443d4 13-Nov-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] Add Conexant audio support to the HD Audio driver

This driver adds limited support for the Conexant 5045 and 5047 HD Audio
codecs. Some issues still need to be resolved. The code is based
primarily on code from the Analog Devices AD1981 support and the Realtek
ALC260 support. Some code came from the original code developed by Alex
Pototskiy (see alsa bugtracker 2485).

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>