History log of /linux-master/sound/pci/hda/patch_realtek.c
Revision Date Author Comments
# 7ee5faad 19-Apr-2024 Ai Chao <aichao@kylinos.cn>

ALSA: hda/realtek - Enable audio jacks of Haier Boyue G42 with ALC269VC

The Haier Boyue G42 with ALC269VC cannot detect the MIC of headset,
the line out and internal speaker until
ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Cc: <stable@vger.kernel.org>
Message-ID: <20240419082159.476879-1-aichao@kylinos.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7caf3daa 17-Apr-2024 Mauro Carvalho Chehab <mchehab@kernel.org>

ALSA: hda/realtek: Add quirks for Huawei Matebook D14 NBLB-WAX9N

The headset mic requires a fixup to be properly detected/used.

As a reference, this specific model from 2021 reports
the following devices:
https://alsa-project.org/db/?f=1a5ddeb0b151db8fe051407f5bb1c075b7dd3e4a

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: <stable@vger.kernel.org>
Message-ID: <b92a9e49fb504eec8416bcc6882a52de89450102.1713370457.git.mchehab@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dca5f4df 13-Apr-2024 Huayu Zhang <zhanghuayu1233@qq.com>

ALSA: hda/realtek: Fix volumn control of ThinkBook 16P Gen4

change HDA & AMP configuration from ALC287_FIXUP_CS35L41_I2C_2 to
ALC287_FIXUP_MG_RTKC_CSAMP_CS35L41_I2C_THINKPAD for ThinkBook 16P Gen4
models to fix volumn control issue (cannot fully mute).

Signed-off-by: Huayu Zhang <zhanghuayu1233@qq.com>
Fixes: 6214e24cae9b ("ALSA: hda/realtek: Add quirks for Lenovo Thinkbook 16P laptops")
Message-ID: <tencent_37EB880C5E5BD99D21C16B288115C4545F06@qq.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0672b017 11-Apr-2024 Vitalii Torshyn <vitaly.torshyn@gmail.com>

ALSA: hda/realtek: Fixes for Asus GU605M and GA403U sound

Added the correct pin table for Asus GU605M and GA403U, enabling all
speakers to be controlled with the master.
Updated quirks for GU605M and GA403U by including the pin table patch
in the chain.

Co-developed-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Signed-off-by: Vitalii Torshyn <vitaly.torshyn@gmail.com>
Message-ID: <20240411125803.18539-1-vitaly.torshyn@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f74ab0c5 11-Apr-2024 Shenghao Ding <shenghao-ding@ti.com>

ALSA: hda/tas2781: Add new vendor_id and subsystem_id to support ThinkPad ICE-1

Add new vendor_id and subsystem_id to support new Lenovo laptop
ThinkPad ICE-1

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Cc: <stable@vger.kernel.org>
Message-ID: <20240411091823.1644-1-shenghao-ding@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 84471d01 05-Apr-2024 Vitaly Rodionov <vitalyr@opensource.cirrus.com>

ALSA: hda/realtek: Add quirk for HP SnowWhite laptops

Add support for HP SnowWhite laptops with CS35L51 amplifiers on I2C
bus connected to Realtek codec.

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Message-ID: <20240405210635.22193-1-vitalyr@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0bfe1050 01-Apr-2024 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: cs35l41: Support ASUS ROG G634JYR

Fixes the realtek quirk to initialise the Cirrus amp correctly and adds
related quirk for missing DSD properties. This model laptop has slightly
updated internals compared to the previous version with Realtek Codec
ID of 0x1caf.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Message-ID: <20240402015126.21115-1-luke@ljones.dev>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1576f263 01-Apr-2024 I Gede Agastya Darma Laksana <gedeagas22@gmail.com>

ALSA: hda/realtek: Update Panasonic CF-SZ6 quirk to support headset with microphone

This patch addresses an issue with the Panasonic CF-SZ6's existing quirk,
specifically its headset microphone functionality. Previously, the quirk
used ALC269_FIXUP_HEADSET_MODE, which does not support the CF-SZ6's design
of a single 3.5mm jack for both mic and audio output effectively. The
device uses pin 0x19 for the headset mic without jack detection.

Following verification on the CF-SZ6 and discussions with the original
patch author, i determined that the update to
ALC269_FIXUP_ASPIRE_HEADSET_MIC is the appropriate solution. This change
is custom-designed for the CF-SZ6's unique hardware setup, which includes
a single 3.5mm jack for both mic and audio output, connecting the headset
microphone to pin 0x19 without the use of jack detection.

Fixes: 0fca97a29b83 ("ALSA: hda/realtek - Add Panasonic CF-SZ6 headset jack quirk")
Signed-off-by: I Gede Agastya Darma Laksana <gedeagas22@gmail.com>
Cc: <stable@vger.kernel.org>
Message-ID: <20240401174602.14133-1-gedeagas22@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b67a7dc4 31-Mar-2024 Christian Bendiksen <christian@bendiksen.me>

ALSA: hda/realtek: Add sound quirks for Lenovo Legion slim 7 16ARHA7 models

This fixes the sound not working from internal speakers on
Lenovo Legion Slim 7 16ARHA7 models. The correct subsystem ID
have been added to cs35l41_hda_property.c and patch_realtek.c.

Signed-off-by: Christian Bendiksen <christian@bendiksen.me>
Cc: <stable@vger.kernel.org>
Message-ID: <20240401122603.6634-1-christian@bendiksen.me>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c33f0d4f 29-Mar-2024 Simon Trimmer <simont@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for ASUS Laptops using CS35L56

These ASUS laptops use the Realtek HDA codec combined with a number of
CS35L56 amplifiers.

The SSID of the GA403U matches a previous ASUS laptop - we can tell them
apart because they use different codecs.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Message-ID: <20240329112803.23897-1-simont@opensource.cirrus.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# daf6c468 28-Mar-2024 Christoffer Sandberg <cs@tuxedo.de>

ALSA: hda/realtek - Fix inactive headset mic jack

This patch adds the existing fixup to certain TF platforms implementing
the ALC274 codec with a headset jack. It fixes/activates the inactive
microphone of the headset.

Signed-off-by: Christoffer Sandberg <cs@tuxedo.de>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Message-ID: <20240328102757.50310-1-wse@tuxedocomputers.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 33affa7f 19-Mar-2024 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirks for some Clevo laptops

Add audio quirks to fix speaker output and headset detection on some new
Clevo models:

- L240TU (ALC245)
- PE60SNE-G (ALC1220)
- V350SNEQ (ALC245)

Co-authored-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Message-ID: <20240319212726.62888-1-tcrawford@system76.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 61456da0 18-Mar-2024 Anthony I Gilea <i@cpp.in>

ALSA: hda/realtek: Add quirk for HP Spectre x360 14 eu0000

Cirrus amps support for this laptop was added in patch:
33e5e648e631 ("ALSA: hda: cs35l41: Support additional HP Envy Models")

This patch adds fixes for wrong pincfgs, wrong DAC selection and
mute/micmute LEDs.

Signed-off-by: Anthony I Gilea <i@cpp.in>
Message-ID: <e2a7aaed-e9d7-4d36-8abf-b71dfd32a0ff@cpp.in>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1e5dc398 17-Mar-2024 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: fix the hp playback volume issue for LG machines

Recently we tested the headphone playback on 2 LG machines, if we set
the volume to the max value or near to the max value, the sound is too
loud, it could even bring harm to listeners.

A workaround is to decrease the max volume to a reasonable value for
the headphone's amplifier, then the users couldn't set the volume
bigger than that value from the userspace.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Message-ID: <20240318011128.156023-1-hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd2d8305 16-Mar-2024 Ian Murphy <iano200@gmail.com>

ALSA: hda/realtek: add in quirk for Acer Swift Go 16 - SFG16-71

Keyboard has an LED that is ON/OFF when mic is muted/active
- LED is controlled by GPIO pin
- Patch enables led to appear in /sys/class/leds/ as hda::micmute
- Enables LED when mic is MUTED
- Disables LED when mic is active

[ fixed white spaces by tiwai ]

Signed-off-by: Ian Murphy <iano200@gmail.com>
Message-ID: <20240316094157.13890-1-iano200@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b714a59 15-Mar-2024 Jichi Zhang <i@jichi.ca>

ALSA: hda/realtek: Add quirk for Lenovo Yoga 9 14IMH9

The speakers on the Lenovo Yoga 9 14IMH9 are similar to previous generations
such as the 14IAP7, and the bass speakers can be fixed using similar methods
with one caveat: 14IMH9 uses CS35L41 amplifiers which need to be activated
separately.

Signed-off-by: Jichi Zhang <i@jichi.ca>
Message-ID: <20240315081954.45470-3-i@jichi.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 300ab0df 12-Mar-2024 Valentine Altair <faetalize@proton.me>

ALSA: hda/realtek - ALC236 fix volume mute & mic mute LED on some HP models

Some HP laptops have received revisions that altered their board IDs
and therefore the current patches/quirks do not apply to them.
Specifically, for my Probook 440 G8, I have a board ID of 8a74.
It is necessary to add a line for that specific model.

Signed-off-by: Valentine Altair <faetalize@proton.me>
Cc: <stable@vger.kernel.org>
Message-ID: <kOqXRBcxkKt6m5kciSDCkGqMORZi_HB3ZVPTX5sD3W1pKxt83Pf-WiQ1V1pgKKI8pYr4oGvsujt3vk2zsCE-DDtnUADFG6NGBlS5N3U4xgA=@proton.me>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0621669 10-Mar-2024 Athaariq Ardhiansyah <foss@athaariq.my.id>

ALSA: hda/realtek: fix ALC285 issues on HP Envy x360 laptops

Realtek codec on HP Envy laptop series are heavily modified by vendor.
Therefore, need intervention to make it work properly. The patch fixes:

- B&O soundbar speakers (between lid and keyboard) activation
- Enable LED on mute button
- Add missing process coefficient which affects the output amplifier
- Volume control synchronization between B&O soundbar and side speakers
- Unmute headset output on several HP Envy models
- Auto-enable headset mic when plugged

This patch was tested on HP Envy x360 13-AR0107AU with Realtek ALC285

The only unsolved problem is output amplifier of all built-in speakers
is too weak, which causes volume of built-in speakers cannot be loud
as vendor's proprietary driver due to missing _DSD parameter in the
firmware. The solution is currently on research. Expected to has another
patch in the future.

Potential fix to related issues, need test before close those issues:

- https://bugzilla.kernel.org/show_bug.cgi?id=189331
- https://bugzilla.kernel.org/show_bug.cgi?id=216632
- https://bugzilla.kernel.org/show_bug.cgi?id=216311
- https://bugzilla.kernel.org/show_bug.cgi?id=213507

Signed-off-by: Athaariq Ardhiansyah <foss@athaariq.my.id>
Message-ID: <20240310140249.3695-1-foss@athaariq.my.id>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a0978123 08-Feb-2024 Sayed, Karimuddin <karimuddin.sayed@intel.com>

ALSA: hda/realtek: Add "Intel Reference board" SSID in the ALC256.

Add "Intel Reference board" SSID in the alc256.
Enable "power saving mode" and Enable "headset jack mode".

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Sayed, Karimuddin <karimuddin.sayed@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20240208163904.92977-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 498e963e 02-Feb-2024 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Remove two HP Laptops using CS35L41

The SKUs, and associated SSIDs, are no longer going to include the
CS35L41. They may come back, but will need a different quirk.

Fixes: aa8e3ef4fe53 ("ALSA: hda/realtek: Add quirks for various HP ENVY models")
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240202170842.321818-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa8e3ef4 26-Jan-2024 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for various HP ENVY models

These models use 2 or 4 CS35L41 amps with HDA using I2C or SPI.
Some models have _DSD support inside cs35l41_hda_property.c.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240126164005.367021-5-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b2d6a1fd 24-Jan-2024 Simon Trimmer <simont@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for HP G11 Laptops using CS35L56

Add quirks for two HP G11 laptops that use a Realtek HDA codec combined
with four CS35L56 amplifiers using SPI.

The CS35L56 driver uses the component binding interface, so uses the same
setup code as the CS35L41 quirks.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240125123301.41692-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fd895a74 24-Jan-2024 Richard Fitzgerald <rf@opensource.cirrus.com>

ALSA: hda: realtek: Move hda_component implementation to module

Move the generic parts of the hda_component implementation into a new
hda_component module. This will allow other HDA codecs to add support
for the component binding API without duplicating all the code.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Tested-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/20240124112607.77614-3-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cf0d9566 24-Jan-2024 Richard Fitzgerald <rf@opensource.cirrus.com>

ALSA: hda: realtek: Re-work CS35L41 fixups to re-use for other amps

Slightly re-work the code around cs35l41_generic_fixup() and the component
binding search so that it can be re-used for other amps that use the
component binding mechanism.

The match string is stored in struct scodec_dev_name instead of hardcoding
it in the match function.

The tas2781 does not use the amp index as part of the driver name match.
But its match format string does not include a field for the index, so
snprintf() would safely ignore the p->index argument. Because of this there
is no need for a special match function for this case, the CS35L41 code
can be re-used.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Tested-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/20240124112607.77614-2-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a17bd44c 04-Mar-2024 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook

The HP EliteBook using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240304134033.773348-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6214e24c 01-Mar-2024 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for Lenovo Thinkbook 16P laptops

These models use 2 CS35L41 amps with HDA using I2C.
Both models have _DSD support inside cs35l41_hda_property.c.

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218437

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240301160154.158398-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 34ab5bbc 01-Mar-2024 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Headset Mic supported Acer NB platform

It will be enable headset Mic for Acer NB platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/fe0eb6661ca240f3b7762b5b3257710d@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d397b6e5 01-Mar-2024 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform

Headset Mic will no show at resume back.
This patch will fix this issue.

Fixes: d7f32791a9fc ("ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform")
Cc: <stable@vger.kernel.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/4713d48a372e47f98bba0c6120fd8254@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b34bf658 22-Feb-2024 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port

It had pop noise from Headphone port when system reboot state.
If NID 58h Index 0x0 to fill default value, it will reduce pop noise.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/7493e207919a4fb3a0599324fd010e3e@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0ac32a39 24-Feb-2024 Willian Wang <git@willian.wang>

ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8

Lenovo Slim/Yoga Pro 9 14IRP8 requires a special fixup because there is
a collision of its PCI SSID (17aa:3802) with Lenovo Yoga DuetITL 2021
codec SSID.

Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Link: https://lore.kernel.org/all/d5b42e483566a3815d229270abd668131a0d9f3a.camel@irl.hu
Cc: stable@vger.kernel.org
Signed-off-by: Willian Wang <git@willian.wang>
Reviewed-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/170879111795.8.6687687359006700715.273812184@willian.wang
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1947ce6 22-Feb-2024 Gergo Koteles <soyer@irl.hu>

ALSA: hda/realtek: tas2781: enable subwoofer volume control

The volume of subwoofer channels is always at maximum with the
ALC269_FIXUP_THINKPAD_ACPI chain.

Use ALC285_FIXUP_THINKPAD_HEADSET_JACK to align it to the master volume.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555#c827

Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/7ffae10ebba58601d25fe2ff8381a6ae3a926e62.1708687813.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 67c3d771 20-Feb-2024 Eniac Zhang <eniac-xw.zhang@hp.com>

ALSA: hda/realtek: fix mute/micmute LED For HP mt440

The HP mt440 Thin Client uses an ALC236 codec and needs the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make the mute and
micmute LEDs work.

There are two variants of the USB-C PD chip on this device. Each uses
a different BIOS and board ID, hence the two entries.

Signed-off-by: Eniac Zhang <eniac-xw.zhang@hp.com>
Signed-off-by: Alexandru Gagniuc <alexandru.gagniuc@hp.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240220175812.782687-1-alexandru.gagniuc@hp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1fdf4e8b 19-Feb-2024 Hans Peter <flurry123@gmx.ch>

ALSA: hda/realtek: Enable Mute LED on HP 840 G8 (MB 8AB8)

On my EliteBook 840 G8 Notebook PC (ProdId 5S7R6EC#ABD; built 2022 for
german market) the Mute LED is always on. The mute button itself works
as expected. alsa-info.sh shows a different subsystem-id 0x8ab9 for
Realtek ALC285 Codec, thus the existing quirks for HP 840 G8 don't work.
Therefore, add a new quirk for this type of EliteBook.

Signed-off-by: Hans Peter <flurry123@gmx.ch>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240219164518.4099-1-flurry123@gmx.ch
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 89a0dff6 19-Feb-2024 Jay Ajit Mate <jay.mate15@gmail.com>

ALSA: hda/realtek: Fix top speaker connection on Dell Inspiron 16 Plus 7630

The Dell Inspiron 16 Plus 7630, similar to its predecessors (7620 models),
experiences an issue with unconnected top speakers. Since the controller
remains unchanged, this commit addresses the problem by correctly
connecting the speakers on NID 0X17 to the DAC on NIC 0x03.

Signed-off-by: Jay Ajit Mate <jay.mate15@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240219100404.9573-1-jay.mate15@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 32f03f40 15-Feb-2024 Eniac Zhang <eniac-xw.zhang@hp.com>

ALSA: hda/realtek: fix mute/micmute LED For HP mt645

The HP mt645 G7 Thin Client uses an ALC236 codec and needs the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make the mute and
micmute LEDs work.

There are two variants of the USB-C PD chip on this device. Each uses
a different BIOS and board ID, hence the two entries.

Signed-off-by: Eniac Zhang <eniac-xw.zhang@hp.com>
Signed-off-by: Alexandru Gagniuc <alexandru.gagniuc@hp.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240215154922.778394-1-alexandru.gagniuc@hp.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 852d432a 13-Feb-2024 Jean-Loïc Charroud <lagiraudiere+linux@free.fr>

ALSA: hda/realtek: cs35l41: Fix order and duplicates in quirks table

Move entry {0x1043, 0x16a3, "ASUS UX3402VA"} following device ID order.
Remove duplicate entry for device {0x1043, 0x1f62, "ASUS UX7602ZM"}.

Fixes: 51d976079976 ("ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models")
Signed-off-by: Jean-Loïc Charroud <lagiraudiere+linux@free.fr>
Link: https://lore.kernel.org/r/1969151851.650354669.1707867864074.JavaMail.zimbra@free.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b9105044 13-Feb-2024 Jean-Loïc Charroud <lagiraudiere+linux@free.fr>

ALSA: hda/realtek: cs35l41: Fix device ID / model name

The patch 51d976079976c800ef19ed1b542602fcf63f0edb ("ALSA: hda/realtek:
Add quirks for ASUS Zenbook 2022 Models") modified the entry 1043:1e2e
from "ASUS UM3402" to "ASUS UM6702RA/RC" and added another entry for
"ASUS UM3402" with 104e:1ee2.
The first entry was correct, while the new one corresponds to model
"ASUS UM6702RA/RC"
Fix the model names for both devices.

Fixes: 51d976079976 ("ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models")
Signed-off-by: Jean-Loïc Charroud <lagiraudiere+linux@free.fr>
Link: https://lore.kernel.org/r/1656546983.650349575.1707867732866.JavaMail.zimbra@free.fr
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 24b6332c 12-Feb-2024 Tomasz Kudela <ramzes005@gmail.com>

ALSA: hda: Add Lenovo Legion 7i gen7 sound quirk

Add sound support for the Legion 7i gen7 laptop (16IAX7).

Signed-off-by: Tomasz Kudela <ramzes005@gmail.com>
Link: https://lore.kernel.org/r/20240213115614.10420-1-ramzes005@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fddab35f 05-Feb-2024 Shuming Fan <shumingf@realtek.com>

ALSA: hda/realtek: add IDs for Dell dual spk platform

This patch adds another two IDs for the Dell dual speaker platform.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240205072252.3791500-1-shumingf@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7de2d9b 01-Feb-2024 Edson Juliano Drosdeck <edson.drosdeck@gmail.com>

ALSA: hda/realtek: Enable headset mic on Vaio VJFE-ADL

Vaio VJFE-ADL is equipped with ALC269VC, and it needs
ALC298_FIXUP_SPK_VOLUME quirk to make its headset mic work.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240201122114.30080-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2468e892 31-Jan-2024 José Relvas <josemonsantorelvas@gmail.com>

ALSA: hda/realtek: Apply headset jack quirk for non-bass alc287 thinkpads

There currently exists two thinkpad headset jack fixups:
ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
ALC285_FIXUP_THINKPAD_HEADSET_JACK

The latter is applied to alc285 and alc287 thinkpads which contain
bass speakers.
However, the former was only being applied to alc285 thinkpads,
leaving non-bass alc287 thinkpads with no headset button controls.
This patch fixes that by adding ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK
to the alc287 chains, allowing the detection of headset buttons.

Signed-off-by: José Relvas <josemonsantorelvas@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240131113407.34698-3-josemonsantorelvas@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f0d78972 28-Jan-2024 Luka Guzenko <l.guzenko@web.de>

ALSA: hda/realtek: Enable Mute LED on HP Laptop 14-fq0xxx

This HP Laptop uses ALC236 codec with COEF 0x07 controlling the
mute LED. Enable existing quirk for this device.

Signed-off-by: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240128155704.2333812-1-l.guzenko@web.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# efb56d84 26-Jan-2024 David Senoner <seda18@rolmail.net>

ALSA: hda/realtek: Fix the external mic not being recognised for Acer Swift 1 SF114-32

If you connect an external headset/microphone to the 3.5mm jack on the
Acer Swift 1 SF114-32 it does not recognize the microphone. This fixes
that and gives the user the ability to choose between internal and
headset mic.

Signed-off-by: David Senoner <seda18@rolmail.net>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240126155626.2304465-1-seda18@rolmail.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fcfc9f71 23-Jan-2024 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add speaker pin verbtable for Dell dual speaker platform

SSID 0x0c0d platform. It can't mute speaker when HP plugged.
This patch add quirk to fill speaker pin verbtable.
And disable speaker passthrough.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/38b82976a875451d833d514cee34ff6a@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1513664f 22-Jan-2024 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power

The HP ZBook Power using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240122074826.1020964-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb3c007f 17-Jan-2024 Bin Li <bin.li@canonical.com>

ALSA: hda/realtek: Enable headset mic on Lenovo M70 Gen5

Lenovo M70 Gen5 is equipped with ALC623, and it needs
ALC283_FIXUP_HEADSET_MIC quirk to make its headset mic work.

Signed-off-by: Bin Li <bin.li@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240117154123.21578-1-bin.li@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b018cee7 15-Jan-2024 Yo-Jung Lin <leo.lin@canonical.com>

ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on HP ZBook

On some HP ZBooks, the audio LEDs can be enabled by
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF. So use it accordingly.

Signed-off-by: Yo-Jung Lin <leo.lin@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240116020722.27236-1-leo.lin@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bc7863d1 15-Jan-2024 Çağhan Demir <caghandemir@marun.edu.tr>

ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq2xxx

This HP Laptop uses ALC236 codec with COEF 0x07 idx 1 controlling
the mute LED. This patch enables the already existing quirk for
this device.

Signed-off-by: Çağhan Demir <caghandemir@marun.edu.tr>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240115172303.4718-1-caghandemir@marun.edu.tr
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6b3d14b7 08-Jan-2024 Tom Jason Schwanke <tom@catboys.cloud>

ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx

This enables the mute and mic-mute LEDs on the HP Envy X360 13-ay0xxx
convertibles.
The quirk 'ALC245_FIXUP_HP_X360_MUTE_LEDS' already exists and is now
enabled for this device.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216197
Signed-off-by: Tom Jason Schwanke <tom@catboys.cloud>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/651b26e9-e86b-45dd-aa90-3e43d6b99823@catboys.cloud
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5cb53fd 29-Dec-2023 Gergo Koteles <soyer@irl.hu>

ALSA: hda/tas2781: add fixup for Lenovo 14ARB7

The 14ARB7 has two tas2563 amplifier on i2c.
Connect it to the tas2781 driver.

Signed-off-by: Gergo Koteles <soyer@irl.hu>
Link: https://lore.kernel.org/r/abce9ee55689523562feb72383377171a489ddc7.1703891777.git.soyer@irl.hu
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 99af5b11 29-Dec-2023 Dorian Cruveiller <doriancruveiller@gmail.com>

ALSA: hda/realtek: enable SND_PCI_QUIRK for Lenovo Legion Slim 7 Gen 8 (2023) serie

Link up the realtek audio chip to the cirrus cs35l41 sound amplifier chip
on 4 models of the Lenovo legion slim 7 gen 8 (2023). These models are
16IRH8 (2 differents subsystem id) and 16APH8 (2 differents subsystem ids).

Subsystem ids list:
- 17AA38B4
- 17AA38B5
- 17AA38B6
- 17AA38B7

Signed-off-by: Dorian Cruveiller <doriancruveiller@gmail.com>
Cc: <stable@vger.kernel.org> # v6.7
Link: https://lore.kernel.org/r/20231230114001.19855-1-doriancruveiller@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 42320660 21-Dec-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for Dell models

These models use 2 or 4 CS35L41 amps with HDA using SPI and I2C.
Models use internal and external boost.
All models require DSD support to be added inside
cs35l41_hda_property.c

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org> # v6.7+
Link: https://lore.kernel.org/r/20231221132518.3213-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b6ce6e6c 03-Jan-2024 Siddhesh Dharme <siddheshdharme18@gmail.com>

ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP ProBook 440 G6

LEDs in 'HP ProBook 440 G6' laptop are controlled by ALC236 codec.
Enable already existing quirk 'ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF'
to fix mute and mic-mute LEDs.

Signed-off-by: Siddhesh Dharme <siddheshdharme18@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240104060736.5149-1-siddheshdharme18@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 18a434f3 01-Jan-2024 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for a HP ZBook

There is a HP ZBook which using ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED
and micmute LED work.

[ confirmed that the new entries are for new models that have no
proper name, so the strings are left as "HP" which will be updated
eventually later -- tiwai ]

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20240102024916.19093-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 13a5b211 29-Dec-2023 Aabish Malik <aabishmalik3337@gmail.com>

ALSA: hda/realtek: enable SND_PCI_QUIRK for hp pavilion 14-ec1xxx series

The HP Pavilion 14 ec1xxx series uses the HP mainboard 8A0F with the
ALC287 codec.
The mute led can be enabled using the already existing
ALC287_FIXUP_HP_GPIO_LED quirk.
Tested on an HP Pavilion ec1003AU

Signed-off-by: Aabish Malik <aabishmalik3337@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231229170352.742261-3-aabishmalik3337@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae53e219 18-Dec-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for ASUS Zenbook 2023 Models

These models use 2xCS35L41amps with HDA using SPI and I2C.
Models use internal and external boost.
All models require DSD support to be added inside
cs35l41_hda_property.c

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231218151221.388745-8-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 51d97607 18-Dec-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models

These models use 2xCS35L41amps with HDA using SPI and I2C.
Models use internal and external boost.
All models require DSD support to be added inside
cs35l41_hda_property.c

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231218151221.388745-6-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a40ce9f4 18-Dec-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for ASUS ROG 2023 models

These models use 2xCS35L41amps with HDA using SPI and I2C.
All models use Internal Boost.
Some models also use Realtek Speakers in conjunction with
CS35L41.
All models require DSD support to be added inside
cs35l41_hda_property.c

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20231218151221.388745-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 02a460ad 14-Dec-2023 Clément Villeret <clement.villeret@gmail.com>

ALSA: hda/realtek: Add quirk for ASUS ROG GV302XA

Asus ROG Flowx13 (GV302XA) seems require same patch as others asus products

Signed-off-by: Clément Villeret <clement.villeret@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/0a27bf4b-3056-49ac-9651-ebd7f3e36328@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b726bf6 09-Dec-2023 Hartmut Knaack <knaack.h@gmx.de>

ALSA: hda/realtek: Apply mute LED quirk for HP15-db

The HP laptop 15-db0403ng uses the ALC236 codec and controls the mute
LED using COEF 0x07 index 1.
Sound card subsystem: Hewlett-Packard Company Device [103c:84ae]

Use the existing quirk for this model.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/e61815d0-f1c7-b164-e49d-6ca84771476a@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 634e5e1e 07-Dec-2023 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7

Lenovo Yoga Pro 7 14APH8 (PCI SSID 17aa:3882) seems requiring the
similar workaround like Yoga 9 model for the bass speaker.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CAGGk=CRRQ1L9p771HsXTN_ebZP41Qj+3gw35Gezurn+nokRewg@mail.gmail.com
Link: https://lore.kernel.org/r/20231207182035.30248-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8804fa04 06-Dec-2023 Mario Limonciello <mario.limonciello@amd.com>

ALSA: hda/realtek: Add Framework laptop 16 to quirks

The Framework 16" laptop has the same controller as other Framework
models. Apply the presence detection quirk.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231206193927.2996-1-mario.limonciello@amd.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 33038efb 06-Dec-2023 Tim Bosse <flinn@timbos.se>

ALSA: hda/realtek: add new Framework laptop to quirks

The Framework Laptop 13 (AMD Ryzen 7040Series) has an ALC295 with
a disconnected or faulty headset mic presence detect similar to the
previous models. It works with the same quirk chain as
309d7363ca3d9fcdb92ff2d958be14d7e8707f68. This model has a VID:PID
of f111:0006.

Signed-off-by: Tim Bosse <flinn@timbos.se>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231206142629.388615-1-flinn@timbos.se
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6f7e4664 04-Dec-2023 Bin Li <bin.li@canonical.com>

ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5

Lenovo M90 Gen5 is equipped with ALC897, and it needs
ALC897_FIXUP_HEADSET_MIC_PIN quirk to make its headset mic work.

Signed-off-by: Bin Li <bin.li@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231204100450.642783-1-bin.li@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd14dedf 03-Dec-2023 Aleksandrs Vinarskis <alex.vinarskis@gmail.com>

ALSA: hda/realtek: fix speakers on XPS 9530 (2023)

XPS 9530 has 2 tweeters and 2 subwoofers powered by CS35L41 amplifier, SPI
connected. For subwoofers to work, it requires both to enable amplifier
support, and to enable output to subwoofers via 0x17 quirk (similalry to
XPS 9510/9520).

Signed-off-by: Aleksandrs Vinarskis <alex.vinarskis@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231203233006.100558-1-alex.vinarskis@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c5c325bb 01-Dec-2023 Pascal Noël <pascal@pascalcompiles.com>

ALSA: hda/realtek: Apply quirk for ASUS UM3504DA

The ASUS UM3504DA uses a Realtek HDA codec and two CS35L41 amplifiers via I2C.
Apply existing quirk to model.

Signed-off-by: Pascal Noël <pascal@pascalcompiles.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231202013744.12369-1-pascal@pascalcompiles.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cae2bdb5 29-Nov-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek: Add supported ALC257 for ChromeOS

ChromeOS want to support ALC257.
Add codec ID to some relation function.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/99a88a7dbdb045fd9d934abeb6cec15f@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# baaacbff 25-Oct-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek: Headset Mic VREF to 100%

This platform need to set Mic VREF to 100%.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/0916af40f08a4348a3298a9a59e6967e@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7c9caa29 17-Nov-2023 Vasiliy Kovalev <kovalev@altlinux.org>

ALSA: hda - Fix speaker and headset mic pin config for CHUWI CoreBook XPro

This patch corrected the speaker and headset mic pin config to the more
appropriate values.

Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
Link: https://lore.kernel.org/r/20231117170923.106822-1-kovalev@altlinux.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5d639b60 15-Nov-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for HP Laptops

These HP laptops use Realtek HDA codec combined with 2 or 4 CS35L41
Amplifiers using SPI with Internal Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231115162116.494968-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 61cbc08f 15-Nov-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for ASUS 2024 Zenbooks

These ASUS Zenbook laptops use Realtek HDA codec combined with
2xCS35L41 Amplifiers using SPI or I2C with External Boost or
Internal Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231115162116.494968-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b944aa9d 14-Nov-2023 Matus Malych <matus@malych.org>

ALSA: hda/realtek: Enable Mute LED on HP 255 G10

HP 255 G10 has a mute LED that can be made to work using quirk
ALC236_FIXUP_HP_MUTE_LED_COEFBIT2.
Enable already existing quirk - at correct line to keep order

Signed-off-by: Matus Malych <matus@malych.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231114133524.11340-1-matus@malych.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 713f040c 11-Nov-2023 Chandradeep Dey <codesigning@chandradeepdey.com>

ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC

Apply the already existing quirk chain ALC294_FIXUP_ASUS_SPK to enable
the internal speaker of ASUS K6500ZC.

Signed-off-by: Chandradeep Dey <codesigning@chandradeepdey.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/NizcVHQ--3-9@chandradeepdey.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8384c0ba 10-Nov-2023 Eymen Yigit <eymenyg01@gmail.com>

ALSA: hda/realtek: Enable Mute LED on HP 255 G8

This HP Notebook uses ALC236 codec with COEF 0x07 idx 1 controlling
the mute LED. Enable already existing quirk for this device.

Signed-off-by: Eymen Yigit <eymenyg01@gmail.com>
Cc: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231110150715.5141-1-eymenyg01@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b21a669 10-Nov-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Dell ALC295 to pin fall back table

Add ALC295 to pin fall back table.
Remove 5 pin quirks for Dell ALC295.
ALC295 was only support MIC2 for external MIC function.
ALC295 assigned model "ALC269_FIXUP_DELL1_MIC_NO_PRESENCE" for pin
fall back table.
It was assigned wrong model. So, let's remove it.

Fixes: fbc571290d9f ("ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/7c1998e873834df98d59bd7e0d08c72e@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ae90e90 08-Nov-2023 Vitalii Torshyn <vitaly.torshyn@gmail.com>

ALSA: hda: ASUS UM5302LA: Added quirks for cs35L41/10431A83 on i2c bus

Proposed patch fixes initialization of CSC3551 on the UM5302LA laptop.
Patching DSDT table is not required since ASUS did added _DSD entry.
Nothing new introduced but reused work started by Stefan B.

Currently there is no official firmware available for 10431A83 on
cirrus git unfortunately.
For testing used 104317f3 (which is also seems on i2c bus):

$ cd /lib/firmware/cirrus/ && \
for fw in $(find ./ -name '*104317f3*'); do newfw=$(echo $fw | sed 's/104317f3/10431a83/g'); echo echo "$fw -> $newfw"; ln -s $f $newfw; done

With the patch applied to 6.6.0 and obviously symlinks to 104317F3 FW,
speakers works and to my susrprise they sound quite good and loud
without distortion.

Probably confirmation from cirrus team is needed on firmware.

Signed-off-by: Vitalii Torshyn <vitaly.torshyn@gmail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218119
Link: https://lore.kernel.org/r/CAHiQ-bCMPpCJ8eOYAaVVoqGkFixS1qTgSS4xfbZvL4oZV9LYew@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f0d9da19 08-Nov-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek: Add support dual speaker for Dell

Dell new platform support dual speaker. But BIOS verb table only show one speaker.
It will fill verb table for second speaker. Then bind with CS AMP model.

Fixes: de90f5165b1c ("ALSA: hda/realtek: Add support for DELL Oasis 13/14/16 laptops")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/4dd390a77bf742b8a518ac2deee00b0f@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26fd31ef 04-Nov-2023 Alex Spataru <alex_spataru@outlook.com>

ALSA: hda/realtek: Add quirk for ASUS UX7602ZM

Enables the SPI-connected CSC35L41 audio amplifier for this
laptop model.

As of BIOS version 303 it's still necessary to
modify the ACPI table to add the related _DSD properties:
https://github.com/alex-spataru/asus_zenbook_ux7602zm_sound/

Signed-off-by: Alex Spataru <alex_spataru@outlook.com>
Link: https://lore.kernel.org/r/DS7PR07MB7621BB5BB14F5473D181624CE3A4A@DS7PR07MB7621.namprd07.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ce66933 21-Sep-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Support ACPI Notification framework via component binding

For systems which have support for ACPI notifications, add a mechanism to
register a handler for ACPI notifications and then call the acpi_notify
api on the bound components.

Registering a handler in the Realtek HDA driver, allows a single handler to
be registered, which then calls into all the components, rather than
attempting to register the same handler multiple times, once for each
component.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230921162849.1988124-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c8c0a03e 17-Oct-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed ASUS platform headset Mic issue

ASUS platform Headset Mic was disable by default.
Assigned verb table for Mic pin will enable it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1155d914c20c40569f56d36c79254879@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5dedc9f5 14-Oct-2023 Artem Borisov <dedsa2002@gmail.com>

ALSA: hda/realtek: Add quirk for ASUS ROG GU603ZV

Enables the SPI-connected Cirrus amp and the required pins
for headset mic detection.

As of BIOS version 313 it is still necessary to modify the
ACPI table to add the related _DSD properties:
https://gist.github.com/Flex1911/1bce378645fc95a5743671bd5deabfc8

Signed-off-by: Artem Borisov <dedsa2002@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231014075044.17474-1-dedsa2002@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56e85993 16-Oct-2023 Luka Guzenko <l.guzenko@web.de>

ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq5xxx

This HP Laptop uses ALC236 codec with COEF 0x07 controlling the
mute LED. Enable existing quirk for this device.

Signed-off-by: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20231016221328.1521674-1-l.guzenko@web.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ccbd88be 06-Oct-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek: Change model for Intel RVP board

Intel RVP board (0x12cc) has Headset Mic issue for reboot.
If system plugged headset when system reboot the headset Mic was gone.

Fixes: 1a93f10c5b12 ("ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/28112f54c0c6496f97ac845645bc0256@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d93eeca6 21-Sep-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC287 merge RTK codec with CS CS35L41 AMP

This is merge model ALC287_FIXUP_THINKPAD_I2S_SPK and
ALC287_FIXUP_CS35L41_I2C_2_THINKPAD_ACPI.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Fixes: f7b069cf0881 ("ALSA: hda/realtek: Fix generic fixup definition for cs35l41 amp")
Link: https://lore.kernel.org/r/82a45234327c4c50b4988a27e9f64c37@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 41b07476 19-Sep-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC287 Realtek I2S speaker platform support

New platform SSID:0x231f.

0x17 was only speaker pin, DAC assigned will be 0x03. Headphone
assigned to 0x02.
Playback via headphone will get EQ filter processing.
So, it needs to swap DAC.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/8d63c6e360124e3ea2523753050e6f05@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 07058dce 12-Sep-2023 Knyazev Arseniy <poseaydone@ya.ru>

ALSA: hda/realtek: Splitting the UX3402 into two separate models

UX3402VA and UX3402ZA models require different hex values, so comibining
them into one model is incorrect.

Fixes: 491a4ccd8a02 ("ALSA: hda/realtek: Add quirk for ASUS Zenbook using CS35L41")
Signed-off-by: Knyazev Arseniy <poseaydone@ya.ru>
Link: https://lore.kernel.org/r/20230913053343.119798-1-poseaydone@ya.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb6254df 12-Sep-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed two speaker platform

If system has two speakers and one connect to 0x14 pin, use this
function will disable it.

Fixes: e43252db7e20 ("ALSA: hda/realtek - ALC287 I2S speaker platform support")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/e3f2aac3fe6a47079d728a6443358cc2@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e43252db 06-Sep-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC287 I2S speaker platform support

0x17 was only speaker pin, DAC assigned will be 0x03. Headphone
assigned to 0x02.
Playback via headphone will get EQ filter processing. So,it needs to
swap DAC.

Tested-by: Mark Pearson <mpearson@lenovo.com>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/4e4cfa1b3b4c46838aecafc6e8b6f876@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c99c26b1 24-Aug-2023 Fabian Vogt <fabian@ritter-vogt.de>

ALSA: hda/realtek: Add quirk for mute LEDs on HP ENVY x360 15-eu0xxx

The LED for the mic mute button is controlled by GPIO2.
The mute button LED is slightly more complex, it's controlled by two bits
in coeff 0x0b.

Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de>
Link: https://lore.kernel.org/r/2693091.mvXUDI8C0e@fabians-envy
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 93dc18e1 23-Aug-2023 SungHwan Jung <onenowy@gmail.com>

ALSA: hda/realtek: Add quirk for HP Victus 16-d1xxx to enable mute LED

This quirk enables mute LED on HP Victus 16-d1xxx (8A25) laptops, which
use ALC245 codec.

Signed-off-by: SungHwan Jung <onenowy@gmail.com>
Link: https://lore.kernel.org/r/20230823114051.3921-1-onenowy@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f286620b 21-Aug-2023 Colin Ian King <colin.i.king@gmail.com>

ALSA: hda/realtek: Fix spelling mistake "powe" -> "power"

There is a spelling mistake in a quirk entry. Fix it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver")
Link: https://lore.kernel.org/r/20230821080003.16678-1-colin.i.king@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3babae91 18-Aug-2023 Shenghao Ding <shenghao-ding@ti.com>

ALSA: hda/tas2781: Add tas2781 HDA driver

Integrate tas2781 configs for Lenovo Laptops. All of the tas2781s in the
laptop will be aggregated as one audio device. The code support realtek
as the primary codec. Rename "struct cs35l41_dev_name" to
"struct scodec_dev_name" for all other side codecs instead of the certain
one.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://lore.kernel.org/r/20230818085836.1442-1-shenghao-ding@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4eae4892 21-Jul-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda: hda_component: Add pre and post playback hooks to hda_component

These hooks can be used to add callbacks that would be run before and after
the main playback hooks. These hooks would be called for all amps, before
moving on to the next hook, i.e. pre_playback_hook would be called for
all amps, before the playback_hook is called for all amps, then finally
the post_playback_hook is called for all amps.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230721151816.2080453-8-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 46cdff23 15-Aug-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Remodified 3k pull low procedure

Set spec->en_3kpull_low default to true.
Then fillback ALC236 and ALC257 to false.

Additional note: this addresses a regression caused by the previous
fix 69ea4c9d02b7 ("ALSA: hda/realtek - remove 3k pull low procedure").
The previous workaround was applied too widely without necessity,
which resulted in the pop noise at PM again. This patch corrects the
condition and restores the old behavior for the devices that don't
suffer from the original problem.

Fixes: 69ea4c9d02b7 ("ALSA: hda/realtek - remove 3k pull low procedure")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217732
Link: https://lore.kernel.org/r/01e212a538fc407ca6edd10b81ff7b05@realtek.com
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 98c68ea0 09-Aug-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Switch Dell Oasis models to use SPI

All I2C Dell Oasis models using CS35L41 have been changed to use SPI.
In addition, System 10280cc5 is no longer required.

Fixes: de90f5165b1c ("ALSA: hda/realtek: Add support for DELL Oasis 13/14/16 laptops")
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230809142957.675933-3-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb8cce69 09-Aug-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for HP G11 Laptops

These HP G11 laptops use Realtek HDA codec combined with
2xCS35L41 Amplifiers using SPI or I2C with External Boost.

Laptop 103c8c26 has been removed as this has been replaced
by this new series of laptops.

Fixes: 3e10f6ca76c4 ("ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops")
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230809142957.675933-2-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8019a4ab 26-Jul-2023 Pavel Asyutchenko <svenpavel@gmail.com>

ALSA: hda/realtek: Support ASUS G713PV laptop

This laptop has CS35L41 amp connected via I2C.

With this patch speakers begin to work if the
missing _DSD properties are added to ACPI tables.

Signed-off-by: Pavel Asyutchenko <svenpavel@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230726223732.20775-1-svenpavel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d510acb6 25-Jul-2023 Luka Guzenko <l.guzenko@web.de>

ALSA: hda/relatek: Enable Mute LED on HP 250 G8

This HP Notebook used ALC236 codec with COEF 0x07 idx 1 controlling
the mute LED. Enable already existing quirk for this device.

Signed-off-by: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230725111509.623773-1-l.guzenko@web.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# de90f516 20-Jul-2023 Vitaly Rodionov <vitalyr@opensource.cirrus.com>

ALSA: hda/realtek: Add support for DELL Oasis 13/14/16 laptops

Adding support for new Dell laptops using Cirrus Logic CS35L41
smart amplifiers with Realtek codec.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230720082022.13033-2-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f7b069cf 20-Jul-2023 Vitaly Rodionov <vitalyr@opensource.cirrus.com>

ALSA: hda/realtek: Fix generic fixup definition for cs35l41 amp

Generic fixup for CS35L41 amplifies should not have vendor specific
chained fixup. For ThinkPad laptops with led issue, we can just add
specific fixup.

Fixes: a6ac60b36dade (ALSA: hda/realtek: Fix mute led issue on thinkpad with cs35l41 s-codec)
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230720082022.13033-1-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0659400f 18-Jul-2023 Luka Guzenko <l.guzenko@web.de>

ALSA: hda/realtek: Enable Mute LED on HP Laptop 15s-eq2xxx

The HP Laptop 15s-eq2xxx uses ALC236 codec and controls the mute LED using
COEF 0x07 index 1. No existing quirk covers this configuration.
Adds a new quirk and enables it for the device.

Signed-off-by: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230718161241.393181-1-l.guzenko@web.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c250ef89 18-Jul-2023 Christoffer Sandberg <cs@tuxedo.de>

ALSA: hda/realtek: Add quirk for Clevo NS70AU

Fixes headset detection on Clevo NS70AU.

Co-developed-by: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Christoffer Sandberg <cs@tuxedo.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230718145722.10592-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 69ea4c9d 13-Jul-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - remove 3k pull low procedure

This was the ALC283 depop procedure.
Maybe this procedure wasn't suitable with new codec.
So, let us remove it. But HP 15z-fc000 must do 3k pull low. If it
reboot with plugged headset,
it will have errors show don't find codec error messages. Run 3k pull
low will solve issues.
So, let AMD chipset will run this for workarround.

Fixes: 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording issue")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Reported-by: Joseph C. Sible <josephcsible@gmail.com>
Closes: https://lore.kernel.org/r/CABpewhE4REgn9RJZduuEU6Z_ijXNeQWnrxO1tg70Gkw=F8qNYg@mail.gmail.com/
Link: https://lore.kernel.org/r/4678992299664babac4403d9978e7ba7@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5251605f 06-Jul-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS ROG GZ301V

Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GZ301V series which uses an SPI connected Cirrus amp.

While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230706223323.30871-2-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 72cea3a3 03-Jul-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Whitespace fix

Remove an erroneous whitespace.

Fixes: 31278997add6 ("ALSA: hda/realtek - Add headset quirk for Dell DT")
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-6-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 33d7c9c3 03-Jul-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS ROG G614Jx

Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG G614J series which uses an SPI connected Cirrus amp.

While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-5-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b759a5f0 03-Jul-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Amend G634 quirk to enable rear speakers

Amends the last quirk for the G634 with 0x1caf subsys to enable the rear
speakers via pincfg.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-4-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9abc77fb 03-Jul-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS ROG GA402X

Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GA402X series which uses an I2C connected Cirrus amp.

While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-3-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8cc87c05 03-Jul-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS ROG GX650P

Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GV601V series which uses an I2C connected Cirrus amp.

While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230704044619.19343-2-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 73f1c75d 02-Jul-2023 dengxiang <dengxiang@nfschina.com>

ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760

These models use NSIWAY amplifiers for internal speaker, but cannot put
sound outside from these amplifiers. So eapd verbs are needed to initialize
the amplifiers. They can be added during boot to get working sound out
of internal speaker.

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


# 22065e42 28-Jun-2023 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for Clevo NPx0SNx

This applies a SND_PCI_QUIRK(...) to the Clevo NPx0SNx barebones fixing the
microphone not being detected on the headset combo port.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230628155434.584159-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e94f1f96 26-Jun-2023 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook

On HP EliteBook 835/845/845W G10, the audio LEDs can be enabled by
ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Fixes: 3e10f6ca76c4 ("ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops")
Link: https://lore.kernel.org/r/20230626130301.301712-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 724418b8 21-Jun-2023 Matthew Anderson <ruinairas1992@gmail.com>

ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audio

This requires a patched ACPI table or a firmware from ASUS to work because
the system does not come with the _DSD field for the CSC3551.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217550
Signed-off-by: Matthew Anderson <ruinairas1992@gmail.com>
Tested-by: Philip Mueller <philm@manjaro.org>
Link: https://lore.kernel.org/r/20230621161714.9442-1-ruinairas1992@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82edd1bd 21-Jun-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS ROG GV601V

Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG GV601V series.

While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230621085715.5382-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 555434fd 19-Jun-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS ROG G634Z

Adds the required quirk to enable the Cirrus amp and correct pins
on the ASUS ROG G634Z series.

While this works if the related _DSD properties are made available, these
aren't included in the ACPI of these laptops (yet).

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20230619060320.1336455-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a2a87148 09-Jun-2023 Edson Juliano Drosdeck <edson.drosdeck@gmail.com>

ALSA: hda/realtek: Add a quirk for Compaq N14JP6

Add a quirk for Compaq N14JP6 to fixup ALC897 headset MIC no sound.

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230609201058.523499-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b752a385 06-Jun-2023 Chris Chiu <chris.chiu@canonical.com>

ALSA: hda/realtek: Enable 4 amplifiers instead of 2 on a HP platform

In the commit 7bb62340951a ("ALSA: hda/realtek: fix speaker, mute/micmute
LEDs not work on a HP platform"), speakers and LEDs are fixed but only 2
CS35L41 amplifiers on SPI bus connected to Realtek codec are enabled. Need
the ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED to get all amplifiers working.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Fixes: 7bb62340951a ("ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230606145747.135966-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ebcbfd84 06-Jun-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Delete cs35l41 component master during free

This ensures that the driver is properly cleaned up when freed.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20230606103436.455348-4-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da209f7a 05-Jun-2023 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo NS50AU

Fixes headset detection on Clevo NS50AU.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230605163834.24653-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 811dd426 05-Jun-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for Asus ROG 2024 laptops using CS35L41

Add support for Asus ROG 2024 models using CS35L41 SPI with Internal
Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230605153308.448550-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a93f10c 02-Jun-2023 Sayed, Karimuddin <karimuddin.sayed@intel.com>

ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256

Add "Intel Reference boad" and "Intel NUC 13" SSID in the alc256.
Enable jack headset volume buttons

Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Sayed, Karimuddin <karimuddin.sayed@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602193812.66768-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ca4c8d4 01-Jun-2023 RenHai <kean0048@gmail.com>

ALSA: hda/realtek: Add Lenovo P3 Tower platform

Headset microphone on this platform does not work without
ALC897_FIXUP_HEADSET_MIC_PIN fixup.

Signed-off-by: RenHai <kean0048@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230602003604.975892-1-kean0048@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 527c356b 26-May-2023 Ai Chao <aichao@kylinos.cn>

ALSA: hda/realtek: Add a quirk for HP Slim Desktop S01

Add a quirk for HP Slim Desktop S01 to fixup headset MIC no presence.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230526094704.14597-1-aichao@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4ca110ca 24-May-2023 Bin Li <bin.li@canonical.com>

ALSA: hda/realtek: Enable headset onLenovo M70/M90

Lenovo M70/M90 Gen4 are equipped with ALC897, and they need
ALC897_FIXUP_HEADSET_MIC_PIN quirk to make its headset mic work.
The previous quirk for M70/M90 is for Gen3.

Signed-off-by: Bin Li <bin.li@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230524113755.1346928-1-bin.li@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9dc68a4f 12-May-2023 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Fix mute and micmute LEDs for yet another HP laptop

There's yet another laptop that needs the fixup to enable mute and
micmute LEDs. So do it accordingly.

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


# 92553ee0 10-May-2023 Ryan C. Underwood <nemesis@icequake.net>

ALSA: hda/realtek: Apply HP B&O top speaker profile to Pavilion 15

The Pavilion 15 line has B&O top speakers similar to the x360 and
applying the same profile produces good sound. Without this, the
sound would be tinny and underpowered without either applying
model=alc295-hp-x360 or booting another OS first.

Signed-off-by: Ryan Underwood <nemesis@icequake.net>
Fixes: 563785edfcef ("ALSA: hda/realtek - Add quirk entry for HP Pavilion 15")
Link: https://lore.kernel.org/r/ZF0mpcMz3ezP9KQw@icequake.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b963ae1 11-May-2023 Alexandru Sorodoc <ealex95@gmail.com>

ALSA: hda/realtek: Add quirks for ASUS GU604V and GU603V

These models use 2 CS35L41 amplifiers using SPI for down-facing
speakers.

alc285_fixup_speaker2_to_dac1 is needed to fix volume control of the
down-facing speakers.

Pin configs are needed to enable headset mic detection.

Note that these models lack the ACPI _DSD properties needed to
initialize the amplifiers. They can be added during boot to get working
sound out of the speakers:
https://gist.github.com/lamperez/862763881c0e1c812392b5574727f6ff

Signed-off-by: Alexandru Sorodoc <ealex95@gmail.com>
Link: https://lore.kernel.org/r/20230511161510.315170-1-ealex95@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3e10f6ca 10-May-2023 Vitaly Rodionov <vitalyr@opensource.cirrus.com>

ALSA: hda/realtek: Add quirk for HP EliteBook G10 laptops

Add support for HP EliteBook 835/845/845W/865 G10 laptops
with CS35L41 amplifiers on I2C/SPI bus connected to Realtek codec.

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230510142227.32945-1-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 90670ef7 05-May-2023 Ai Chao <aichao@kylinos.cn>

ALSA: hda/realtek: Add a quirk for HP EliteDesk 805

Add a quirk for HP EliteDesk 805 to fixup ALC3867 headset MIC no sound.

Signed-off-by: Ai Chao <aichao@kylinos.cn>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230506022653.2074343-1-aichao@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4671b7f 05-May-2023 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for 2nd ASUS GU603

Add quirk for GU603 with 0x1c62 variant of codec.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230505235824.49607-2-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0a6b36c5 05-May-2023 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek: Add quirk for Clevo L140AU

Fixes headset detection on Clevo L140AU.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230505163651.21257-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56fc217f 05-May-2023 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Fix mute and micmute LEDs for an HP laptop

There's another laptop that needs the fixup to enable mute and micmute
LEDs. So do it accordingly.

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


# e7477cb9 02-May-2023 Caleb Harper <calebharp2005@gmail.com>

ALSA: hda/realtek: support HP Pavilion Aero 13-be0xxx Mute LED

This patch adds support for the mute LED on the HP Pavilion Aero Laptop
13-be0xxx. The current behavior is that the LED does not turn on at any
time and does not indicate to the user whether the sound is muted.

The solution is to add a PCI quirk to properly recognize and support the
LED on this device.

This change has been tested on the device in question using modified
versions of kernels 6.0.7-6.2.12 on Arch Linux.

Signed-off-by: Caleb Harper <calebharp2005@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230503175026.6796-1-calebharp2005@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7e2d0662 01-May-2023 Mark Asselstine <asselsm@gmail.com>

ALSA: hda/realtek: Add quirk for ASUS UM3402YAR using CS35L41

This Asus Zenbook laptop uses Realtek HDA codec combined with
2xCS35L41 Amplifiers using I2C with External Boost.

Signed-off-by: Mark Asselstine <asselsm@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230501231346.54979-1-asselsm@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 067eb084 26-Apr-2023 Vitaly Rodionov <vitalyr@opensource.cirrus.com>

ALSA: hda/realtek: Add quirk for ThinkPad P1 Gen 6

Lenovo ThinkPad P1 Gen 6 laptop has 2 CS35L41 amplifies
on I2C bus connected to Realtek codec.

Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230427110452.13787-1-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2ae147d6 19-Apr-2023 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook

There is a HP ProBook 455 G10 which using ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and
micmute LED work.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230420035942.66817-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bc66b591 19-Apr-2023 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/realtek: Remove specific patch for Dell Precision 3260

Unfortunately, the tester gave a weak feedback (working/non-working) for
this case. After the double confirmation, this change is not really required.
The standard code with alc269_fallback_pin_fixup_tbl should work on this
hardware.

Fixes: 5911d78fabbb ("ALSA: hda/realtek: Improve support for Dell Precision 3260")
Fixes: 5f4efc9dfcfd ("ALSA: hda/realtek: Fix support for Dell Precision 3260")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230419081121.304846-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8eda19cd 12-Apr-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for Lenovo Z13/Z16 Gen2

These Lenovo laptops use Realtek HDA codec combined with
2xCS35L41 Amplifiers using I2C with External Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230412160531.182007-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e959f2be 06-Apr-2023 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA: hda: patch_realtek: add quirk for Asus N7601ZM

Add pins and verbs needed to enable speakers and jack.

The pins and verbs configurations were identified by snooping the
Windows driver commands, with a nice write-up here:
https://brakkee.org/site/2023/02/07/fixing-sound-on-the-asus-n7601zm/

Reported-by: Erik Brakkee <erik@brakkee.org>
Link: https://github.com/thesofproject/linux/issues/4176
Tested-by: Erik Brakkee <erik@brakkee.org>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230406152725.15191-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 36d4d213 31-Mar-2023 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek: Add quirk for Clevo X370SNW

Fixes speaker output and headset detection on Clevo X370SNW.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230331162317.14992-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9fdc1605 31-Mar-2023 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook

There is a HP ProBook which using ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and
micmute LED work.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230331083242.58416-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 52aad393 28-Mar-2023 huangwenhui <huangwenhuia@uniontech.com>

ALSA: hda/realtek: Add quirk for Lenovo ZhaoYang CF4620Z

Fix headset microphone detection on Lenovo ZhaoYang CF4620Z.

[ adjusted to be applicable to the latest tree -- tiwai ]

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


# 5f4efc9d 22-Mar-2023 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/realtek: Fix support for Dell Precision 3260

Unfortunately, in commit 5911d78fabbb a wrong codec patch was selected.
The model=alc283-dac-wcaps is equivalent to ALC283_FIXUP_CHROME_BOOK not
ALC295_FIXUP_CHROME_BOOK.

Fixes: 5911d78fabbb ("ALSA: hda/realtek: Improve support for Dell Precision 3260")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230322153404.386473-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b7a58228 17-Mar-2023 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirks for some Clevo laptops

Add the audio quirk for some of Clevo's latest RPL laptops:

- NP50RNJS (ALC256)
- NP70SNE (ALC256)
- PD50SNE (ALC1220)
- PE60RNE (ALC1220)

Co-authored-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230317141825.11807-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a86e79e3 07-Mar-2023 Hamidreza H. Fard <nitocris@posteo.net>

ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro

Samsung Galaxy Book2 Pro (13" 2022 NP930XED-KA1DE) with codec SSID
144d:c868 requires the same workaround for enabling the speaker amp
like other Samsung models with ALC298 code.

Signed-off-by: Hamidreza H. Fard <nitocris@posteo.net>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230307163741.3878-1-nitocris@posteo.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7bb62340 07-Mar-2023 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform

There is a HP platform needs ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED quirk to
make mic-mute/audio-mute/speaker working.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230307135317.37621-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ea24b995 23-Feb-2023 Łukasz Stelmach <l.stelmach@samsung.com>

ALSA: hda/realtek: Add quirk for HP EliteDesk 800 G6 Tower PC

HP EliteDesk 800 G6 Tower PC (103c:870c) requires a quirk for enabling
headset-mic.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217008
Link: https://lore.kernel.org/r/20230223074749.1026060-1-l.stelmach@samsung.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5911d78f 21-Feb-2023 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/realtek: Improve support for Dell Precision 3260

The headset jack works better with model=alc283-dac-wcaps. Without this
option, the headset insertion (separate physical jack) may not be handled
correctly (re-insertion is required).

It seems that it follows the "Intel Reference Board" defaults.

Reported-by: steven_wu2@dell.com
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20230221102157.515852-1-perex@perex.cz
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9251584a 14-Feb-2023 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: Enable mute/micmute LEDs and speaker support for HP Laptops

On HP Laptops, requires the ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED quirk to
make its audio LEDs and speaker work.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230214140432.39654-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5007b848 13-Feb-2023 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform.

There is a HP platform needs ALC236_FIXUP_HP_GPIO_LED quirk to
make mic-mute/audio-mute working.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230214035853.31217-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2bdccfd2 12-Feb-2023 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - fixed wrong gpio assigned

GPIO2 PIN use for output. Mask Dir and Data need to assign for 0x4. Not 0x3.
This fixed was for Lenovo Desktop(0x17aa1056). GPIO2 use for AMP enable.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/8d02bb9ac8134f878cd08607fdf088fd@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88d18b88 07-Feb-2023 Edson Juliano Drosdeck <edson.drosdeck@gmail.com>

ALSA: hda/realtek: Add Positivo N14KP6-TG

Positivo N14KP6-TG (1c6c:1251)
require quirk for enabling headset-mic

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230207183720.2519-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6c4715aa 07-Feb-2023 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform.

There is a HP platform needs ALC236_FIXUP_HP_GPIO_LED quirk to
make mic-mute/audio-mute working.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230207083011.100189-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7a17e842 06-Feb-2023 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirk for ASUS UM3402 using CS35L41

This Asus Zenbook laptop use Realtek HDA codec combined with
2xCS35L41 Amplifiers using I2C with External Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230206150019.3825120-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9a6804aa 05-Feb-2023 Elvis Angelaccio <elvis.angelaccio@kde.org>

ALSA: hda/realtek: Enable mute/micmute LEDs on HP Elitebook, 645 G9

The HP Elitebook 645 G9 laptop (with motherboard model 89D2) uses the
ALC236 codec and requires the alc236_fixup_hp_mute_led_micmute_vref
fixup in order to enable mute/micmute LEDs.

Note: the alc236_fixup_hp_gpio_led fixup, which is used by the Elitebook
640 G9, does not work with the 645 G9.

[ rearranged the entry in SSID order -- tiwai ]

Signed-off-by: Elvis Angelaccio <elvis.angelaccio@kde.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/4055cb48-e228-8a13-524d-afbb7aaafebe@kde.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd401fd7 29-Jan-2023 Guillaume Pinot <texitoi@texitoi.eu>

ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro 360

Samsung Galaxy Book2 Pro 360 (13" 2022 NP930QED-KA1FR) with codec SSID
144d:ca03 requires the same workaround for enabling the speaker amp
like other Samsung models with ALC298 codec.

Cc: <stable@vger.kernel.org>
Signed-off-by: Guillaume Pinot <texitoi@texitoi.eu>
Link: https://lore.kernel.org/r/20230129171338.17249-1-texitoi@texitoi.eu
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6a28a25d 23-Jan-2023 Victor Shyba <victor1984@riseup.net>

ALSA: hda/realtek: Add Acer Predator PH315-54

Same issue as SP513-54N: Headset microphone does not work without
ALC255_FIXUP_ACER_MIC_NO_PRESENCE fixup.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=211853
Cc: <stable@vger.kernel.org>
Signed-off-by: Victor Shyba <victor1984@riseup.net>
Link: https://lore.kernel.org/r/20230123222129.17589-1-victor1984@riseup.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 858c5415 18-Jan-2023 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs, speaker don't work for a HP platform

There is a HP platform needs ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED quirk to
make mic-mute/audio-mute/speaker working.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230118115446.14902-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca88eeb3 10-Jan-2023 Luka Guzenko <l.guzenko@web.de>

ALSA: hda/realtek: Enable mute/micmute LEDs on HP Spectre x360 13-aw0xxx

The HP Spectre x360 13-aw0xxx devices use the ALC285 codec with GPIO 0x04
controlling the micmute LED and COEF 0x0b index 8 controlling the mute LED.
A quirk was added to make these work as well as a fixup.

Signed-off-by: Luka Guzenko <l.guzenko@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230110202514.2792-1-l.guzenko@web.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9c694fbf 04-Jan-2023 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs don't work for a HP platform

There is a HP platform uses ALC236 codec which using GPIO2 to control
mute LED and GPIO1 to control micmute LED.
Thus, add a quirk to make them work.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230105044154.8242-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a5751933 03-Jan-2023 Chris Chiu <chris.chiu@canonical.com>

ALSA: hda - Enable headset mic on another Dell laptop with ALC3254

There is another Dell Latitude laptop (1028:0c03) with Realtek
codec ALC3254 which needs the ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
instead of the default matched ALC269_FIXUP_DELL1_MIC_NO_PRESENCE.
Apply correct fixup for this particular model to enable headset mic.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230103095332.730677-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1f680609 30-Dec-2022 Yuchi Yang <yangyuchi66@gmail.com>

ALSA: hda/realtek - Turn on power early

Turn on power early to avoid wrong state for power relation register.
This can earlier update JD state when resume back.

Signed-off-by: Yuchi Yang <yangyuchi66@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/e35d8f4fa18f4448a2315cc7d4a3715f@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4517c4f 26-Dec-2022 Chris Chiu <chris.chiu@canonical.com>

ALSA: hda/realtek: Apply dual codec fixup for Dell Latitude laptops

The Dell Latiture 3340/3440/3540 laptops with Realtek ALC3204 have
dual codecs and need the ALC1220_FIXUP_GB_DUAL_CODECS to fix the
conflicts of Master controls. The existing headset mic fixup for
Dell is also required to enable the jack sense and the headset mic.

Introduce a new fixup to fix the dual codec and headset mic issues
for particular Dell laptops since other old Dell laptops with the
same codec configuration are already well handled by the fixup in
alc269_fallback_pin_fixup_tbl[].

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221226114303.4027500-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4bf5bf54 07-Dec-2022 Edward Pacman <edward@edward-p.xyz>

ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB

Lenovo TianYi510Pro-14IOB (17aa:3742)
require quirk for enabling headset-mic

Signed-off-by: Edward Pacman <edward@edward-p.xyz>
Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216756
Link: https://lore.kernel.org/r/20221207133218.18989-1-edward@edward-p.xyz
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2912cdda 05-Dec-2022 Philipp Jungkamp <p.jungkamp@gmx.net>

ALSA: patch_realtek: Fix Dell Inspiron Plus 16

The Dell Inspiron Plus 16, in both laptop and 2in1 form factor, has top
speakers connected on NID 0x17, which the codec reports as unconnected.
These speakers should be connected to the DAC on NID 0x03.

Signed-off-by: Philipp Jungkamp <p.jungkamp@gmx.net>
Link: https://lore.kernel.org/r/20221205163713.7476-1-p.jungkamp@gmx.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1d8025ec 27-Nov-2022 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook

There is a HP ProBook which using ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and
micmute LED work.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221128022849.13759-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1abfd71e 15-Nov-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360

Samsung Galaxy Book Pro 360 (13" 2021 NP930QBD-ke1US) with codec SSID
144d:c1a6 requires the same workaround for enabling the speaker amp
like other Samsung models with ALC298 codec.

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


# b18a4563 15-Nov-2022 Emil Flink <emil.flink@gmail.com>

ALSA: hda/realtek: fix speakers for Samsung Galaxy Book Pro

The Samsung Galaxy Book Pro seems to have the same issue as a few
other Samsung laptops, detailed in kernel bug report 207423. Sound from
headphone jack works, but not the built-in speakers.

alsa-info: http://alsa-project.org/db/?f=b40ba609dc6ae28dc84ad404a0d8a4bbcd8bea6d

Signed-off-by: Emil Flink <emil.flink@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221115144500.7782-1-emil.flink@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 79e28f2a 09-Nov-2022 Edson Juliano Drosdeck <edson.drosdeck@gmail.com>

ALSA: hda/realtek: Add Positivo C6300 model quirk

Positivo Master C6300 (1849:a233) require quirk for anabling headset-mic

Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221109171732.5417-1-edson.drosdeck@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8d06679b 28-Oct-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirk for ASUS Zenbook using CS35L41

This Asus Zenbook laptop use Realtek HDA codec combined with
2xCS35L41 Amplifiers using I2C with Internal Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221028102742.2588687-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f86bfeb6 22-Oct-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add another HP ZBook G9 model quirks

HP ZBook Firefly 16 G9 (103c:896d) and HP ZBook Power 15.6 G9
(103c:89c0) require the same quirk for enabling CS35L41 speaker amps.

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


# b51c2253 20-Oct-2022 Maciej S. Szmigiero <maciej.szmigiero@oracle.com>

ALSA: hda/realtek: Use snd_ctl_rename() to rename a control

With the recent addition of hashed controls lookup it's not enough to just
update the control name field, the hash entries for the modified control
have to be updated too.

snd_ctl_rename() takes care of that, so use it instead of directly
modifying the control name.

Fixes: c27e1efb61c5 ("ALSA: control: Use xarray for faster lookups")
Cc: stable@vger.kernel.org
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Link: https://lore.kernel.org/r/37496bd80f91f373268148f877fd735917d97287.1666296963.git.maciej.szmigiero@oracle.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 491a4ccd 18-Oct-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirk for ASUS Zenbook using CS35L41

This Asus Zenbook laptop use Realtek HDA codec combined with
2xCS35L41 Amplifiers using SPI with External Boost.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221018121506.2561397-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a8dfb850 13-Oct-2022 Yang Yingliang <yangyingliang@huawei.com>

ALSA: hda/realtek: simplify the return of comp_bind()

After commit 23904f7b2518 ("ALSA: hda: cs35l41: Remove
suspend/resume hda hooks"), the return of comp_bind()
can be simplified. No functional changed.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221014013640.1142107-1-yangyingliang@huawei.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23904f7b 11-Oct-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda: cs35l41: Remove suspend/resume hda hooks

The current code uses calls from the HDA Codec driver to
determine when to suspend/resume by calling hooks via the
hda_component binding.
However, this means the cs35l41 driver relies on the HDA
Codec driver to tell it when to suspend or resume,
creating an additional external dependency, and potentially
creating race conditions in the future. It is better for
the cs35l41 hda driver to decide for itself when the part
should be suspended or resumed.
This makes supporting system suspend easier.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221011143552.621792-5-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4f2e56a5 10-Oct-2022 Saranya Gopal <saranya.gopal@intel.com>

ALSA: hda/realtek: Add Intel Reference SSID to support headset keys

This patch fixes the issue with 3.5mm headset keys
on RPL-P platform.

[ Rearranged the entry in SSID order by tiwai ]

Signed-off-by: Saranya Gopal <saranya.gopal@intel.com>
Signed-off-by: Ninad Naik <ninad.naik@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221011044916.2278867-1-saranya.gopal@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2ea8e129 10-Oct-2022 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS GV601R laptop

The ASUS ROG X16 (GV601R) series laptop has the same node-to-DAC pairs
as early models and the G14, this includes bass speakers which are by
default mapped incorrectly to the 0x06 node.

Add a quirk to use the same DAC pairs as the G14.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221010070347.36883-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 66ba7c88 10-Oct-2022 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Correct pin configs for ASUS G533Z

The initial fix for ASUS G533Z was based on faulty information. This
fixes the pincfg to values that have been verified with no existing
module options or other hacks enabled.

Enables headphone jack, and 5.1 surround.

[ corrected the indent level by tiwai ]

Fixes: bc2c23549ccd ("ALSA: hda/realtek: Add pincfg for ASUS G533Z HP jack")
Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20221010065702.35190-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 417b9c51 05-Oct-2022 Callum Osmotherly <callum.osmotherly@gmail.com>

ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530

After some feedback from users with Dell Precision 5530 machines, this
patch reverts the previous change to add ALC289_FIXUP_DUAL_SPK.
While it improved the speaker output quality, it caused the headphone
jack to have an audible "pop" sound when power saving was toggled.

Fixes: 1885ff13d4c4 ("ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop")
Signed-off-by: Callum Osmotherly <callum.osmotherly@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/Yz0uyN1zwZhnyRD6@piranha
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35a17444 30-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: More robust component matching for CS35L41

As the previous commit implies, a system may have a different SPI bus
number that is embedded in the device string. And, assuming the fixed
bus number is rather fragile; it may be assigned differently depending
on the configuration or on the boot environment. Once when a bus
number change happens, the binding fails, resulting in the silence.

This patch tries to make the matching a bit more relaxed, allowing to
bind with a different bus number (or without it). So the previous
fix, the introduction of ALC245_FIXUP_CS35L41_SPI1_2 fixup became
superfluous, and this is unified to ALC245_FIXUP_CS35L41_SPI_2.

Fixes: 225f6e1bc151 ("ALSA: hda/realtek: Add quirk for HP Zbook Firefly 14 G9 model")
Link: https://lore.kernel.org/r/20220930084810.10435-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 225f6e1b 29-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add quirk for HP Zbook Firefly 14 G9 model

HP Zbook Firefly 14 G9 model (103c:8abb) requires yet another binding
with CS35L41 codec, but with a slightly different configuration. It's
over spi1 instead of spi0. Create a new fixup entry for that.

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


# 49632230 18-Sep-2022 Daniel Houldsworth <dhould3@gmail.com>

ALSA: hda/realtek: Add a quirk for HP OMEN 16 (8902) mute LED

Similair to the HP OMEN 15, the HP OMEN 16 also needs
ALC285_FIXUP_HP_MUTE_LED for the mute LED to work.

[ Rearranged the entry in PCI SSID order by tiwai ]

Signed-off-by: Daniel Houldsworth <dhould3@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220918171300.24693-1-dhould3@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ba1f8180 15-Sep-2022 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add quirk for ASUS GA503R laptop

The ASUS G15 2022 (GA503R) series laptop has the same node-to-DAC pairs
as early models and the G14, this includes bass speakers which are by
default mapped incorrectly to the 0x06 node.

Add a quirk to use the same DAC pairs as the G14.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220915080921.35563-4-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bc2c2354 15-Sep-2022 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add pincfg for ASUS G533Z HP jack

Fixes up the pincfg for ASUS ROG Strix G15 (G533Z) headphone combo jack

[ Fixed the position in the quirk table by tiwai ]

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220915080921.35563-3-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c611e659 15-Sep-2022 Luke D. Jones <luke@ljones.dev>

ALSA: hda/realtek: Add pincfg for ASUS G513 HP jack

Fixes up the pincfg for ASUS ROG Strix G513 headphone and mic combo jack

[ Fixed the position in the quirk table by tiwai ]

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220915080921.35563-2-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b16c8f22 15-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-arrange quirk table entries

A few entries have been mistakenly inserted in wrong positions without
considering the SSID ordering. Place them at right positions.

Fixes: b7557267c233 ("ALSA: hda/realtek: Add quirk for ASUS GA402")
Fixes: 94db9cc8f8fa ("ALSA: hda/realtek: Add quirk for ASUS GU603")
Fixes: 739d0959fbed ("ALSA: hda: Add quirk for ASUS Flow x13")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220915154724.31634-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1885ff13 15-Sep-2022 Callum Osmotherly <callum.osmotherly@gmail.com>

ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5530 laptop

Just as with the 5570 (and the other Dell laptops), this enables the two
subwoofer speakers on the Dell Precision 5530 together with the main
ones, significantly increasing the audio quality. I've tested this
myself on a 5530 and can confirm it's working as expected.

Signed-off-by: Callum Osmotherly <callum.osmotherly@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YyMjQO3mhyXlMbCf@piranha
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bdc9b739 14-Sep-2022 Callum Osmotherly <callum.osmotherly@gmail.com>

ALSA: hda/realtek: Enable 4-speaker output Dell Precision 5570 laptop

The Dell Precision 5570 uses the same 4-speakers-on-ALC289 just like the
previous Precision 5560. I replicated that patch onto this one, and can
confirm that the audio is much better (the woofers are now working);
I've tested it on my Dell Precision 5570.

Signed-off-by: Callum Osmotherly <callum.osmotherly@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YyGbWM5wEoFMbW2v@piranha
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cbcdf8c4 12-Sep-2022 huangwenhui <huangwenhuia@uniontech.com>

ALSA: hda/realtek: Add quirk for Huawei WRT-WX9

Fixes headphone and headset microphone detection on Huawei WRT-WX9.

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


# a2d57ebe 27-Aug-2022 Kacper Michajłow <kasper93@gmail.com>

ALSA: hda/realtek: Add speaker AMP init for Samsung laptops with ALC298

Magic initialization sequence was extracted from Windows driver and
cleaned up manually.

Fixes internal speakers output.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=207423
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1851518
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220827203328.30363-1-kasper93@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 90d74fdb 17-Aug-2022 Christoffer Sandberg <cs@tuxedo.de>

ALSA: hda/realtek: Add quirk for Clevo NS50PU, NS70PU

Fixes headset microphone detection on Clevo NS50PU and NS70PU.

Signed-off-by: Christoffer Sandberg <cs@tuxedo.de>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220817135144.34103-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 70cfdd03 16-Aug-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add quirk for Lenovo Yoga7 14IAL7

Lenovo Yoga7 14IAL7 requires the same quirk as Lenovo Yoga9 14IAP7 for
fixing the bass speaker problems.

Reported-by: Pascal Gross <baipush@tutanota.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/N9_CjBz--3-2@tutanota.com
Link: https://lore.kernel.org/r/20220816132132.15520-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 461122b9 15-Aug-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add quirks for ASUS Zenbooks using CS35L41

These Asus Zenbook laptop use Realtek HDA codec combined with
2xCS35L41 Amplifiers using SPI.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220815141953.25197-1-sbinding@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 30267718 09-Aug-2022 Bedant Patnaik <bedant.patnaik@gmail.com>

ALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED

Board ID 8786 seems to be another variant of the Omen 15 that needs
ALC285_FIXUP_HP_MUTE_LED for working mute LED.

Signed-off-by: Bedant Patnaik <bedant.patnaik@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220809142455.6473-1-bedant.patnaik@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f882c4be 05-Aug-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda/realtek: Add quirk for another Asus K42JZ model

There is another Asus K42JZ model with the PCI SSID 1043:1313
that requires the quirk ALC269VB_FIXUP_ASUS_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/20220805074534.20003-1-tangmeng@uniontech.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 24df5428 03-Aug-2022 Ivan Hasenkampf <ivan.hasenkampf@gmail.com>

ALSA: hda/realtek: Add quirk for HP Spectre x360 15-eb0xxx

Fixes speaker output on HP Spectre x360 15-eb0xxx

[ re-sorted in SSID order by tiwai ]

Signed-off-by: Ivan Hasenkampf <ivan.hasenkampf@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220803164001.290394-1-ivan.hasenkampf@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# be561ffa 30-Jul-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo NV45PZ

Fixes headset detection on Clevo NV45PZ.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220731032243.4300-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3790a3d6 29-Jul-2022 Philipp Jungkamp <p.jungkamp@gmx.net>

ALSA: hda/realtek: Add quirk for Lenovo Yoga9 14IAP7

The Lenovo Yoga 9 14IAP7 is set up similarly to the Thinkpad X1 7th and
8th Gen. It also has the speakers attached to NID 0x14 and the bass
speakers to NID 0x17, but here the codec misreports the NID 0x17 as
unconnected.

The pincfg and hda verbs connect and activate the bass speaker
amplifiers, but the generic driver will connect them to NID 0x06 which
has no volume control. Set connection list/preferred connections is
required to gain volume control.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Signed-off-by: Philipp Jungkamp <p.jungkamp@gmx.net>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220729162103.6062-1-p.jungkamp@gmx.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1e24881d 27-Jul-2022 Lucas Tanure <tanureal@opensource.cirrus.com>

ALSA: hda: cs35l41: Support CLSA0101

Add support for Intel version of Legion 7 laptop.

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220727095924.80884-3-tanureal@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c578d5da 19-Jul-2022 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Enable speaker and mute LEDs for HP laptops

Two more HP laptops that use cs35l41 AMP for speaker and GPIO for mute
LEDs.

So use the existing quirk to enable them accordingly.

[ Sort the entries at the SSID order by tiwai ]

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Reviewed-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220719142015.244426-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1873ebd3 29-Jun-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda: cs35l41: Support Hibernation during Suspend

CS35L41 supports hibernation during suspend when using
DSP firmware.
When the driver suspends it will hibernate the part, if
firmware is running, and resume will wake from hibernation.
CS35L41 driver will suspend/resume when requested by
hda driver.
Note that suspend/resume and hibernation is only supported
when firmware is running.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220630002335.366545-10-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 22d5cbd2 29-Jun-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda: cs35l41: Save codec object inside component struct

This is required for ALSA control support.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220630002335.366545-4-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b043a8f 13-Jul-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop

The headset on this machine is not defined, after applying the quirk
ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well

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


# 4ba5c853 13-Jul-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc221

On a HP 288 Pro G2 MT (X9W02AV), the front mic could not be detected.
In order to get it working, the pin configuration needs to be set
correctly, and the ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE fixup needs
to be applied.

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


# 61d30785 12-Jul-2022 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP machines

The HP ProBook 440/450 G9 and EliteBook 640/650 G9 have multiple
motherboard design and they are using different subsystem ID of audio
codec. Add the same quirk for other MBs.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220713022706.22892-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dbe75d31 12-Jul-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671

On a HP 288 Pro G6, the front mic could not be detected.In order to
get it working, the pin configuration needs to be set correctly, and
the ALC671_FIXUP_HP_HEADSET_MIC2 fixup needs to be applied.

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


# 841bdf85 12-Jul-2022 Meng Tang <tangmeng@uniontech.com>

ALSA: hda - Add fixup for Dell Latitidue E5430

Another Dell model, another fixup entry: Latitude E5430 needs the same
fixup as other Latitude E series as workaround for noise problems.

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


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

ALSA: hda/realtek: Fix headset mic for Acer SF313-51

The issue on Acer SWIFT SF313-51 is that headset microphone
doesn't work. The following quirk fixed headset microphone issue.
Note that the fixup of SF314-54/55 (ALC256_FIXUP_ACER_HEADSET_MIC)
was not successful on my SF313-51.

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


# 11bea269 24-Jun-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo L140PU

Fixes headset detection on Clevo L140PU.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220624144109.3957-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 627ce0d6 22-Jun-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo NS50PU

Fixes headset detection on Clevo NS50PU.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220622150017.9897-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d4995121 17-Jun-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo PD70PNT

Fixes speaker output and headset detection on Clevo PD70PNT.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220617133028.50568-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56ec3e75 13-Jun-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Apply fixup for Lenovo Yoga Duet 7 properly

It turned out that Lenovo shipped two completely different products
with the very same PCI SSID, where both require different quirks;
namely, Lenovo C940 has already the fixup for its speaker
(ALC298_FIXUP_LENOVO_SPK_VOLUME) with the PCI SSID 17aa:3818, while
Yoga Duet 7 has also the very same PCI SSID but requires a different
quirk, ALC287_FIXUP_YOGA7_14TIL_SPEAKERS.

Fortunately, both are with different codecs (C940 with ALC298 and Duet
7 with ALC287), hence we can apply different fixes by checking the
codec ID. This patch implements that special fixup function.

For easier handling, the internal function for applying a specific
fixup entry is exported as __snd_hda_apply_fixup(), so that it can be
called from the codec driver. The rest is simply calling it with a
different fixup ID depending on the codec ID.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: nikitashvets@flyium.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/5ca147d1-3a2d-60c6-c491-8aa844183222@redhat.com
Link: https://lore.kernel.org/r/20220614054831.14648-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fe6900bd 13-Jun-2022 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC897 headset MIC no sound

There is not have Headset Mic verb table in BIOS default.
So, it will have recording issue from headset MIC.
Add the verb table value without jack detect. It will turn on Headset Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/719133a27d8844a890002cb817001dfa@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b2e6b3d9 09-Jun-2022 Soham Sen <contact@sohamsen.me>

ALSA: hda/realtek: Add mute LED quirk for HP Omen laptop

The HP Omen 15 laptop needs a quirk to toggle the mute LED. It already is implemented for a different variant of the HP Omen laptop so a fixup entry is needed for this variant.

Signed-off-by: Soham Sen <contact@sohamsen.me>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220609181919.45535-1-contact@sohamsen.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5f3d696e 08-Jun-2022 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek: Add quirk for HP Dev One

Enables the audio mute LEDs and limits the mic boost to avoid picking up
noise.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220608140111.23170-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 527f4643 08-Jun-2022 huangwenhui <huangwenhuia@uniontech.com>

ALSA: hda/realtek - Add HW8326 support

Added the support of new Huawei codec HW8326. The HW8326 is developed
by Huawei with Realtek's IP Core, and it's compatible with ALC256.

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


# 85743a84 05-Jun-2022 Cameron Berkenpas <cam@neo-zeon.de>

ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo Yoga DuetITL 2021

Enables the ALC287_FIXUP_YOGA7_14ITL_SPEAKERS quirk for the Lenovo
Yoga DuetITL 2021 laptop to fix speaker output.

[ re-sorted in the SSID order by tiwai ]

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Signed-off-by: Cameron Berkenpas <cam@neo-zeon.de>
Co-authored-by: Songine <donglingluoying@gmail.com>
Cc: stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220606002329.215330-1-cam@neo-zeon.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9bfa7b36 30-May-2022 Marios Levogiannis <marios.levogiannis@gmail.com>

ALSA: hda/realtek - Fix microphone noise on ASUS TUF B550M-PLUS

Set microphone pins 0x18 (rear) and 0x19 (front) to VREF_50 to fix the
microphone noise on ASUS TUF B550M-PLUS which uses the ALCS1200A codec.
The initial value was VREF_80.

The same issue is also present on Windows using both the default Windows
driver and all tested Realtek drivers before version 6.0.9049.1. Comparing
Realtek driver 6.0.9049.1 (the first one without the microphone noise) to
Realtek driver 6.0.9047.1 (the last one with the microphone noise)
revealed that the fix is the result of setting pins 0x18 and 0x19 to
VREF_50.

This fix may also work for other boards that have been reported to have
the same microphone issue and use the ALC1150 and ALCS1200A codecs, since
these codecs are similar and the fix in the Realtek driver on Windows is
common for both. However, it is currently enabled only for ASUS TUF
B550M-PLUS as this is the only board that could be tested.

Signed-off-by: Marios Levogiannis <marios.levogiannis@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220530074131.12258-1-marios.levogiannis@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 15dad62f 27-May-2022 Rik van der Kemp <rik@upto11.nl>

ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9520 laptop

The 2022-model XPS 15 appears to use the same 4-speakers-on-ALC289
audio setup as the Dell XPS 15 9510, so requires the same quirk to
enable woofer output. Tested on my own 9520.

[ Move the entry to the right position in the SSID order -- tiwai ]

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=216035
Cc: <stable@vger.kernel.org>
Signed-off-by: Rik van der Kemp <rik@upto11.nl>
Link: https://lore.kernel.org/r/181056a137b.d14baf90133058.8425453735588429828@upto11.nl
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 60571929 24-May-2022 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new type for ALC245

Add new type for ALC245.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/cef26a7cd3d146eb96a3994ce79e34d2@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 14e42cee 09-May-2022 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda: cs35l41: Remove Set Channel Map api from binding

This API was required for CLSA0100 laptop, which did not
have correct properties inside ACPI. The required values
are now hardcoded inside the driver so this is no longer
needed.
Without this api, there CLSA0100 can now use the generic
cs35l41 fixup, like the other laptops.
All other laptops will read the Speaker Position from
ACPI and set the channel map from within the driver.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220509214703.4482-4-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 024a7ad9 13-May-2022 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine

The HP EliteBook 630 is using ALC236 codec which used 0x02 to control mute LED
and 0x01 to control micmute LED. Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220513121648.28584-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8b3b2392 12-May-2022 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for TongFang devices with pop noise

When audio stops playing there is an audible "pop"-noise when using
headphones on the TongFang GMxMRxx, GKxNRxx, GMxZGxx, GMxTGxx and GMxAGxx.

This quirk fixes this mostly.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220512180956.281804-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 309d7363 10-May-2022 Dustin L. Howett <dustin@howett.net>

ALSA: hda/realtek: Add quirk for the Framework Laptop

Some board revisions of the Framework Laptop have an ALC295 with a
disconnected or faulty headset mic presence detect.

The "dell-headset-multi" fixup addresses this issue, but also enables an
inoperative "Headphone Mic" input device whenever a headset is
connected.

Adding a new quirk chain specific to the Framework Laptop resolves this
issue. The one introduced here is based on the System76 "no headphone
mic" quirk chain.

The VID:PID f111:0001 have been allocated to Framework Computer for this
board revision.

Revision history:
- v2: Moved to a custom quirk chain to suppress the "Headphone Mic"
pincfg.

Signed-off-by: Dustin L. Howett <dustin@howett.net>
Link: https://lore.kernel.org/r/20220511010759.3554-1-dustin@howett.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1efcdd9c 01-May-2022 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda/realtek: Add quirk for Dell Latitude 7520

The driver is currently using ALC269_FIXUP_DELL4_MIC_NO_PRESENCE for
the Latitude 7520, but this fixup chain has some issues:

- The internal mic is really loud and the recorded audio is distorted
at "standard" audio levels.

- There are pop noises at system startup and when plugging/unplugging
headphone jacks.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215885
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Link: https://lore.kernel.org/r/20220501124237.4667-1-gabriele.mzt@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3d9ca93 30-Apr-2022 Randy Dunlap <rdunlap@infradead.org>

ALSA: hda - fix unused Realtek function when PM is not enabled

When CONFIG_PM is not enabled, alc_shutup() is not needed,
so move it inside the #ifdef CONFIG_PM guard.
Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity.

Fixes this build warning:
sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup'

Fixes: 08c189f2c552 ("ALSA: hda - Use generic parser codes for Realtek driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220430193318.29024-1-rdunlap@infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3b79954f 24-Apr-2022 Zihao Wang <wzhd@ustc.edu>

ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers

Lenovo Yoga Duet 7 13ITL6 has Realtek ALC287 and built-in
speakers do not work out of the box. The fix developed for
Yoga 7i 14ITL5 also enables speaker output for this model.

Signed-off-by: Zihao Wang <wzhd@ustc.edu>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220424084120.74125-1-wzhd@ustc.edu
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5f5d8890 22-Apr-2022 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: Enable mute/micmute LEDs support for HP Laptops

On HP Laptops, requires the same ALC285_FIXUP_HP_GPIO_LED quirk to
make its audio LEDs work.

So apply the quirk, and make it the last one since it's an LED quirk.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Fixes: 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops")
Link: https://lore.kernel.org/r/20220422090845.230071-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a6ac60b3 22-Apr-2022 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: Fix mute led issue on thinkpad with cs35l41 s-codec

The quirk ALC287_FIXUP_CS35L41_I2C_2 needs to chain the quirk
ALC269_FIXUP_THINKPAD_ACPI, otherwise the mute led will not work if a
thinkpad machine applies that quirk.

And it will be safe if non-thinkpad machines apply that quirk since
hda_fixup_thinkpad_acpi() will check and return in this case.

Fixes: ae7abe36e352e ("ALSA: hda/realtek: Add CS35L41 support for Thinkpad laptops")
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20220422073937.10073-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 86222af0 21-Apr-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo NP70PNP

Fixes headset detection on Clevo NP70PNP.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220421170412.3697-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b3fbe536 21-Apr-2022 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook 845/865 G9

On HP EliteBook 845 G9 and EliteBook 865 G9, the audio LEDs can be enabled by
ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Fixes: 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops")
Link: https://lore.kernel.org/r/20220421063606.39772-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 264fb034 09-Apr-2022 Tao Jin <tao-j@outlook.com>

ALSA: hda/realtek: add quirk for Lenovo Thinkpad X12 speakers

For this specific device on Lenovo Thinkpad X12 tablet, the verbs were
dumped by qemu running a guest OS that init this codec properly.
After studying the dump, it turns out that
the same quirk used by the other Lenovo devices can be reused.

The patch was tested working against the mainline kernel.

Cc: <stable@vger.kernel.org>
Signed-off-by: Tao Jin <tao-j@outlook.com>
Link: https://lore.kernel.org/r/CO6PR03MB6241CD73310B37858FE64C85E1E89@CO6PR03MB6241.namprd03.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9eb6f5c3 05-Apr-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo PD50PNT

Fixes speaker output and headset detection on Clevo PD50PNT.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220405182029.27431-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f30741cd 30-Mar-2022 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Fix audio regression on Mi Notebook Pro 2020

Commit 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording
issue") is to solve recording issue met on AL236, by matching codec
variant ALC269_TYPE_ALC257 and ALC269_TYPE_ALC256.

This match can be too broad and Mi Notebook Pro 2020 is broken by the
patch.

Instead, use codec ID to be narrow down the scope, in order to make
ALC256 unaffected.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=215484
Fixes: 5aec98913095 ("ALSA: hda/realtek - ALC236 headset MIC recording issue")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20220330061335.1015533-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5a873857 25-Mar-2022 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Enable headset mic on Lenovo P360

Lenovo P360 is another platform equipped with ALC897, and it needs
ALC897_FIXUP_HEADSET_MIC_PIN quirk to make its headset mic work.

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


# ce18f905 24-Mar-2022 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Add mute and micmut LED support for Zbook Fury 17 G9

Zbook Fury 17 G9 requires the same ALC285_FIXUP_HP_GPIO_LED quirk to
make its audio LEDs work.

So apply the quirk, and make it the last one since it's an LED quirk.

Fixes: 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20220324062159.241313-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae016b9d 13-Feb-2022 Yong Wu <yong.wu@mediatek.com>

ALSA: hda/realtek: Make use of the helper component_compare_dev_name

Use the common compare helper from component.

Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Jeremy Szu <jeremy.szu@canonical.com>
Cc: Werner Sembach <wse@tuxedocomputers.com>
Cc: Hui Wang <hui.wang@canonical.com>
Cc: Cameron Berkenpas <cam@neo-zeon.de>
Cc: Kailang Yang <kailang@realtek.com>
Cc: Lucas Tanure <tanureal@opensource.cirrus.com>
Cc: Sami Loone <sami@loone.fi>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-24-yong.wu@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ef248d9b 22-Mar-2022 Matt Kramer <mccleetus@gmail.com>

ALSA: hda/realtek: Add alc256-samsung-headphone fixup

This fixes the near-silence of the headphone jack on the ALC256-based
Samsung Galaxy Book Flex Alpha (NP730QCJ). The magic verbs were found
through trial and error, using known ALC298 hacks as inspiration. The
fixup is auto-enabled only when the NP730QCJ is detected. It can be
manually enabled using model=alc256-samsung-headphone.

Signed-off-by: Matt Kramer <mccleetus@gmail.com>
Link: https://lore.kernel.org/r/3168355.aeNJFYEL58@linus
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 864cb14c 17-Mar-2022 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Fix LED on Zbook Studio G9

Commit 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops")
breaks mute and micmute LEDs because it changed the LED quirk from
ALC285_FIXUP_HP_GPIO_LED to ALC245_FIXUP_HP_GPIO_LED, so change it back
here.

Also reorder the chain of quirks to ensure LED quirk is the last one
being applied.

Fixes: 07bcab93946c ("ALSA: hda/realtek: Add support for HP Laptops")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20220317221134.566358-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6194c8d 14-Mar-2022 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines

* The HP ProBook 440/450 and EliteBook 640/650 are
using ALC236 codec which used 0x02 to control mute LED
and 0x01 to control micmute LED. Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Link: https://lore.kernel.org/r/20220314142122.71602-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b7557267 13-Mar-2022 Jason Zheng <jasonzheng2004@gmail.com>

ALSA: hda/realtek: Add quirk for ASUS GA402

ASUS GA402 requires a workaround to manage the routing of its 4 speakers
like the other ASUS models. Add a corresponding quirk entry to fix it.

Signed-off-by: Jason Zheng <jasonzheng2004@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220313092216.29858-1-jasonzheng2004@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 882bd07f 11-Mar-2022 huangwenhui <huangwenhuia@uniontech.com>

ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671

On a HP 288 Pro G8, the front mic could not be detected.In order to
get it working, the pin configuration needs to be set correctly, and
the ALC671_FIXUP_HP_HEADSET_MIC2 fixup needs to be applied.

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


# 9cb72750 07-Mar-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo NP50PNJ

Fixes headset detection on Clevo NP50PNJ.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220307193229.5141-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0c20fce1 04-Mar-2022 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo NP70PNJ

Fixes headset detection on Clevo NP70PNJ.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220304170840.3351-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 07bcab93 21-Jan-2022 Lucas Tanure <tanureal@opensource.cirrus.com>

ALSA: hda/realtek: Add support for HP Laptops

Add support for two and four CS35L41 using the component
binding method

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220121172431.6876-9-sbinding@opensource.cirrus.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>


# 2a845837 14-Feb-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix deadlock by COEF mutex

The recently introduced coef_mutex for Realtek codec seems causing a
deadlock when the relevant code is invoked from the power-off state;
then the HD-audio core tries to power-up internally, and this kicks
off the codec runtime PM code that tries to take the same coef_mutex.

In order to avoid the deadlock, do the temporary power up/down around
the coef_mutex acquisition and release. This assures that the
power-up sequence runs before the mutex, hence no re-entrance will
happen.

Fixes: b837a9f5ab3b ("ALSA: hda: realtek: Fix race at concurrent COEF updates")
Reported-and-tested-by: Julian Wollrath <jwollrath@web.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220214132838.4db10fca@schienar
Link: https://lore.kernel.org/r/20220214130410.21230-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c07f2c7b 12-Feb-2022 Yu Huang <diwang90@gmail.com>

ALSA: hda/realtek: Add quirk for Legion Y9000X 2019

Legion Y9000X 2019 has the same speaker with Y9000X 2020,
but with a different quirk address. Add one quirk entry
to make the speaker work on Y9000X 2019 too.

Signed-off-by: Yu Huang <diwang90@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220212160835.165065-1-diwang90@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 94db9cc8 30-Jan-2022 Albert Geantă <albertgeanta@gmail.com>

ALSA: hda/realtek: Add quirk for ASUS GU603

The ASUS GU603 (Zephyrus M16 - SSID 1043:16b2) requires a quirk similar to
other ASUS devices for correctly routing the 4 integrated speakers. This
fixes it by adding a corresponding quirk entry, which connects the bass
speakers to the proper DAC.

Signed-off-by: Albert Geantă <albertgeanta@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220131010523.546386-1-albertgeanta@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ea354196 28-Jan-2022 Christian Lachner <gladiac@gmail.com>

ALSA: hda/realtek: Fix silent output on Gigabyte X570 Aorus Xtreme after reboot from Windows

This commit switches the Gigabyte X570 Aorus Xtreme from using the
ALC1220_FIXUP_CLEVO_P950 to the ALC1220_FIXUP_GB_X570 quirk. This fixes
the no-audio after reboot from windows problem.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205275
Signed-off-by: Christian Lachner <gladiac@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220129113243.93068-4-gladiac@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 41a86013 28-Jan-2022 Christian Lachner <gladiac@gmail.com>

ALSA: hda/realtek: Fix silent output on Gigabyte X570S Aorus Master (newer chipset)

Newer versions of the X570 Master come with a newer revision of the
mainboard chipset - the X570S. These boards have the same ALC1220 codec
but seem to initialize the codec with a different parameter in Coef 0x7
which causes the output audio to be very low. We therefore write a
known-good value to Coef 0x7 to fix that. As the value is the exact same
as on the other X570(non-S) boards the same quirk-function can be shared
between both generations.

This commit adds the Gigabyte X570S Aorus Master to the list of boards
using the ALC1220_FIXUP_GB_X570 quirk. This fixes both, the silent output
and the no-audio after reboot from windows problems.

This work has been tested by the folks over at the level1techs forum here:
https://forum.level1techs.com/t/has-anybody-gotten-audio-working-in-linux-on-aorus-x570-master/154072

Signed-off-by: Christian Lachner <gladiac@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220129113243.93068-3-gladiac@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 63394a16 28-Jan-2022 Christian Lachner <gladiac@gmail.com>

ALSA: hda/realtek: Add missing fixup-model entry for Gigabyte X570 ALC1220 quirks

The initial commit of the new Gigabyte X570 ALC1220 quirks lacked the
fixup-model entry in alc882_fixup_models[]. It seemed not to cause any ill
effects but for completeness sake this commit makes up for that.

Signed-off-by: Christian Lachner <gladiac@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220129113243.93068-2-gladiac@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b837a9f5 31-Jan-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda: realtek: Fix race at concurrent COEF updates

The COEF access is done with two steps: setting the index then read or
write the data. When multiple COEF accesses are performed
concurrently, the index and data might be paired unexpectedly.
In most cases, this isn't a big problem as the COEF setup is done at
the initialization, but some dynamic changes like the mute LED may hit
such a race.

For avoiding the racy COEF accesses, this patch introduces a new
mutex coef_mutex to alc_spec, and wrap the COEF accessing functions
with it.

Reported-by: Alexander Sergeyev <sergeev917@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220111195229.a77wrpjclqwrx4bx@localhost.localdomain
Link: https://lore.kernel.org/r/20220131075738.24323-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 91502a9a 14-Jan-2022 Alexander Sergeyev <sergeev917@gmail.com>

ALSA: hda/realtek: fix speakers and micmute on HP 855 G8

There are several PCI ids associated with HP EliteBook 855 G8 Notebook
PC. Commit 0e68c4b11f1e6 ("ALSA: hda/realtek: fix mute/micmute LEDs for
HP 855 G8") covers 0x103c:0x8896, while this commit covers 0x103c:0x8895
which needs some additional work on top of the quirk from 0e68c4b11f1e6.

Note that the device can boot up with working speakers and micmute LED
without this patch, but the success rate would be quite low (order of
16 working boots across 709 boots) at least for the built-in drivers
scenario. This also means that there are some timing issues during early
boot and this patch is a workaround.

With this patch applied speakers and headphones are consistenly working,
as well as mute/micmute LEDs and the internal microphone.

Signed-off-by: Alexander Sergeyev <sergeev917@gmail.com>
Link: https://lore.kernel.org/r/20220114165050.ouw2nknuspclynro@localhost.localdomain
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b81e9e5c 13-Dec-2021 Bart Kroon <bart@tarmack.eu>

ALSA: hda: ALC287: Add Lenovo IdeaPad Slim 9i 14ITL5 speaker quirk

The speaker fixup that is used for the Yoga 7 14ITL5 also applies to
the IdeaPad Slim 9i 14ITL5. The attached patch applies the quirk to
initialise the amplifier on the IdeaPad Slim 9i as well.

This is validated to work on my laptop.

[ corrected the quirk entry position by tiwai ]

Signed-off-by: Bart Kroon <bart@tarmack.eu>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/JAG24R.7NLJGWBF4G8U@tarmack.eu
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae7abe36 17-Dec-2021 Stefan Binding <sbinding@opensource.cirrus.com>

ALSA: hda/realtek: Add CS35L41 support for Thinkpad laptops

Add support for two CS35L41 using I2C bus and the component
binding method

[ Fix the entries to be sorted order by tiwai ]

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211217115708.882525-11-tanureal@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d3dca026 17-Dec-2021 Lucas Tanure <tanureal@opensource.cirrus.com>

ALSA: hda/realtek: Add support for Legion 7 16ACHg6 laptop

Add Support for CS35L41 using the component binding
method

[ corrected the quirk entry position by tiwai ]

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20211217115708.882525-10-tanureal@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2aac550d 05-Jan-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-order quirk entries for Lenovo

The recent few quirk entries for Lenovo haven't been put in the right
order. Let's arrange the table again.

Fixes: ad7cc2d41b7a ("ALSA: hda/realtek: Quirks to enable speaker output...")
Fixes: 6dc86976220c ("ALSA: hda/realtek: Add speaker fixup for some Yoga 15ITL5 devices")
Fixes: 8f4c90427a8f ("ALSA: hda/realtek: Add quirk for Legion Y9000X 2020")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8f4c9042 05-Jan-2022 Baole Fang <fbl718@163.com>

ALSA: hda/realtek: Add quirk for Legion Y9000X 2020

Legion Y9000X 2020 has a speaker, but the speaker doesn't work.
This can be fixed by applying alc285_fixup_ideapad_s740_coef
to fix the speaker's coefficients.
Besides, to support the transition between the speaker and the headphone,
alc287_fixup_legion_15imhg05_speakers needs to be run.

Signed-off-by: Baole Fang <fbl718@163.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220105140856.4855-1-fbl718@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1933008 03-Jan-2022 Christian Lachner <gladiac@gmail.com>

ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master after reboot from Windows

This patch addresses an issue where after rebooting from Windows into Linux
there would be no audio output.

It turns out that the Realtek Audio driver on Windows changes some coeffs
which are not being reset/reinitialized when rebooting the machine. As a
result, there is no audio output until these coeffs are being reset to
their initial state. This patch takes care of that by setting known-good
(initial) values to the coeffs.

We initially relied upon alc1220_fixup_clevo_p950() to fix some pins in the
connection list. However, it also sets coef 0x7 which does not need to be
touched. Furthermore, to prevent mixing device-specific quirks I introduced
a new alc1220_fixup_gb_x570() which is heavily based on
alc1220_fixup_clevo_p950() but does not set coeff 0x7 and fixes the coeffs
that are actually needed instead.

This new alc1220_fixup_gb_x570() is believed to also work for other boards,
like the Gigabyte X570 Aorus Extreme and the newer Gigabyte Aorus X570S
Master. However, as there is no way for me to test these I initially only
enable this new behaviour for the mainboard I have which is the Gigabyte
X570(non-S) Aorus Master.

I tested this patch on the 5.15 branch as well as on master and it is
working well for me.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205275
Signed-off-by: Christian Lachner <gladiac@gmail.com>
Fixes: 0d45e86d2267d ("ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20220103140517.30273-2-gladiac@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 08977fe8 23-Dec-2021 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Use ALC285_FIXUP_HP_GPIO_LED on another HP laptop

The audio mute and mic mute LEDs don't work, so use the quirk to make
them work.

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


# 6dc86976 23-Dec-2021 Arie Geiger <arsgeiger@gmail.com>

ALSA: hda/realtek: Add speaker fixup for some Yoga 15ITL5 devices

This patch adds another possible subsystem ID for the ALC287 used by
the Lenovo Yoga 15ITL5.
It uses the same initalization as the others.
This patch has been tested and works for my device.

Signed-off-by: Arie Geiger <arsgeiger@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211223232857.30741-1-arsgeiger@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# edca7cc4 15-Dec-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Fix quirk for Clevo NJ51CU

The Clevo NJ51CU comes either with the ALC293 or the ALC256 codec, but uses
the 0x8686 subproduct id in both cases. The ALC256 codec needs a different
quirk for the headset microphone working and and edditional quirk for sound
working after suspend and resume.

When waking up from s3 suspend the Coef 0x10 is set to 0x0220 instead of
0x0020 on the ALC256 codec. Setting the value manually makes the sound
work again. This patch does this automatically.

[ minor coding style fix by tiwai ]

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Fixes: b5acfe152abaa ("ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220)")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211215191646.844644-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f7ac570d 14-Dec-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook

There is a HP ProBook which using ALC236 codec and need the
ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make mute LED and
micmute LED work.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211214164156.49711-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa723946 13-Dec-2021 Bradley Scott <bscott@teksavvy.com>

ALSA: hda/realtek: Add new alc285-hp-amp-init model

Adds a new "alc285-hp-amp-init" model that can be used to apply the ALC285
HP speaker amplifier initialization fixup to devices that are not already
known by passing "hda_model=alc285-hp-amp-init" to the
snd-sof-intel-hda-common module or "model=alc285-hp-amp-init" to the
snd-hda-intel module, depending on which is being used.

Signed-off-by: Bradley Scott <bscott@teksavvy.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211213162246.506838-1-bscott@teksavvy.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d296a74b 13-Dec-2021 Bradley Scott <Bradley.Scott@zebra.com>

ALSA: hda/realtek: Amp init fixup for HP ZBook 15 G6

HP ZBook 15 G6 (SSID 103c:860f) needs the same speaker amplifier
initialization as used on several other HP laptops using ALC285.

Signed-off-by: Bradley Scott <Bradley.Scott@zebra.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211213154938.503201-1-Bradley.Scott@zebra.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d7f32791 23-Nov-2021 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform

Lenovo ALC897 platform had headset Mic.
This patch enable supported headset Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/baab2c2536cb4cc18677a862c6f6d840@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 619764cc 02-Dec-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Fix quirk for TongFang PHxTxX1

This fixes the SND_PCI_QUIRK(...) of the TongFang PHxTxX1 barebone. This
fixes the issue of sound not working after s3 suspend.

When waking up from s3 suspend the Coef 0x10 is set to 0x0220 instead of
0x0020. Setting the value manually makes the sound work again. This patch
does this automatically.

While being on it, I also fixed the comment formatting of the quirk and
shortened variable and function names.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Fixes: dd6dd6e3c791 ("ALSA: hda/realtek: Add quirk for TongFang PHxTxX1")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211202165010.876431-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 05ec7161 18-Nov-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix LED on HP ProBook 435 G7

HP ProBook 435 G7 (SSID 103c:8735) needs the similar quirk as another
HP ProBook for enabling the mute and the mic-mute LEDs.

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


# 174a7fb3 11-Nov-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for ASRock NUC Box 1100

This applies a SND_PCI_QUIRK(...) to the ASRock NUC Box 1100 series. This
fixes the issue of the headphone jack not being detected unless warm
rebooted from a certain other OS.

When booting a certain other OS some coeff settings are changed that enable
the audio jack. These settings are preserved on a warm reboot and can be
easily dumped.

The relevant indexes and values where gathered by naively diff-ing and
reading a working and a non-working coeff dump.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211112110704.1022501-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c058493d 10-Nov-2021 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Add quirk for HP EliteBook 840 G7 mute LED

The mute and micmute LEDs don't work on HP EliteBook 840 G7. The same
quirk for other HP laptops can let LEDs work, so apply it.

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


# 4fad4fb9 07-Nov-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add quirk for ASUS UX550VE

ASUS UX550VE (SSID 1043:1970) requires a similar workaround for
managing the routing of the 4 speakers like some other ASUS models.
Add a corresponding quirk entry for fixing it.

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


# 2a5bb694 04-Nov-2021 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/realtek: Add a quirk for Acer Spin SP513-54N

Another model requires ALC255_FIXUP_ACER_MIC_NO_PRESENCE fixup.

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


# 1278cc5ac 02-Nov-2021 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek: Headset fixup for Clevo NH77HJQ

On Clevo NH77HJ, NH77HP, and their 15" variants, there is a headset
microphone input attached to 0x19 that does not have a jack detect. In
order to get it working, the pin configuration needs to be set
correctly, and a new ALC256_FIXUP_SYSTEM76_MIC_NO_PRESENCE fixup is
applied. This is similar to the existing System76 quirk for ALC293, but
for ALC256.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211102172104.10610-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dbfe8350 01-Nov-2021 Tim Crawford <tcrawford@system76.com>

ALSA: hda/realtek: Add quirk for Clevo PC70HS

Apply the PB51ED PCI quirk to the Clevo PC70HS. Fixes audio output from
the internal speakers.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211101162134.5336-1-tcrawford@system76.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 375f8426 28-Oct-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add a quirk for HP OMEN 15 mute LED

HP OMEN 15 laptop requires the quirk to fiddle with COEF 0x0b bit 2
for toggling the mute LED. It's already implemented for other HP
laptops, and we just need to add a proper fixup entry.

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


# 5fc462c3 20-Oct-2021 Johnathon Clark <john.clark@cantab.net>

ALSA: hda/realtek: Fix mic mute LED for the HP Spectre x360 14

On the 'HP Spectre x360 Convertible 14-ea0xx' the microphone mute led is
controlled by GPIO 0x04. The speaker mute LED does not seem to be
exposed by GPIO and is there not set.

[ a slight coding-style fix by tiwai ]

Fixes: c3bb2b521944 ("ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup")
Signed-off-by: Johnathon Clark <john.clark@cantab.net>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211020131253.35894-1-john.clark@cantab.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d94befbb 15-Oct-2021 Davide Baldo <davide@baldo.me>

ALSA: hda/realtek: Fixes HP Spectre x360 15-eb1xxx speakers

In laptop 'HP Spectre x360 Convertible 15-eb1xxx/8811' both front and
rear speakers are silent, this patch fixes that by overriding the pin
layout and by initializing the amplifier which needs a GPIO pin to be
set to 1 then 0, similar to the existing HP Spectre x360 14 model.

In order to have volume control, both front and rear speakers were
forced to use the DAC1.

This patch also correctly map the mute LED but since there is no
microphone on/off switch exposed by the alsa subsystem it never turns
on by itself.

There are still known audio issues in this laptop: headset microphone
doesn't work, the button to mute/unmute microphone is not yet mapped,
the LED of the mute/unmute speakers doesn't seems to be exposed via
GPIO and never turns on.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213953
Signed-off-by: Davide Baldo <davide@baldo.me>
Link: https://lore.kernel.org/r/20211015072121.5287-1-davide@baldo.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aef454b4 14-Oct-2021 Steven Clarkson <sc@lambdal.com>

ALSA: hda/realtek: Add quirk for Clevo PC50HS

Apply existing PCI quirk to the Clevo PC50HS and related models to fix
audio output on the built in speakers.

Signed-off-by: Steven Clarkson <sc@lambdal.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211014133554.1326741-1-sc@lambdal.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a3fd1a98 12-Oct-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW

We need to define the codec pin 0x1b to be the mic, but somehow
the mic doesn't support hot plugging detection, and Windows also has
this issue, so we set it to phantom headset-mic.

Also the determine_headset_type() often returns the omtp type by a
mistake when we plug a ctia headset, this makes the mic can't record
sound at all. Because most of the headset are ctia type nowadays and
some machines have the fixed ctia type audio jack, it is possible this
machine has the fixed ctia jack too. Here we set this mic jack to
fixed ctia type, this could avoid the mic type detection mistake and
make the ctia headset work stable.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214537
Reported-and-tested-by: msd <msd.mmq@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20211012114748.5238-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 023a062f 10-Oct-2021 Cameron Berkenpas <cam@neo-zeon.de>

ALSA: hda/realtek: Fix for quirk to enable speaker output on the Lenovo 13s Gen2

The previous patch's HDA verb initialization for the Lenovo 13s
sequence was slightly off. This updated verb sequence has been tested
and confirmed working.

Fixes: ad7cc2d41b7a ("ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i 15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Cc: <stable@vger.kernel.org>
Signed-off-by: Cameron Berkenpas <cam@neo-zeon.de>
Link: https://lore.kernel.org/r/20211010225410.23423-1-cam@neo-zeon.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dd6dd6e3 06-Oct-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for TongFang PHxTxX1

This applies a SND_PCI_QUIRK(...) to the TongFang PHxTxX1 barebone. This
fixes the issue of the internal Microphone not working after booting
another OS.

When booting a certain another OS this barebone keeps some coeff settings
even after a cold shutdown. These coeffs prevent the microphone detection
from working in Linux, making the Laptop think that there is always an
external microphone plugged-in and therefore preventing the use of the
internal one.

The relevant indexes and values where gathered by naively diff-ing and
reading a working and a non-working coeff dump.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211006130415.538243-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5aec9891 05-Oct-2021 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC236 headset MIC recording issue

In power save mode, the recording voice from headset mic will 2s more delay.
Add this patch will solve this issue.

[ minor coding style fix by tiwai ]

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


# cc03069a 01-Oct-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for Clevo X170KM-G

This applies a SND_PCI_QUIRK(...) to the Clevo X170KM-G barebone. This
fixes the issue of the devices internal Speaker not working.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211001133111.428249-3-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1f8d398e 01-Oct-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Complete partial device name to avoid ambiguity

The string "Clevo X170" is not enough to unambiguously identify the correct
device.

Fixing it so another Clevo barebone name starting with "X170" can be added
without causing confusion.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211001133111.428249-2-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2b987fe8 01-Oct-2021 Chris Chiu <chris.chiu@canonical.com>

ALSA: hda - Enable headphone mic on Dell Latitude laptops with ALC3254

The headphone mic is not working on Dell Latitude laptops with ALC3254.
The codec vendor id is 0x10ec0295 and share the same pincfg as defined
in ALC295_STANDARD_PINS. So the ALC269_FIXUP_DELL1_MIC_NO_PRESENCE will
be applied per alc269_pin_fixup_tbl[] but actually the headphone mic is
using NID 0x1b instead of 0x1a. The ALC269_FIXUP_DELL4_MIC_NO_PRESENCE
need to be applied instead.

Use ALC269_FIXUP_DELL4_MIC_NO_PRESENCE for particular models before
a generic fixup comes out.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211001062856.1037901-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb676622 30-Sep-2021 John Liu <johnliu55tw@gmail.com>

ALSA: hda/realtek: Enable 4-speaker output for Dell Precision 5560 laptop

The Dell Precision 5560 laptop appears to use the 4-speakers-on-ALC289
audio just like its sibling product XPS 9510, so it requires the same
quirk to enable woofer output. Tested on my Dell Precision 5560.

Signed-off-by: John Liu <johnliu55tw@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210930115316.659-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad7cc2d4 13-Sep-2021 Cameron Berkenpas <cam@neo-zeon.de>

ALSA: hda/realtek: Quirks to enable speaker output for Lenovo Legion 7i 15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 laptops.

This patch initializes and enables speaker output on the Lenovo Legion 7i
15IMHG05, Yoga 7i 14ITL5/15ITL5, and 13s Gen2 series of laptops using the
HDA verb sequence specific to each model.

Speaker automute is suppressed for the Lenovo Legion 7i 15IMHG05 to avoid
breaking speaker output on resume and when devices are unplugged from its
headphone jack.

Thanks to: Andreas Holzer, Vincent Morel, sycxyc, Max Christian Pohle and
all others that helped.

[ minor coding style fixes by tiwai ]

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Signed-off-by: Cameron Berkenpas <cam@neo-zeon.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210913212627.339362-1-cam@neo-zeon.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 93ab3eaf 23-Aug-2021 Johnathon Clark <john.clark@cantab.net>

ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup

This patch extends support for the HP Spectre x360 14
amp enable quirk to support a model of the device with
an additional subdevice ID.

Signed-off-by: Johnathon Clark <john.clark@cantab.net>
Link: https://lore.kernel.org/r/20210823162110.8870-1-john.clark@cantab.net
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 13d9c6b9 20-Aug-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Workaround for conflicting SSID on ASUS ROG Strix G17

ASUS ROG Strix G17 has the very same PCI and codec SSID (1043:103f) as
ASUS TX300, and unfortunately, the existing quirk for TX300 is broken
on ASUS ROG. Actually the device works without the quirk, so we'll
need to clear the quirk before applying for this device.
Since ASUS ROG has a different codec (ALC294 - while TX300 has
ALC282), this patch adds a workaround for the device, just clearing
the codec->fixup_id by checking the codec vendor_id.

It's a bit ugly to add such a workaround there, but it seems to be the
simplest way.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214101
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210820143214.3654-1-tiwai@suse.de
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>


# 8903376d 18-Aug-2021 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Limit mic boost on HP ProBook 445 G8

The mic has lots of noises if mic boost is enabled. So disable mic boost
to get crystal clear audio capture.

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


# da946920 14-Aug-2021 Kristin Paget <kristin@tombom.co.uk>

ALSA: hda/realtek: Enable 4-speaker output for Dell XPS 15 9510 laptop

The 2021-model XPS 15 appears to use the same 4-speakers-on-ALC289 audio
setup as the Precision models, so requires the same quirk to enable woofer
output. Tested on my own 9510.

Signed-off-by: Kristin Paget <kristin@tombom.co.uk>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/e1fc95c5-c10a-1f98-a5c2-dd6e336157e1@tombom.co.uk
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d07149ab 10-Aug-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 650 G8 Notebook PC

The HP ProBook 650 G8 Notebook PC is using ALC236 codec which is
using 0x02 to control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210810100846.65844-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 739d0959 06-Aug-2021 Luke D Jones <luke@ljones.dev>

ALSA: hda: Add quirk for ASUS Flow x13

The ASUS GV301QH sound appears to work well with the quirk for
ALC294_FIXUP_ASUS_DUAL_SPK.

Signed-off-by: Luke D Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210807025805.27321-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0d4867a1 21-Jul-2021 Alexander Monakov <amonakov@ispras.ru>

ALSA: hda/realtek: add mic quirk for Acer SF314-42

The Acer Swift SF314-42 laptop is using Realtek ALC255 codec. Add a
quirk so microphone in a headset connected via the right-hand side jack
is usable.

Signed-off-by: Alexander Monakov <amonakov@ispras.ru>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210721170141.24807-1-amonakov@ispras.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35171fbf 26-Jul-2021 Nikos Liolios <liolios.nk@gmail.com>

ALSA: hda/realtek: Fix headset mic for Acer SWIFT SF314-56 (ALC256)

The issue on Acer SWIFT SF314-56 is that headset microphone doesn't work.
The following quirk fixed headset microphone issue. The fixup was found by trial and error.
Note that the fixup of SF314-54/55 (ALC256_FIXUP_ACER_HEADSET_MIC) was not successful on my SF314-56.

Signed-off-by: Nikos Liolios <liolios.nk@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210727030510.36292-1-liolios.nk@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e4efa826 18-Jul-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: Fix pop noise and 2 Front Mic issues on a machine

This is a Lenovo ThinkStation machine which uses the codec alc623.
There are 2 issues on this machine, the 1st one is the pop noise in
the lineout, the 2nd one is there are 2 Front Mics and pulseaudio
can't handle them, After applying the fixup of
ALC623_FIXUP_LENOVO_THINKSTATION_P340 to this machine, the 2 issues
are fixed.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210719030231.6870-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 42334fbc 03-Jul-2021 Frank Schäfer <fschaefer.oss@googlemail.com>

ALSA: hda/realtek: fix mute led of the HP Pavilion 15-eh1xxx series

The HP Pavilion 15-eh1xxx series uses the HP mainboard 88D0 with ALC287 and needs
the ALC287_FIXUP_HP_GPIO_LED quirk to make the mute led working.
Tested with a HP Pavilion 15-eh1557ng.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210703135416.13151-1-fschaefer.oss@googlemail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb3acdb2 01-Jul-2021 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 630 G8

The HP ProBook 630 G8 using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210701091417.9696-3-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a3b7f9b8 01-Jul-2021 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G8

The HP ProBook 445 G8 using ALC236 codec.
COEF index 0x34 bit 5 is used to control the playback mute LED, but the
microphone mute LED is controlled using pin VREF instead of a COEF index.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210701091417.9696-2-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2b70b264 01-Jul-2021 Andy Chi <andy.chi@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 450 G8

The HP ProBook 450 G8 using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Andy Chi <andy.chi@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210701091417.9696-1-andy.chi@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3c24e483 30-Jun-2021 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add ALC285 HP init procedure

ALC285 headphone initial procedure.
It also could suitable for ALC215/ALC289/ALC225/ALC295/ALC299.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/2b7539c3e96f41a4ab458d53ea5f5784@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 99cee034 30-Jun-2021 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add type for ALC287

Add independent type for ALC287.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/2b7539c3e96f41a4ab458d53ea5f5784@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dfc2e8ae 25-Jun-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 830 G8 Notebook PC

The HP EliteBook 830 G8 Notebook PC using ALC285 codec which using 0x04 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210625133414.26760-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0ac05b25 23-Jun-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Apply LED fixup for HP Dragonfly G1, too

HP Dragonfly G1 (SSID 103c:861f) also requires the same quirk for the
mute and mic-mute LED just as Dragonfly G2 model.

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


# f8fbcdfb 20-Jun-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix bass speaker DAC mapping for Asus UM431D

Asus Zenbook 14 UM431D has two speaker pins and a headphone pin, and
the auto-parser ends up assigning the bass to the third DAC 0x06.
Although the tone comes out, it's inconvenient because this DAC has no
volume control unlike two other DACs.

For obtaining the volume control for the bass speaker, this patch
enforces the mapping to let both front and bass speaker pins sharing
the same DAC. It's not ideal but a little bit of improvement.

Since we've already applied the same workaround for another ASUS
machine, we just need to hook the chain to the existing quirk.

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


# 434591b2 19-Jun-2021 Elia Devito <eliadevito@gmail.com>

ALSA: hda/realtek: Improve fixup for HP Spectre x360 15-df0xxx

On HP Spectre x360 15-df0xxx, after system boot with plugged headset, the
headset mic are not detected.
Moving pincfg and DAC's config to single fixup function fix this.

[ The actual bug in the original code was that it used a chain to
ALC286_FIXUP_SPEAKER2_TO_DAC1, and it contains not only the DAC1
route fix but also another chain to ALC269_FIXUP_THINKPAD_ACPI.
I thought the latter one is harmless for non-Thinkpad, but it
doesn't seem so; it contains again yet another chain to
ALC269_FIXUP_SKI_IGNORE, and this might be bad for some machines,
including this HP machine. -- tiwai ]

Signed-off-by: Elia Devito <eliadevito@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210619204105.5682-1-eliadevito@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1948fc06 18-Jun-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add another ALC236 variant support

The codec chip 10ec:0230 is another variant of ALC236, combined with a
card reader. Apply the equivalent setup as 10ec:0236.

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


# c3d2c882 17-Jun-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook x360 830 G8

The HP EliteBook x360 830 G8 using ALC285 codec which using 0x04 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210617171422.16652-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 745f260b 04-Jun-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Change device names for quirks to barebone names

Change the name string of several devices needing quirks to the Clevo-barebone
ones. Also make the names follow the same pattern for multiple Clevo names
referring to the same mainboard.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://lore.kernel.org/r/20210604140207.8023-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 600dd2a7 08-Jun-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power G8

The HP ZBook Power G8 using ALC236 codec which using 0x02 to
control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210608114750.32009-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 57c9e21a 07-Jun-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: headphone and mic don't work on an Acer laptop

There are 2 issues on this machine, the 1st one is mic's plug/unplug
can't be detected, that is because the mic is set to manual detecting
mode, need to apply ALC255_FIXUP_XIAOMI_HEADSET_MIC to set it to auto
detecting mode. The other one is headphone's plug/unplug can't be
detected by pulseaudio, that is because the pulseaudio will use
ucm2/sof-hda-dsp on this machine, and the ucm2 only handle
'Headphone Jack', but on this machine the headphone's pincfg sets the
location to Front, then the alsa mixer name is "Front Headphone Jack"
instead of "Headphone Jack", so override the pincfg to change location
to Left.

BugLink: http://bugs.launchpad.net/bugs/1930188
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210608024600.6198-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dfb06401 05-Jun-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 840 Aero G8

The HP EliteBook 840 Aero G8 using ALC285 codec which using 0x04 to
control mute LED and 0x01 to control micmute LED.
In the other hand, there is no output from right channel of speaker.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210605082539.41797-3-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 61d3e874 05-Jun-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP EliteBook x360 1040 G8

The HP EliteBook x360 1040 G8 using ALC285 codec which using 0x04 to control
mute LED and 0x01 to control micmute LED.
In the other hand, there is no output from right channel of speaker.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210605082539.41797-2-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 15d295b5 05-Jun-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Elite Dragonfly G2

The HP Elite Dragonfly G2 using ALC285 codec which using 0x04 to control
mute LED and 0x01 to control micmute LED.
In the other hand, there is no output from right channel of speaker.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210605082539.41797-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 901be145 31-May-2021 Carlos M <carlos.marr.pz@gmail.com>

ALSA: hda: Fix for mute key LED for HP Pavilion 15-CK0xx

For the HP Pavilion 15-CK0xx, with audio subsystem ID 0x103c:0x841c,
adding a line in patch_realtek.c to apply the ALC269_FIXUP_HP_MUTE_LED_MIC3
fix activates the mute key LED.

Signed-off-by: Carlos M <carlos.marr.pz@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210531202026.35427-1-carlos.marr.pz@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 50dbfae9 19-May-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 17 G8

The HP ZBook Studio 17.3 Inch G8 is using ALC285 codec which is
using 0x04 to control mute LED and 0x01 to control micmute LED.
In the other hand, there is no output from right channel of speaker.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210519170357.58410-4-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e650c1a9 19-May-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 15 G8

The HP ZBook Fury 15.6 Inch G8 is using ALC285 codec which is
using 0x04 to control mute LED and 0x01 to control micmute LED.
In the other hand, there is no output from right channel of speaker.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210519170357.58410-3-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bbe183e0 19-May-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook G8

The HP ZBook Studio 15.6 Inch G8 is using ALC285 codec which is
using 0x04 to control mute LED and 0x01 to control micmute LED.
In the other hand, there is no output from right channel of speaker.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210519170357.58410-2-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0e68c4b1 19-May-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP 855 G8

The HP EliteBook 855 G8 Notebook PC is using ALC285 codec which needs
ALC285_FIXUP_HP_MUTE_LED fixup to make it works. After applying the
fixup, the mute/micmute LEDs work good.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210519170357.58410-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 29c8f40b 24-May-2021 Peter Ujfalusi <peter.ujfalusi@linux.intel.com>

ALSA: hda/realtek: Chain in pop reduction fixup for ThinkStation P340

Lenovo ThinkStation P340 uses ALC623 codec (SSID 17aa:1048) and it produces
bug plock/pop noise over line out (green jack on the back) which can be
fixed by applying ALC269_FIXUP_NO_SHUTUP tot he machine.

Convert the existing entry for the same SSID to chain to apply this fixup
as well.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210524203726.2278-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9ebaef05 21-May-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: the bass speaker can't output sound on Yoga 9i

The Lenovo Yoga 9i has bass speaker, but the bass speaker can't work,
that is because there is an i2s amplifier on that speaker, need to
run ideapad_s740_coef() to initialize the amplifier.

And also needs to apply ALC285_FIXUP_THINKPAD_HEADSET_JACK to rename
the speaker's mixer control name, otherwise the PA can't handle them.

BugLink: http://bugs.launchpad.net/bugs/1926165
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210522042645.14221-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 119b75c1 21-May-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: Headphone volume is controlled by Front mixer

On some ASUS and MSI machines, the audio codec is alc1220 and the
Headphone is connected to audio mixer 0xf and DAC 0x5, in theory
the Headphone volume is controlled by DAC 0x5 (Heapdhone Playback
Volume), but somehow it is controlled by DAC 0x2 (Front Playback
Volume), maybe this is a defect on the codec alc1220.

Because of this issue, the PA couldn't switch the headphone and
Lineout correctly, If we apply the quirk CLEVO_P950 to those machines,
the Lineout and Headphone will share the audio mixer 0xc and DAC 0x2,
and generate Headphone+LO mixer, then PA could handle them when
switching between them.

BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1206
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210522034741.13415-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1d5cfca2 13-May-2021 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek: Add some CLOVE SSIDs of ALC293

Fix "use as headset mic, without its own jack detect" problen.

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/d0746eaf29f248a5acc30313e3ba4f99@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f2be77fe 11-May-2021 Elia Devito <eliadevito@gmail.com>

ALSA: hda/realtek: Add fixup for HP Spectre x360 15-df0xxx

Fixup to enable all 4 speaker on HP Spectre x360 15-df0xxx and probably
on similar models.

0x14 pin config override is required to enable all speakers and
alc285-speaker2-to-dac1 fixup to enable volume adjustment.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=189331
Signed-off-by: Elia Devito <eliadevito@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210511124651.4802-1-eliadevito@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1b55029 06-May-2021 Daniel Cordova A <danesc87@gmail.com>

ALSA: hda: fixup headset for ASUS GU502 laptop

The GU502 requires a few steps to make headset i/o works properly:
pincfg, verbs to unmute headphone out and callback to toggle output
between speakers and headphone using jack.

Signed-off-by: Daniel Cordova A <danesc87@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210507173116.12043-1-danesc87@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8822702f 06-May-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: reset eapd coeff to default value for alc287

Ubuntu users reported an audio bug on the Lenovo Yoga Slim 7 14IIL05,
he installed dual OS (Windows + Linux), if he booted to the Linux
from Windows, the Speaker can't work well, it has crackling noise,
if he poweroff the machine first after Windows, the Speaker worked
well.

Before rebooting or shutdown from Windows, the Windows changes the
codec eapd coeff value, but the BIOS doesn't re-initialize its value,
when booting into the Linux from Windows, the eapd coeff value is not
correct. To fix it, set the codec default value to that coeff register
in the alsa driver.

BugLink: http://bugs.launchpad.net/bugs/1925057
Suggested-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210507024452.8300-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5d84b531 04-May-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add fixup for HP OMEN laptop

HP OMEN dc0019-ur with codec SSID 103c:84da requires the pin config
overrides and the existing mic/mute LED setup. This patch implements
those in the fixup table.

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


# 622464c8 04-May-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32

HP Envy AiO 32-a12xxx has an external amp that is controlled via GPIO
bit 0x04. However, unlike other devices, this amp seems to shut down
itself after the certain period, hence the OS needs to up/down the bit
dynamically only during the actual playback.

This patch adds the control of the GPIO bit via the existing pcm_hook
mechanism. Ideally it should be triggered at the actual stream start,
but we have only the state change at prepare/cleanup, so use those for
switching the GPIO bit on/off. This should be good enough for the
purpose, and was actually confirmed to work fine.

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


# 8eedd3a7 04-May-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA

It was reported that the headphone output on ASUS UX430UA (SSID
1043:1740) with ALC295 codec is silent while the speaker works.
After the investigation, it turned out that the DAC assignment has to
be fixed on this machine; unlike others, it expects DAC 0x02 to be
assigned to the speaker pin 0x07 while DAC 0x03 to headphone pin
0x21.

This patch provides a fixup for the fixed DAC/pin mapping for this
device.

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


# 266fd994 30-Apr-2021 Sami Loone <sami@loone.fi>

ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable

In 9bbb94e57df1 ("ALSA: hda/realtek: fix static noise on ALC285 Lenovo
laptops") an existing Lenovo quirk was made more generic by removing a
0x12 pin requirement from the entry. This made the second chance table
Thinkpad jack entry unreachable as the pin configurations became
identical.

Revert the 0x12 pin requirement removal and move Thinkpad jack pin quirk
back to the primary pin table as they can co-exist when more specific
configurations come first.

Add a more targeted pin quirk for Lenovo devices that have 0x12 as
0x40000000.

Tested on Yoga 6 (AMD) laptop.

[ Corrected the commit ID -- tiwai ]

Fixes: 9bbb94e57df1 ("ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops")
Signed-off-by: Sami Loone <sami@loone.fi>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YI0oefvTYn8URYDb@yoga
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices

The quirk entry for Uniwill ECS M31EI is with the PCI SSID device 0,
which means matching with all. That is, it's essentially equivalent
with SND_PCI_QUIRK_VENDOR(0x1584), which also matches with the
previous entry for Haier W18 applying the very same quirk.

Let's unify them with the single vendor-quirk entry.

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


# 9edeb110 28-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-order ALC662 quirk table entries

Just re-order the alc662_fixup_tbl[] entries for Acer and ASUS 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-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Re-order remaining ALC269 quirk table entries

Just re-order the alc269_fixup_tbl[] entries for FSC, Medion, Samsung
and Lemote 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-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries

Just re-order the alc269_fixup_tbl[] entries for Lenovo 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-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries

Just re-order the alc269_fixup_tbl[] entries for Sony 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-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3cd0ed63 28-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-order ALC269 ASUS quirk table entries

Just re-order the alc269_fixup_tbl[] entries for ASUS 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-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries

Just re-order the alc269_fixup_tbl[] entries for Dell 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-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 433f894e 28-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-order ALC269 Acer quirk table entries

Just re-order the alc269_fixup_tbl[] entries for Acer 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-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 45461e3b 28-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-order ALC269 HP quirk table entries

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

Formerly, some entries were grouped for the actual codec, but this
doesn't seem reasonable to keep in that way. So now we simply keep
the PCI SSID order for the whole.

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

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


# 13e1a4cd 28-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries

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

Also, user lower hex letters in the entry.

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

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


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

ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries

Just re-order the alc882_fixup_tbl[] entries for Sony 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-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries

Just re-order the alc882_fixup_tbl[] entries for Acer 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-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 970e3012 27-Apr-2021 Eckhart Mohr <e.mohr@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx

This applies a SND_PCI_QUIRK(...) to the Clevo PCx0Dx barebones. This
fix enables audio output over the headset jack and ensures that a
microphone connected via the headset combo jack is correctly recognized
when pluged in.

[ Rearranged the list entries in a sorted order -- tiwai ]

Signed-off-by: Eckhart Mohr <e.mohr@tuxedocomputers.com>
Co-developed-by: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210427153025.451118-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9bbb94e5 25-Apr-2021 Sami Loone <sami@loone.fi>

ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops

Remove a duplicate vendor+subvendor pin fixup entry as one is masking
the other and making it unreachable. Consider the more specific newcomer
as a second chance instead.

The generic entry is made less strict to also match for laptops with
slightly different 0x12 pin configuration. Tested on Lenovo Yoga 6 (AMD)
where 0x12 is 0x40000000.

Fixes: 607184cb1635 ("ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button")
Signed-off-by: Sami Loone <sami@loone.fi>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/YIXS+GT/dGI/LtK6@yoga
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd15b155 20-Apr-2021 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook 845 G8

On HP EliteBook 845 G8, the audio LEDs can be enabled by
ALC285_FIXUP_HP_MUTE_LED. So use it accordingly.

In addition to that, the mic captures lots of noises, so also limits the
mic boost. The quality of capture audio becomes crystal clear after
limiting the mic boost.

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


# 1c9d9dfd 20-Apr-2021 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Headset Mic issue on HP platform

Boot with plugged headset, the Headset Mic will be gone.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/207eecfc3189466a820720bc0c409ea9@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 76fae618 18-Apr-2021 Luke D Jones <luke@ljones.dev>

ALSA: hda/realtek: GA503 use same quirks as GA401

The GA503 has almost exactly the same default setup as the GA401
model with the same issues. The GA401 quirks solve all the issues
so we will use the full quirk chain.

Signed-off-by: Luke D Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210419030411.28304-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 75b62ab6 15-Apr-2021 Jonas Witschel <diabonas@archlinux.org>

ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G7

The HP ProBook 445 G7 (17T32ES) uses ALC236. Like ALC236_FIXUP_HP_GPIO_LED,
COEF index 0x34 bit 5 is used to control the playback mute LED, but the
microphone mute LED is controlled using pin VREF instead of a COEF index.

AlsaInfo: https://alsa-project.org/db/?f=0d3f4d1af39cc359f9fea9b550727ee87e5cf45a
Signed-off-by: Jonas Witschel <diabonas@archlinux.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210416105852.52588-1-diabonas@archlinux.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26928ca1 16-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add quirk for Lenovo Ideapad S740

Lenovo Ideapad S740 requires quite a few COEF setups to make its
speakers working. The verb table was provided from Ryan Prescott as
the result of investigation via qemu:
https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-from-a-Windows-sound-driver

BugLink: https://github.com/thesofproject/linux/issues/2748
Tested-by: Ryan Prescott <ryan@cousinscomputers.net>
Link: https://lore.kernel.org/r/20210416081211.20059-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1ee66c5 15-Apr-2021 Phil Calvin <phil@philcalvin.com>

ALSA: hda/realtek: fix mic boost on Intel NUC 8

Fix two bugs with the Intel HDA Realtek ALC233 sound codec
present in Intel NUC NUC8i7BEH and probably a few other similar
NUC models.

These codecs advertise a 4-level microphone input boost amplifier on
pin 0x19, but the highest two boost settings do not work correctly,
and produce only low analog noise that does not seem to contain any
discernible signal. There is an existing fixup for this exact problem
but for a different PCI subsystem ID, so we re-use that logic.

Changing the boost level also triggers a DC spike in the input signal
that bleeds off over about a second and overwhelms any input during
that time. Thankfully, the existing fixup has the side effect of
making the boost control show up in userspace as a mute/unmute switch,
and this keeps (e.g.) PulseAudio from fiddling with it during normal
input volume adjustments.

Finally, the NUC hardware has built-in inverted stereo mics. This
patch also enables the usual fixup for this so the two channels cancel
noise instead of the actual signal.

[ Re-ordered the quirk entry point by tiwai ]

Signed-off-by: Phil Calvin <phil@philcalvin.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/80dc5663-7734-e7e5-25ef-15b5df24511a@philcalvin.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

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

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

Remove the custom implementation from the HDA driver.

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

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


# 04f7791b 05-Mar-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda - bind headset buttons to the headphone jack

With the HDA driver, if the headset buttons are supported, an audio
Jack will be created for them. This audio Jack is a bit confusing to
users since it can't report headphone/mic insertion events but it
claims to support these events.

And in addition, the driver already builds a headphone Jack and a mic
Jack, and most of those buttons are used for headphone playback, so
do some change to bind those buttons to the headphone Jack. After this
change, the key events are generated from NID 0x55, and are reported
to the input layer via headphone jack (NID 0x21).

If there is no headphone Jack, then build an audio jack to support
those buttons same as previously.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210305092608.109599-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c8426b27 07-Apr-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix speaker amp setup on Acer Aspire E1

We've got a report about Acer Aspire E1 (PCI SSID 1025:0840) that
loses the speaker output after resume. With the comparison of COEF
dumps, it was identified that the COEF 0x0d bits 0x6000 corresponds to
the speaker amp.

This patch adds the specific quirk for the device to restore the COEF
bits at the codec (re-)initialization.

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


# 417eadfd 30-Mar-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP 640 G8

The HP EliteBook 640 G8 Notebook PC is using ALC236 codec which is
using 0x02 to control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210330114428.40490-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e54f30be 20-Mar-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: call alc_update_headset_mode() in hp_automute_hook

We found the alc_update_headset_mode() is not called on some machines
when unplugging the headset, as a result, the mode of the
ALC_HEADSET_MODE_UNPLUGGED can't be set, then the current_headset_type
is not cleared, if users plug a differnt type of headset next time,
the determine_headset_type() will not be called and the audio jack is
set to the headset type of previous time.

On the Dell machines which connect the dmic to the PCH, if we open
the gnome-sound-setting and unplug the headset, this issue will
happen. Those machines disable the auto-mute by ucm and has no
internal mic in the input source, so the update_headset_mode() will
not be called by cap_sync_hook or automute_hook when unplugging, and
because the gnome-sound-setting is opened, the codec will not enter
the runtime_suspend state, so the update_headset_mode() will not be
called by alc_resume when unplugging. In this case the
hp_automute_hook is called when unplugging, so add
update_headset_mode() calling to this function.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210320091542.6748-2-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# febf2256 20-Mar-2021 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: fix a determine_headset_type issue for a Dell AIO

We found a recording issue on a Dell AIO, users plug a headset-mic and
select headset-mic from UI, but can't record any sound from
headset-mic. The root cause is the determine_headset_type() returns a
wrong type, e.g. users plug a ctia type headset, but that function
returns omtp type.

On this machine, the internal mic is not connected to the codec, the
"Input Source" is headset mic by default. And when users plug a
headset, the determine_headset_type() will be called immediately, the
codec on this AIO is alc274, the delay time for this codec in the
determine_headset_type() is only 80ms, the delay is too short to
correctly determine the headset type, the fail rate is nearly 99% when
users plug the headset with the normal speed.

Other codecs set several hundred ms delay time, so here I change the
delay time to 850ms for alc2x4 series, after this change, the fail
rate is zero unless users plug the headset slowly on purpose.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210320091542.6748-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 53b861be 16-Mar-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP 850 G8

The HP EliteBook 850 G8 Notebook PC is using ALC285 codec which is
using 0x04 to control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210316094236.89028-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e7d66cf7 16-Mar-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP 440 G8

The HP EliteBook 840 G8 Notebook PC is using ALC236 codec which is
using 0x02 to control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210316074626.79895-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca688339 16-Mar-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix mute/micmute LEDs for HP 840 G8

The HP EliteBook 840 G8 Notebook PC is using ALC285 codec which is
using 0x04 to control mute LED and 0x01 to control micmute LED.
Therefore, add a quirk to make it works.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210316065452.75659-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b95bc12e 15-Mar-2021 Xiaoliang Yu <yxl_22@outlook.com>

ALSA: hda/realtek: apply pin quirk for XiaomiNotebook Pro

Built-in microphone and combojack on Xiaomi Notebook Pro (1d72:1701) needs
to be fixed, the existing quirk for Dell works well on that machine.

Signed-off-by: Xiaoliang Yu <yxl_22@outlook.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/OS0P286MB02749B9E13920E6899902CD8EE6C9@OS0P286MB0274.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1c86210 12-Mar-2021 Xiaoliang Yu <yxl_22@outlook.com>

ALSA: hda/realtek: Apply headset-mic quirks for Xiaomi Redmibook Air

There is another fix for headset-mic problem on Redmibook (1d72:1602),
it also works on Redmibook Air (1d72:1947), which has the same issue.

Signed-off-by: Xiaoliang Yu <yxl_22@outlook.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/TYBP286MB02856DC016849DEA0F9B6A37EE6F9@TYBP286MB0285.JPNP286.PROD.OUTLOOK.COM
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26af1772 03-Mar-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Apply dual codec quirks for MSI Godlike X570 board

There is another MSI board (1462:cc34) that has dual Realtek codecs,
and we need to apply the existing quirk for fixing the conflicts of
Master control.

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


# 73e7161e 02-Mar-2021 Werner Sembach <wse@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for Intel NUC 10

This adds a new SND_PCI_QUIRK(...) and applies it to the Intel NUC 10
devices. This fixes the issue of the devices not having audio input and
output on the headset jack because the kernel does not recognize when
something is plugged in.

The new quirk was inspired by the quirk for the Intel NUC 8 devices, but
it turned out that the NUC 10 uses another pin. This information was
acquired by black box testing likely pins.

Co-developed-by: Eckhart Mohr <e.mohr@tuxedocomputers.com>
Signed-off-by: Eckhart Mohr <e.mohr@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210302180414.23194-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 48698c97 02-Mar-2021 Eckhart Mohr <e.mohr@tuxedocomputers.com>

ALSA: hda/realtek: Add quirk for Clevo NH55RZQ

This applies a SND_PCI_QUIRK(...) to the Clevo NH55RZQ barebone. This
fixes the issue of the device not recognizing a pluged in microphone.

The device has both, a microphone only jack, and a speaker + microphone
combo jack. The combo jack already works. The microphone-only jack does
not recognize when a device is pluged in without this patch.

Signed-off-by: Eckhart Mohr <e.mohr@tuxedocomputers.com>
Co-developed-by: Werner Sembach <wse@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/0eee6545-5169-ef08-6cfa-5def8cd48c86@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d0e18561 25-Feb-2021 Chris Chiu <chris.chiu@canonical.com>

ALSA: hda/realtek: Enable headset mic of Acer SWIFT with ALC256

The Acer SWIFT Swift SF314-54/55 laptops with ALC256 cannot detect
both the headset mic and the internal mic. Introduce new fixup
to enable the jack sense and the headset mic. However, the internal
mic actually connects to Intel SST audio. It still needs Intel SST
support to make internal mic capture work.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
Acked-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210226010440.8474-1-chris.chiu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3bb2b52 15-Feb-2021 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Quirk for HP Spectre x360 14 amp setup

HP Spectre x360 14 model (PCI SSID 103c:87f7) seems requiring a unique
setup for its external amp: the GPIO0 needs to be toggled on and off
shortly at each device initialization via runtime PM.

This patch implements that workaround as well as the model option
string, so that users with other devices may try the same workaround
more easily.

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


# 4841b8e6 02-Feb-2021 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek: modify EAPD in the ALC886

Modify 0x20 index 7 bit 5 to 1, make the 0x15 EAPD the same as 0x14.

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/e62c5058957f48d8b8953e97135ff108@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5de3b943 21-Jan-2021 Jian-Hong Pan <jhp@endlessos.org>

ALSA: hda/realtek: Enable headset of ASUS B1400CEPE with ALC256

ASUS B1400CEPE laptop's headset audio is not enabled until
ALC256_FIXUP_ASUS_HPE quirk is applied.

Here is the original pin node values:

0x12 0x40000000
0x13 0x411111f0
0x14 0x90170110
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x40461b45
0x1e 0x411111f0
0x21 0x04211020

Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210122054705.48804-1-jhp@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 495dc763 14-Jan-2021 Chris Chiu <chiu@endlessos.org>

ALSA: hda/realtek - Limit int mic boost on Acer Aspire E5-575T

The Acer Apire E5-575T laptop with codec ALC255 has a terrible
background noise comes from internal mic capture. And the jack
sensing dose not work for headset like some other Acer laptops.

This patch limits the internal mic boost on top of the existing
ALC255_FIXUP_ACER_MIC_NO_PRESENCE quirk for Acer Aspire E5-575T.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210114082728.74729-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 91bc1568 06-Jan-2021 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines

* The HP ZBook Fury 15/17 G7 Mobile Workstation are using ALC285 codec
which is using 0x04 to control mute LED and 0x01 to control micmute LED.

* The right channel speaker is no sound and it needs to expose GPIO1 for
initialing AMP.

Add quirks to support them.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210106130549.100532-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a598098c 30-Dec-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Enable mute and micmute LED on HP EliteBook 850 G7

HP EliteBook 850 G7 uses the same GPIO pins as ALC285_FIXUP_HP_GPIO_LED
to enable mute and micmute LED. So apply the quirk to enable the LEDs.

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


# ce2e79b2 31-Dec-2020 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek: Add two "Intel Reference board" SSID in the ALC256.

Add two "Intel Reference boad" SSID in the alc256.
Enable "power saving mode" and Enable "headset jack mode".

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/5978d2267f034c28973d117925ec9c63@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 48422958 29-Dec-2020 Manuel Jiménez <mjbfm99@me.com>

ALSA: hda/realtek: Add mute LED quirk for more HP laptops

HP Pavilion 13-bb0000 (SSID 103c:87c8) needs the same
quirk as other models with ALC287.

Signed-off-by: Manuel Jiménez <mjbfm99@me.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/X+s/gKNydVrI6nLj@HP-Pavilion-13
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1e89523 23-Dec-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Modify Dell platform name

Dell platform SSID:0x0a58 change platform name.
Use the generic name instead for avoiding confusion.

Fixes: 150927c3674d ("ALSA: hda/realtek - Supported Dell fixed type headset")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/efe7c196158241aa817229df7835d645@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f86de9b1 23-Oct-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix speaker volume control on Lenovo C940

Cannot adjust speaker's volume on Lenovo C940.
Applying the alc298_fixup_speaker_volume function can fix the issue.

[ Additional note: C940 has I2S amp for the speaker and this needs the
same initialization as Dell machines.
The patch was slightly modified so that the quirk entry is moved
next to the corresponding Dell quirk entry. -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/ea25b4e5c468491aa2e9d6cb1f2fced3@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 13be30f1 22-Dec-2020 Chris Chiu <chiu@endlessos.org>

ALSA/hda: apply jack fixup for the Acer Veriton N4640G/N6640G/N2510G

This Acer Veriton N4640G/N6640G/N2510G desktops have 2 headphone
jacks(front and rear), and a separate Mic In jack.

The rear headphone jack is actually a line out jack but always silent
while playing audio. The front 'Mic In' also fails the jack sensing.
Apply the ALC269_FIXUP_LIFEBOOK to have all audio jacks to work as
expected.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201222150459.9545-2-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ca653e3 22-Dec-2020 Chris Chiu <chiu@endlessos.org>

ALSA: hda/realtek: Apply jack fixup for Quanta NL3

The Quanta NL3 laptop has both a headphone output jack and a headset
jack, on the right edge of the chassis.

The pin information suggests that both of these are at the Front.
The PulseAudio is confused to differentiate them so one of the jack
can neither get the jack sense working nor the audio output.

The ALC269_FIXUP_LIFEBOOK chained with ALC269_FIXUP_QUANTA_MUTE can
help to differentiate 2 jacks and get the 'Auto-Mute Mode' working
correctly.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201222150459.9545-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 09926202 20-Dec-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add quirk for MSI-GP73

MSI-GP73 (with SSID 1462:1229) requires yet again
ALC1220_FIXUP_CLEVO_P950 quirk like other MSI models.

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


# 150927c3 17-Dec-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Supported Dell fixed type headset

This platform only supported iphone type headset.
It can't support Dell headset mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/b97e971978034bc9b772a08ec91265e8@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 34cdf405 16-Dec-2020 Chris Chiu <chiu@endlessos.org>

ALSA: hda/realtek: Remove dummy lineout on Acer TravelMate P648/P658

Acer TravelMate laptops P648/P658 series with codec ALC282 only have
one physical jack for headset but there's a confusing lineout pin on
NID 0x1b reported. Audio applications hence misunderstand that there
are a speaker and a lineout, and take the lineout as the default audio
output.

Add a new quirk to remove the useless lineout and enable the pin 0x18
for jack sensing and headset microphone.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201216125200.27053-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 607184cb 10-Dec-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button

Add supported for more Lenovo ALC285 Headset Button.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/bb1f1da1526d460885aa4257be81eb94@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7e413528 08-Dec-2020 Chris Chiu <chiu@endlessos.org>

ALSA: hda/realtek - Enable headset mic of ASUS Q524UQK with ALC255

The ASUS laptop Q524UQK with ALC255 codec can't detect the headset
microphone until ALC255_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201209045730.9972-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5cfca596 07-Dec-2020 Chris Chiu <chiu@endlessos.org>

ALSA: hda/realtek - Enable headset mic of ASUS X430UN with ALC256

The ASUS laptop X430UN with ALC256 can't detect the headset microphone
until ALC256_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201207072755.16210-1-chiu@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c72b9bfe 04-Dec-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: make bass spk volume adjustable on a yoga laptop

This change could fix 2 issues on this machine:
- the bass speaker's output volume can't be adjusted, that is because
the bass speaker is routed to the DAC (Nid 0x6) which has no volume
control.
- after plugging a headset with vol+, vol- and pause buttons on it,
press those buttons, nothing happens, this means those buttons
don't work at all. This machine has alc287 codec, need to add the
codec id to the disable/enable_headset_jack_key(), then the headset
button could work.

The quirk of ALC285_FIXUP_THINKPAD_HEADSET_JACK could fix both of these
2 issues.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20201205051130.8122-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aeedad25 28-Nov-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Add mute LED quirk to yet another HP x360 model

HP Spectre x360 Convertible 15" version (SSID 103c:827f) needs the
same quirk to make the mute LED working like other models.
System Information
Manufacturer: HP
Product Name: HP Spectre x360 Convertible 15-bl1XX

Sound Codec:
Codec: Realtek ALC295
Vendor Id: 0x10ec0295
Subsystem Id: 0x103c827f
Revision Id: 0x100002

Reported-by: <christoph.plattner@gmx.at>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201128090015.7743-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c84bfedc 27-Nov-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek: Fix bass speaker DAC assignment on Asus Zephyrus G14

ASUS Zephyrus G14 has two speaker pins, and the auto-parser tries to
assign an individual DAC to each pin as much as possible.
Unfortunately the third DAC has no volume control unlike the two DACs,
and this resulted in the inconsistent speaker volumes.

As a workaround, wire both speaker pins to the same DAC by modifying
the existing quirk (ALC289_FIXUP_ASUS_GA401) applied to this device.
Since this quirk entry is chained by another, we need to avoid
applying the DAC assignment change for it. Luckily, there is another
quirk entry (ALC289_FIXUP_ASUS_GA502) doing the very same thing, so we
can chain to the GA502 quirk instead.

Note that this patch uses a new flag of the generic parser,
obey_preferred_dacs, for enforcing the DACs.

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


# e5782a5d 26-Nov-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec supported for ALC897

Enable new codec supported for ALC897.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/3b00520f304842aab8291eb8d9191bd8@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eeacd80f 24-Nov-2020 Jian-Hong Pan <jhp@endlessos.org>

ALSA: hda/realtek: Enable headset of ASUS UX482EG & B9400CEA with ALC294

Some laptops like ASUS UX482EG & B9400CEA's headset audio does not work
until the quirk ALC294_FIXUP_ASUS_HPE is applied.

Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201124092024.179540-1-jhp@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92666d45 19-Nov-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed Dell AIO wrong sound tone

This platform only had one audio jack.
If it plugged speaker then replug with speaker or headset, the sound
tone will change to abnormal.
Headset Mic also can't record when this issue was happen.

[ Added a short comment about the COEF by tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/593c777dcfef4546aa050e105b8e53b5@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9e885770 03-Nov-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - HP Headset Mic can't detect after boot

System boot or warm boot with plugged headset.
If it turn on power save mode, Headset Mic will lose.
This patch will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a0ccbc53 06-Nov-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add supported mute Led for HP

HP Pavilion x360 Convertible machine, it supported mute led.
GPIO4 high will turn on led.
The patch will enable control led via GPIO4 pin.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1ae4d98e92c147b780ace3911c4e1d73@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5acfe15 11-Nov-2020 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek: Add some Clove SSID in the ALC293(ALC1220)

Fix "use as headset mic, without its own jack detect" problem.

[ Minor coding style fixes by tiwai ]

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/481963e4a5694ff19f27ae1e283d79ad@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 446b8185 02-Nov-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add supported for Lenovo ThinkPad Headset Button

Add supported for Lenovo ThinkPad Headset Button.
Thinkpad P1 Gen 3 (0x22c1)
Thinkpad X1 Extreme Gen 3 (0x22c2)

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/f39b11d00340408ca2ed2df9b4fc2a09@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ef9ce66f 03-Nov-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Enable headphone for ASUS TM420

ASUS TM420 had depop circuit for headphone.
It need to turn on by COEF bit.

[ fixed the missing enum definition by tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/3d6177d7023b4783bf2793861c577ada@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8a8de09c 27-Oct-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed HP headset Mic can't be detected

System boot with plugged headset. It will not detect headset Mic.
It will happen on cold boot restart resume state.
Quirk by SSID change to quirk by pin verb.

Fixes: 13468bfa8c58 ("ALSA: hda/realtek - set mic to auto detect on a HP AIO machine")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/f42ae1ede1cf47029ae2bef1a42caf03@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a6e7d0a4 12-Oct-2020 Kai Vehmanen <kai.vehmanen@linux.intel.com>

ALSA: hda: fix jack detection with Realtek codecs when in D3

In case HDA controller becomes active, but codec is runtime suspended,
jack detection is not successful and no interrupt is raised. This has
been observed with multiple Realtek codecs and HDA controllers from
different vendors. Bug does not occur if both codec and controller are
active, or both are in suspend. Bug can be easily hit on desktop systems
with no built-in speaker.

The problem can be fixed by powering up the codec once after every
controller runtime resume. Even if codec goes back to suspend later, the
jack detection will continue to work. Add a flag to 'hda_codec' to
describe codecs that require this flow from the controller driver.
Modify __azx_runtime_resume() to use pm_request_resume() to make the
intent clearer.

Mark all Realtek codecs with the new forced_resume flag.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209379
Cc: Kailang Yang <kailang@realtek.com>
Co-developed-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201012102704.794423-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 148ebf54 08-Oct-2020 Jeremy Szu <jeremy.szu@canonical.com>

ALSA: hda/realtek - The front Mic on a HP machine doesn't work

On a HP ZCentral, the front Mic could not be detected.

The codec of the HP ZCentrol is alc671 and it needs to override the pin
configuration to enable the headset mic.

Signed-off-by: Jeremy Szu <jeremy.szu@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201008105645.65505-1-jeremy.szu@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca184355 06-Oct-2020 Jian-Hong Pan <jhp@endlessos.org>

ALSA: hda/realtek: Enable audio jacks of ASUS D700SA with ALC887

The ASUS D700SA desktop's audio (1043:2390) with ALC887 cannot detect
the headset microphone and another headphone jack until
ALC887_FIXUP_ASUS_HMIC and ALC887_FIXUP_ASUS_AUDIO quirks are applied.
The NID 0x15 maps as the headset microphone and NID 0x19 maps as another
headphone jack. Also need the function like alc887_fixup_asus_jack to
enable the audio jacks.

Signed-off-by: Jian-Hong Pan <jhp@endlessos.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201007052224.22611-1-jhp@endlessos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 08befca4 02-Oct-2020 Qiu Wenbo <qiuwenbo@kylinos.com.cn>

ALSA: hda/realtek - Add mute Led support for HP Elitebook 845 G7

After installing archlinux, the mute led and micmute led are not working
at all. This patch fix this issue by applying a fixup from similar
model. These mute leds are confirmed working on HP Elitebook 845 G7.

Signed-off-by: Qiu Wenbo <qiuwenbo@kylinos.com.cn>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201002124454.7240-1-qiuwenbo@kylinos.com.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 13468bfa 28-Sep-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - set mic to auto detect on a HP AIO machine

Recently we enabled a HP AIO machine, we found the mic on the machine
couldn't record any sound and it couldn't detect plugging and
unplugging as well.

Through debugging we found the mic is set to manual detect mode, after
setting it to auto detect mode, it could detect plugging and
unplugging and could record sound.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200928080117.12435-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8f8bf00b 20-Sep-2020 Takashi Iwai <tiwai@suse.de>

Revert "ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO"

This reverts commit 15cbff3fbbc6 ("ALSA: hda - Fix silent audio output
and corrupted input on MSI X570-A PRO").

A regression reported by a Fedora user for MSI X570-A PRO mobo.
Until the correct solution is found out, let's revert the quirk as a
quick workaround.

Fixes: 15cbff3fbbc6 ("ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO")
Reported-by: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@vger.kernel.org>
Cc: Dan Crawford <dnlcrwfrd@gmail.com>
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1879277
Link: https://lore.kernel.org/r/7efd2fe5-bf38-7f85-891a-eee3845d1493@redhat.com
Link: https://lore.kernel.org/r/20200921102632.31139-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f73bbf63 14-Sep-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520

On Lenovo P520, the front panel headset LED isn't lit up right now.

Realtek states that the LED needs to be enabled by ALC233's GPIO2, so
let's do it accordingly to light the LED up.

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


# 3f742490 14-Sep-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged

We found a Mic detection issue on many Lenovo laptops, those laptops
belong to differnt models and they have different audio design like
internal mic connects to the codec or PCH, they all have this problem,
the problem is if plugging a headset before powerup/reboot the
machine, after booting up, the headphone could be detected but Mic
couldn't. If we plug out and plug in the headset, both headphone and
Mic could be detected then.

Through debugging we found the codec on those laptops are same, it is
alc257, and if we don't disable the 3k pulldown in alc256_shutup(),
the issue will be fixed. So far there is no pop noise or power
consumption regression on those laptops after this change.

Cc: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200914065118.19238-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fc19d559 08-Sep-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - The Mic on a RedmiBook doesn't work

The Mic connects to the Nid 0x19, but the configuration of Nid 0x19
is not defined to Mic, and also need to set the coeff to enable the
auto detection on the Nid 0x19. After this change, the Mic plugging
in or plugging out could be detected and could record the sound from
the Mic.

And the coeff value is suggested by Kailang of Realtek.

Cc: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200909020041.8967-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3cdf189 07-Sep-2020 Luke D Jones <luke@ljones.dev>

ALSA: hda: fixup headset for ASUS GX502 laptop

The GX502 requires a few steps to enable the headset i/o: pincfg,
verbs to enable and unmute the amp used for headpone out, and
a jacksense callback to toggle output via internal or jack using
a verb.

Signed-off-by: Luke D Jones <luke@ljones.dev>
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208005
Link: https://lore.kernel.org/r/20200907081959.56186-1-luke@ljones.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6a6660d0 03-Sep-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Improved routing for Thinkpad X1 7th/8th Gen

There've been quite a few regression reports about the lowered volume
(reduced to ca 65% from the previous level) on Lenovo Thinkpad X1
after the commit d2cd795c4ece ("ALSA: hda - fixup for the bass speaker
on Lenovo Carbon X1 7th gen"). Although the commit itself does the
right thing from HD-audio POV in order to have a volume control for
bass speakers, it seems that the machine has some secret recipe under
the hood.

Through experiments, Benjamin Poirier found out that the following
routing gives the best result:
* DAC1 (NID 0x02) -> Speaker pin (NID 0x14)
* DAC2 (NID 0x03) -> Shared by both Bass Speaker pin (NID 0x17) &
Headphone pin (0x21)
* DAC3 (NID 0x06) -> Unused

DAC1 seems to have some equalizer internally applied, and you'd get
again the output in a bad quality if you connect this to the
headphone pin. Hence the headphone is connected to DAC2, which is now
shared with the bass speaker pin. DAC3 has no volume amp, hence it's
not connected at all.

For achieving the routing above, this patch introduced a couple of
workarounds:

* The connection list of bass speaker pin (NID 0x17) is reduced not to
include DAC3 (NID 0x06)
* Pass preferred_pairs array to specify the fixed connection

Here, both workarounds are needed because the generic parser prefers
the individual DAC assignment over others.

When the routing above is applied, the generic parser creates the two
volume controls "Front" and "Bass Speaker". Since we have only two
DACs for three output pins, those are not fully controlling each
output individually, and it would confuse PulseAudio. For avoiding
the pitfall, in this patch, we rename those volume controls to some
unique ones ("DAC1" and "DAC2"). Then PulseAudio ignore them and
concentrate only on the still good-working "Master" volume control.
If a user still wants to control each DAC volume, they can still
change manually via "DAC1" and "DAC2" volume controls.

Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen")
Reported-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207407#c10
BugLink: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3214171
BugLink: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3276276
Link: https://lore/kernel.org/r/20200829112746.3118-1-benjamin.poirier@gmail.com
Link: https://lore.kernel.org/r/20200903083300.6333-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 15cbff3f 28-Aug-2020 Dan Crawford <dnlcrwfrd@gmail.com>

ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO

Following Christian Lachner's patch for Gigabyte X570-based motherboards,
also patch the MSI X570-A PRO motherboard; the ALC1220 codec requires the
same workaround for Clevo laptops to enforce the DAC/mixer connection
path. Set up a quirk entry for that.

I suspect most if all X570 motherboards will require similar patches.

[ The entries reordered in the SSID order -- tiwai ]

Related buglink: https://bugzilla.kernel.org/show_bug.cgi?id=205275
Signed-off-by: Dan Crawford <dnlcrwfrd@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200829024946.5691-1-dnlcrwfrd@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8bcea6cb 26-Aug-2020 Adrien Crivelli <adrien.crivelli@gmail.com>

ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion NT950XCJ-X716A

The Galaxy Book Ion NT950XCJ-X716A (15 inches) uses the same ALC298
codec as other Samsung laptops which have the no headphone sound bug. I
confirmed on my own hardware that this fixes the bug.

This also correct the model name for the 13 inches version. It was
incorrectly referenced as NT950XCJ-X716A in commit e17f02d05. But it
should have been NP930XCJ-K01US.

Fixes: e17f02d0559c ("ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion")
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
Signed-off-by: Adrien Crivelli <adrien.crivelli@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200826084014.211217-1-adrien.crivelli@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e17f02d0 18-Aug-2020 Mike Pozulp <pozulp.kernel@gmail.com>

ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion

The Galaxy Book Ion uses the same ALC298 codec as other Samsung laptops
which have the no headphone sound bug, like my Samsung Notebook. The
Galaxy Book owner confirmed that this patch fixes the bug.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
Signed-off-by: Mike Pozulp <pozulp.kernel@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200818165446.499821-1-pozulp.kernel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23dc9586 16-Aug-2020 Mike Pozulp <pozulp.kernel@gmail.com>

ALSA: hda/realtek: Add model alc298-samsung-headphone

The very quiet and distorted headphone output bug that afflicted my
Samsung Notebook 9 is appearing in many other Samsung laptops. Expose
the quirk which fixed my laptop as a model so other users can try it.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
Signed-off-by: Mike Pozulp <pozulp.kernel@gmail.com>
Link: https://lore.kernel.org/r/20200817043219.458889-1-pozulp.kernel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f70fff83 13-Aug-2020 Mike Pozulp <pozulp.kernel@gmail.com>

ALSA: hda/realtek: Add quirk for Samsung Galaxy Flex Book

The Flex Book uses the same ALC298 codec as other Samsung laptops which
have the no headphone sound bug, like my Samsung Notebook. The Flex Book
owner used Early Patching to confirm that this quirk fixes the bug.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
Signed-off-by: Mike Pozulp <pozulp.kernel@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200814045346.645367-1-pozulp.kernel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e5b1d977 12-Aug-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix unused variable warning

The previous fix forgot to remove the unused variable that triggers a
compile warning now:
sound/pci/hda/patch_realtek.c: In function 'alc285_fixup_hp_gpio_led':
sound/pci/hda/patch_realtek.c:4163:19: warning: unused variable 'spec' [-Wunused-variable]

Fix it.

Fixes: 404690649e6a ("ALSA: hda - reverse the setting value in the micmute_led_set")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20200812070256.32145-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 40469064 11-Aug-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda - reverse the setting value in the micmute_led_set

Before the micmute_led_set() is introduced, the function of
alc_gpio_micmute_update() will set the gpio value with the
!micmute_led.led_value, and the machines have the correct micmute led
status. After the micmute_led_set() is introduced, it sets the gpio
value with !!micmute_led.led_value, so the led status is not correct
anymore, we need to set micmute_led_polarity = 1 to workaround it.

Now we fix the micmute_led_set() and remove micmute_led_polarity = 1.

Fixes: 87dc36482cab ("ALSA: hda/realtek - Add LED class support for micmute LED")
Reported-and-suggested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200811122430.6546-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 386a6539 09-Aug-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO

After installing the Ubuntu Linux, the micmute led status is not
correct. Users expect that the led is on if the capture is disabled,
but with the current kernel, the led is off with the capture disabled.

We tried the old linux kernel like linux-4.15, there is no this issue.
It looks like we introduced this issue when switching to the led_cdev.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200810021659.7429-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2d2fded 07-Aug-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Fix pin default on Intel NUC 8 Rugged

The jack on Intel NUC 8 Rugged rear panel doesn't work.

The spec [1] states that the jack supports both headphone and
microphone, so override a Pin Complex which has both Amp-In and Amp-Out
to make the jack work.

Node 0x1b fits the requirement, and user confirmed the jack now works
with new pin config.

[1] https://www.intel.com/content/dam/support/us/en/documents/mini-pcs/NUC8CCH_TechProdSpec.pdf
BugLink: https://bugs.launchpad.net/bugs/1875199

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


# f1ec5be1 02-Aug-2020 Huacai Chen <chenhuacai@kernel.org>

ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops

There are several Loongson-3 based laptops produced by CZC or Lemote,
they use alc269/alc662 codecs and need specific pin-tables, this patch
add their pin-tables.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1596360400-32425-1-git-send-email-chenhc@lemote.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56496253 29-Jul-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed HP right speaker no sound

HP NB right speaker had no sound output.
This platform was connected to I2S Amp for speaker out.(None Realtek I2S Amp IC)
EC need to check codec GPIO1 pin to initial I2S Amp.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/01285f623ac7447187482fb4a8ecaa7c@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6fa38ef1 27-Jul-2020 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek: Fix add a "ultra_low_power" function for intel reference board (alc256)

Intel requires to enable power saving mode for intel reference board (alc256)

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200727115647.10967-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 293a92c1 24-Jul-2020 Armas Spann <zappel@retarded.farm>

ALSA: hda/realtek: typo_fix: enable headset mic of ASUS ROG Zephyrus G14(GA401) series with ALC289

This patch fixes a small typo I accidently submitted with the initial patch. The board should be named GA401 not G401.

Fixes: ff53664daff2 ("ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289")
Signed-off-by: Armas Spann <zappel@retarded.farm>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200724140837.302763-1-zappel@retarded.farm
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b43d05a 24-Jul-2020 Armas Spann <zappel@retarded.farm>

ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G15(GA502) series with ALC289

This patch adds support for headset mic to the ASUS ROG Zephyrus
G15(GA502) notebook series by adding the corresponding
vendor/pci_device id, as well as adding a new fixup for the used
realtek ALC289. The fixup stets the correct pin to get the headset mic
correctly recognized on audio-jack.

Signed-off-by: Armas Spann <zappel@retarded.farm>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200724140616.298892-1-zappel@retarded.farm
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 568e4e82 18-Jul-2020 Joonho Wohn <doomsheart@gmail.com>

ALSA: hda/realtek: Fixed ALC298 sound bug by adding quirk for Samsung Notebook Pen S

Fixed no headphone sound bug on laptop Samsung Notebook Pen S
(950SBE-951SBE), by using existing patch in Linus' tree, commit
14425f1f521f (ALSA: hda/realtek: Add quirk for Samsung Notebook).
This laptop uses the same ALC298 but different subsystem id 0x144dc812.
I added SND_PCI_QUIRK at sound/pci/hda/patch_realtek.c

Signed-off-by: Joonho Wohn <doomsheart@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/CAHcbMh291aWDKiWSZoxXB4-Eru6OYRwGA4AVEdCZeYmVLo5ZxQ@mail.gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5734e509 16-Jul-2020 PeiSen Hou <pshou@realtek.com.tw>

ALSA: hda/realtek - fixup for yet another Intel reference board

Add headset_jack for the intel reference board support with
10ec:1230.

Signed-off-by: PeiSen Hou <pshou@realtek.com.tw>
Link: https://lore.kernel.org/r/20200716090134.9811-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 158ae2f5 16-Jul-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Enable Speaker for ASUS UX563

ASUS UX563 speaker can't output.
Add quirk to link suitable model will enable it.
This model also could enable headset Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/96dee3ab01a04c28a7b44061e88009dd@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 473fbe13 16-Jul-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Enable Speaker for ASUS UX533 and UX534

ASUS UX533 and UX534 speaker still can't output.
End User feedback speaker didn't have output.
Add this COEF value will enable it.

Fixes: 4e051106730d ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294")
Cc: <stable@vger.kernel.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/80334402a93b48e385f8f4841b59ae09@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6317e5eb 14-Jul-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Replace the words white/blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Note that pm_blacklist module option is still kept as was, so that
users can still keep the old option.

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


# f50a121d 13-Jul-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset mic of Acer TravelMate B311R-31 with ALC256

The Acer TravelMate B311R-31 laptop's audio (1025:1430) with ALC256
cannot detect the headset microphone until
ALC256_FIXUP_ACER_MIC_NO_PRESENCE quirk maps the NID 0x19 as the headset
mic pin.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200713060421.62435-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ff53664d 11-Jul-2020 Armas Spann <zappel@retarded.farm>

ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G14(G401) series with ALC289

This patch adds support for headset mic to the ASUS ROG Zephyrus
G14(GA401) notebook series by adding the corresponding
vendor/pci_device id, as well as adding a new fixup for the used
realtek ALC289. The fixup stets the correct pin to get the headset mic
correctly recognized on audio-jack.

Signed-off-by: Armas Spann <zappel@retarded.farm>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200711110557.18681-1-zappel@retarded.farm
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ef9ddb9d 10-Jul-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - change to suitable link model for ASUS platform

ASUS platform couldn't need to use Headset Mode model.
It changes to the suitable model.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/d05bcff170784ec7bb35023407148161@realtek.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>


# 781c90c0 06-Jul-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset mic of Acer Veriton N4660G with ALC269VC

The Acer Veriton N4660G desktop's audio (1025:1248) with ALC269VC cannot
detect the headset microphone until ALC269VC_FIXUP_ACER_MIC_NO_PRESENCE
quirk maps the NID 0x18 as the headset mic pin.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200706071826.39726-3-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6e15d126 06-Jul-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset mic of Acer C20-820 with ALC269VC

The Acer Aspire C20-820 AIO's audio (1025:1065) with ALC269VC can't
detect the headset microphone until ALC269VC_FIXUP_ACER_HEADSET_MIC
quirk maps the NID 0x18 as the headset mic pin.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200706071826.39726-2-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8eae7e9b 06-Jul-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VC

The Acer desktop vCopperbox with ALC269VC cannot detect the MIC of
headset, the line out and internal speaker until
ALC269VC_FIXUP_ACER_VCOPPERBOX_PINS quirk applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200706071826.39726-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9774dc21 03-Jul-2020 Benjamin Poirier <benjamin.poirier@gmail.com>

ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice id

1)
In snd_hda_pick_fixup(), quirks are first matched by PCI SSID and then, if
there is no match, by codec SSID. The Lenovo "ThinkPad X1 Carbon 7th" has
an audio chip with PCI SSID 0x2292 and codec SSID 0x2293[1]. Therefore, fix
the quirk meant for that device to match on .subdevice == 0x2292.

2)
The "Thinkpad X1 Yoga 7th" does not exist. The companion product to the
Carbon 7th is the Yoga 4th. That device has an audio chip with PCI SSID
0x2292 and codec SSID 0x2292[2]. Given the behavior of
snd_hda_pick_fixup(), it is not possible to have a separate quirk for the
Yoga based on SSID. Therefore, merge the quirks meant for the Carbon and
Yoga. This preserves the current behavior for the Yoga.

[1] This is the case on my own machine and can also be checked here
https://github.com/linuxhw/LsPCI/tree/master/Notebook/Lenovo/ThinkPad
https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3225701
[2]
https://github.com/linuxhw/LsPCI/tree/master/Convertible/Lenovo/ThinkPad
https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3176355

Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen")
Fixes: 54a6a7dc107d ("ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen")
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Kailang Yang <kailang@realtek.com>
Tested-by: Vincent Bernat <vincent@bernat.ch>
Tested-by: Even Brenden <evenbrenden@gmail.com>
Signed-off-by: Benjamin Poirier <benjamin.poirier@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200703080005.8942-2-benjamin.poirier@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek: Unify LED helper code

Both mute and mic-mute LED callbacks do almost similar tasks with just
different bits. Factor out the common code and use them from the
callbacks for simplification.

This ended up with covering the forgotten stuff, too; e.g. VREF LED
handling required the temporary power up/down that was missing for the
mute LED, or some forgotten polarity checks are added.

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


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

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

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

The code in Thinkpad helper is also converted. In that case, just
call the new function and remove the open-code.

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


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

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

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

The Thinkpad helper code is updated accordingly, too.

Also, the usage of snd_hda_gen_fixup_micmute_led() is replaced with
either the local alc_fixup_micmute_led() or the explicit call of
snd_hda_gen_add_micmute_led_cdev() with NULL callback.

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


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

ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev

A new helper, snd_hda_gen_add_micmute_led_cdev(), is introduced here
for creating a LED classdev and setting up the hook to the capture
control for controlling the mic-mute LED to follow the capture switch
change. This will replace the existing users of
snd_hda_gen_add_micmute_led() in later patches.

Also, introduce a new kconfig CONFIG_SND_HDA_GENERIC_LEDS, to indicate
the usage of mute / mic-mute LED helpers. It's selected by the codec
drivers (Realtek, Conexant and Sigmatel), while it selects the
necessary LED class dependencies.

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


# b2c22910 17-Jun-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Add mute LED and micmute LED support for HP systems

There are two more HP systems control mute LED from HDA codec and need
to expose micmute led class so SoF can control micmute LED.

Add quirks to support them.

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


# a0b03952 16-Jun-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add quirk for MSI GE63 laptop

MSI GE63 laptop with ALC1220 codec requires the very same quirk
(ALC1220_FIXUP_CLEVO_P950) as other MSI devices for the proper sound
output.

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


# 573fcbfd 08-Jun-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - add a pintbl quirk for several Lenovo machines

A couple of Lenovo ThinkCentre machines all have 2 front mics and they
use the same codec alc623 and have the same pin config, so add a
pintbl entry for those machines to apply the fixup
ALC283_FIXUP_HEADSET_MIC.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200608115541.9531-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 630e3612 27-May-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec supported for ALC287

Enable new codec supported for ALC287.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/dcf5ce5507104d0589a917cbb71dc3c6@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 399c01aa 26-May-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add a model for Thinkpad T570 without DAC workaround

We fixed the regression of the speaker volume for some Thinkpad models
(e.g. T570) by the commit 54947cd64c1b ("ALSA: hda/realtek - Fix
speaker output regression on Thinkpad T570"). Essentially it fixes
the DAC / pin pairing by a static table. It was confirmed and merged
to stable kernel later.

Now, interestingly, we got another regression report for the very same
model (T570) about the similar problem, and the commit above was the
culprit. That is, by some reason, there are devices that prefer the
DAC1, and another device DAC2!

Unfortunately those have the same ID and we have no idea what can
differentiate, in this patch, a new fixup model "tpt470-dock-fix" is
provided, so that users with such a machine can apply it manually.
When model=tpt470-dock-fix option is passed to snd-hda-intel module,
it avoids the fixed DAC pairing and the DAC1 is assigned to the
speaker like the earlier versions.

Fixes: 54947cd64c1b ("ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570")
BugLink: https://apibugzilla.suse.com/show_bug.cgi?id=1172017
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200526062406.9799-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 259eb824 19-May-2020 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek - Add more fixup entries for Clevo machines

A few known Clevo machines (PC50, PC70, X170) with ALC1220 codec need
the existing quirk for pins for PB51 and co.

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200519065012.13119-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d9e8fe0c 17-May-2020 Christian Lachner <gladiac@gmail.com>

ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Xtreme

The Gigabyte X570 Aorus Xtreme motherboard with ALC1220 codec
requires a similar workaround for Clevo laptops to enforce the
DAC/mixer connection path. Set up a quirk entry for that.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205275
Signed-off-by: Christian Lachner <gladiac@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200518053844.42743-2-gladiac@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b590b38c 14-May-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Limit int mic boost for Thinkpad T530

Lenovo Thinkpad T530 seems to have a sensitive internal mic capture
that needs to limit the mic boost like a few other Thinkpad models.
Although we may change the quirk for ALC269_FIXUP_LENOVO_DOCK, this
hits way too many other laptop models, so let's add a new fixup model
that limits the internal mic boost on top of the existing quirk and
apply to only T530.

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


# 1b94e59d 12-May-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add COEF workaround for ASUS ZenBook UX431DA

ASUS ZenBook UX431DA requires an additional COEF setup when booted
from the recent Windows 10, otherwise it produces the noisy output.
The quirk turns on COEF 0x1b bit 10 that has been cleared supposedly
due to the pop noise reduction.

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


# 7900e817 12-May-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset mic of ASUS UX581LV with ALC295

The ASUS UX581LV laptop's audio (1043:19e1) with ALC295 can't detect the
headset microphone until ALC295_FIXUP_ASUS_MIC_NO_PRESENCE quirk
applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Link: https://lore.kernel.org/r/20200512061525.133985-3-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad97d667 12-May-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable headset mic of ASUS UX550GE with ALC295

The ASUS laptop UX550GE with ALC295 can't detect the headset microphone
until ALC295_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Link: https://lore.kernel.org/r/20200512061525.133985-2-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9e43342b 12-May-2020 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Enable headset mic of ASUS GL503VM with ALC295

The ASUS laptop GL503VM with ALC295 can't detect the headset microphone.
The headset microphone does not work until pin 0x19 is enabled for it.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Link: https://lore.kernel.org/r/20200512061525.133985-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 14425f1f 09-May-2020 Mike Pozulp <pozulp.kernel@gmail.com>

ALSA: hda/realtek: Add quirk for Samsung Notebook

Some models of the Samsung Notebook 9 have very quiet and distorted
headphone output. This quirk changes the VREF value of the ALC298
codec NID 0x1a from default HIZ to new 100.

[ adjusted to 5.7-base and rearranged in SSID order -- tiwai ]

Signed-off-by: Mike Pozulp <pozulp.kernel@gmail.com>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423
Link: https://lore.kernel.org/r/20200510032838.1989130-1-pozulp.kernel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 52e4e368 03-May-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek - Fix S3 pop noise on Dell Wyse

Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to
0") makes the ALC225 have pop noise on S3 resume and cold boot.

The previous fix enable power save node universally for ALC225, however
it makes some ALC225 systems unable to produce any sound.

So let's only enable power save node for the affected Dell Wyse
platform.

Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0")
BugLink: https://bugs.launchpad.net/bugs/1866357
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200503152449.22761-2-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f41224ef 03-May-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

Revert "ALSA: hda/realtek: Fix pop noise on ALC225"

This reverts commit 3b36b13d5e69d6f51ff1c55d1b404a74646c9757.

Enable power save node breaks some systems with ACL225. Revert the patch
and use a platform specific quirk for the original issue isntead.

Fixes: 3b36b13d5e69 ("ALSA: hda/realtek: Fix pop noise on ALC225")
BugLink: https://bugs.launchpad.net/bugs/1875916
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200503152449.22761-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0127f597 01-May-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix unused variable warning w/o CONFIG_LEDS_TRIGGER_AUDIO

Cover with a proper ifdef around the variable declaration for fixing
the following compilation warning without CONFIG_LEDS_TRIGGER_AUDIO:
sound/pci/hda/patch_realtek.c: In function 'alc_fixup_hp_gpio_led':
sound/pci/hda/patch_realtek.c:4134:6: warning: unused variable 'err' [-Wunused-variable]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 87dc36482cab ("ALSA: hda/realtek - Add LED class support for micmute LED")
Link: https://lore.kernel.org/r/20200501072857.13720-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 87dc3648 30-Apr-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek - Add LED class support for micmute LED

Currently DMIC controls micmute LED via "audio mute LED trigger".

However, unlike Dell and Lenovo platforms, HP platforms don't provide a
way to control micmute LED via ACPI, it's controlled by HDA codec
instead.

So let's register an LED class for micmute so other subsystems like DMIC
can facilitate the codec-controlled LED.

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


# 3e0650ab 30-Apr-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek - Enable micmute LED on and HP system

Though the system uses DMIC, headset mic still uses the HDA, let's use
GPIO 0x1 to control the micmute LED.

The micmute LED GPIO has a different polarity to the mute LED GPIO, we
can use the newly added micmute_led_polarity to indicate that.

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


# dbd13179 30-Apr-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek - Introduce polarity for micmute LED GPIO

Currently mute LED and micmute LED share the same GPIO polarity.

So split the polarity for mute and micmute, in case they have different
polarities.

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


# ef0b3203 26-Apr-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter

This new Lenovo ThinkCenter has two front mics which can't be handled
by PA so far, so apply the fixup ALC283_FIXUP_HEADSET_MIC to change
the location for one of the mics.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200427030039.10121-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7fbdcd83 23-Apr-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec supported for ALC245

Enable new codec supported for ALC245.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/8c0804738b2c42439f59c39c8437817f@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 67791202 18-Apr-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix unexpected init_amp override

The commit 1c76aa5fb48d ("ALSA: hda/realtek - Allow skipping
spec->init_amp detection") changed the way to assign spec->init_amp
field that specifies the way to initialize the amp. Along with the
change, the commit also replaced a few fixups that set spec->init_amp
in HDA_FIXUP_ACT_PROBE with HDA_FIXUP_ACT_PRE_PROBE. This was rather
aligning to the other fixups, and not supposed to change the actual
behavior.

However, this change turned out to cause a regression on FSC S7020,
which hit exactly the above. The reason was that there is still one
place that overrides spec->init_amp after HDA_FIXUP_ACT_PRE_PROBE
call, namely in alc_ssid_check().

This patch fixes the regression by adding the proper spec->init_amp
override check, i.e. verifying whether it's still ALC_INIT_UNDEFINED.

Fixes: 1c76aa5fb48d ("ALSA: hda/realtek - Allow skipping spec->init_amp detection")
Cc: <stable@vger.kernel.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207329
Link: https://lore.kernel.org/r/20200418190639.10082-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4963d66b 10-Apr-2020 Adam Barber <barberadam995@gmail.com>

ALSA: hda/realtek - Enable the headset mic on Asus FX505DT

On Asus FX505DT with Realtek ALC233, the headset mic is connected
to pin 0x19, with default 0x411111f0.

Enable headset mic by reconfiguring the pin to an external mic
associated with the headphone on 0x21. Mic jack detection was also
found to be working.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207131
Signed-off-by: Adam Barber <barberadam995@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200410090032.2759-1-barberadam995@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1d3aa4a5 08-Apr-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add quirk for MSI GL63

MSI GL63 laptop requires the similar quirk like other MSI models,
ALC1220_FIXUP_CLEVO_P950. The board BIOS doesn't provide a PCI SSID
for the device, hence we need to take the codec SSID (1462:1275)
instead.

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


# 24164f43 07-Apr-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add HP new mute led supported for ALC236

HP new platform has new mute led feature.
COEF index 0x34 bit 5 to control playback mute led.
COEF index 0x35 bit 2 and bit 3 to control Mic mute led.

[ corrected typos by tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/6741211598ba499687362ff2aa30626b@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 431e76c3 07-Apr-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add supported new mute Led for HP

HP Note Book supported new mute Led.
Hardware PIN was not enough to meet old LED rule.
JD2 to control playback mute led.
GPO3 to control capture mute led.
(ALC285 didn't control GPO3 via verb command)
This two PIN just could control by COEF registers.

[ corrected typos by tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/6741211598ba499687362ff2aa30626b@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca707b3f 02-Apr-2020 Hans de Goede <hdegoede@redhat.com>

ALSA: hda/realtek - Add quirk for Lenovo Carbon X1 8th gen

The audio setup on the Lenovo Carbon X1 8th gen is the same as that on
the Lenovo Carbon X1 7th gen, as such it needs the same
ALC285_FIXUP_THINKPAD_HEADSET_JACK quirk.

This fixes volume control of the speaker not working among other things.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1820196
Cc: stable@vger.kernel.org
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20200402174311.238614-1-hdegoede@redhat.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f36938aa 29-Mar-2020 Thomas Hebb <tommyhebb@gmail.com>

ALSA: hda/realtek - Remove now-unnecessary XPS 13 headphone noise fixups

patch_realtek.c has historically failed to properly configure the PC
Beep Hidden Register for the ALC256 codec (among others). Depending on
your kernel version, symptoms of this misconfiguration can range from
chassis noise, picked up by a poorly-shielded PCBEEP trace, getting
amplified and played on your internal speaker and/or headphones to loud
feedback, which responds to the "Headphone Mic Boost" ALSA control,
getting played through your headphones. For details of the problem, see
the patch in this series titled "ALSA: hda/realtek - Set principled PC
Beep configuration for ALC256", which fixes the configuration.

These symptoms have been most noticed on the Dell XPS 13 9350 and 9360,
popular laptops that use the ALC256. As a result, several model-specific
fixups have been introduced to try and fix the problem, the most
egregious of which locks the "Headphone Mic Boost" control as a hack to
minimize noise from a feedback loop that shouldn't have been there in
the first place.

Now that the underlying issue has been fixed, remove all these fixups.
Remaining fixups needed by the XPS 13 are all picked up by existing pin
quirks.

This change should, for the XPS 13 9350/9360

- Significantly increase volume and audio quality on headphones
- Eliminate headphone popping on suspend/resume
- Allow "Headphone Mic Boost" to be set again, making the headphone
jack fully usable as a microphone jack too.

Fixes: 8c69729b4439 ("ALSA: hda - Fix headphone noise after Dell XPS 13 resume back from S3")
Fixes: 423cd785619a ("ALSA: hda - Fix headphone noise on Dell XPS 13 9360")
Fixes: e4c9fd10eb21 ("ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant")
Fixes: 1099f48457d0 ("ALSA: hda/realtek: Reduce the Headphone static noise on XPS 9350/9360")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Link: https://lore.kernel.org/r/b649a00edfde150cf6eebbb4390e15e0c2deb39a.1585584498.git.tommyhebb@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c4473744 29-Mar-2020 Thomas Hebb <tommyhebb@gmail.com>

ALSA: hda/realtek - Set principled PC Beep configuration for ALC256

The Realtek PC Beep Hidden Register[1] is currently set by
patch_realtek.c in two different places:

In alc_fill_eapd_coef(), it's set to the value 0x5757, corresponding to
non-beep input on 1Ah and no 1Ah loopback to either headphones or
speakers. (Although, curiously, the loopback amp is still enabled.) This
write was added fairly recently by commit e3743f431143 ("ALSA:
hda/realtek - Dell headphone has noise on unmute for ALC236") and is a
safe default. However, it happens in the wrong place:
alc_fill_eapd_coef() runs on module load and cold boot but not on S3
resume, meaning the register loses its value after suspend.

Conversely, in alc256_init(), the register is updated to unset bit 13
(disable speaker loopback) and set bit 5 (set non-beep input on 1Ah).
Although this write does run on S3 resume, it's not quite enough to fix
up the register's default value of 0x3717. What's missing is a set of
bit 14 to disable headphone loopback. Without that, we end up with a
feedback loop where the headphone jack is being driven by amplified
samples of itself[2].

This change eliminates the update in alc256_init() and replaces it with
the 0x5757 write from alc_fill_eapd_coef(). Kailang says that 0x5757 is
supposed to be the codec's default value, so using it will make
debugging easier for Realtek.

Affects the ALC255, ALC256, ALC257, ALC235, and ALC236 codecs.

[1] Newly documented in Documentation/sound/hd-audio/realtek-pc-beep.rst

[2] Setting the "Headphone Mic Boost" control from userspace changes
this feedback loop and has been a widely-shared workaround for headphone
noise on laptops like the Dell XPS 13 9350. This commit eliminates the
feedback loop and makes the workaround unnecessary.

Fixes: e1e8c1fdce8b ("ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236")
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Link: https://lore.kernel.org/r/bf22b417d1f2474b12011c2a39ed6cf8b06d3bf5.1585584498.git.tommyhebb@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 476c02e0 29-Mar-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - a fake key event is triggered by running shutup

On the Lenovo X1C7 machines, after we plug the headset, the rt_resume()
and rt_suspend() of the codec driver will be called periodically, the
driver can't stay in the rt_suspend state even users doen't use the
sound card.

Through debugging, I found when running rt_suspend(), it will call
alc225_shutup(), in this function, it will change 3k pull down control
by alc_update_coef_idx(codec, 0x4a, 0, 3 << 10), this will trigger a
fake key event and that event will resume the codec, when codec
suspend agin, it will trigger the fake key event one more time, this
process will repeat.

If disable the key event before changing the pull down control, it
will not trigger fake key event. It also needs to restore the pull
down control and re-enable the key event, otherwise the system can't
get key event when codec is in rt_suspend state.

Also move some functions ahead of alc225_shutup(), this can save the
function declaration.

Fixes: 76f7dec08fd6 (ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1)
Cc: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200329082018.20486-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f5a88b0a 26-Mar-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Enable mute LED on an HP system

The system in question uses ALC285, and it uses GPIO 0x04 to control its
mute LED.

The mic mute LED can be controlled by GPIO 0x01, however the system uses
DMIC so we should use that to control mic mute LED.

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


# a124458a 17-Mar-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662

A headset on the desktop like Acer N50-600 does not work, until quirk
ALC662_FIXUP_ACER_NITRO_HEADSET_MODE is applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200317082806.73194-3-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d858c706 17-Mar-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662

The Acer desktop X2660G with ALC662 can't detect the headset microphone
until ALC662_FIXUP_ACER_X2660G_HEADSET_MODE quirk applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200317082806.73194-2-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3b36b13d 11-Mar-2020 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Fix pop noise on ALC225

Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to
0") makes the ALC225 have pop noise on S3 resume and cold boot.

So partially revert this commit for ALC225 to fix the regression.

Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0")
BugLink: https://bugs.launchpad.net/bugs/1866357
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200311061328.17614-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8b33a134 25-Feb-2020 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294

A headset on the laptop like ASUS B9450FA does not work, until quirk
ALC294_FIXUP_ASUS_HPE is applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200225072920.109199-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0d45e86d 23-Feb-2020 Christian Lachner <gladiac@gmail.com>

ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master

The Gigabyte X570 Aorus Master motherboard with ALC1220 codec
requires a similar workaround for Clevo laptops to enforce the
DAC/mixer connection path. Set up a quirk entry for that.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205275
Signed-off-by: Christian Lachner <gladiac@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200223092416.15016-2-gladiac@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 76f7dec0 10-Feb-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1

ThinkPad want to support Headset Button control.
This patch will enable it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/7f0b7128f40f41f6b5582ff610adc33d@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 78def224 20-Feb-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Headset Mic supported

Dell desktop platform supported headset Mic.
Add pin verb to enable headset Mic.
This platform only support fixed type headset for Iphone type.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/b9da28d772ef43088791b0f3675929e7@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c37c0ab0 18-Feb-2020 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1

Need to chain the THINKPAD_ACPI, otherwise the mute led will not
work.

Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20200219052306.24935-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc5049ae 18-Feb-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply quirk for yet another MSI laptop

MSI GP65 laptop with SSID 1462:1293 requires the same quirk as other
MSI models.

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


# a655e2b1 17-Feb-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply quirk for MSI GP63, too

The same quirk that was applied to MSI GL73 is needed for MSI GP63,
too. Adding the entry with the SSID 1462:1228.

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


# 7dafba37 12-Feb-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix silent output on MSI-GL73

MSI-GL73 laptop with ALC1220 codec requires a similar workaround for
Clevo laptops to enforce the DAC/mixer connection path. Set up a
quirk entry for that.

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


# 2b3b6497 10-Feb-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add more codec supported Headset Button

Add supported Headset Button for ALC215/ALC285/ALC289.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/948f70b4488f4cc2b629a39ce4e4be33@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f2adbae0 05-Feb-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported

HP want to keep BIOS verb table for release platform.
So, it need to add 0x19 pin for quirk.

Fixes: 5af29028fd6d ("ALSA: hda/realtek - Add Headset Mic supported for HP cPC")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/74636ccb700a4cbda24c58a99dc430ce@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5af29028 16-Jan-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Headset Mic supported for HP cPC

HP ALC671 need to support Headset Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Link: https://lore.kernel.org/r/06a9d2b176e14706976d6584cbe2d92a@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a462be5 09-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Manage concurrent reg access more properly

In the commit 8e85def5723e ("ALSA: hda: enable regmap internal
locking"), we re-enabled the regmap lock due to the reported
regression that showed the possible concurrent accesses. It was a
temporary workaround, and there are still a few opened races even
after the revert. In this patch, we cover those still opened windows
with a proper mutex lock and disable the regmap internal lock again.

First off, the patch introduces a new snd_hdac_device.regmap_lock
mutex that is applied for each snd_hdac_regmap_*() call, including
read, write and update helpers. The mutex is applied carefully so
that it won't block the self-power-up procedure in the helper
function. Also, this assures the protection for the accesses without
regmap, too.

The snd_hdac_regmap_update_raw() is refactored to use the standard
regmap_update_bits_check() function instead of the open-code. The
non-regmap case is still open-coded but it's an easy part. The all
read and write operations are in the single mutex protection, so it's
now race-free.

In addition, a couple of new helper functions are added:
snd_hdac_regmap_update_raw_once() and snd_hdac_regmap_sync(). Both
are called from HD-audio legacy driver. The former is to initialize
the given verb bits but only once when it's not initialized yet. Due
to this condition, the function invokes regcache_cache_only(), and
it's now performed inside the regmap_lock (formerly it was racy) too.
The latter function is for simply invoking regcache_sync() inside the
regmap_lock, which is called from the codec resume call path.
Along with that, the HD-audio codec driver code is slightly modified /
simplified to adapt those new functions.

And finally, snd_hdac_regmap_read_raw(), *_write_raw(), etc are
rewritten with the helper macro. It's just for simplification because
the code logic is identical among all those functions.

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


# 8a71821f 11-Jan-2020 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ALSA: hda: patch_realtek: fix empty macro usage in if block

GCC reports the following warning with W=1

sound/pci/hda/patch_realtek.c: In function ‘alc269_suspend’:
sound/pci/hda/patch_realtek.c:3616:29: warning: suggest braces around
empty body in an ‘if’ statement [-Wempty-body]
3616 | alc5505_dsp_suspend(codec);
| ^

sound/pci/hda/patch_realtek.c: In function ‘alc269_resume’:
sound/pci/hda/patch_realtek.c:3651:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
3651 | alc5505_dsp_resume(codec);
| ^

This is a classic macro problem and can indeed lead to bad program
flows.

Fix by using the usual "do { } while (0)" pattern

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200111214736.3002-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54a6a7dc 08-Jan-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add quirk for the bass speaker on Lenovo Yoga X1 7th gen

Add quirk to ALC285_FIXUP_SPEAKER2_TO_DAC1, which is the same fixup
applied for X1 Carbon 7th gen in commit d2cd795c4ece ("ALSA: hda -
fixup for the bass speaker on Lenovo Carbon X1 7th gen").

Signed-off-by: Kailang Yang <kailang@realtek.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9194a1eb 07-Jan-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Set EAPD control to default for ALC222

Set EAPD control to verb control.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6b0f95c4 05-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - More constifications

Apply const prefix to each coef table array.

Just for minor optimization and no functional changes.

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


# 5fab5829 05-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply mic mute LED quirk for Dell E7xx laptops, too

Dell E7xx laptops have also mic mute LED that is driven by the
dell-laptop platform driver. Bind it with the capture control as
already done for other models.

A caveat is that the fixup hook for the mic mute LED has to be applied
at last, otherwise it results in the invalid override of the callback.

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


# 6d9ffcff 03-Jan-2020 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec supported for ALCS1200A

Add ALCS1200A supported.
It was similar as ALC900.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/a9bd3cdaa02d4fa197623448d5c51e50@realtek.com
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>


# 48e01504 29-Dec-2019 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Enable the bass speaker of ASUS UX431FLC

ASUS reported that there's an bass speaker in addition to internal
speaker and it uses DAC 0x02. It was not enabled in the commit
436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS
UX431FLC") which only enables the amplifier and the front speaker.
This commit enables the bass speaker on top of the aforementioned
work to improve the acoustic experience.

Fixes: 436e25505f34 ("ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC")
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191230031118.95076-1-chiu@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e79c2269 18-Dec-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Bass Speaker and fixed dac for bass speaker

Dell has new platform which has dual speaker connecting.
They want dual speaker which use same dac for output.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/229c7efa2b474a16b7d8a916cd096b68@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 66c5d718 09-Dec-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset Mic no shutup for ALC283

Chrome machine had humming noise from external speaker plugin at
codec D3 state.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/2692449396954c6c968f5b75e2660358@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5815bdfd 10-Dec-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Line-out jack doesn't work on a Dell AIO

After applying the fixup ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, the
Line-out jack works well. And instead of adding a new set of pin
definition in the pin_fixup_tbl, we put a more generic matching entry
in the fallback_pin_fixup_tbl.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20191211051321.5883-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2cd795c 29-Nov-2019 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen

The auto-parser assigns the bass speaker to DAC3 (NID 0x06) which
is without the volume control. I do not see a reason to use DAC2,
because the shared output to all speakers produces the sufficient
and well balanced sound. The stereo support is enough for this
purpose (laptop).

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


# 336820c4 28-Nov-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G

We've added the bass speaker support on Acer 8951G by the commit
00066e9733f6 ("Add Acer Aspire Ethos 8951G model quirk"), but it seems
that the GPIO pin was wrongly set: while the commit turns off the bit
to power up the amp, the actual hardware reacts other way round,
i.e. GPIO bit on = amp on.

So this patch fixes the bug, turning on the GPIO bit 0x02 as default.
Since turning on the GPIO bit can be more easily managed with
alc_setup_gpio() call, we simplify the quirk code by integrating the
GPIO setup into the existing alc662_fixup_aspire_ethos_hp() and
dropping the whole ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER quirk.

Fixes: 00066e9733f6 ("Add Acer Aspire Ethos 8951G model quirk")
Reported-and-tested-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191128202630.6626-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1e8c1fd 26-Nov-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236

headphone have noise even the volume is very small.
Let it fill up pcbeep hidden register to default value.
The issue was gone.

Fixes: 4344aec84bd8 ("ALSA: hda/realtek - New codec support for ALC256")
Fixes: 736f20a70608 ("ALSA: hda/realtek - Add support for ALC236/ALC3204")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/9ae47f23a64d4e41a9c81e263cd8a250@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 436e2550 25-Nov-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC

Laptops like ASUS UX431FLC and UX431FL can share the same audio quirks.
But UX431FLC needs one more step to enable the internal speaker: Pull
the GPIO from CODEC to initialize the AMP.

Fixes: 60083f9e94b2 ("ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL")
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191125093405.5702-1-jian-hong@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 695d1ec3 20-Nov-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop

The headset on this machine is not defined, after applying the quirk
ALC256_FIXUP_ASUS_HEADSET_MIC, the headset-mic works well

BugLink: https://bugs.launchpad.net/bugs/1846148
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20191121025427.8856-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d64ebdbf 20-Nov-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Move some alc236 pintbls to fallback table

We have a new Dell machine which needs to apply the quirk
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table
to fix it this time. And we could remove all pintbls of alc236
for applying DELL1_MIC_NO_PRESENCE on Dell machines.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20191121022644.8078-2-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aed8c7f4 20-Nov-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Move some alc256 pintbls to fallback table

We have a new Dell machine which needs to apply the quirk
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, try to use the fallback table
to fix it this time. And we could remove all pintbls of alc256
for applying DELL1_MIC_NO_PRESENCE on Dell machines.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20191121022644.8078-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8a6c55d0 24-Oct-2019 Aaron Ma <aaron.ma@canonical.com>

ALSA: hda/realtek - Fix 2 front mics of codec 0x623

These 2 ThinkCentres installed a new realtek codec ID 0x623,
it has 2 front mics with the same location on pin 0x18 and 0x19.

Apply fixup ALC283_FIXUP_HEADSET_MIC to change 1 front mic
location to right, then pulseaudio can handle them.
One "Front Mic" and one "Mic" will be shown, and audio output works
fine.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191024114439.31522-1-aaron.ma@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f0778871 24-Oct-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support for ALC623

Support new codec ALC623.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/ed97b6a8bd9445ecb48bc763d9aaba7a@realtek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 83629532 02-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support for ALC711

Support new codec ALC711.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c8967a7 17-Oct-2019 Daniel Drake <drake@endlessm.com>

ALSA: hda/realtek - Enable headset mic on Asus MJ401TA

On Asus MJ401TA (with Realtek ALC256), the headset mic is connected to
pin 0x19, with default configuration value 0x411111f0 (indicating no
physical connection).

Enable this by quirking the pin. Mic jack detection was also tested and
found to be working.

This enables use of the headset mic on this product.

Signed-off-by: Daniel Drake <drake@endlessm.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20191017081501.17135-1-drake@endlessm.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1099f484 02-Oct-2019 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Reduce the Headphone static noise on XPS 9350/9360

Headphone on XPS 9350/9360 produces a background white noise. The The
noise level somehow correlates with "Headphone Mic Boost", when it sets
to 1 the noise disappears. However, doing this has a side effect, which
also decreases the overall headphone volume so I didn't send the patch
upstream.

The noise was bearable back then, but after commit 717f43d81afc ("ALSA:
hda/realtek - Update headset mode for ALC256") the noise exacerbates to
a point it starts hurting ears.

So let's use the workaround to set "Headphone Mic Boost" to 1 and lock
it so it's not touchable by userspace.

Fixes: 717f43d81afc ("ALSA: hda/realtek - Update headset mode for ALC256")
BugLink: https://bugs.launchpad.net/bugs/1654448
BugLink: https://bugs.launchpad.net/bugs/1845810
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20191003043919.10960-1-kai.heng.feng@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd9c10bc 15-Sep-2019 Jan-Marek Glogowski <glogow@fbihome.de>

ALSA: hda/realtek - PCI quirk for Medion E4254

The laptop has a combined jack to attach headsets on the right.
The BIOS encodes them as two different colored jacks at the front,
but otherwise it seems to be configured ok. But any adaption of
the pins config on its own doesn't fix the jack detection to work
in Linux. Still Windows works correct.

This is somehow fixed by chaining ALC256_FIXUP_ASUS_HEADSET_MODE,
which seems to register the microphone jack as a headset part and
also results in fixing jack sensing, visible in dmesg as:

-snd_hda_codec_realtek hdaudioC0D0: Mic=0x19
+snd_hda_codec_realtek hdaudioC0D0: Headset Mic=0x19

[ Actually the essential change is the location of the jack; the
driver created "Front Mic Jack" without the matching volume / mute
control element due to its jack location, which confused PA.
-- tiwai ]

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/8f4f9b20-0aeb-f8f1-c02f-fd53c09679f1@fbihome.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54324221 16-Sep-2019 James McDonnell <james_mcdonnell@hotmail.com>

ALSA: hda/realtek - Fix alienware headset mic

Headset microphone quirk for alienware 15r3. Without this using
a headset with mic attached will not work.

Signed-off-by: James McDonnell <james_mcdonnell@hotmail.com>
Link: https://lore.kernel.org/r/QB1PR01MB2337D0367C2E3ADB0010134F808C0@QB1PR01MB2337.CANPRD01.PROD.OUTLOOK.COM
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 00066e97 06-Sep-2019 Sergey Bostandzhyan <jin@mediatomb.cc>

Add Acer Aspire Ethos 8951G model quirk

This notebook has 6 built in speakers for 5.1 surround support, however
only two got autodetected and have also not been assigned correctly.

This patch enables all speakers and also fixes muting when headphones are
plugged in.

The speaker layout is as follows:

pin 0x15 Front Left / Front Right
pin 0x18 Front Center / Subwoofer
pin 0x1b Rear Left / Rear Right (Surround)

The quirk will be enabled automatically on this hardware, but can also be
activated manually via the model=aspire-ethos module parameter.

Caveat: pin 0x1b is shared between headphones jack and surround speakers.
When headphones are plugged in, the surround speakers get muted
automatically by the hardware, however all other speakers remain
unmuted. Currently it's not possible to make use of the generic automute
function in the driver, because such shared pins are not supported.

If we would change the pin settings to identify the pin as headphones,
the surround channel and thus the ability to select 5.1 profiles would
get lost.

This quirk solves the above problem by monitoring jack state of 0x1b and
by connecting/disconnecting all remaining speaker pins when something
gets plugged in or unplugged from the headphones jack port.

Signed-off-by: Sergey Bostandzhyan <jin@mediatomb.cc>
Link: https://lore.kernel.org/r/20190906093343.GA7640@xn--80adja5bqm.su
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2a36c16e 03-Sep-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Fix the problem of two front mics on a ThinkCentre

This ThinkCentre machine has a new realtek codec alc222, it is not
in the support list, we add it in the realtek.c then this machine
can apply FIXUPs for the realtek codec.

And this machine has two front mics which can't be handled
by PA so far, it uses the pin 0x18 and 0x19 as the front mics, as
a result the existing FIXUP ALC294_FIXUP_LENOVO_MIC_LOCATION doesn't
work on this machine. Fortunately another FIXUP
ALC283_FIXUP_HEADSET_MIC also can change the location for one of the
two mics on this machine.

Link: https://lore.kernel.org/r/20190904055327.9883-1-hui.wang@canonical.com
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 60083f9e 02-Sep-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek - Enable internal speaker & headset mic of ASUS UX431FL

Original pin node values of ASUS UX431FL with ALC294:

0x12 0xb7a60140
0x13 0x40000000
0x14 0x90170110
0x15 0x411111f0
0x16 0x411111f0
0x17 0x90170111
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x4066852d
0x1e 0x411111f0
0x1f 0x411111f0
0x21 0x04211020

1. Has duplicated internal speakers (0x14 & 0x17) which makes the output
route become confused. So, the output volume cannot be changed by
setting.
2. Misses the headset mic pin node.

This patch disables the confusing speaker (NID 0x14) and enables the
headset mic (NID 0x19).

Link: https://lore.kernel.org/r/20190902100054.6941-1-jian-hong@endlessm.com
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d33cd42d 31-Aug-2019 Sam Bazley <sambazley@fastmail.com>

ALSA: hda/realtek - Add quirk for HP Pavilion 15

HP Pavilion 15 (AMD Ryzen-based model) with 103c:84e7 needs the same
quirk like HP Envy/Spectre x360 for enabling the mute LED over Mic3 pin.

[ rearranged in the SSID number order by tiwai ]

Signed-off-by: Sam Bazley <sambazley@fastmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 89781d08 29-Aug-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix overridden device-specific initialization

The recent change to shuffle the codec initialization procedure for
Realtek via commit 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on
later") caused the silent output on some machines. This change was
supposed to be safe, but it isn't actually; some devices have quirk
setups to override the EAPD via COEF or BTL in the additional verb
table, which is applied at the beginning of snd_hda_gen_init(). And
this EAPD setup is again overridden in alc_auto_init_amp().

For recovering from the regression, tell snd_hda_gen_init() not to
apply the verbs there by a new flag, then apply the verbs in
alc_init().

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204727
Fixes: 607ca3bd220f ("ALSA: hda/realtek - EAPD turn on later")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 051c78af 22-Aug-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93

Lenovo ThinkCentre M73 and M93 don't seem to have a proper beep
although the driver tries to probe and set up blindly.
Blacklist these machines for suppressing the beep creation.

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


# 2722b535 22-Aug-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Check beep whitelist before assigning in all codecs

Some Realtek codec parsers didn't check the availability of PC beep.
Add has_cdefine_beep() check appropriately.

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


# 7c0a6939 16-Aug-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Define a fallback_pin_fixup_tbl for alc269 family

We have another Dell laptop which needs the DELL4_MIC_NO_PRESENCE,
and this laptop has different pincfg definitions from existing
ones in the pintbl, rather adding a new entry, let us define
a tbl in the fallback_pin_fixup_tbl and this tbl will match
all dell machines with alc289 codec and the pins of 0x19 and 0x1b
are undef by default.

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


# 0fc1e447 16-Aug-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Expand pin_match function to match upcoming new tbls

With the existing pintbl, we already have many entries in it. it is
better to figure out a new way to reduce the size of the pintbl.

We plan to define a new tbl which will match more machines with a
single tbl, To do that, this function doesn't need to match all valid
pins between machine and tbl, it just needs to match all pins defined
in the tbl with the machine.

And the plan is to move some tbls from pin_fixup_tbl to
fallback_pin_fixup_tbl gradually.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
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>


# 190d0381 13-Aug-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add quirk for HP Envy x360

HP Envy x360 (AMD Ryzen-based model) with 103c:8497 needs the same
quirk like HP Spectre x360 for enabling the mute LED over Mic3 pin.

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


# a2ef03fe 09-Aug-2019 Tomas Espeleta <tomas.espeleta@gmail.com>

ALSA: hda - Add a quirk model for fixing Huawei Matebook X right speaker

[ This is rather a revival of the patch Tomas sent in months ago, but
applying only with the quirk model option -- tiwai ]

Hard coded coefficients to make Huawuei Matebook X right speaker
work. The Matebook X has a ALC298, please refer to bug 197801 on
how these numbers were reverse engineered from the Windows driver

The reversed engineered sequence represents a repeating pattern
of verbs, and the only values that are changing periodically are
written on indexes 0x23 and 0x25:

0x500, 0x23
0x400, VALUE1
0x500, 0x25
0x400, VALUE2

* skipped reading sequences (0x500 - 0xc00 sequences are ignored)
* static values from reverse engineering are used

NOTE: since a significant risk is still considered, this is provided
as an experimental fix that isn't applied as default for now. For
enabling the fix, you'll have to choose huawei-mbx-stereo via model
option of snd-hda-intel module.

If we get feedback from users that this works stably, we may apply it
per default.

[ Some coding style fixes and replacement with AC_VERB_* by tiwai ]

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=197801
Signed-off-by: Tomas Espeleta <tomas.espeleta@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b4e0e32 16-Jul-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine

Without this patch, the headset-mic and headphone-mic don't work.

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


# fbc57129 14-Jul-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform

It assigned to wrong model. So, The headphone Mic can't work.

Fixes: 3f640970a414 ("ALSA: hda - Fix headset mic detection problem for several Dell laptops")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d07a9a4f 04-Jul-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Headphone Mic can't record after S3

Dell headset mode platform with ALC236.
It doesn't recording after system resume from S3.
S3 mode was deep. s2idle was not has this issue.
S3 deep will cut of codec power. So, the register will back to default
after resume back.
This patch will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bef33e19 28-Jun-2019 Dennis Wassenberg <dennis.wassenberg@secunet.com>

ALSA: hda/realtek - Change front mic location for Lenovo M710q

On M710q Lenovo ThinkCentre machine, there are two front mics,
we change the location for one of them to avoid conflicts.

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


# 503d90b3 19-Jun-2019 Richard Sailer <rs@tuxedocomputers.com>

ALSA: hda/realtek: Add quirks for several Clevo notebook barebones

This adds 4 SND_PCI_QUIRK(...) lines for several barebone models of the ODM
Clevo. The model names are written in regex syntax to describe/match all clevo
models that are similar enough and use the same PCI SSID that this fixup works
for them.

Additionally the lines regarding SSID 0x96e1 and 0x97e1 didn't fix audio for the
all our Clevo notebooks using these SSIDs (models Clevo P960* and P970*) since
ALC1220_FIXP_CLEVO_PB51ED_PINS swapped pins that are not necesarry to be
swapped. This patch initiates ALC1220_FIXUP_CLEVO_P950 instead for these model
and fixes the audio.

Fixes: 80690a276f44 ("ALSA: hda/realtek - Add quirk for Tuxedo XC 1509")
Signed-off-by: Richard Sailer <rs@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 17d30460 14-Jun-2019 Hui Wang <hui.wang@canonical.com>

Revert "ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops"

This reverts commit 9cb40eb184c4220d244a532bd940c6345ad9dbd9.

This patch introduces noise and headphone playback issue after
rebooting or suspending/resuming. Let us revert it.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=203831
Fixes: 9cb40eb184c4 ("ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 717f43d8 31-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update headset mode for ALC256

ALC255 and ALC256 were some difference for hidden register.
This update was suitable for ALC256.

Fixes: e69e7e03ed22 ("ALSA: hda/realtek - ALC256 speaker noise issue")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9cb40eb1 28-May-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops

We met another Acer Aspire laptop which has the problem on the
headset-mic, the Pin 0x19 is not set the corret configuration for a
mic and the pin presence can't be detected too after plugging a
headset. Kailang suggested that we should set the coeff to enable the
mic and apply the ALC269_FIXUP_LIFEBOOK_EXTMIC. After doing that,
both headset-mic presence and headset-mic work well.

The existing ALC255_FIXUP_ACER_MIC_NO_PRESENCE set the headset-mic
jack to be a phantom jack. Now since the jack can support presence
unsol event, let us imporve it to set the jack to be a normal jack.

https://bugs.launchpad.net/bugs/1821269
Fixes: 5824ce8de7b1c ("ALSA: hda/realtek - Add support for Acer Aspire E5-475 headset mic")
Cc: Chris Chiu <chiu@endlessm.com>
CC: Daniel Drake <drake@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
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>


# 0fbf21c3 23-May-2019 Ayman Bagabas <ayman.bagabas@gmail.com>

ALSA: hda/realtek - Enable micmute LED for Huawei laptops

Since this LED is found on all Huawei laptops, we can hook it to
huawei-wmi platform driver to control it.

Also, some renames have been made to use product name instead of common
name to avoid confusions.

Fixes: 8ac51bbc4cfe ("ALSA: hda: fix front speakers on Huawei MBXP")
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 317d9313 23-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Set default power save node to 0

I measured power consumption between power_save_node=1 and power_save_node=0.
It's almost the same.
Codec will enter to runtime suspend and suspend.
That pin also will enter to D3. Don't need to enter to D3 by single pin.
So, Disable power_save_node as default. It will avoid more issues.
Windows Driver also has not this option at runtime PM.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aeac1a0d 16-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Check headset type by unplug and resume

When system enable HDA power save mode.
This issue will happen on new platform which DMIC connect to PCH.
In Dell headset mode, it will recheck during runtime resume when
headset was plugged.
This patch will move check headset type on unplug and system resume.

[ A few minor code cleanups by tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56df90b6 14-May-2019 Michał Wadowski <wadosm@gmail.com>

ALSA: hda/realtek - Fix for Lenovo B50-70 inverted internal microphone bug

Add patch for realtek codec in Lenovo B50-70 that fixes inverted
internal microphone channel.
Device IdeaPad Y410P has the same PCI SSID as Lenovo B50-70,
but first one is about fix the noise and it didn't seem help in a
later kernel version.
So I replaced IdeaPad Y410P device description with B50-70 and apply
inverted microphone fix.

Bugzilla: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1524215
Signed-off-by: Michał Wadowski <wadosm@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 891afcf2 10-May-2019 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek - Corrected fixup for System76 Gazelle (gaze14)

A mistake was made in the identification of the four variants of the
System76 Gazelle (gaze14). This patch corrects the PCI ID of the
17-inch, GTX 1660 Ti variant from 0x8560 to 0x8551. This patch also
adds the correct fixups for the 15-inch and 17-inch GTX 1650 variants
with PCI IDs 0x8560 and 0x8561.

Tests were done on all four variants ensuring full audio capability.

Fixes: 80a5052db751 ("ALSA: hdea/realtek - Headset fixup for System76 Gazelle (gaze14)")
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c9af753f 10-May-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Avoid superfluous COEF EAPD setups

Realtek codec driver applied the COEF setups to change the EAPD
control to the default mode (i.e. control by EPAD verbs) at the init
callback. It works, but this is too excessive at the same time, since
it's called at each runtime PM resume. That is, the initialization
should be done only once after the probe. One may think that moving
this to the probe should be OK, but no -- there is a catch; when a
system resumes from S4 (hibernation), we need to re-initialize this
again manually, because it's out of regcache restoration.

This patch addresses the issue by introducing alc_pre_init() function
that performs such a task. This is called from each codec probe
function, and it's called from the resume callback conditionally only
from S4 resume.

Reported-and-tested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dad3197d 10-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixup headphone noise via runtime suspend

Dell platform with ALC298.
system enter to runtime suspend. Headphone had noise.
Let Headset Mic not shutup will solve this issue.

[ Fixed minor coding style issues by tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6447c962 08-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support low power consumption for ALC256

Remove hp_pin = 0 return. Add the default pin 0x21 as headphone.
Supported low power consumption, it must do depop procedure when
headset jack was plugged or unplugged.
So, alc256_init() and alc256_shutup() must run delay when headset jack
was plugged or unplugged.
If depop procedure not run with delay, it will have a chance to let
power consumption raise high.

[ NOTE: this is a quite quite similar change for ALC295 by commit
d3ba58bb8959 ("ALSA: hda/realtek - Support low power consumption for
ALC295"), but applied to ALC256 codec instead -- tiwai ]

Fixes: 8983eb602af5 ("ALSA: hda/realtek - Move to ACT_INIT state")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 80a5052d 07-May-2019 Jeremy Soller <jeremy@system76.com>

ALSA: hdea/realtek - Headset fixup for System76 Gazelle (gaze14)

On the System76 Gazelle (gaze14), there is a headset microphone input
attached to 0x1a that does not have a jack detect. In order to get it
working, the pin configuration needs to be set correctly, and the
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC fixup needs to be applied. This is
identical to the patch already applied for the System76 Darter Pro
(darp5).

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d3ba58bb 06-May-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support low power consumption for ALC295

Enter to close more power control widgets at suspend.
Remove hp_pin check. Add the default pin 0x21 as headphone.
Supported low power consumption, it must do depop procedure when
headset jack was plugged or unplugged.
So, alc225_init() and alc225_shutup() must run delay when headset
jack was plugged or unplugged.
If depop procedure not run with delay, it will have a chance to let
power consumption raise high.

[ A few compile fixes by tiwai ]

Fixes: 8983eb602af5 ("ALSA: hda/realtek - Move to ACT_INIT state")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3887c26c 30-Apr-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply the fixup for ASUS Q325UAR

Some ASUS models like Q325UAR with ALC295 codec requires the same
fixup that has been applied to ALC294 codec. Just copy the entry with
the pin matching to cover ALC295 too.

BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1784485
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 607ca3bd 26-Apr-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - EAPD turn on later

Let EAPD turn on after set pin output.

[ NOTE: This change is supposed to reduce the possible click noises at
(runtime) PM resume. The functionality should be same (i.e. the
verbs are executed correctly) no matter which order is, so this
should be safe to apply for all codecs -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0700d3d1 26-Apr-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed Dell AIO speaker noise

Fixed Dell AIO speaker noise.
spec->gen.auto_mute_via_amp = 1, this option was solved speaker white
noise at boot.
codec->power_save_node = 0, this option was solved speaker noise at
resume back.

Fixes: 9226665159f0 ("ALSA: hda/realtek - Fix Dell AIO LineOut issue")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0a29c57b 24-Apr-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new Dell platform for headset mode

Add two Dell platform for headset mode.

[ Note: this is a further correction / addition of the previous
pin-based quirks for Dell machines; another entry for ALC236 with
the d-mic pin 0x12 and an entry for ALC295 -- tiwai ]

Fixes: b26e36b7ef36 ("ALSA: hda/realtek - add two more pin configuration sets to quirk table")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b26e36b7 17-Apr-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - add two more pin configuration sets to quirk table

We have two Dell laptops which have the codec 10ec0236 and 10ec0256
respectively, the headset mic on them can't work, need to apply the
quirk of ALC255_FIXUP_DELL1_MIC_NO_PRESENCE. So adding their pin
configurations in the pin quirk table.

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


# 80690a27 02-Apr-2019 Richard Sailer <rs@tuxedocomputers.com>

ALSA: hda/realtek - Add quirk for Tuxedo XC 1509

This adds a SND_PCI_QUIRK(...) line for the Tuxedo XC 1509.

The Tuxedo XC 1509 and the System76 oryp5 are the same barebone
notebooks manufactured by Clevo. To name the fixups both use after the
actual underlying hardware, this patch also changes System76_orpy5
to clevo_pb51ed in 2 enum symbols and one function name,
matching the other pci_quirk entries which are also named after the
device ODM.

Fixes: 7f665b1c3283 ("ALSA: hda/realtek - Headset microphone and internal speaker support for System76 oryp5")
Signed-off-by: Richard Sailer <rs@tuxedocomputers.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8983eb60 03-Apr-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Move to ACT_INIT state

It will be lose Mic JD state when Chrome OS boot and headset was plugged.
Just Implement of reset combo jack JD verb for ACT_PRE_PROBE state.
Intel test result was also failed.
It test passed until changed the initial state to ACT_INIT.
Mic JD will show every time.
This patch also changed the model name as 'alc-chrome-book' for
application of Chrome OS.

Fixes: 10f5b1b85ed1 ("ALSA: hda/realtek - Fixed Headset Mic JD not stable")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ea5c7eba 31-Mar-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset MIC of Acer TravelMate B114-21 with ALC233

The Acer TravelMate B114-21 laptop cannot detect and record sound from
headset MIC. This patch adds the ALC233_FIXUP_ACER_HEADSET_MIC HDA verb
quirk chained with ALC233_FIXUP_ASUS_MIC_NO_PRESENCE pin quirk to fix
this issue.

[ fixed the missing brace and reordered the entry -- tiwai ]

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Reviewed-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2a829b3 04-Mar-2019 Bernhard Rosenkraenzer <bero@lindev.ch>

ALSA: hda/realtek - Fix speakers on Acer Predator Helios 500 Ryzen laptops

On an Acer Predator Helios 500 (Ryzen version), the laptop's speakers
don't work out of the box.

The problem can be worked around with hdajackretask, remapping the
"Black Headphone, Right side" pin (0x21) to the Internal speaker.

This patch adds a quirk to change this mapping by default.

[ corrected ALC299_FIXUP_PREDATOR_SPK definition and adapted for the
latest tree by tiwai ]

Signed-off-by: Bernhard Rosenkraenzer <bero@lindev.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ac371aa 21-Mar-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset MIC of ASUS X430UN and X512DK with ALC256

The ASUS X430UN and X512DK with ALC256 cannot detect the headset MIC
until ALC256_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a806ef1c 21-Mar-2019 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek: Enable headset mic of ASUS P5440FF with ALC256

The ASUS laptop P5440FF with ALC256 can't detect the headset microphone
until ALC256_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1037354 21-Mar-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable ASUS X441MB and X705FD headset MIC with ALC256

The ASUS laptop X441MB and X705FD with ALC256 cannot detect the headset
MIC until ALC256_FIXUP_ASUS_MIC_NO_PRESENCE quirk applied.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7531e31 21-Mar-2019 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Add support for Acer Aspire E5-523G/ES1-432 headset mic

The Acer laptop Aspire E5-523G and ES1-432 with ALC255 can't detect
the headset microphone until ALC255_FIXUP_ACER_MIC_NO_PRESENCE quirk
applied.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2733cceb 21-Mar-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset MIC of Acer Aspire Z24-890 with ALC286

The Acer Aspire Z24-890 cannot detect the headset MIC until
ALC286_FIXUP_ACER_AIO_HEADSET_MIC quirk applied.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 667a8f73 15-Mar-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset MIC of Acer AIO with ALC286

Some Acer AIO desktops like Veriton Z6860G, Z4860G and Z4660G cannot
record sound from headset MIC. This patch adds the
ALC286_FIXUP_ACER_AIO_HEADSET_MIC quirk to fix this issue.

Fixes: 9f8aefed9623 ("ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4660G")
Fixes: b72f936f6b32 ("ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4860G/Z6860G")
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Reviewed-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da484d00 14-Mar-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support headset mode for New DELL WYSE NB

Enable headset mode support for new WYSE NB platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 136824ef 14-Mar-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support headset mode for DELL WYSE AIO

This patch will enable WYSE AIO for Headset mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c8a9afa6 14-Mar-2019 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/realtek: merge alc_fixup_headset_jack to alc295_fixup_chromebook

The ALC225_FIXUP_HEADSET_JACK fixup can be merged to alc295_fixup_chromebook.
There are no other users for ALC225_FIXUP_HEADSET_JACK other than
the chromebook hardware.

Fixes: 10f5b1b85ed1 ("ALSA: hda/realtek - Fixed Headset Mic JD not stable")
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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


# 10f5b1b8 21-Feb-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed Headset Mic JD not stable

It will be lose Mic JD state when Chrome OS boot and headset was plugged.
Implement of reset combo jack JD. It will show normally.

Fixes: e854747d7593 ("ALSA: hda/realtek - Enable headset button support for new codec")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cbc05fd6 13-Mar-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable headset MIC of Acer TravelMate X514-51T with ALC255

The Acer TravelMate X514-51T with ALC255 cannot detect the headset MIC
until ALC255_FIXUP_ACER_HEADSET_MIC quirk applied. Although, the
internal DMIC uses another module - snd_soc_skl as the driver. We still
need the NID 0x1a in the quirk to enable the headset MIC.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8bb37a2a 21-Feb-2019 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable audio jacks of ASUS UX362FA with ALC294

The ASUS UX362FA with ALC294 cannot detect the headset MIC and outputs
through the internal speaker and the headphone. This issue can be fixed
by the quirk in the commit 4e0511067 ALSA: hda/realtek: Enable audio
jacks of ASUS UX533FD with ALC294.

Besides, ASUS UX362FA and UX533FD have the same audio initial pin config
values. So, this patch replaces SND_PCI_QUIRK of UX533FD with a new
SND_HDA_PIN_QUIRK which benefits both UX362FA and UX533FD.

Fixes: 4e051106730d ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294")
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Ming Shuo Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0ca5ece 20-Feb-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Reduce click noise on Dell Precision 5820 headphone

Dell Precision 5820 with ALC3234 codec (which is equivalent with
ALC255) shows click noises at (runtime) PM resume on the headphone.
The biggest source of the noise comes from the cleared headphone pin
control at resume, which is done via the standard shutup procedure.

Although we have an override of the standard shutup callback to
replace with NOP, this would skip other needed stuff (e.g. the pull
down of headset power). So, instead, this "fixes" the behavior of
alc_fixup_no_shutup() by introducing spec->no_shutup_pins flag.
When this flag is set, Realtek codec won't call the standard
snd_hda_shutup_pins() & co. Now alc_fixup_no_shutup() just sets this
flag instead of overriding spec->shutup callback itself. This allows
us to apply the similar fix for other entries easily if needed in
future.

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


# c8c6ee61 13-Feb-2019 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek: Disable PC beep in passthrough on alc285

It is reported that there's a constant background "hum/whitenoise"
in the headset on the Lenovo X1 machines with the codec alc285, and it
is confirmed that if we run the command below, the noise will stop.
sudo hda-verb /dev/snd/hwC0D0 0x1d SET_PIN_WIDGET_CONTROL 0x0

Then I consulted this issue with Kailang, he told me the pin 0x1d on
this codec is used for PC beep in, the noise probably comes from this
pin and we can also disable the PC beep in passthrough, then the PC
beep in will not affect other sound playback.

Fixes: c4cfcf6f4297 ("ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1660581
Cc: <stable@vger.kernel.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7f665b1c 13-Feb-2019 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek - Headset microphone and internal speaker support for System76 oryp5

On the System76 Oryx Pro (oryp5), there is a headset microphone input
attached to 0x19 that does not have a jack detect. In order to get it
working, the pin configuration needs to be set correctly, and the
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC fixup needs to be applied. This is
similar to the MIC_NO_PRESENCE fixups for some Dell laptops, except we
have a separate microphone jack that is already configured correctly.

Since the ALC1220 does not have a fixup similar to
ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, I have exposed the fixup from the
ALC269 in a way that it can be accessed from the
alc1220_fixup_system76_oryp5 function. In addition, the
alc1220_fixup_clevo_p950 needs to be applied to gain speaker output.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35a39f98 01-Feb-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use a common helper for hp pin reference

Replace the open-codes in many places with a new common helper for
performing the same thing: referring to the primary headphone pin.

This eventually fixes the potentially missing headphone pin on some
weird devices, too.

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


# d561aa0a 01-Feb-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix lose hp_pins for disable auto mute

When auto_mute = no or spec->suppress_auto_mute = 1, cfg->hp_pins will
lose value.

Add this patch to find hp_pins value.
I add fixed for ALC282 ALC225 ALC256 ALC294 and alc_default_init()
alc_default_shutup().

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 89e3a568 30-Jan-2019 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek - Headset microphone support for System76 darp5

On the System76 Darter Pro (darp5), there is a headset microphone
input attached to 0x1a that does not have a jack detect. In order to
get it working, the pin configuration needs to be set correctly, and
the ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC fixup needs to be applied.
This is similar to the MIC_NO_PRESENCE fixups for some Dell laptops,
except we have a separate microphone jack that is already configured
correctly.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f6ef4e0e 29-Jan-2019 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply ALC294 hp init also for S4 resume

The init sequence for ALC294 headphone stuff is needed not only for
the boot up time but also for the resume from hibernation, where the
device is switched from the boot kernel without sound driver to the
suspended image. Since we record the PM event in the device
power_state field, we can now recognize the call pattern and apply the
sequence conditionally.

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


# 693abe11 29-Jan-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed hp_pin no value

Fix hp_pin always no value.

[More notes on the changes:

The hp_pin value that is referred in alc294_hp_init() is always zero
at the moment the function gets called, hence this is actually
useless as in the current code.

And, this kind of init sequence should be called from the codec init
callback, instead of the parser function. So, the first fix in this
patch to move the call call into its own init_hook.

OTOH, this function is needed to be called only once after the boot,
and it'd take too long for invoking at each resume (where the init
callback gets called). So we add a new flag and invoke this only
once as an additional fix.

The one case is still not covered, though: S4 resume. But this
change itself won't lead to any regression in that regard, so we
leave S4 issue as is for now and fix it later. -- tiwai ]

Fixes: bde1a7459623 ("ALSA: hda/realtek - Fixed headphone issue for ALC700")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82aa0d7e 11-Jan-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix typo for ALC225 model

Fix typo for model alc255-dell1 to alc225-dell1.

Enable headset mode support for new WYSE NB platform.

Fixes: a26d96c7802e ("ALSA: hda/realtek - Comprehensive model list for ALC259 & co")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1dd4211 09-Jan-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225

Disable Headset Mic VREF for headset mode of ALC225.
This will be controlled by coef bits of headset mode functions.

[ Fixed a compile warning and code simplification -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d4b0c52 09-Jan-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add unplug function into unplug state of Headset Mode for ALC225

Forgot to add unplug function to unplug state of headset mode
for ALC225.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c2a7c55a 03-Jan-2019 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support Dell headset mode for New AIO platform

Dell has new platform for ALC274.
This will support to enable headset mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82b01149 27-Dec-2018 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable the headset mic auto detection for ASUS laptops

The headset mic of ASUS laptops like UX533FD, UX433FN and UX333FA, whose
CODEC is Realtek ALC294 has jack auto detection feature. This patch
enables the feature.

Fixes: 4e051106730d ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294")
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9cf6533e 19-Dec-2018 Wandrille RONCE <w@ndrille.fr>

ALSA: hda/realtek: Enable audio jacks of ASUS UX391UA with ALC294

By default, there is no sound on Asus UX391UA on Linux.

This patch adds sound support on Asus UX391UA. Tested working by three
different users.

The problem has also been described at
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1784485

Signed-off-by: Wandrille RONCE <w@ndrille.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2744fd7 12-Dec-2018 Ayman Bagabas <ayman.bagabas@gmail.com>

ALSA: hda: add support for Huawei WMI micmute LED

Some of Huawei laptops come with a LED in the micmute key. This patch
enables the use of micmute LED for these devices:
1. Matebook X (19e5:3200), (19e5:3201)
2. Matebook X Pro (19e5:3204)

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8ac51bbc 12-Dec-2018 Ayman Bagabas <ayman.bagabas@gmail.com>

ALSA: hda: fix front speakers on Huawei MBXP

This patch solves bug 200501 'Only 2 of 4 speakers playing sound.'
It enables the front speakers on Huawei Matebook X Pro laptops.
These laptops come with Dolby Atmos sound system and these pins
configuration enables the front speakers.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200501
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0bea4cc8 07-Dec-2018 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable audio jacks of ASUS UX433FN/UX333FA with ALC294

The ASUS UX433FN and UX333FA with ALC294 cannot detect the headset MIC
and output through the internal speaker and the headphone until
ALC294_FIXUP_ASUS_SPK and ALC294_FIXUP_ASUS_HEADSET_MIC quirk applied.

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4e051106 07-Dec-2018 Jian-Hong Pan <jian-hong@endlessm.com>

ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294

The ASUS UX533FD with ALC294 cannot detect the headset MIC and outputs
through the internal speaker and the headphone until
ALC294_FIXUP_ASUS_SPK and ALC294_FIXUP_ASUS_HEADSET_MIC quirk applied.

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d8ae458e 07-Dec-2018 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek: ALC294 mic and headset-mode fixups for ASUS X542UN

The known ALC256_FIXUP_ASUS_MIC fixup can fix the headphone jack
sensing and enable use of the internal microphone on this laptop
X542UN. However, it's ALC294 so create a new fixup named
ALC294_FIXUP_ASUS_MIC to avoid confusion.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6ba189c5 08-Dec-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Fix the mute LED regresion on Lenovo X1 Carbon

Users reported a mute LED regression on Lenovo X1 Carbon, the root
cause is we applied the fixup of ALC285_FIXUP_LENOVO_HEADPHONE_NOISE
to this machine, then the machine can't apply the fixup of
ALC269_FIXUP_THINKPAD_ACPI anymore. To fix it, we chain two fixup
together.

Fixes: c4cfcf6f4297 ("ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e854747d 28-Nov-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Enable headset button support for new codec

This patch will enable headset button for new Chrome platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bde1a745 07-Dec-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed headphone issue for ALC700

If it plugged headphone or headset into the jack, then
do the reboot, it will have a chance to cause headphone no sound.
It just need to run the headphone mode procedure after boot time.
The issue will be fixed.
It also suitable for ALC234 ALC274 and ALC294.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b72f936f 04-Dec-2018 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4860G/Z6860G

Acer AIO Veriton Z4860G/Z6860G with the same ALC286 codec has issues
with the input from external microphone. The issue can be fixed by
the fixup ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE for Veriton Z4660G.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9f8aefed 04-Dec-2018 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4660G

Acer AIO Veriton Z4660G with ALC286 codec has issue with the input
from external microphones connecting via 'Front Mic' jack. The fixup
ALC286_FIXUP_ACER_AIO_MIC_NO_PRESENCE enables the jack sensing of
the headset and fix the audio input issue of external microphone.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 705b65f1 04-Dec-2018 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Add support for Acer Aspire C24-860 headset mic

The Acer AIO Aspire C24-860 with ALC286 can't detect the headset
microphone. Just like another Acer AIO U27-880, it needs a different
pin value for 0x18 and the headset fixup to make headset mic work.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 33aaebd4 04-Dec-2018 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek: ALC286 mic and headset-mode fixups for Acer Aspire U27-880

Acer Aspire U27-880(AIO) with ALC286 codec can not detect headset mic
and internal mic not working either. It needs the similar quirk like
Sony laptops to fix headphone jack sensing and enables use of the
internal microphone.

Unfortunately jack sensing for the headset mic is still not working.

Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Chris Chiu <chiu@endlessm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54947cd6 03-Dec-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570

We've got a regression report for some Thinkpad models (at least
T570s) which shows the too low speaker output volume. The bisection
leaded to the commit 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad
Dock device for ALC298 platform"), and it's basically adding the two
pin configurations for the dock, and looks harmless.

The real culprit seems, though, that the DAC assignment for the
speaker pin is implicitly assumed on these devices, i.e. pin NID 0x14
to be coupled with DAC NID 0x03. When more pins are configured by the
commit above, the auto-parser changes the DAC assignment, and this
resulted in the regression.

As a workaround, just provide the fixed pin / DAC mapping table for
this Thinkpad fixup function. It's no generic solution, but the
problem itself is pretty much device-specific, so must be good
enough.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554304
Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform")
Cc: <stable@vger.kernel.org>
Reported-and-tested-by: Jeremy Cline <jcline@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b3802783 26-Nov-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support led audio trigger

Now all relevant platform drivers are providing the LED audio trigger,
we can switch the mute LED control with the LED trigger, finally.

For the mic-mute LED trigger, a common fixup function,
snd_hda_gen_fixup_micmute_led(), is provided to be called for the
corresponding quirk entries. This sets up the capture sync hook with
ledtrig_audio_set() call appropriately.

For the mute LED trigger, which is done currently only for
thinkpad_acpi, the call is replaced with ledtrig_audio_set() as well.

Overall, the beauty of the new implementation is that the whole ugly
bindings with request_symbol() are dropped, and also that it provides
more flexibility to users.

One potential behavior change by this patch is that the mute LED enum
may be created on machines that actually have no LED device. In the
former code, we did test-call and abort binding if the test failed.
But with the LED-trigger binding, this test isn't possible, and the
actual check is done in the LED class device side. So it's the
downside of simpleness.

Also, note that the HD-audio codec driver doesn't select CONFIG_LEDS
and co by itself. It's supposed to be selected by the platform
drivers instead.

Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1078bef0 08-Nov-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support ALC300

This patch will enable ALC300.

[ It's almost equivalent with other ALC269-compatible ones, and
apparently has no loopback mixer -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e8ed64b0 26-Nov-2018 Girija Kumar Kasinadhuni <gkumar@neverware.com>

ALSA: hda/realtek - Add auto-mute quirk for HP Spectre x360 laptop

This device makes a loud buzzing sound when a headphone is inserted while
playing audio at full volume through the speaker.

Fixes: bbf8ff6b1d2a ("ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakers")
Signed-off-by: Girija Kumar Kasinadhuni <gkumar@neverware.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c4cfcf6f 25-Nov-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - fix the pop noise on headphone for lenovo laptops

We have several Lenovo laptops with the codec alc285, when playing
sound via headphone, we can hear click/pop noise in the headphone,
if we let the headphone share the DAC of NID 0x2 with the speaker,
the noise disappears.

The Lenovo laptops here include P52, P72, X1 yoda2 and X1 carbon.

I have tried to set preferred_dacs and override_conn, but neither of
them worked. Thanks for Kailang, he told me to invalidate the NID 0x3
through override_wcaps.

BugLink: https://bugs.launchpad.net/bugs/1805079
Cc: <stable@vger.kernel.org>
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8cd65271 23-Nov-2018 Anisse Astier <anisse@astier.eu>

ALSA: hda/realtek - fix headset mic detection for MSI MS-B171

MSI Cubi N 8GL (MS-B171) needs the same fixup as its older model, the
MS-B120, in order for the headset mic to be properly detected.

They both use a single 3-way jack for both mic and headset with an
ALC283 codec, with the same pins used.

Cc: stable@vger.kernel.org
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 563785ed 12-Nov-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add quirk entry for HP Pavilion 15

HP Pavilion 15 (103c:820d) with ALC295 codec requires the quirk for
the mute LED control over mic3 pin. Added the corresponding quirk
entry.

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


# d06fb562 09-Oct-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Fix the problem of the front MIC on the Lenovo M715

The front MIC on the Lenovo M715 can't record sound, after applying
the ALC294_FIXUP_LENOVO_MIC_LOCATION, the problem is fixed. So add
the pin configuration of this machine to the pin quirk table.

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


# 5b7c5e1f 09-Oct-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix headphone pin config for ASUS G751

BIOS on ASUS G751 doesn't seem to map the headphone pin (NID 0x16)
correctly. Add a quirk to address it, as well as chaining to the
previous fix for the microphone.

Reported-by: Håvard <hovardslill@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 40c51675 07-Oct-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add ASUS G751 quirk model entry

Add a corresponding model list entry for ASUS G751 so that user can
test the quirk for another compatible machines more easily.

Reported-and-tested-by: Håvard <hovardslill@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 11ba6111 07-Oct-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for ASUS G751 laptop

ASUS G751 requires the extra COEF initialization to make it microphone
working properly.

Reported-and-tested-by: Håvard <hovardslill@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 709ae62e 03-Oct-2018 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek - Cannot adjust speaker's volume on Dell XPS 27 7760

The issue is the same as commit dd9aa335c880 ("ALSA: hda/realtek - Can't
adjust speaker's volume on a Dell AIO"), the output requires to connect
to a node with Amp-out capability.

Applying the same fixup ALC298_FIXUP_SPK_VOLUME can fix the issue.

BugLink: https://bugs.launchpad.net/bugs/1775068
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
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>


# 8a328ac1 21-Aug-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix HP Headset Mic can't record

This patch will fix HP workstation Headset Mic not recording.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56e40eb6 04-Aug-2018 Alexandru Gagniuc <mr.nuke.me@gmail.com>

ALSA: hda/realtek - Add mute LED quirk for HP Spectre x360

This device has the same issues as the HP x360 wrt the MUTE LED and
the front speakers not working. This patch fixes the MUTE LED issue,
but doesn't touch the HDA verbs. The fix for the x360 does not work
on the Spectre.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f3d737b6 17-Jul-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Yet another Clevo P950 quirk entry

The PCI SSID 1558:95e1 needs the same quirk for other Clevo P950
models, too. Otherwise no sound comes out of speakers.

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


# 0fca97a2 01-Jul-2018 YOKOTA Hiroshi <yokota.hgml@gmail.com>

ALSA: hda/realtek - Add Panasonic CF-SZ6 headset jack quirk

This adds some required quirk when uses headset or headphone on
Panasonic CF-SZ6.

Signed-off-by: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c6b17f10 06-Jul-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - two more lenovo models need fixup of MIC_LOCATION

We have two new lenovo desktop models which need to apply the fixup of
ALC294_FIXUP_LENOVO_MIC_LOCATION, and they have the same pin cfg as
the machine with subsystem id:0x17aa3136, now use the pincfg table
to apply the fixup for them.

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


# 772c2917 26-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Comprehensive model list for ALC882 & co

More comprehensive list of model strings for ALC882 & co.

Also corrected the subsection in models.rst, too.

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


# e43c44d6 26-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Comprehensive model list for ALC262

Added a few missing entries for ALC262 model strings.
All about specific hardwares.

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


# 03bf11c9 26-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Comprehensive model list for ALC268

Add the missing entry for ALC268 model strings.
Only "spdif" was missing, and that's it.

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


# a26d96c7 26-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Comprehensive model list for ALC259 & co

Like the previous commit for ALC662, let's give more comprehensive
list of model entries for ALC269 & co as well.

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


# aa3841b5 25-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Comprehensive model list for ALC662 & co

ALC662 and others have far more fixup entries than the model table.
Let's add more model string entries so that user can test / debug
without compiling kernels at each time.

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


# efe55732 15-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply PRE_PROBE fixup after ALC269 codec variant setups

Currently patch_alc269() calls the fixup with HDA_FIXUP_ACT_PRE_PROBE
before setting up the codec model-specific setups (e.g. setting
codec_variant or mixer_nid setup). This is rather confusing as others
do call the *_PRE_PROBE fixup after such a setup. Due to this
disorder, we have to override spec->shutup not at the usual
HDA_FIXUP_ACT_PRE_PROBE but the unusual HDA_FIXUP_ACT_PROBE time.

This patch corrects the fixup call orders in patch_alc269(), and also
corrects the action to set up spec->shutup accordingly.

No functional changes but just refactoring.

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


# fea80fae 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use common helper for creating beep controls

In the Realtek codec driver, we used to build kctl elements for beep
mixer in the own build_controls callback. This is an open-code and
can be covered by the standard feature of the generic parser with
snd_hda_gen_add_kctl() instead.

Also, after the conversion, spec->beep_amp becomes superfluous; hence
it's removed along with the conversion.

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


# a5cb463a 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use common helper for creating ALC268 beep controls

The beep mixer controls are the only remaining stuff that uses
spec->mixers[] array, and they can be well converted to the standard
helper in the generic parser, snd_hda_gen_add_kctl().

This simplifies the code, especially the superfluous mixers and
num_mixers fields can be now removed from alc_spec.

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


# df73d83f 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use common GPIO mask for ALC660VD ASUS fixup

The ALC660VD_FIX_ASUS_GPIO1 quirk requires to set up GPIO bit0 ON
while bit 1 OFF. Implement the fixup function and convert from the
static init verbs.

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


# d44a6864 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Simplify Dell XPS13 GPIO handling

Dell XPS13 has multi-step fixups, and one of them
(ALC288_FIXUP_DELL_XPS_13_GPIO6) corresponds to the management of GPIO
bit6 (0x40). It used to be a static init verbs (to turn *off* the
bit6).

In this patch, we convert it as the gpio_mask and gpio_dir
initializations folded in the existing fixup function. With this
change, ALC288_FIXUP_DELL_XPS_13_GPIO6 becomes superfluous, thus it's
removed.

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


# ae065f1c 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Convert some manual GPIO setups

This patch converts the remaining static init verbs for GPIO bits with
the common gpio_* fields management. Only the verbs setting the GPIO
data bits are targeted in this patch. The rest will be changed in
later patches.

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


# 01e4a275 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Simplify mute LED GPIO handling

Now we can simplify the mute LED GPIO handling as well. Each fixup
dealing with GPIO for the mute LED controls defined the static init
verbs, and they are converted to the common GPIO bit fields with the
new helper, alc_fixup_hp_gpio_led().

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


# 215c850c 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Simplify alc885_fixup_macpro_gpio()

The fixup for Macbook Pro is nothing but setting the GPIO bits as
usual but with one exception: it adds some delay at writing the GPIO
bits.

Add a flag to put the conditional delay in the common helper, and
clean up alc885_fixup_macpro_gpio() with the new flag.

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


# d261eec8 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Consolidate gpio_data and gpio_led

Until now, two fields, gpio_data and gpio_led, coexist in alc_spec
although basically both of them serve for the same purpose -- the GPIO
data bits.

This patch consolidates both usages and eliminates the superfluous
gpio_led field.

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


# aaf312de 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add GPIO data update helper

For updating GPIO bits dynamically, provide a new helper, and use it
from the alc260 automute hook. This helper will be used by other
places in future, too.

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


# 5579cd6f 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Manage GPIO bits commonly

Currently the GPIO bits are managed by individual verbs in some cases
while toggled dynamically in other cases. For simplifying the GPIO
management, define the GPIO mask, dir and data bits in alc_spec
fields, and refer to / set them consistently from all places.

As a first step, along with the definition of the new gpio_* fields,
this patch replaces the static verbs that are used at initialization
and fixups with the common helper functions.

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


# 1c76aa5f 21-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Allow skipping spec->init_amp detection

Some devices have the overrides of spec->init_amp at
HDA_FIXUP_ACT_PROBE just because alc_ssid_check() gives the
false-positive values from the SSID.

For more consistent behavior, define the logic in the following way:

- Define ALC_INIT_UNDEFINED as the default value before calling
alc_ssid_check()
- Each fixup may set up spec->init_amp with another value at
HDA_FIXUP_ACT_PRE_PROBE
- At detection, check whether spec->init_amp is ALC_INIT_UNDEFINED or
not; if it's different, we skip the detection

Also, it turned out that ASUS TX300 requires the spec->init_amp
override, too; currently it ignores the GPIO bits implicitly by its
static init verb, but this will be changed in the later patchset.

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


# e41fc8c5 25-Jun-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Fix the problem of two front mics on more machines

We have 3 more Lenovo machines, they all have 2 front mics on them,
so they need the fixup to change the location for one of two mics.

Among these 3 Lenovo machines, one of them has the same pin cfg as the
machine with subid 0x17aa3138, so use the pin cfg table to apply fixup
for them. The rest machines don't share the same pin cfg, so far use
the subid to apply fixup for them.

Fixes: a3dafb2200bf ("ALSA: hda/realtek - adjust the location of one mic")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 275ec0cb 21-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add a quirk for FSC ESPRIMO U9210

Fujitsu Seimens ESPRIMO Mobile U9210 requires the same fixup as H270
for the correct pin configs.

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


# 1bce62a6 19-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Simplify alc269_fixup_hp_line1_mic1_led()

alc269_fixup_hp_line1_mic1_led() can be simplified more with the
existing helper code.

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>


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

ALSA: hda/realtek - Use the mic-mute LED helper for HP and others

Similar as the previous commit, convert to use the common helper for
controlling the mic mute LED for HP and other machines in the Realtek
codec driver, too. This will give the mic mute LED enum as gratis.

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


# d5a6cabf 12-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix pop noise on Lenovo P50 & co

Some Lenovo laptops, e.g. Lenovo P50, showed the pop noise at resume
or runtime resume. It turned out to be reduced by applying
alc_no_shutup() just like TPT440 quirk does.

Since there are many Lenovo models showing the same behavior, put this
workaround in ALC269_FIXUP_THINKPAD_ACPI entry so that it's applied
commonly to all such Lenovo machines.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Benjamin Berg <bberg@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7273bd6 12-Jun-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add shutup hint

The pin shutup callback seems working well on some devices while it
does harm on some other devices; e.g. Lenovo laptops show often the
noises at (runtime) PM with the pin shutup enabled.

Currently, the only way to disable the pin shutup is to hard-code
spec->shutup = alc_no_shutup;
in the fixup, and this makes the debugging harder for normal users.
For allowing users to test the similar effect without recompiling the
kernel, this patch adds a new hint string "shutup". It's a boolean
value, and by passing false to this, user can turn off the pin shutup
call.

For example, to turn off the shutup on Lenovo P50, create a "firmware
patch" file (e.g. /lib/firmware/alsa/lenovo-p50) containing the
following lines:

[codec]
0x10ec0298 0x17aa222e 0

[hint]
shutup = no

and pass the file via patch option of snd-hda-intel module
(e.g. patch=alsa/lenovo-p50).

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


# 986376b6 29-May-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Enable mic-mute hotkey for several Lenovo AIOs

We have several Lenovo AIOs like M810z, M820z and M920z, they have
the same design for mic-mute hotkey and led and they use the same
codec with the same pin configuration, so use the pin conf table to
apply fix to all of them.

Fixes: 29693efcea0f ("ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bbf8ff6b 29-May-2018 Tom Briden <tom@decompile.me.uk>

ALSA: hda/realtek - Fixup for HP x360 laptops with B&O speakers

Added a new helper file for these fixups due to requiring a huge number
of coefs being set to get the top speakers to work, as well as
setting pin 0x17 for the top speakers and the correct input source
of 0x17 for volume control

[ Note: this is a revised work based on Tom's fixup patch with the
replacement of the full COEF tables provided by Realtek.
Also, the fixup function has a proper HDA_FIXUP_ACT_* handling now.
The credit for the new COEF table goes to Kailang -- tiwai ]

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Tom Briden <tom@decompile.me.uk>
Tested-by: Tom Briden <tom@decompile.me.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 85c467dc 29-May-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Refactor alc269_fixup_hp_mute_led_mic*()

Just a code refactoring to use the common helper for the all three
functions.

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


# 7f783bd5 25-Mar-2017 Tom Briden <tom@decompile.me.uk>

ALSA: hda/realtek - Fixup mute led on HP Spectre x360

This patch adds the mute LED control for HP Spectre x360 Kabylake
model. The mute LED is controlled via VREF bits on NID 0x1b, so we
need a new fixup function.

Note that this doesn't fix the other issues like the missing speaker
output on the machine. They will be addressed by later patches.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189331
Signed-off-by: Tom Briden <tom@decompile.me.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2f0d520a 07-May-2018 Jeremy Soller <jeremy@system76.com>

ALSA: hda/realtek - Clevo P950ER ALC1220 Fixup

This adds support for the P950ER, which has the same required fixup as
the P950HR, but has a different PCI ID.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6a30abaa 27-Apr-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix incorrect usage of IS_REACHABLE()

The commit c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for
dependency on input") simplified the dependencies with IS_REACHABLE()
macro, but it broke due to its incorrect usage: it should have been
IS_REACHABLE(CONFIG_INPUT) instead of IS_REACHABLE(INPUT).

Fixes: c469652bb5e8 ("ALSA: hda - Use IS_REACHABLE() for dependency on input")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 65811834 25-Apr-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - change the location for one of two front mics

On this Lenovo ThinkCentre machine. There are two front mics,
we change the location for one of them.

Relation: f33f79f3d0e5 ("ALSA: hda/realtek - change the location for
one of two front microphones")

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ab3b8e51 25-Apr-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update ALC255 depop optimize

Add ALC255 its own depop functions for alc_init and alc_shutup.
Assign it to ALC256 usage.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ea04a1db 25-Apr-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add some fixes for ALC233

Fill COEF to change EAPD to verb control.
Assigned codec type.

This is an additional fix over 92f974df3460 ("ALSA: hda/realtek - New
vendor ID for ALC233").

[ More notes:
according to Kailang, the chip is 10ec:0235 bonding for ALC233b,
which is equivalent with ALC255. It's only used for Lenovo.
The chip needs no alc_process_coef_fw() for headset unlike ALC255. ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
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>


# a3dafb22 18-Apr-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - adjust the location of one mic

There are two front mics on this machine, if we don't adjust the
location for one of them, they will have the same mixer name,
pulseaudio can't handle this situation.

After applying this FIXUP, they will have different mixer name,
then pulseaudio can handle them correctly.

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


# 3ce0d5aa 18-Apr-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - set PINCFG_HEADSET_MIC to parse_flags

Otherwise, the pin will be regarded as microphone, and the jack name
is "Mic Phantom", it is always on in the pulseaudio even nothing is
plugged into the jack. So the UI is confusing to users since the
microphone always shows up in the UI even there is no microphone
plugged.

After adding this flag, the jack name is "Headset Mic Phantom", then
the pulseaudio can handle its detection correctly.

Fixes: f0ba9d699e5c ("ALSA: hda/realtek - Fix Dell headset Mic can't record")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88d42b2b 14-Mar-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix speaker no sound after system resume

It will have a chance speaker no sound after system resume.
To toggle NID 0x53 index 0x2 bit 15 will solve this issue.
This usage will also suitable with ALC256.

Fixes: 4a219ef8f370 ("ALSA: hda/realtek - Add ALC256 HP depop function")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f0ba9d69 15-Mar-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix Dell headset Mic can't record

This platform was hardware fixed type for CTIA type for headset port.
Assigned 0x19 verb will fix can't record issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e40bdb03 17-Mar-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Always immediately update mute LED with pin VREF

Some HP laptops have a mute mute LED controlled by a pin VREF. The
Realtek codec driver updates the VREF via vmaster hook by calling
snd_hda_set_pin_ctl_cache().

This works fine as long as the driver is running in a normal mode.
However, when the VREF change happens during the codec being in
runtime PM suspend, the regmap access will skip and postpone the
actual register change. This ends up with the unchanged LED status
until the next runtime PM resume even if you change the Master mute
switch. (Interestingly, the machine keeps the LED status even after
the codec goes into D3 -- but it's another story.)

For improving this usability, let the driver temporarily powering up /
down only during the pin VREF change. This can be achieved easily by
wrapping the call with snd_hda_power_up_pm() / *_down_pm().

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


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

ALSA: hda/realtek - Make dock sound work on ThinkPad L570

One version of Lenovo Thinkpad T570 did not use ALC298
(like other Kaby Lake devices). Instead it uses ALC292.
In order to make the Lenovo dock working with that codec
the dock quirk for ALC292 will be used.

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


# e312a869 05-Mar-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix dock line-out volume on Dell Precision 7520

The dock line-out pin (NID 0x17 of ALC3254 codec) on Dell Precision
7520 may route to three different DACs, 0x02, 0x03 and 0x06. The
first two DACS have the volume amp controls while the last one
doesn't. And unfortunately, the auto-parser assigns this pin to DAC3,
resulting in the non-working volume control for the line out.

Fix it by disabling the routing to DAC3 on the corresponding pin.

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


# 85981dfd 14-Feb-2018 Benjamin Berg <bberg@redhat.com>

ALSA: hda/realtek: Limit mic boost on T480

The internal mic boost on the T480 is too high. Fix this by applying the
ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain.

Signed-off-by: Benjamin Berg <bberg@redhat.com>
Tested-by: Benjamin Berg <bberg@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae104a21 05-Feb-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset mode support for Dell laptop

This platform was only one phone Jack.
Add dummy lineout verb to fix automute mode disable.
This just the workaround.

[ More background information:
since the platform has only a headphone jack without speaker, the
driver doesn't create the auto-mute control. Meanwhile we do update
the headset mode via the automute hook in the driver, thus with this
setup, the headset won't be updated any longer.

By adding a dummy line-out pin here, the auto-mute is added by the
driver, and the headset update is triggered properly.

Note that this is different from the other
ALC274_FIXUP_DELL_AIO_LINEOUT_VERB, which has the real line-out pin,
while this quirk adds a dummy line-out pin. -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5f364135 25-Jul-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support headset mode for DELL WYSE

Enable headset mode support for WYSE platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d5078193 01-Mar-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines

With the alc289, the Pin 0x1b is Headphone-Mic, so we should assign
ALC269_FIXUP_DELL4_MIC_NO_PRESENCE rather than
ALC225_FIXUP_DELL1_MIC_NO_PRESENCE to it. And this change is suggested
by Kailang of Realtek and is verified on the machine.

Fixes: 3f2f7c553d07 ("ALSA: hda - Fix headset mic detection problem for two Dell machines")
Cc: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 71db96dd 26-Feb-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix pincfg at resume on Lenovo T470 dock

We've added a quirk to enable the recent Lenovo dock support, where it
overwrites the pin configs of NID 0x17 and 19, not only updating the
pin config cache. It works right after the boot, but the problem is
that the pin configs are occasionally cleared when the machine goes to
PM. Meanwhile the quirk writes the pin configs only at the pre-probe,
so this won't be applied any longer.

For addressing that issue, this patch moves the code to overwrite the
pin configs into HDA_FIXUP_ACT_INIT section so that it's always
applied at both probe and resume time.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195161
Fixes: 61fcf8ece9b6 ("ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fdcc968a 14-Feb-2018 Jan-Marek Glogowski <glogow@fbihome.de>

ALSA: hda/realtek: PCI quirk for Fujitsu U7x7

These laptops have a combined jack to attach headsets, the U727 on
the left, the U757 on the right, but a headsets microphone doesn't
work. Using hdajacksensetest I found that pin 0x19 changed the
present state when plugging the headset, in addition to 0x21, but
didn't have the correct configuration (shown as "Not connected").

So this sets the configuration to the same values as the headphone
pin 0x21 except for the device type microphone, which makes it
work correctly. With the patch the configured pins for U727 are

Pin 0x12 (Internal Mic, Mobile-In): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x19 (Black Mic, Left side): present = No
Pin 0x1d (Internal Aux): present = No
Pin 0x21 (Black Headphone, Left side): present = No

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 61fcf8ec 02-Feb-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Enable Thinkpad Dock device for ALC298 platform

Thinkpad Dock device support for ALC298 platform.
It need to use SSID for the quirk table.
Because IdeaPad also has ALC298 platform.
Use verb for the quirk table will confuse.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 40e2c4e5 02-Feb-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset mode support for Dell laptop

This platform had two Dmic and single Dmic.
This update was for single Dmic.

This commit was for two Dmic.

Fixes: 75ee94b20b46 ("ALSA: hda - fix headset mic problem for Dell machines...")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3f2f7c55 28-Jan-2018 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix headset mic detection problem for two Dell machines

One of them has the codec of alc256 and the other one has the codec
of alc289.

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


# 1c9609e3 19-Jan-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reduce the suspend time consumption for ALC256

ALC256 has its own quirk to override the shutup call, and it contains
the COEF update for pulling down the headset jack control. Currently,
the COEF update is called after clearing the headphone pin, and this
seems triggering a stall of the codec communication, and results in a
long delay over a second at suspend.

A quick resolution is to swap the calls: at first with the COEF
update, then clear the headphone pin.

Fixes: 4a219ef8f370 ("ALSA: hda/realtek - Add ALC256 HP depop function")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198503
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1b6832be 17-Jan-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - update ALC215 depop optimize

Add ALC215 its own depop functions for alc_init and alc_shutup.
Assign it to ALC225 usage.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c2b691ee 17-Jan-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289

This patch will enable headset mode for ALC215/ALC285/ALC289 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c469652b 15-Jan-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use IS_REACHABLE() for dependency on input

The commit ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek
HD-audio codec") introduced the reverse-selection of CONFIG_INPUT for
Realtek codec in order to avoid the mess with dependency between
built-in and modules. Later on, we obtained IS_REACHABLE() macro
exactly for this kind of problems, and now we can remove th INPUT
selection in Kconfig and put IS_REACHABLE(INPUT) to the appropriate
places in the code, so that the driver doesn't need to select other
subsystem forcibly.

Fixes: ffcd28d88e4f ("ALSA: hda - Select INPUT for Realtek HD-audio codec")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # and build-tested
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e4c9fd10 10-Jan-2018 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant

There is another Dell XPS 13 variant (SSID 1028:082a) that requires
the existing fixup for reducing the headphone noise.
This patch adds the quirk entry for that.

BugLink: http://lkml.kernel.org/r/CAHXyb9ZCZJzVisuBARa+UORcjRERV8yokez=DP1_5O5isTz0ZA@mail.gmail.com
Reported-and-tested-by: Francisco G. <frangio.1@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da911b1f 05-Jan-2018 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - update ALC225 depop optimize

Add ALC225 its own depop functions for alc_init and alc_shutup.
Add depop optimize step for headset mode functions.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1350bff 27-Dec-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up ALC299 init code

ALC299 is compatible with ALC225/295, thus it doesn't have to assign
its own model. Merge together with ALC225/295 code.

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


# 44be77c5 27-Dec-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing COEF init for ALC225/295/299

There was a long-standing problem on HP Spectre X360 with Kabylake
where it lacks of the front speaker output in some situations. Also
there are other products showing the similar behavior. The culprit
seems to be the missing COEF setup on ALC codecs, ALC225/295/299,
which are all compatible.

This patch adds the proper COEF setup (to initialize idx 0x67 / bits
0x3000) for addressing the issue.

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


# 8da5bbfc 21-Dec-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - change the location for one mic on a Lenovo machine

There are two front mics on this machine, and current driver assign
the same name Mic to both of them, but pulseaudio can't handle them.
As a workaround, we change the location for one of them, then the
driver will assign "Front Mic" and "Mic" for them.

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


# 285d5ddc 21-Dec-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix headset mic detection issue on a Dell machine

It has the codec alc256, and add its pin definition to pin quirk
table to let it apply ALC255_FIXUP_DELL1_MIC_NO_PRESENCE.

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


# 92266651 14-Dec-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix Dell AIO LineOut issue

Dell AIO had LineOut jack.
Add LineOut verb into this patch.

[ Additional notes:
the ALC274 codec seems requiring the fixed pin / DAC connections for
HP / line-out pins for enabling EQ for speakers; i.e. the HP / LO
pins expect to be connected with NID 0x03 while keeping the speaker
with NID 0x02. However, by adding a new line-out pin, the
auto-parser assigns the NID 0x02 for HP/LO pins as primary outputs.
As an easy workaround, we provide the preferred_pairs[] to map
forcibly for these pins. -- tiwai ]

Fixes: 75ee94b20b46 ("ALSA: hda - fix headset mic problem for Dell machines with alc274")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f429e7e4 05-Dec-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codec support for ALC257

Add new support for ALC257 codec.

[ It's supposed to be almost equivalent with other ALC25x variants,
just adding another type and id -- tiwai ]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2d7fe618 22-Nov-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix ALC700 family no sound issue

It maybe the typo for ALC700 support patch.
To fix the bit value on this patch.

Fixes: 6fbae35a3170 ("ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0ce48e17 20-Nov-2017 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek: Add headset mic support for Intel NUC Skull Canyon

Users have been using knob "model=dell-headset-multi" on Intel Skull
Canyon for a while.

Add the equivalent quirk, ALC269_FIXUP_DELL1_MIC_NO_PRESENCE for Skull
Canyon.

BugLink: https://bugs.launchpad.net/bugs/1732034
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3aabf94c 08-Nov-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix ALC275 no sound issue

Sound works after a cold boot but not after a reboot from windows.
This patch will solve this issue. This is relation with Class-D power control.

[ The bug was reported in Bugzilla below for Sony VAIO SVS13A1C5E
-- tiwai]

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


# 75ee94b2 08-Nov-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix headset mic problem for Dell machines with alc274

Confirmed with Kailang of Realtek, the pin 0x19 is for Headset Mic, and
the pin 0x1a is for Headphone Mic, he suggested to apply
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to fix this problem. And we
verified applying this FIXUP can fix this problem.

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


# 0202f5cd 25-Oct-2017 Peisen <pshou@realtek.com>

ALSA: hda/realtek - Add support for ALC1220

Add Clevo-P51 mode support for ALC1220.
ALC1220 Clevo-p51
Speaker uses I2S output.
We therefore want to make sure 0x14 (Headphones) and 0x1b (Speakers)
use to stereo DAC 0x02.

Signed-off-by: Peisen Hou <pshou@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f265788c 24-Oct-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix headset mic problem for Dell machines with alc236

We have several Dell laptops which use the codec alc236, the headset
mic can't work on these machines. Following the commit 736f20a70, we
add the pin cfg table to make the headset mic work.

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


# 736f20a7 20-Oct-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support for ALC236/ALC3204

Add support for ALC236/ALC3204.
Add headset mode support for ALC236/ALC3204.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 28d1d6d2 18-Oct-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add model string for Intel reference board quirk

For allowing user to apply the existing quirk on a machine with a
different SSID, add a new model string entry, alc700-ref.
The quirk itself was introduced in the commit b84e843644f2: "ALSA:
hda/realtek - Enable jack detection function for Intel ALC700")

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


# b84e8436 01-Sep-2017 PeiSen Hou <pshou@realtek.com>

ALSA: hda/realtek - Enable jack detection function for Intel ALC700

Intel ALC 700 needs this patch for jack detection function.
Because ALC700's jack detect function defaults is disable.
So alc700 needs pathc to enable jack detection function.

Signed-off-by: PeiSen Hou <pshou@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8df4b003 14-Aug-2017 Shih-Yuan Lee (FourDollars) <sylee@canonical.com>

ALSA: hda/realtek - Fix pincfg for Dell XPS 13 9370

The initial pin configs for Dell headset mode of ALC3271 has changed.

/sys/class/sound/hwC0D0/init_pin_configs: (BIOS 0.1.4)
0x12 0xb7a60130
0x13 0xb8a61140
0x14 0x40000000
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x4087992d
0x1e 0x411111f0
0x21 0x04211020

has changed to ...

/sys/class/sound/hwC0D0/init_pin_configs: (BIOS 0.2.0)
0x12 0xb7a60130
0x13 0x40000000
0x14 0x411111f0
0x16 0x411111f0
0x17 0x90170110
0x18 0x411111f0
0x19 0x411111f0
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x4067992d
0x1e 0x411111f0
0x21 0x04211020

Fixes: b4576de87243 ("ALSA: hda/realtek - Fix typo of pincfg for Dell quirk")
Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3f3c3714 02-Aug-2017 Sergei A. Trusov <sergei.a.trusov@ya.ru>

ALSA: hda - Fix speaker output from VAIO VPCL14M1R

Sony VAIO VPCL14M1R needs the quirk to make the speaker working properly.

Tested-by: Dmitriy <mexx400@yandex.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e674ac9a 21-Jul-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - No loopback on ALC225/ALC295 codec

ALC225/ALC295 also have no loopback mixer.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5a36767a 21-Jul-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update headset mode for ALC225

Dell new platform with new hardware layout.
Old headset mode policy will cause headset mode check type has a
chance to check fail.
So, we update new headset mode to match new hardware layout.
New headset mode policy also could suitable to old hardware layout.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 89542936 17-Jul-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update headset mode for ALC298

Dell new platform with new hardware layout.
Old headset mode policy will cause headset mode check type has a
chance to check fail.
So, we update new headset mode to match new hardware layout.
New headset mode policy also could suitable to old hardware layout.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 65553b12 11-Jul-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codec device ID for ALC1220

Codec ID is 0x1168.
It is another ALC1220 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f33f79f3 06-Jul-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - change the location for one of two front microphones

On this Lenovo machine, there are two front mics, and both of them are
assigned the same name "Mic", but pulseaudio can't support two mics
with the same name, as a workaround, we change the location for one of
them, then the driver will assign "Front Mic" and "Mic" for them.

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


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

ALSA: hda/realtek - Remove GPIO_MASK

GPIO_MASK was introduced in commit "df694daa3c01 [ALSA] hda-codec - Add
the support of ALC262,ALC883,ALC885,ALC861" but it's not being used. So
we can simply remove it.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b4576de8 03-Jul-2017 Shih-Yuan Lee (FourDollars) <sylee@canonical.com>

ALSA: hda/realtek - Fix typo of pincfg for Dell quirk

The PIN number for Dell headset mode of ALC3271 is wrong.

Fixes: fcc6c877a01f ("ALSA: hda/realtek - Support Dell headset mode for ALC3271")
Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0a6f0600 30-Jun-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codecs support for ALC215/ALC285/ALC289

Add new codecs support for ALC215 ALC285 ALC289.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4731d5de 30-Jun-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Remove ALC285 device ID

0x0285 Device ID was not used.
It just assigned for alias of ALC293 as backup.
So, remove it first.
Because our new codec will use this device ID.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fcc6c877 29-Jun-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support Dell headset mode for ALC3271

Add DELL4_MIC_NO_PRESENCE model.
Add the pin configuration value of this machine into the pin_quirk
table to make DELL4_MIC_NO_PRESENCE apply to this machine.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 532a7784 25-Jun-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - There is no loopback mixer in the ALC234/274/294

We have a Lenovo machine with the codec ALC294 on it, without the
patch, the Node 0x0b is regarded as the loopback mixer, but the Node
0x0b in this codec is "Vendor Defined Widget" instead of the audio
mixer, please see the log below:

Node 0x0b [Vendor Defined Widget] wcaps 0xf00000: Mono
Control: name="Beep Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=4, ofs=0
Control: name="Beep Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=4, ofs=0

And I have consulted with Realtek, so far the ALC234/274/294 all don't
have loopback mixer.

Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c2d6af53 21-Jun-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add default procedure for suspend and resume state

Except ALC269.
This will reduce pop noise from headset or headphone.
If codec enter to power save state, when plug headset or headphone....
It has a chance to cut off power by system.
Our new codec use this procedure will be more stable during suspend
and resume state.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 71683c32 20-Jun-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support headset mode for ALC234/ALC274/ALC294

This patch will enable headset mode for ALC234/ALC274/ALC294 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a219ef8 16-Jun-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add ALC256 HP depop function

Add this functions, it could support ALC256 for HP depop functions.
It also can solve some ALC256 machine plug headset cause power
off issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4eab0ea1 05-Jun-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Reorder ALC269 ASUS quirk entries

A disorder is found in some ALC269 quirk entries for ASUS (1043:xxxx),
which should have been sorted in PCI SSID order. Rearrange them, so
that I won't overlook the already existing entry like I did a couple
of times in the past...

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


# 28e8af8a 05-Jun-2017 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek: Fix mic and headset jack sense on Asus X705UD

The ASUS X705UD laptop requires the known fixup ALC256_FIXUP_ASUS_MIC
in order to fix headphone jack sensing and to enable use of the internal
microphone.

Unfortunately jack sensing for the headset mic is still not working.

[rearranged the position to keep the PCI SSID order -- tiwai]

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2c3b14e 01-Jun-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix applying MSI dual-codec mobo quirk

The previous commit [63691587f7b0: ALSA: hda - Apply dual-codec quirk
for MSI Z270-Gaming mobo] attempted to apply the existing dual-codec
quirk for a MSI mobo. But it turned out that this isn't applied
properly due to the MSI-vendor quirk before this entry. I overlooked
such two MSI entries just because they were put in the wrong position,
although we have a list ordered by PCI SSID numbers.

This patch fixes it by rearranging the unordered entries.

Fixes: 63691587f7b0 ("ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo")
Reported-by: Rudolf Schmidt <info@rudolfschmidt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ba90d6a6 22-May-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Provide dual-codecs model option for a few Realtek codecs

Recently some laptops and mobos are equipped with the dual Realtek
codecs that require special quirks. For making the debugging easier,
add the model "dual-codecs" to be passed via module option.

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


# 63691587 22-May-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply dual-codec quirk for MSI Z270-Gaming mobo

MSI Z270-Gamin mobo has also two ALC1220 codecs like Gigabyte AZ370-
Gaming mobo. Apply the same quirk to this one.

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


# a717777d 09-May-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Simplify bound-beep mute control for ALC268

The beep mute switch for ALC268 needs to touch two NIDs, and we used
to apply the bind-mixer stuff. But the use case for ALC268 is fairly
easy to convert to an open-code in a shorter form. Since this is the
only user of the bind-ctls, we can clean up the common helper codes
later.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fa16b69f 16-May-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - No loopback on ALC299 codec

ALC299 has no loopback mixer, but the driver still tries to add a beep
control over the mixer NID which leads to the error at accessing it.
This patch fixes it by properly declaring mixer_nid=0 for this codec.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195775
Fixes: 28f1f9b26cee ("ALSA: hda/realtek - Add new codec ID ALC299")
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca169cc2 25-Apr-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add Dual Codecs support for Lenovo P520/420

Lenovo P520/420 build with two codecs.
ALC233 for front panel.
ALC662 for rear panel.
This patch will rename capture name for slove conflicts.
And create a card longname for UCM profile.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56798e6b 11-Apr-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use a helper function for renaming kctl names

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


# 7beb3a6e 10-Apr-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support Gigabyte Gaming board with dual Realtek codecs

This patch adds some workarounds to make Gigabyte GA-AX370 Gaming 5
board working without the conflicts of kctls, etc. In general, the
dual codec configs result in the conflicts of the following stuff:
- Master controls
- Capture controls
- Analog loopback controls
In addition, the auto-mute and the auto-mic can't work well among
multiple codecs.

The current "solution" is to disable all these features, and use UCM
for a better PulseAudio management. For a dedicated UCM profile, the
patch overrides the card longname so that the system an get a unique
profile path.

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


# fc7438b1 21-Apr-2017 Mikhail Paulyshka <me@mixaill.tk>

ALSA: hda - Fix headset microphone detection for ASUS N551 and N751

Headset microphone does not work out of the box on ASUS Nx51
laptops. This patch fixes it.

Patch tested on Asus N551 laptop. Asus N751 part is not tested, but
according to [1] this laptop uses the same audiosystem.

1. https://bugzilla.kernel.org/show_bug.cgi?id=117781

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195437
Signed-off-by: Mikhail Paulyshka <me@mixaill.tk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2f726aec 30-Mar-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix a problem for lineout on a Dell AIO machine

On this Dell AIO machine, the lineout jack does not work.

We found the pin 0x1a is assigned to lineout on this machine, and in
the past, we applied ALC298_FIXUP_DELL1_MIC_NO_PRESENCE to fix the
heaset-set mic problem for this machine, this fixup will redefine
the pin 0x1a to headphone-mic, as a result the lineout doesn't
work anymore.

After consulting with Dell, they told us this machine doesn't support
microphone via headset jack, so we add a new fixup which only defines
the pin 0x18 as the headset-mic.

[rearranged the fixup insertion position by tiwai in order to make the
merge with other branches easier -- tiwai]

Fixes: 59ec4b57bcae ("ALSA: hda - Fix headset mic detection problem for two dell machines")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3f307834 22-Mar-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Adding a group of pin definition to fix headset problem

A new Dell laptop needs to apply ALC269_FIXUP_DELL1_MIC_NO_PRESENCE to
fix the headset problem, and the pin definiton of this machine is not
in the pin quirk table yet, now adding it to the table.

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


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

ALSA: hda - add support for docking station for HP 820 G2

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

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


# eeed4cd1 28-Feb-2017 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Fix speaker support for Asus AiO ZN270IE

Asus AiO ZN270IE with ALC256 has no audio ouput for internal speaker
and headphone. It requires GPIO 2 as an amp. This commit enables the
GPIO and pulls it high.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 216d7aeb 28-Feb-2017 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Fix headset mic and speaker on Asus X441SA/X441UV

ASUS X441SA and X441UV laptops with ALC3236 (ALC223) codec require
the known fixup (ALC269_FIXUP_HEADSET_MIC) and a different pin value on
pin 0x19 to make the headset mic work.

To make the speaker work, it requires an EAPD verb fixup.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1732ede 28-Feb-2017 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Fix headset and mic on several Asus laptops with ALC256

Enable jack sensing and fix internal mic and headset mic on
Asus X555UB and X540SA.

Fix internal mic and headset mic on Asus E402NA and E403NA.

Fix headset mic on Asus X541UV, X541SA and Z550SA.

Unfortunately jack sensing for the headset mic is still not working.
We believe this is a codec limitation.

Some of these quirks were authored by João Paulo Rechi Vita.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 615966ad 28-Feb-2017 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Fix headset mic on several Asus laptops with ALC255

Add pin quirks to enable use of the headset mic on Asus Z550MA,
X540LA, X540LJ, X556UR, Z450LA, and X441NC.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5824ce8d 28-Feb-2017 Chris Chiu <chiu@endlessm.com>

ALSA: hda/realtek - Add support for Acer Aspire E5-475 headset mic

The Acer laptop Aspire E5-475 with ALC255 can't detect the headset
microphone until we modify a pin definition.

Signed-off-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 493de342 28-Feb-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add subwoofer support for Dell Inspiron 17 7000 Gaming

Dell Inspiron 17 7000 Gaming laptop needs a similar quirk like
Inspiron 7599 to support its subwoofer speaker.

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


# 29693efc 26-Feb-2017 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix micmute hotkey problem for a lenovo AIO machine

On this machine, the micmute button is connected to Line2 of the
codec and the micmute led is connected to GPIO2 of the codec.

After applying this quirk, both hotkey and led work well.

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


# 9f1bc2c4 16-Feb-2017 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda/realtek - Cannot adjust speaker's volume on a Dell AIO

The issue is the same as "dd9aa335c880 ALSA: hda/realtek - Can't adjust
speaker's volume on a Dell AIO", the output requires to connect to a node
with Amp-out capability.

Applying the same fixup "ALC298_FIXUP_SPK_VOLUME" can fix the issue.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9eb5d0e6 17-Jan-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support headphone Mic for ALC221 of HP platform

ALC221 HP platform need to support Headphone Mic.
This patch will turn on headphone Mic supported.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a535ad57 16-Jan-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codec support of ALC1220

Add support for new codec of ALC1220.
It's compatible with ALC882 & co.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7efff92 04-Jan-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply asus-mode8 fixup to ASUS X71SL

Although the old quirk table showed ASUS X71SL with ALC663 codec being
compatible with asus-mode3 fixup, the bugzilla reporter explained that
asus-model8 fits better for the dual headphone controls. So be it.

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


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

ALSA: hda - Fix up GPIO for ASUS ROG Ranger

ASUS ROG Ranger VIII with ALC1150 codec requires the extra GPIO pin to
up for the front panel. Just use the existing fixup for setting up
the GPIO pins.

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


# 28f1f9b2 03-Jan-2017 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec ID ALC299

ALC299 was similar as ALC225.
Add headset support for ALC299.
ALC3271 was for Dell rename.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 823ff161 24-Dec-2016 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - Fix click noises on Samsung Ativ Book 8

The Samsung Ativ Book 8 makes a loud click noise on boot, shutdown
and when the audio card enters or exits power saving states. All
these noises disappear applying ALC269_FIXUP_NO_SHUTUP.

In addition to that, fix the loud click noise that the laptop
makes when inserting or removing the headphone jack by automuting
via amp instead of pinctl.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 972aa2c7 24-Dec-2016 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - Apply ALC269_FIXUP_NO_SHUTUP on HDA_FIXUP_ACT_PROBE

Setting shutup when the action is HDA_FIXUP_ACT_PRE_PROBE might
not have the desired effect since it could be overridden by
another more generic shutup function. Prevent this by setting
the more specific shutup function on HDA_FIXUP_ACT_PROBE.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c6790c8e 25-Nov-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support for headset MIC for ALC622

Add headset MIC support for ALC622 of USI platform.
It only support headset of iphone type.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 989dbe4a 23-Nov-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix headset-mic problem on a Dell laptop

This group of new pins is not in the pin quirk table yet, adding
them to the pin quirk table to fix the headset-mic problem.

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


# 9a254191 10-Nov-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mic regression by ASRock mobo fixup

The commit [1a3f099101b8: ALSA: hda - Fix surround output pins for
ASRock B150M mobo] introduced a fixup of pin configs for ASRock
mobos to fix the surround outputs. However, this overrides the pin
configs of the mic pins as if they are outputs-only, effectively
disabling the mic inputs. Of course, it's a regression wrt mic
functionality.

Actually the pins 0x18 and 0x1a don't need to be changed; we just need
to disable the bogus pins 0x14 and 0x15. Then the auto-parser will
pick up mic pins as switchable and assign the surround outputs there.

This patch removes the incorrect pin overrides of NID 0x18 and 0x1a
from the ASRock fixup.

Fixes: 1a3f099101b8 ('ALSA: hda - Fix surround output pins for ASRock...')
Reported-and-tested-by: Vitor Antunes <vitor.hda@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=187431
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4ce8e6a5 08-Nov-2016 Lars-Peter Clausen <lars@metafoo.de>

ALSA: hda - Fix typo

EPAD -> EAPD

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a3f0991 19-Oct-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix surround output pins for ASRock B150M mobo

ASRock B150M Pro4/D3 mobo with ALC892 codec doesn't seem to provide
proper pins for the surround outputs, hence we need to specify the
pincfgs manually with a couple of other corrections.

Reported-and-tested-by: Benjamin Valentin <benpicco@googlemail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6aecd871 20-Oct-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix headset mic detection problem for two Dell laptops

They uses the codec ALC255, and have the different pin cfg definition
from the ones in the existing pin quirk table. Now adding them into
the table to fix the problem.

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


# f771d5bb 17-Oct-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Adding a new group of pin cfg into ALC295 pin quirk table

We have a new Dell laptop model which uses ALC295, the pin definition
is different from the existing ones in the pin quirk table, to fix the
headset mic detection and mic mute led's problem, we need to add the
new pin defintion into the pin quirk table.

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


# 392c9da2 25-Sep-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Adding one more ALC255 pin definition for headset problem

We have two new Dell laptop models, they have the same ALC255 pin
definition, but not in the pin quirk table yet, as a result, the
headset microphone can't work. After adding the definition in the
table, the headset microphone works well.

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


# 3f640970 10-Sep-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix headset mic detection problem for several Dell laptops

One of the laptops has the codec ALC256 on it, applying the
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE can fix the problem, the rest
of laptops have the codec ALC295 on them, they are similar to machines
with ALC225, applying the ALC269_FIXUP_DELL1_MIC_NO_PRESENCE can fix
the problem.

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


# 09da111a 07-Sep-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Skip Realtek SKU check for Lenovo machines

Realtek codec driver expects an implicit rule where either the codec
SSID or the pincfg NID 0x1d contains the some information encoded in
some bits. One of the expected information is there is the
availability of PC beep, and the driver doesn't build up the PC beep
control if this is *supposed* to be disabled there.

Meanwhile, Lenovo doesn't seem to follow this requirement (yes it's
non-standard after all), and the BIOS sets just the normal SSID and
the pincfg values. This resulted in the lack of PC beep on a few
machines, purely with a lucky or unlucky number. It didn't bother
most people, but some people still demand the PC beep, as found in bug
reports.

This patch just adds the fixup chain to Lenovo machines to skip the
SKU checks. Then the beep control will show up in the mixer, and user
can still decide to enable / disable it via the standard mixer
interface.

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


# fd06c77e 30-Aug-2016 Kai-Heng Feng <kai.heng.feng@canonical.com>

ALSA: hda - Enable subwoofer on Dell Inspiron 7559

The subwoofer on Inspiron 7559 was disabled originally.
Applying a pin fixup to node 0x1b can enable it and make it work.

Old pin: 0x411111f0
New pin: 0x90170151

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 311042d1 29-Aug-2016 Shrirang Bagul <shrirang.bagul@canonical.com>

ALSA: hda - Add headset mic quirk for Dell Inspiron 5468

This patch enables headset microphone on some variants of
Dell Inspiron 5468. (Dell SSID 0x07ad)

BugLink: https://bugs.launchpad.net/bugs/1617900
Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# abaa2274 24-Aug-2016 Anisse Astier <anisse@astier.eu>

ALSA: hda/realtek - fix headset mic detection for MSI MS-B120

MSI Cubi MS-B120 needs the same fixup as the Gigabyte BXBT-2807 for its
mic to work.

They both use a single 3-way jack for both mic and headset with an
ALC283 codec, with the same pins used.

Cc: Daniel Drake <drake@endlessm.com>
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 59ec4b57 04-Aug-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix headset mic detection problem for two dell machines

One of the machines has ALC255 on it, another one has ALC298 on it.

On the machine with the codec ALC298, it also has the speaker volume
problem, so we add the fixup chained to ALC298_FIXUP_SPK_VOLUME rather
than adding a group of pin definition in the pin quirk table, since
the speak volume problem does not happen on other machines yet.

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


# 9b51fe3e 31-Jul-2016 Shrirang Bagul <shrirang.bagul@canonical.com>

ALSA: hda - On-board speaker fixup on ACER Veriton

On Acer Veriton machines, codec with subsystem-id 0x1b0a01b8 the port at
0x15 is configured by default as an Internal Speaker (0x90170120).
However, no physical is speaker installed on-board. This patch adds a quirk
which disables the physical connection on this pin.

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

Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dd9aa335 31-Jul-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO

We have a Dell AIO on which we can't adjust its speaker's volume.
The problem is it is connected to a Audio Output node without Amp-out
capability. To fix it, we change it to be connnected to a node with
Amp-out capability.

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


# 8a132099 08-Jul-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - add new pin definition in alc225 pin quirk table

We have some Dell laptops which can't detect headset mic, the machines
use the codec ALC225, they have some new pin configuration values,
after adding them in the alc225 pin quirk table, they work well.

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


# 9cd25743 05-Jul-2016 Torsten Hilbrich <torsten.hilbrich@secunet.com>

ALSA: hda/realtek: Add Lenovo L460 to docking unit fixup

This solves the issue that a headphone is not working on the docking
unit.

Signed-off-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0f087ee3 24-Jun-2016 Jaroslav Kysela <perex@perex.cz>

ALSA: hda / realtek - add two more Thinkpad IDs (5050,5053) for tpt460 fixup

See: https://bugzilla.redhat.com/show_bug.cgi?id=1349539
See: https://bugzilla.kernel.org/show_bug.cgi?id=120961

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


# f83c3292 24-Jun-2016 Woodrow Shen <woodrow.shen@gmail.com>

ALSA: hda - Fix the headset mic jack detection on Dell machine

The new Dell laptop with codec 3246 can't detect headset mic when
headset was inserted on the machine. So adding pin configurations
into quirk table makes headset mic work correctly.

Codec: Realtek ALC3246
Vendor Id: 0x10ec0256
Subsystem Id: 0x10280781

Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 78f4f7c2 06-Jun-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC891 headset mode for Dell

New headset mode of ALC891 for Dell.
This patch is supported Dell headset mode for ALC891.
It is only support I-phone type headset.
I think this function is only support for DELL.
This patch is test passed by Ubuntu team.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dab38e43 07-Jun-2016 Torsten Hilbrich <torsten.hilbrich@secunet.com>

ALSA: hda/realtek: Add T560 docking unit fixup

Tested with Lenovo Ultradock. Fixes the non-working headphone jack on
the docking unit.

Signed-off-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Tested-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f90d83b3 03-Jun-2016 AceLan Kao <acelan.kao@canonical.com>

ALSA: hda - Fix headset mic detection problem for Dell machine

Add the pin configuration value of this machine into the pin_quirk
table to make DELL1_MIC_NO_PRESENCE apply to this machine.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6fbae35a 30-May-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703

Support new codecs for ALC700/ALC701/ALC703.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e69e7e03 30-May-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - ALC256 speaker noise issue

That is some different register for ALC255 and ALC256.
ALC256 can't fit with some ALC255 register.
This issue is cause from LDO output voltage control.
This patch is updated the right LDO register value.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 86c72d1c 24-May-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix headset mic detection problem for one Dell machine

Add the pin configuration value of this machine into the pin_quirk
table to make DELL1_MIC_NO_PRESENCE apply 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>


# 7d727869 24-May-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support for ALC295/ALC3254

Add support for ALC295/ALC3254.
They are simply compatible with ALC225 chip.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 423cd785 20-May-2016 Kai-Heng Feng <kaihengfeng@gmail.com>

ALSA: hda - Fix headphone noise on Dell XPS 13 9360

The headphone has noise when playing sound or switching microphone sources.
It uses the same codec on XPS 13 9350, but with different subsystem ID.
Applying the fixup can solve the issue.
Also, changing the model name to better differentiate models.

v2: Reorder by device ID.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3231e205 07-May-2016 Yura Pakhuchiy <pakhuchiy@gmail.com>

ALSA: hda - Fix subwoofer pin on ASUS N751 and N551

Subwoofer does not work out of the box on ASUS N751/N551 laptops. This
patch fixes it. Patch tested on N751 laptop. N551 part is not tested,
but according to [1] and [2] this laptop requires similar changes, so I
included them in the patch.

1. https://github.com/honsiorovskyi/asus-n551-hda-fix
2. https://bugs.launchpad.net/ubuntu/+source/alsa-tools/+bug/1405691

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


# 2da2dc9e 08-May-2016 Kaho Ng <ngkaho1234@gmail.com>

ALSA: hda - Fix white noise on Asus UX501VW headset

For reducing the noise from the headset output on ASUS UX501VW,
call the existing fixup, alc_fixup_headset_mode_alc668(), additionally.

Thread: https://bbs.archlinux.org/viewtopic.php?id=209554

Signed-off-by: Kaho Ng <ngkaho1234@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dcd4f0db 04-May-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codecs support for ALC234/ALC274/ALC294

Support new codecs for ALC234/ALC274/ALC294.
This three codecs was the same IC.
But bonding is not the same.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 037e1197 26-Apr-2016 Conrad Kostecki <ck+linuxkernel@bl4ckb0x.de>

ALSA: hda - Add dock support for ThinkPad X260

Fixes audio output on a ThinkPad X260, when using Lenovo CES 2013
docking station series (basic, pro, ultra).

Signed-off-by: Conrad Kostecki <ck+linuxkernel@bl4ckb0x.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# afecb146 18-Apr-2016 Bastien Nocera <hadess@hadess.net>

ALSA: hda/realtek - Add ALC3234 headset mode for Optiplex 9020m

The Optiplex 9020m with Haswell-DT processor needs a quirk for the
headset jack at the front of the machine to be able to use microphones.

A quirk for this model was originally added in 3127899, but c77900e
removed it in favour of a more generic version.

Unfortunately, pin configurations can changed based on firmware/BIOS
versions, and the generic version doesn't have any effect on newer
versions of the machine/firmware anymore.

With help from David Henningsson <diwic@ubuntu.com>

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Bastien Nocera <hadess@hadess.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c636b95e 11-Apr-2016 Sven Eckelmann <sven@narfation.org>

ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T460s

The Lenovo Thinkpad T460s requires the alc_fixup_tpt440_dock as well in
order to get working sound output on the docking stations headphone jack.

Patch tested on a Thinkpad T460s (20F9CT01WW) using a ThinkPad Ultradock
on kernel 4.4.6.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Tested-by: Simon Wunderlich <sw@simonwunderlich.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e549d190 31-Mar-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix front mic problem for a HP desktop

The front mic jack (pink color) can't detect any plug or unplug. After
applying this fix, both detecting function and recording function
work well.

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


# 83a9efb5 23-Mar-2016 Bobi Mihalca <bobbymihalca@touchtech.ro>

ALSA: hda - Apply fix for white noise on Asus N550JV, too

Apply the new fixup that is used for ASUS N750JV to another similar
model, N500JV, too, for reducing the headphone noise.

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


# 9d4dc584 23-Mar-2016 Bobi Mihalca <bobbymihalca@touchtech.ro>

ALSA: hda - Fix white noise on Asus N750JV headphone

For reducing the noise from the headphone output on ASUS N750JV,
call the existing fixup, alc_fixup_auto_mute_via_amp(), additionally.

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


# 70cf2cbd 23-Mar-2016 Bobi Mihalca <bobbymihalca@touchtech.ro>

ALSA: hda - Asus N750JV external subwoofer fixup

ASUS N750JV needs the same fixup as N550 for enabling its subwoofer.

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


# 6ef2f68f 10-Mar-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix the mic mute button and led problem for a Lenovo AIO

This Lenovo ThinkCentre AIO also uses Line2 as mic mute button and
uses GPIO2 to control the mic mute led, so applying this quirk can
make both the button and led work.

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


# 02322ac9 02-Mar-2016 Simon South <simon@simonsouth.com>

ALSA: hda - Fix mic issues on Acer Aspire E1-472

This patch applies the microphone-related fix created for the Acer
Aspire E1-572 to the E1-472 as well, as it uses the same Realtek ALC282
CODEC and demonstrates the same issues.

This patch allows an external, headset microphone to be used and limits
the gain on the (quite noisy) internal microphone.

Signed-off-by: Simon South <simon@simonsouth.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f883982d 25-Feb-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix headset support and noise on HP EliteBook 755 G2

HP EliteBook 755 G2 with ALC3228 (ALC280) codec [103c:221c] requires
the known fixup (ALC269_FIXUP_HEADSET_MIC) for making the headset mic
working. Also, it suffers from the loopback noise problem, so we
should disable aamix path as well.

Reported-by: Derick Eddington <derick.eddington@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2ae95577 25-Feb-2016 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fixup speaker pass-through control for nid 0x14 on ALC225

On one of the machines we enable, we found that the actual speaker volume
did not always correspond to the volume set in alsamixer. This patch
fixes that problem.

This patch was orginally written by Kailang @ Realtek, I've rebased it
to fit sound git master.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1549660
Co-Authored-By: Kailang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3b43b71f 25-Feb-2016 Kai-Heng Feng <kaihengfeng@gmail.com>

ALSA: hda - Fixing background noise on Dell Inspiron 3162

After login to the desktop on Dell Inspiron 3162,
there's a very loud background noise comes from the builtin speaker.
The noise does not go away even if the speaker is muted.

The noise disappears after using the aamix fixup.

Codec: Realtek ALC3234
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0255
Subsystem Id: 0x10280725
Revision Id: 0x100002
No Modem Function Group found

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


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

ALSA: hda - Fix bad dereference of jack object

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

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

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


# c44d9b11 07-Feb-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix speaker output from VAIO AiO machines

Some Sony VAIO AiO models (VGC-JS4EF and VGC-JS25G, both with PCI SSID
104d:9044) need the same quirk to make the speaker working properly.

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


# 6c361d10 05-Feb-2016 Takashi Iwai <tiwai@suse.de>

Revert "ALSA: hda - Fix noise on Gigabyte Z170X mobo"

This reverts commit 0c25ad80408e95e0a4fbaf0056950206e95f726f.

The original commit disabled the aamixer path due to the noise
problem, but it turned out that some mobo with the same PCI SSID
doesn't suffer from the issue, and the disabled function (analog
loopback) is still demanded by users.

Since the recent commit [e7fdd52779a6: ALSA: hda - Implement loopback
control switch for Realtek and other codecs], we have the dynamic
mixer switch to enable/disable the aamix path, and we don't have to
disable the path statically any longer. So, let's revert the
disablement, so that only the user suffering from the noise problem
can turn off the aamix on the fly.

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


# 4cc9b9d6 03-Feb-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support headset mode for ALC225

Support headset mode for ALC225 platforms.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cfc5a845 03-Feb-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support Dell headset mode for ALC225

Dell create new platform with ALC298 codec.
This patch will enable headset mode for ALC225/ALC3253 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4231430d 03-Feb-2016 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codec support of ALC225

Add new support for ALC225, yet another variant of ALC298 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org> # 4.4+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# db8948e6 18-Jan-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix bass pin fixup for ASUS N550JX

ASUS N550JX (PCI SSID 1043:13df) requires the same fixup for a bass
speaker output pin as other N550 models.

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


# cf52103a 14-Jan-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add fixup for Dell Latitidue E6540

Another Dell model, another fixup entry: Latitude E6540 needs the same
fixup as other Latitude E series as workaround for noise problems.

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


# 0a1f90a9 12-Jan-2016 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix the headset mic detection problem for a Dell laptop

The machine uses codec alc255, and the pin configuration value for
pin 0x14 on this machine is 0x90171130 which is not in the pin quirk
table yet.

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


# 98070576 12-Jan-2016 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix white noise on Dell Latitude E5550

Dell Latitude E5550 (1028:062c) has a white noise problem like other
Latitude E models, and it gets fixed by the very same quirk as well.

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


# 56f27013 11-Jan-2016 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fixup inverted internal mic for Lenovo E50-80

Inform userspace that one channel of the internal mic has reversed
polarity, so it does not attempt to add both channels together and
end up with silence.

Cc: stable@vger.kernel.org
Reported-by: Andrzej Mendel <andrzej.mendel@gmail.com>
Alsa-info: http://www.alsa-project.org/db/?f=3088f82a0cf977855f92af9db8ad406c04f71efa
BugLink: https://bugs.launchpad.net/bugs/1529624
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7b60a89 27-Dec-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add keycode map for alc input device

Then users can remap the keycode from userspace. If without the remap,
the input device will pass KEY_MICMUTE to userspace, but in X11 layer,
it uses KEY_F20 rather than KEY_MICMUTE for XF86AudioMicMute. After
adding the keycode map, users can remap the keycode to any value users
want.

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


# 3694cb29 27-Dec-2015 Kailang <kailang@realtek.com>

ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO

The Lenovo ThinkCenter AIO uses Line2 (NID 0x1b) to implement the
micmute hotkey, here we register an input device and use Line2 unsol
event to collect the hotkey pressing or releasing.

In the meanwhile, the micmute led is controlled by GPIO2, so we
use an existing function alc_fixup_gpio_mic_mute_hook() to control
the led.

[Hui: And there are two places to register the input device, to make
the code simple and clean, move the two same code sections into a
function.]

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


# 9f660a1c 21-Dec-2015 Mario Kleiner <mario.kleiner.de@gmail.com>

ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)

Without this patch, internal speaker and line-out work,
but front headphone output jack stays silent on the
Mac Pro 4,1.

This code path also gets executed on the MacPro 5,1 due
to identical codec SSID, but i don't know if it has any
positive or adverse effects there or not.

(v2) Implement feedback from Takashi Iwai: Reuse
alc889_fixup_mbp_vref and just add a new nid
0x19 for the MacPro 4,1.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b6903c0e 09-Dec-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for Thinkpad X1 Carbon 2nd

Apply the same fixup for Thinkpad with dock to Thinkpad X1 Carbon 2nd,
too. This reduces the annoying loud cracking noise problem, as well
as the support of missing docking port.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=958439
Reported-and-tested-by: Benjamin Poirier <bpoirier@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 70a0976b 15-Dec-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set codec to D3 at reboot/shutdown on Thinkpads

Lenovo Thinkpads with Realtek codecs may still have some loud
crackling noises at reboot/shutdown even though a few previous fixes
have been applied. It's because the previous fix (disabling the
default shutup callback) takes effect only at transition of the codec
power state. Meanwhile, at reboot or shutdown, we don't take down the
codec power as default, thus it triggers the same problem unless the
codec is powered down casually by runtime PM.

This patch tries to address the issue. It gives two things:
- implement the separate reboot_notify hook to struct alc_spec, and
call it optionally if defined.
- turn off the codec to D3 for Thinkpad models via this new callback

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=958439
Reported-and-tested-by: Benjamin Poirier <bpoirier@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 157f0b7f 10-Dec-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply click noise workaround for Thinkpads generically

It seems that a workaround for Thinkpad T440s crackling noise can be
applied generically to all Thinkpad models: namely, disabling the
default alc269 shutup callback. This patch moves it to the existing
alc_fixup_tpt440_dock() while also replacing the rest code with
another existing alc_fixup_disable_aamix(). It resulted in a good
code reduction.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=958439
Reported-and-tested-by: Benjamin Poirier <bpoirier@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c04017ea 15-Dec-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix headphone mic input on a few Dell ALC293 machines

These laptops support both headphone, headset and mic modes
for the 3.5mm jack.

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


# 9a811230 09-Dec-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix noise problems on Thinkpad T440s

Lenovo Thinkpad T440s suffers from constant background noises, and it
seems to be a generic hardware issue on this model:
https://forums.lenovo.com/t5/ThinkPad-T400-T500-and-newer-T/T440s-speaker-noise/td-p/1339883

As the noise comes from the analog loopback path, disabling the path
is the easy workaround.

Also, the machine gives significant cracking noises at PM suspend. A
workaround found by trial-and-error is to disable the shutup callback
currently used for ALC269-variant.

This patch addresses these noise issues by introducing a new fixup
chain. Although the same workaround might be applicable to other
Thinkpad models, it's applied only to T440s (17aa:220c) in this patch,
so far, just to be safe (you chicken!). As a compromise, a new model
option string "tp440" is provided now, though, so that owners of other
Thinkpad models can test it more easily.

Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=958504
Reported-and-tested-by: Tim Hardeck <thardeck@suse.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23adc192 07-Dec-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fixing speaker noise on the two latest thinkpad models

We have two latest thinkpad laptop models which are all based on the
Intel skylake platforms, and all of them have the codec alc293 on
them. When the machines boot to the desktop, an greeting dialogue
shows up with the notification sound. But on these two models, there
is noise with the notification sound. We have 3 SKUs for each of
the models, all of them have this problem.

So far, this problem is only specific to these two thinkpad models,
we did not find this problem on the old thinkpad models with the
codec alc293 or alc292.

A workaround for this problem is disabling the aamix.

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


# 02f6ff90 07-Dec-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add inverted dmic for Packard Bell DOTS

On the internal mic of the Packard Bell DOTS, one channel
has an inverted signal. Add a quirk to fix this up.

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


# 0c25ad80 24-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix noise on Gigabyte Z170X mobo

Gigabyte Z710X mobo with ALC1150 codec gets significant noises from
the analog loopback routes even if their inputs are all muted.
Simply kill the aamix for fixing it.

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


# 8c69729b 23-Nov-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Fix headphone noise after Dell XPS 13 resume back from S3

We have a machine Dell XPS 13 with the codec alc256, after resume back
from S3, the headphone has noise when play sound.

Through comparing with the coeff vaule before and after S3, we found
restoring a coeff register will help remove noise.

BugLink: https://bugs.launchpad.net/bugs/1519168
Cc: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b9c2fa52 19-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add fixup for Acer Aspire One Cloudbook 14

For making the speakers on Acer Aspire One Cloudbook 14 to work, we
need the as same quirk as for another Chromebook. This patch adds the
corresponding fixup entry.

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


# 86f799b8 14-Nov-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix noise on Dell Latitude E6440

Dell Latitude E6440 (1028:05bd) needs the same fixup as applied to
other Latitude E7xxx models for the click noise due to the recent
power-saving changes.

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


# 6ed1131f 26-Oct-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Dell XPS one ALC3260 speaker no sound after resume back

This machine had I2S codec for speaker output.
It need to refill the I2S codec initial verb after resume back.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Reported-and-tested-by: George Gugulea <gugulea@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - convert to hda_device_id

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

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

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

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


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

ALSA: hda - consolidate chip rename functions

A few multiple codec drivers do renaming the chip_name string but all
these are open-coded and some of them have even no error check. Let's
make common helpers to do it properly.

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


# d05ea7da 02-Oct-2015 Laura Abbott <labbott@fedoraproject.org>

ALSA: hda: Add dock support for ThinkPad T550

Much like all the other Lenovo laptops, add a quirk to make
sound work with docking.

Reported-and-tested-by: lacknerflo@gmail.com
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7f57d803 24-Sep-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable power_save_node for Thinkpads

Lenovo Thinkpads with recent Realtek codecs seem suffering from click
noises at power transition since the introduction of widget power
saving in 4.1 kernel. Although this might be solved by some delays in
appropriate points, as a quick workaround, just disable the
power_save_node feature for now. The gain it gives is relatively
small, and this makes the situation back to pre 4.1 time.

This patch ended up with a bit more code changes than usual because
the existing fixup for Thinkpads is highly chained. Instead of adding
yet another chain, combine a few of them into a single fixup entry, as
a gratis cleanup.

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


# 467e1436 05-Sep-2015 Niranjan Sivakumar <ns253@cornell.edu>

ALSA: hda - Fix white noise on Dell M3800

The M3800 is very minor workstation variant of the XPS 15 which has
already been patched for this issue. I figured it's probably more
important for this version of the laptop to be patched than the
regular XPS as Dell sells is pre-configured with Ubuntu to be used as
a Linux workstation. I have tested the patch on my the hardware on
Linux 4.2.0.

Signed-off-by: Niranjan Sivakumar <ns253@cornell.edu>
Cc: <stable@vger.kernel.org> # v4.1+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a161574e 13-Aug-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use ALC880_FIXUP_FUJITSU for FSC Amilo M1437

It turned out that the machine has a bass speaker, so take a correct
fixup entry.

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


# bb148bde 13-Aug-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable headphone jack detect on old Fujitsu laptops

According to the bug report, FSC Amilo laptops with ALC880 can detect
the headphone jack but currently the driver disables it. It's partly
intentionally, as non-working jack detect was reported in the past.
Let's enable now.

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


# 1adecc67 04-Sep-2015 Woodrow Shen <woodrow.shen@canonical.com>

ALSA: hda - Add some FIXUP quirks for white noise on Dell laptop.

Dell laptop has a series model to use the same codec but different subsystem ID.
At the same time they happens the white noise by login screen and headphone;
for fixing them together, I only can add these IDs to FIXUP function ALC292_FIXUP_DISABLE_AAMIX,
then try to solve such the similar issues.

Codec: Realtek ALC3235
Vendor Id: 0x10ec0293
Subsystem Id: 0x102806dd
Subsystem Id: 0x102806df
Subsystem Id: 0x102806e0

Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1492132
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 59a51a6b 18-Aug-2015 Rick Sherman <rick@shermdog.com>

ALSA: hda - Add dock support for Thinkpad W541 (17aa:2211)

Tested with W541 and Ultra Dock 170w

Signed-off-by: Rick Sherman <rick@shermdog.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ccb0a99 12-Aug-2015 Woodrow Shen <woodrow.shen@canonical.com>

ALSA: hda - Fix the white noise on Dell laptop

Dell laptop causes the white noise by login screen and headphone,
and the fixup function ALC292_FIXUP_DISABLE_AAMIX can eliminate this
noise.

Codec: Realtek ALC3235
Vendor Id: 0x10ec0293
Subsystem Id: 0x102806db

Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1484334
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9f502ff5 04-Aug-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - yet another fix for Dell headset mic with ALC3266

It turned out that there are three variants of pin config values of
NID 0x17 on Dell laptops with ALC3266 (alias of ALC298): 0x90170110,
0x90170140 and 0x90170150. The first two have been already covered by
commits 703867e2f252 and 977e627684df, so this commit adds the missing
last entry.

While we're at it, rearrange the three entries in the order of pincfg
values.

Reported-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 73851b36 05-Aug-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - one Dell machine needs the headphone white noise fixup

The fixup ALC292_FIXUP_DISABLE_AAMIX can fix the white noise of
the headphone on this Dell machine.

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


# 703867e2 04-Aug-2015 Woodrow Shen <woodrow.shen@canonical.com>

ALSA: hda - Fix Dell laptop for internal mic/headset mic

The new Dell laptop with ALC3266 can't use internal microphone to
record. Also, the 3 ring headset mic doesn't work on it. For src of
patch_realtek.c, only the pin cfg of Nid 0x17 is different, so the
Nid 0x17 is added into pin quirk, and others are defined to macro
ALC298_STANDARD_PINS in common use.

Codec: Realtek ALC3266
Vendor Id: 0x10ec0298
Subsystem Id: 0x102806e5

BugLink: https://bugs.launchpad.net/bugs/1481575
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 11580297 02-Aug-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - remove no physical connection pins from pin_quirk table

To cleanup the pin_quirk table:
- rewrite the pin_config_match(), comparing all pins on the machine
with the corresponding pins in the quirk table.
- remove all 0x4xxxxxxx pin configurations from pin_quirk table
- after removing the 0x4xxxxxxx pin configurations, some pin tables
are exactly same, so removing the redudant pin tables.

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


# 649ccd08 30-Jul-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix MacBook Pro 5,2 quirk

MacBook Pro 5,2 with ALC889 codec had already a fixup entry, but this
seems not working correctly, a fix for pin NID 0x15 is needed in
addition. It's equivalent with the fixup for MacBook Air 1,1, so use
this instead.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102131
Reported-and-tested-by: Jeffery Miller <jefferym@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3a05d12f 29-Jul-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply a fixup to Dell Vostro 5480

Dell Vostro 5480 (1028:069a) needs the very same quirk used for Vostro
5470 model to make bass speakers properly working.

Reported-and-tested-by: Paulo Roberto de Oliveira Castro <p.oliveira.castro@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5ce000b2 27-Jul-2015 Woodrow Shen <woodrow.shen@canonical.com>

ALSA: hda - Add pin quirk for the headset mic jack detection on Dell laptop

The new Dell laptop with codec 256 can't detect headset mic when
headset was inserted on the machine. From alsa-info, we check
init_pin_configs and need to define the new register value for pin
0x1d & 0x1e because the original macro ALC256_STANDARD_PINS can't
match pin definition. Also, the macro ALC256_STANDARD_PINS is
simplified by removing them. This makes headset mic works on laptop.

Codec: Realtek ALC256
Vendor Id: 0x10ec0256
Subsystem Id: 0x102806f2

BugLink: https://bugs.launchpad.net/bugs/1478497
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e9c28e16 24-Jul-2015 Woodrow Shen <woodrow.shen@canonical.com>

ALSA: hda - Fix the headset mic that will not work on Dell desktop machine

When the headset was plugged in the Dell desktop, the mic of headset
can't be detected and workable.
According to the alsa-info, we found the differece between alsa and
init_pin_configs on the machine, so we need to add the pin configs to
make headset work.

Codec: Realtek ALC3234
Vendor Id: 0x10ec0255
Subsystem Id: 0x102806bb

BugLink: https://bugs.launchpad.net/bugs/1477900
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cba59972 22-Jul-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add headset mic pin quirk for a Dell device

Without this patch, the headset mic will not work on this machine.

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


# 21e9d017 21-Jul-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - remove one pin from ALC292_STANDARD_PINS

One more Dell laptop with alc293 codec needs
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, but the pin 0x1e does not match
the corresponding one in the ALC292_STANDARD_PINS. To use this macro
for this machine, we need to remove pin 0x1e from it.

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


# 0420694d 19-Jul-2015 Mateusz Sylwestrzak <matisec7@gmail.com>

ALSA: hda - Add headset mic support for Acer Aspire V5-573G

Acer Aspire V5 with the ALC282 codec is given the wrong value for the
0x19 PIN by the laptop's BIOS. Overriding it with the correct value
adds support for the headset microphone which would not otherwise be
visible in the system.

The fix is based on commit 7819717b1134 with a similar quirk for Acer
Aspire with the ALC269 codec.

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


# 98973f2f 15-Jul-2015 Keith Packard <keithp@keithp.com>

ALSA: hda/realtek: Enable HP amp and mute LED on HP Folio 9480m [v3]

This laptop needs GPIO4 pulled high to enable the headphone amplifier,
and has a mute LED on GPIO3. I modelled the patch on the existing
GPIO4 code which pulls the line low for the same purpose; this time,
the HP amp line is pulled high.

v2: Disable the headphone amplifier when no headphone is connected.
Don't disable power savings to preserve the LED state.

v3: Remove headset-specific hooks and code; this is just a headphone.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4275554d 29-Jun-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for Dell E7450

Dell E7450 [0128:062e] needs the same quirk as other E7xx models.

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


# 4df3fd17 29-Jun-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780

Fujitsu Lifebook E780 sets the sequence number 0x0f to only only of
the two headphones, thus the driver tries to assign another as the
line-out, and this results in the inconsistent mapping between the
created jack ctl and the actual I/O. Due to this, PulseAudio doesn't
handle it properly and gets the silent output.

The fix is to ignore the non-HP sequencer checks.

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


# 7819717b 27-Jun-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add headset support to Acer Aspire V5

Acer Aspire V5 with ALC282 codec needs the similar quirk like Dell
laptops to support the headset mic. The headset mic pin is 0x19 and
it's not exposed by BIOS, thus we need to fix the pincfg as well.

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


# 831bfdf9 25-Jun-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - restore the MIC FIXUP for some Dell machines

Those FIXUPs were applied to the machines through pin quirks, but
recently the PCI_QUIRK makes them can't apply to the machines.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99851
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Cc: <stable@vger.kernel.org> # v4.1
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ec56af67 24-Jun-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out

Thinkpad X250, when attached to a dock, has two headphone outs but
no line out. Make sure we don't try to turn this into one headphone
and one line out (since that disables the headphone amp on the dock).

Alsa-info at http://www.alsa-project.org/db/?f=36f8764e1d782397928feec715d0ef90dfddd4c1

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


# 82d6d8a4 15-Jun-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix noisy outputs on Dell XPS13 (2015 model)

The new Dell XPS13 also requires the similar quirk for fixing the
noisy outputs. (But, as the codec was changed, now the fixup for
Latitude is used instead.)

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


# 8b99aba7 15-Jun-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix audio crackles on Dell Latitude E7x40

We still got a report that the audio crackles and noises occur with
the recent 4.1 kernels on Dell machines. These machines seem to need
similar workarounds that have been applied to the recent Dell XPS 13
models. Since the codec of these machines (Dell Latitute E7240 and
E7440) is different from XPS 13's one, we need a new fixup entry.

Also, it was confirmed that the previous workaround to disable the
widget power-save (commit [219f47e4f964: ALSA: hda - Disable widget
power-saving for ALC292 & co]) is no longer needed after this fix.
So, this patch includes the partial revert of the commit, too.

Reported-and-tested-by: Mihai Donțu <mihai.dontu@gmail.com>
Tested-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5d724b1 02-Jun-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420

Acer Aspire 9420 with ALC883 (1025:0107) needs the fixup for EAPD to
make the sound working like other Aspire models.

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


# 81a1231b 28-May-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Suooprt Dell headset mode for ALC256

Dell SSID 0x0706 support headset mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Set patch_ops before calling auto-parser

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

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

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


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

ALSA: hda - Fix lost sound due to stream_pm ops cleanup

The commit [49fb18972581: ALSA: hda - Set stream_pm ops automatically
by generic parser] resulted in regressions on some Realtek and VIA
codecs because these drivers set patch_ops after calling the generic
parser, thus stream_pm got cleared to NULL again. I haven't noticed
since I tested with IDT codec.

Restore (partial revert) the stream_pm ops for them to fix the
regression.

Fixes: 49fb18972581 ('ALSA: hda - Set stream_pm ops automatically by generic parser')
Reported-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b40eda64 28-May-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Disable Headphone Mic boost for ALC662

When headphone mic boost is above zero, some 10 - 20 second delay
might occur before the headphone mic is operational.
Therefore disable the headphone mic boost control (recording gain is
sufficient even without it).

(Note: this patch is not about the headset mic, it's about the less
common mic-in only mode.)

BugLink: https://bugs.launchpad.net/bugs/1454235
Suggested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Set stream_pm ops automatically by generic parser

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

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


# 82324502 25-May-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add ALC256 alias name for Dell

Add ALC3246 for Dell platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 219f47e4 19-May-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable widget power-saving for ALC292 & co

We've got reports that ALC3226 (a Dell variant of ALC292) gives click
noises at transition from D3 to D0 when the widget power-saving is
enabled. Further debugging session showed that avoiding it isn't
trivial, unfortunately, since paths are basically activated
dynamically while the pins have been already enabled.

This patch disables the widget power-saving for such codecs.

Reported-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b016951e 19-May-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add headset-mode* model options for ALC269 & co

Modern machines tend to have only one headset jack nowadays, and they
often need these quirks. Let's allow them applicable via model
option for ease of debugging.

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


# 977e6276 18-May-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support Dell headset mode for ALC298

Dell create new platform with ALC298 codec.
This patch will enable headset mode for ALC298/ALC3266 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 09ea9976 13-May-2015 Ansgar Hegerfeld <linux@hegerfeld.org>

ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450

The Lenovo ThinkPad L450 requires the ALC292_FIXUP_TPT440_DOCK fix in
order to get sound output on the docking stations audio port.

This patch was tested using a ThinkPad L450 (20DSS00B00) using kernel
4.0.3 and a ThinkPad Pro Dock.

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


# 1f8b46cd 12-May-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix headset mic and mic-in for a Dell desktop

ALC662 does not need any special verbs to change the jack functionality,
and enables mic in through the headphone jack mode by changing the
direction of the headphone pin node.

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


# 1a5bc8d9 12-May-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support headset mode for ALC298

Support headset mode for ALC298 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b5a4e39 11-May-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add headset mic quirk for Dell Inspiron 5548

This enables the headset microphone on Dell Inspiron 5548,
or at least some variants of it.

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


# 2c674fac 05-May-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add ALC298 alias name for Dell

Add ALC3266 for Dell platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ec6bfca8 04-May-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix typo for ALC286/ALC288

Delete more one break for ALC286/ALC288.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88776f36 01-May-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add headphone quirk for Lifebook E752

Fujitsu Lifebook E752 laptop needs a similar quirk done for Lifebook
T731. Otherwise the headphone is always muted.

Reported-and-tested-by: Christian Weber <we_chris@hotmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3e1b0c4a 27-Apr-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix click noise at start on Dell XPS13

Dell XPS13 produces a click noise at boot up, and Gabriele spotted out
that it's triggered by the initial pin control of the mic (NID 0x19).
This has to be set to Hi-Z Vref while the driver initializes to Vref
80% as a normal mic.

This patch fixes the generic parser code not to override the target
vref if it has been already set by the driver, and adds a proper
initialization of the target vref for this pin in the Realtek driver
side.

Reported-and-tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e8191a8e 23-Apr-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix headset mic detection problem for one more machine

We have two machines with alc256 codec in the pin quirk table, so
moving the common pins to ALC256_STANDARD_PINS.

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1447909
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d32b6666 23-Apr-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix Headphone Mic doesn't recording for ALC256

Switch default pcbeep path to Line in path.

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


# 7d1b6e29 21-Apr-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - fix "num_steps = 0" error on ALC256

The ALC256 does not have a mixer nid at 0x0b, and there's no
loopback path (the output pins are directly connected to the DACs).

This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)"
error (and as a result, problems with amixer/alsamixer).

If there's pcbeep functionality, it certainly isn't controlled by setting an
amp on 0x0b, so disable beep functionality (at least for now).

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


# 9476d369 19-Apr-2015 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - Mute headphone pin on suspend on XPS13 9333

Muting the headphone output pin right before the codec suspension
prevents pop noises when headphones are plugged in (except for a
barely audible click noise).
This solution allows to truly save some power when headphones are
plugged in unlike the previous solution (033b0a7ca9c:
"ALSA: hda - Pop noises fix for XPS13 9333")

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f2aa1110 12-Apr-2015 Jo-Philipp Wich <jow@openwrt.org>

ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450

The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in
order to get working sound output on the docking stations headphone jack.

Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in
conjunction with a ThinkPad Ultradock.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0278669 11-Apr-2015 Yves-Alexis Perez <corsac@debian.org>

ALSA: hda - Add dock support for ThinkPad X250 (17aa:2226)

This model uses the same dock port as the previous generation.

Signed-off-by: Yves-Alexis Perez <corsac@debian.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f4d3129c 10-Apr-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix a typo

A comma was used instead of a semicolon, which may lead to a build
error.

Fixes: cffd39668177 ('ALSA: hda/realtek - Fix the regression by widget power-saving')
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cffd3966 09-Apr-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix the regression by widget power-saving

While enabling the widget power-saving for ALC269 & co, the important
setup was forgotten -- stream_pm ops. Without this setup, the paths
for PCM won't be powered up at all.

Also, the power_filter callbacks used in ALC269 & co need to chain to
the default snd_hda_gen_path_power_filter().

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc7016ab 08-Apr-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix headphone pin config for Lifebook T731

Some BIOS version of Fujitsu Lifebook T731 seems to set up the
headphone pin (0x21) without the assoc number 0x0f while it's set only
to the output on the docking port (0x1a). With the recent commit
[03ad6a8c93b6: ALSA: hda - Fix "PCM" name being used on one DAC when
there are two DACs], this resulted in the weird mixer element
mapping where the headphone on the laptop is assigned as a shared
volume with the speaker and the docking port is assigned as an
individual headphone.

This patch improves the situation by correcting the headphone pin
config to the more appropriate value.

Reported-and-tested-by: Taylor Smock <smocktaylor@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1e62b98 08-Apr-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support Dell headset mode for ALC288

Dell create new platform with ALC288 codec.
This patch will enable headset mode for Dino platform.

[slight code refactoring and compile fix by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f3b70332 08-Apr-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support headset mode for ALC286/288

Support headset mode for ALC286 and ALC288 platforms.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a59d7199 08-Apr-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Make more stable to get pin sense for ALC283

Pin sense will active when power pin is wake up.
Power pin will not wake up immediately during resume state.
Add some delay to wait for power pin activated.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7081adf3 30-Mar-2015 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support Dell headset mode for ALC256

Dell new platform of ALC256 audio codec.
Support headset mode for Dell ALC256 platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 382fd7be 03-Apr-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable widget power saving for Realtek codecs

Recent Realtek codecs support the finer power state control on each
widget. Let's enable the new feature.

Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# af95b414 26-Mar-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add one more node in the EAPD supporting candidate list

We have a HP machine which use the codec node 0x17 connecting the
internal speaker, and from the node capability, we saw the EAPD,
if we don't set the EAPD on for this node, the internal speaker
can't output any sound.

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


# 80b311d3 23-Mar-2015 Sebastian Wicki <gandro@gmx.net>

ALSA: hda - Add dock support for Thinkpad T450s (17aa:5036)

This model uses the same dock port as the previous generation.

Signed-off-by: Sebastian Wicki <gandro@gmx.net>
Cc: <stable@vger.kernel.org>
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>


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

ALSA: hda - Use regmap for amp accesses

This patch converts the amp access functions to the regmap helpers.
The amp values were formerly cached in the own hash table. Now it's
dropped by the regmap's cache.

The only tricky conversion is snd_hda_codec_amp_init(). This function
shouldn't do anything if the amp was already initialized. For
achieving this behavior, a value is read once at first temporarily in
the cache-only mode. Only if it returns an error, i.e. the item
still doesn't exist in the cache, it proceeds to the update.

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>


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

ALSA: hda - Simplify PCM setup overrides

This patch does two things:
- code refactoring with a local helper function,
- allow codec drivers to provide the specific PCM stream info pointers
only for overriding the non-NULL entries, instead of copying the
whole.

This simplifies the codec driver side (currently the only user is
alc269's 44kHz fixed rate).

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


# 70658b99 05-Mar-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - One more Dell macine needs DELL1_MIC_NO_PRESENCE quirk

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


# bbbc7e85 27-Feb-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Allocate hda_pcm objects dynamically

So far, the hda_codec object kept the hda_pcm list in an array, and
the codec driver was expected to assign the array. However, this
makes the object life cycle management harder, because the assigned
array is freed at the codec driver detach while it might be still
accessed by the opened streams.

In this patch, we allocate each hda_pcm object dynamically and manage
it as a linked list. Each object has a kref refcount, and both the
codec driver binder and the PCM open/close touches it, so that the
object won't be freed while in use.

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>


# 7976eb49 12-Feb-2015 Hui Wang <hui.wang@canonical.com>

ALSA: hda - enable mute led quirk for one more hp machine.

Otherwise, the mute led can't work at all.

Tested-by: Taihsiang Ho <taihsiang.ho@canonical.com>
Cc: <stable@vger.kernel.org>
BugLink: https://bugs.launchpad.net/bugs/1410704
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3271cb22 10-Feb-2015 TienFu Chen <tienfu.chen@canonical.com>

ALSA: hda - Add docking station support for another HP machine

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


# b4b33f9d 20-Jan-2015 TienFu Chen <tienfu.chen@canonical.com>

ALSA: hda - Enable docking station for an HP machine

On this machine we need to inform the driver where the docking
station pins are, because it has not been set up by BIOS.

Tested-by: TienFu Chen <tienfu.chen@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1412800
Signed-off-by: TienFu Chen <tienfu.chen@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ffcd28d8 15-Jan-2015 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Select INPUT for Realtek HD-audio codec

The commit commit [33f4acd3b214: ALSA: hda - Enable mic mute hotkey
and LEDs for an HP machine] introduced a quirk for a HP machine
involving with the input event handling. Although the relevant code
is protected via IS_ENABLED(CONFIG_INPUT), this doesn't suffice when
the audio driver is built in while the input is module.

As an easy workaround, this patch forcibly selects CONFIG_INPUT in
Kconfig. This shouldn't be a practical problem since CONFIG_INPUT is
almost mandatory for all systems. Also, this allows to remove the
ugly ifdefs in the code.

Fixes: 33f4acd3b214 ('ALSA: hda - Enable mic mute hotkey and LEDs for an HP machine')
Acked-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 624afe4d 10-Jan-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - fixup input_free_device called after input_unregister_device

Input_unregister_device will internally free the device, so
input_free_device should not be called.

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>


# 33f4acd3 07-Jan-2015 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Enable mic mute hotkey and LEDs for an HP machine

On this machine, the mic mute hotkey is connected to GPIO2. We therefore
create an extra input device for this key.

Also enable LEDs connected to GPIO3 and GPIO4.

(Note: if this patch is backported to older kernels, where KEY_MIC_MUTE is
not available, change the KEY_MIC_MUTE to KEY_F20, which was previously used
for mic mute keys.)

BugLink: https://bugs.launchpad.net/bugs/1408295
Tested-by: Keng-Yu Lin <keng-yu.lin@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 506b62c3 18-Dec-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codec support for ALC298

Add new support for ALC298 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4344aec8 17-Dec-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New codec support for ALC256

Add new support for ALC256 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8b72415d 17-Dec-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new Dell desktop for ALC3234 headset mode

New Dell desktop needs to support headset mode for ALC3234.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Fix built-in mic at resume on Lenovo Ideapad S210

The built-in mic boost volume gets almost muted after suspend/resume
on Lenovo Ideapad S210.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88121
Reported-and-tested-by: Roman Kagan <rkagan@mail.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b734304f 01-Dec-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset Mic support for new Dell machine

Dell has new machines. It supports headset Mic and Headphone Mic.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 911f632c 21-Nov-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - One more HP machine needs to change mute led quirk

The machine originally use the quirk ALC269_FIXUP_HP_GPIO_MIC1_LED,
but the LED doesn't work at all.

After this change, the machine will change to use
ALC269_FIXUP_HP_MUTE_LED_MIC1 through pin_fixup_tbl[], and the LED
works well.

BugLink: https://bugs.launchpad.net/bugs/1389497
Tested-by: TieFu Chen <tienfu.chen@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eaa8e5ef 21-Nov-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Supported HP mute Led for ALC286

New HP machine supported output mute led and input mute led.
ALC286:
GPIO1 to control output mute led.
GPIO5 to control input mute led.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0f32fd19 18-Nov-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Clean up mute/mic GPIO LED handling

There are a few duplicated codes handling the mute and mic-mute LEDs
via GPIO pins. Let's consolidate to single helpers. Here we
introduced two new fields to alc_spec, gpio_mute_led_mask and
gpio_mic_led_mask, to contain the bit mask to set/clear. Also,
mute_led_polarity is evaluated as well.

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


# 6676f308 18-Nov-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix the mic mute led problem for Latitude E5550

The microphone mute led on the Latitude E5550 can't work. We need to
apply DELL_WMI_MIC_MUTE_LED quirk to this machine.

The machine uses alc293 codec and already applied the quirk
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE through pin_fixup_tbl[].

Here we just let DELL_WMI_MIC_MUTE_LED be chained to
ALC269_FIXUP_HEADSET_MODE, then the machine will have these
quirks ALC293_FIXUP_DELL1_MIC_NO_PRESENCE-->
ALC269_FIXUP_HEADSET_MODE-->ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED.

BugLink: https://bugs.launchpad.net/bugs/1381856
Reported-and-tested-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a83d42a 18-Nov-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - move DELL_WMI_MIC_MUTE_LED to the tail in the quirk chain

We have one more Dell machine needs DELL_WMI_MIC_MUTE_LED quirk, but
the machine uses alc293 instead of alc255. So if
DELL_WMI_MIC_MUTE_LED still chain ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
the machine can't use this quirk.

To change this situation, let the DELL_WMI_MIC_MUTE_LED to be a
standalone quirk, and let other quirks chain it.

After this change, this quirk can be chained to any existing quirks,
and as a result, it is possible that this quirk is applied to
a non-Dell machine or a Dell machine without mic mute led on it, but
it is still safe since alc_fixup_dell_wmi() will return an error in
these situations.

And remove the quirk for machine with subsystem id 0x6010 and 0x601f,
these two machines will fall back to the quirk
ALC255_FIXUP_DELL1_MIC_NO_PRESENCE-->ALC255_FIXUP_HEADSET_MODE-->
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED through pin_fixup_tbl[].

BugLink: https://bugs.launchpad.net/bugs/1381856
Reported-and-tested-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 394c97f8 12-Nov-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Change EAPD to verb control

This will fix no sound in Linux system after reboot from windows.

Change log:
- alc662_fill_coef() is replaced with alc_fill_eapd_coef_idx()
and move into alc_auto_init_amp().
- For ALC262, ALC267, ALC268, ALC269, ALC233, ALC255, ALC280, ALC282,
ALC283, ALC284, ALC285, ALC286, ALC288, ALC290, ALC292, ALC293, ALC294,
ALC668, ALC888VC, ALC888VD, ALC891, ALC892, ALC898 and ALC1150, add update
COEF control for EAPD setting.
- Remove alc269_fill_coef() for update EAPD control line.

ADDITIONAL NOTE:
Many Realtek cdoecs have a COEF bit to switch the master amp control
between COEF and EAPD. Windows drivers seem using COEF while we use
EAPD, which is more standard. As a result, some system suffer from
the silent output when booting after Windows. This patch sets the
COEF bits on the relevant codecs properly to switch to EAPD control.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=87771
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f3f9185f 24-Oct-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Restore default value for ALC668

Restore the registers to prevent the abnormal digital power supply
rising ratio/sequence to the codec and causing the incorrect default
codec register restoration during initialization.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c922c4e8 04-Nov-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix mute led problem for three HP laptops

Without the fix, the mute led can't work on these three machines.

After apply this fix, these three machines will fall back on the led
control quirk as below, and through testing, the mute led works very
well.
PIN_QUIRK(0x10ec0282, 0x103c, "HP", ALC269_FIXUP_HP_LINE1_MIC1_LED,
ALC282_STANDARD_PINS,
{0x12, 0x90a60140},
...

BugLink: https://bugs.launchpad.net/bugs/1389497
Tested-by: TieFu Chen <tienfu.chen@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1df8874b 29-Oct-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update Initial AMP for EAPD control

The default EAPD control uses verb command to control EAPD. Some codec
does not have verb command for EAPD. It needs to control by hidden
register.

This update will avoid wrong behavior for some codec. This patch will
fix double setup for EAPD. It just needs to turn on by one site for
verb command or hidden register controlled.

Detailed changes:
- alc889_coef_init() is replaced with alc_update_coef_idx() with a
correct COEF value.
- for ALC262, ALC887 and ALC900, the EAPD setup via the hidden
register is removed because this rather conflicts with the EAPD verb
setup.
- For ALC888-VC, also the hidden register access is removed in
alc888_coef_init().
- Remove the dead #if 0 code for ALC267/ALC268.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cf51eb9d 30-Oct-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - change three SSID quirks to one pin quirk

These three HP machines all have the same pin config, so we can
change it to a pin quirk.

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


# 7a5255f1 30-Oct-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Set GPIO 4 low for a few HP machines

These HP machines needs GPIO 4 low to enable the headphone amplifier.
In addition, we still need to control LEDs via vref and GPIO.

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


# 7c21539c 29-Oct-2014 Lukas Bossard <mr.bobukas@gmail.com>

ALSA: hda - Add ultra dock support for Thinkpad X240.

Adding ultra doch support for Lenovo Thinkpad X240 (17aa:2214).
[Actually replaced the entry with ALC292_FIXUP_TPT440_DOCK -- tiwai]

Signed-off-by: Lukas Bossard <mr.bobukas@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6a98e34b 27-Oct-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New SSID for Headset quirk

It is lite version of AIO machine(0x0626).
The audio layout of this machine was similar with SSID 0x0626.
The audio was same as commit ad8ff99e6beb8708b0bdefd9d5658324e90200f0.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 56779864 24-Oct-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update restore default value for ALC283

Update two records for ALC283 for restore default value.

[The update doesn't seem to have high impact on the existing machines,
but it fixes possible issues, especially expected in BIOS changes on
new machines, according to Realtek -- tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 32fa7e49 24-Oct-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Update restore default value for ALC282

Update default value for ALC282 for COEF.

[The update doesn't seem to have high impact on the existing machines,
but it fixes possible issues, especially expected in BIOS changes on
new machines, according to Realtek -- tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b1974f96 20-Oct-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix inverted LED gpio setup for Lenovo Ideapad

We implemented in a wrong way for mute LED on Lenovo Ideapad; the bit
must be flipped.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16373
Fixes: 3e887f379d8a ('ALSA: hda - Add mute LED support to Lenovo Ideapad')
Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b450b17c 09-Oct-2014 Harsha Priya <harshapriya.n@intel.com>

ALSA: ALC283 codec - Avoid pop noise on headphones during suspend/resume

This patch sets the headphones mode to default before suspending
which helps avoid the pop noise on headphones

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c497d9f9 07-Oct-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add dock port support to Thinkpad L440 (71aa:501e)

Yet another Thinkpad model that has a dock port.

Reported-by: Sascha Wilde <wilde@intevation.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6d16941a 07-Oct-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add dock support for Thinkpad T440 (17aa:2212)

There is another Thinkpad T440 with SSID 17aa:2212 that has a dock
port.

Reported-by: Siwei Luo <sluo@smartbeans.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9d36a7dc 07-Oct-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Make the inv dmic handling for Realtek use generic parser

From what I can see, the generic parser is now good enough to handle
Realtek's inverted dmic handling, so let's remove the special handling
and use the generic parser instead.

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


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

ALSA: hda - Add Inverted Internal mic for Samsung Ativ book 9 (NP900X3G)

In this case, it looks like the right channel records noise rather
than the inverted signal, but the simplest way is to just call it
"Inverted Internal Mic", which will cause it to be muted by default.

Alsa-info at http://www.alsa-project.org/db/?f=064f0b536a1b068efd30d58c2641b5ec2348f059

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


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

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

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

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

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


# aec856d0 03-Sep-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Make the ALC269 pin quirk table shorter

...by factoring out common parts to the just added pin macros.

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


# fea185e2 03-Sep-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add common pin macros for ALC269 family

This will be used in a later patch to make the pin quirk table shorter.

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


# 0279661b 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move HP_GPIO_MIC1_LED quirk for alc280

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


# 200afc09 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move HP_LINE1_MIC1_LED quirk for alc282

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


# e4442bcf 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move HP_MUTE_LED_MIC1 quirk for alc290

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


# 2c609999 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move HP_MUTE_LED_MIC1 quirk for alc282

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


# c77900e6 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move DELL2_MIC_NO_PRESENCE quirk for alc255

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


# 29a4f699 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move DELL1_MIC_NO_PRESENCE quirk for alc255

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


# bc262179 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move DELL1_MIC_NO_PRESENCE quirk for alc283

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


# e8818fa8 02-Sep-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda/realtek - move DELL2_MIC_NO_PRESENCE quirk for alc292

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


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

ALSA: hda - Fix COEF setups for ALC1150 codec

ALC1150 codec seems to need the COEF- and PLL-setups just like its
compatible ALC882 codec. Some machines (e.g. SunMicro X10SAT) show
the problem like too low output volumes unless the COEF setup is
applied.

Reported-and-tested-by: Dana Goyette <danagoyette@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1a22e775 27-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set up initial pins for Acer Aspire V5

Acer Aspire V5 doesn't set up the pins correctly at the cold boot
while the pins are corrected after the warm reboot. This patch gives
the proper pin configs statically in the driver as a workaround.

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


# 54db6c39 18-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use tables for batch COEF writes/updtes

There are many codes doing writes or updates COEF verbs sequentially
in a batch. Rewrite such open codes with tables for optimization.

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


# 98b24883 18-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add alc_update_coef*_idx() helper

... and rewrite a few open codes with them.

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


# 1687ccc8 18-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use alc_write_coef_idx() in alc269_quanta_automake()

Just a refactoring.

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


# f2a227cd 18-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Optimize alc888_coef_init()

Just a refactoring using the existing helper functions.

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


# f475371a 18-Aug-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - restore the gpio led after resume

On some HP laptops, the mute led is controlled by codec gpio.

When some machine resume from s3/s4, the codec gpio data will be
cleared to 0 by BIOS:
Before suspend:
IO[3]: enable=1, dir=1, wake=0, sticky=0, data=1, unsol=0
After resume:
IO[3]: enable=1, dir=1, wake=0, sticky=0, data=0, unsol=0

To skip the AFG node to enter D3 can't fix this problem.

A workaround is to restore the gpio data when the system resume
back from s3/s4. It is safe even on the machines without this
problem.

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


# f3ee07d8 15-Aug-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co

ALC269 & co have many vendor-specific setups with COEF verbs.
However, some verbs seem specific to some codec versions and they
result in the codec stalling. Typically, such a case can be avoided
by checking the return value from reading a COEF. If the return value
is -1, it implies that the COEF is invalid, thus it shouldn't be
written.

This patch adds the invalid COEF checks in appropriate places
accessing ALC269 and its variants. The patch actually fixes the
resume problem on Acer AO725 laptop.

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


# de3da4f6 08-Aug-2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - Fix pop noises on reboot for Dell XPS 13 9333

If nid 0x15 (Headphone Playback Switch) is in D3 and headphones are
plugged in when the laptop reboots, a pop noise is generated.
Prevent this by keeping nid 0x15 in D0 when headphones are plugged in.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f38663ab 08-Aug-2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - Set internal mic as default input source on Dell XPS 13 9333

If the laptop is powered on with a jack plugged in, independently on what
is plugged, the jack is treated as a microphone jack.

Initialize the capture source so that by default jacks are treated as
headphones jacks. This will also prevent pop noises on boot in case
headphones are plugged in since setting/unsetting mic-in as input source
causes a pop noise.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f7ae9ba0 30-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed ALC286/ALC288 recording delay for Headset Mic

It will be recording voice delay for resume back recording for Headset Mic.
This alc286 will quickly open Headset Mic, to prevent avoid recording files are missing.
The issue was fixed. This is follow ALC286 programing guide.

[fix build error, add static and renamed the function by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 00ef9940 30-Jul-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add mic mute led hook for dell machines

The mic mute led on dell laptops is controlled by the wmi driver.
Followed this part being merged to the kernel, we add the mic mute led
hook in the hda driver.

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


# c5d019c3 22-Jul-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix loopback noise on Dell XPS 15

Dell XPS 15 (1028:05fe) gives the bad feedback noise from analog
loopback line even if the channels are muted. The similar problem has
been seen on XPS 13, and it was fixed by simply disabling loopback.
The same fixup was confirmed to be applicable and fix the problem on
XPS 15, too.

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


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

ALSA: hda - Make vendor quirks lowest prio for ALC2xx

Add a new quirk table to make sure that pin quirks have a higher
priority than quirks that apply to an entire vendor.

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


# 9dc12862 22-Jul-2014 Daniel Drake <drake@endlessm.com>

ALSA: hda - Add mic fixup for Gigabyte BXBT-2807

The Gigabyte BRIX BXBT-2707 is a mini-PC with Realtek ALC283 HDA,
exposing a single headset jack.

However, the default pin config information only suggests
that one pin is connected: a HP out jack (pin 0x21, default
config 0x04211010).

The microphone input is behind pin 0x19, which has default
config 0x411111f0 (i.e. unused), so it does not show up in
userspace, and no microphone input is possible via the headset.

Override the pin config so that the headset mic can be used.

[rearranged the fixup entry position by tiwai]

Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Add mute LED pin quirk for HP 15 touchsmart

This makes the mute LED work on a HP 15 touchsmart machine.

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


# 50dd9050 08-Jul-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add capture mute led support in led_power_filter

Now the led_power_filter() needs to handle 3 situations:
- only mute_led_nid is set
- only cap_mute_led_nid is set
- both mute_led_ind and cap_mute_led_nid are set

BugLink: https://bugs.launchpad.net/bugs/1329580
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fc1fad93 08-Jul-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix a typo by changing mute_led_nid to cap_mute_led_nid

BugLink: https://bugs.launchpad.net/bugs/1329580
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Kailang Yang <kailang@realtek.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 549d8782 07-Jul-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add several entries for enabling HP mute led

BugLink: https://bugs.launchpad.net/bugs/1329580
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a12137e7 26-Jun-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for Thinkpad T540p

The similar fixup as T440 is needed for supporting the dock on T540.

Reported-by: Jim Minter <jminter@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e03fdbde 27-Jun-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add another headset pin quirk for some Dell machines

Another quirk to make the headset mic work on some new Dell machines.

Cc: Hui Wang <hui.wang@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1297581
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 76c2132e 24-Jun-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Make the pin quirk tables use the SND_HDA_PIN_QUIRK macro

This is cosmetical - it makes the pin quirk table look better.

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


# 7a52cd79 24-Jun-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add pin quirk for Dell XPS 15

Two bug reporters with Dell XPS 15 report that they need to use the
dell-headset-multi model to get the headset mic working.

The two bug reporters have different PCI SSID (1028:05fd and 1028:05fe)
but this pin quirk matches both.

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


# 9c5dc3bf 19-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Support HP mute led for output and input

HP mute led support output mute led and input mute led.
ALC280:
GPIO3 to control output mute led.
Mic1 vref to control input mute led.
ALC282:
Line1 vref to control output mute led.
Mic1 vref to control input mute led.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8a02b164 13-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add more entry for enable HP mute led

More HP machine need mute led support.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2041d564 13-Jun-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add quirk for external mic on Lifebook U904

According to the bug reporter (Данило Шеган), the external mic
starts to work and has proper jack detection if only pin 0x19
is marked properly as an external headset mic.

AlsaInfo at https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1328587/+attachment/4128991/+files/AlsaInfo.txt

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


# 64eb4280 12-Jun-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - fix a fixup value for codec alc293 in the pin_quirk table

The fixup value for codec alc293 was set to
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE by a mistake, if we don't fix it,
the Dock mic will be overwriten by the headset mic, this will make
the Dock mic can't work.

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


# 6538de03 10-Jun-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add quirk for ABit AA8XE

Bios does not set up the pin config default correctly (everything
is set to zero). Reporter claims that 6stack-dig and 6stack-automute
solve the problem.

Alsa-info at http://www.alsa-project.org/db/?f=376c0804cbdde90bcd2cb94799407cb1cacf5d05
BugLink: https://bugs.launchpad.net/bugs/1319291
Reported-by: Stefano Statuti <stefano.statuti@hotmail.it>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 72009433 06-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support of ALC667 codec

New codec suooprt of ALC667.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6e5f7ad 06-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add more codec rename

Some vendor has special bonding options.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92f974df 06-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - New vendor ID for ALC233

This is compatible with ALC255.
It is use for Lenovo.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 560b9277 05-Jun-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add two new pin tables

These two new pin tables can fix headset mic problems for several
new Dell machines.

And also delete some machines from old quirk table since the existing
pin talbes already cover them.

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


# b6c5fbad 04-Jun-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support of ALC891 codec

New codec support for ALC891.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 192a98e2 02-Jun-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup

The conversion to a fixup table for Replacer model with ALC260 in
commit 20f7d928 took the wrong widget NID for COEF setups. Namely,
NID 0x1a should have been used instead of NID 0x20, which is the
common node for all Realtek codecs but ALC260.

Fixes: 20f7d928fa6e ('ALSA: hda/realtek - Replace ALC260 model=replacer with the auto-parser')
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e30cf2d2 01-Jun-2014 Ronan Marquet <ronan.marquet@orange.fr>

ALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop

Correcion of wrong fixup entries add in commit ca8f0424 to replace
static model quirk for PB V7900 laptop (will model).

[note: the removal of ALC260_FIXUP_HP_PIN_0F chain is also needed as a
part of the fix; otherwise the pin is set up wrongly as a headphone,
and user-space (PulseAudio) may be wrongly trying to detect the jack
state -- tiwai]

Fixes: ca8f04247eaa ('ALSA: hda/realtek - Add the fixup codes for ALC260 model=will')
Signed-off-by: Ronan Marquet <ronan.marquet@orange.fr>
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 532895c5 29-May-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - move some alc662 family machines to hda_pin_quirk table

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


# d91a4c1b 29-May-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - move some alc269 family machines to hda_pin_quirk table

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


# 033b0a7c 26-May-2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - Pop noises fix for XPS13 9333

When headphones are plugged in, force AFG and node 0x02
("Headphone Playback Volume") to D0 to avoid pop noises.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=76611
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1918938 26-May-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add an instance to use snd_hda_pick_pin_fixup

Just two members in the alc269_pin_fixup_tbl[] can cover more than
10 Dell laptop models.

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


# 13fd08a3 21-May-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support headset mode for ALC233

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e9bd7d5c 21-May-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable AA-mix on Sony Vaio S13

The analog-loopback causes the speaker noises even if it's set to zero
volume. As a simple workaround, just get rid of the loopback mixer.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=873704
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5e6db669 20-May-2014 Gabriele Mazzotta <gabriele.mzt@gmail.com>

ALSA: hda - White noise fix for XPS13 9333

Disable the AA-loopback path to get rid of the constant white noise
that can be heard when headphones are used.

Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a1f3b5fa 08-May-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirks for three Dell laptops

When we plug a 3-ring headset on the Dell machines (VID: 0x10ec0255,
SID: 0x1028065c; VID: 0x10ec0255, SID: 0x10280680; VID: 0x10ec0292,
SID: 0x10280684), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

And on the machine with SID 0x10280684, and the Lineout and external
microphone should be routed to docking, this patch also fix this
problem.

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


# 1c37c223 06-May-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add dock pin setups for Thinkpad T440

The headphone and mic jacks on Thinkpad T440 are assigned to pins NID
0x16 and 0x19, respectively. These need to be set up manually by a
fixup.

Reported-and-tested-by: Joschi Brauchle <joschi.brauchle@tum.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 91943954 29-Apr-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirk for a Dell laptop

When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
SID: 0x1028067e), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

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


# a22aa26f 23-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec ALC293/ALC3235 UAJ supported

New codec ALC293/ALC3235 support multifunction jacks.
It used for menual select the input device.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 193177de 23-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add two codecs alias name for Dell

Add ALC3235 ALC3263.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e32dfbed 28-Apr-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirk for a Dell laptop

When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
SID: 0x10280674), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

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


# 8dc9abb9 16-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset Mic support for Dell machine

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 67807ce5 15-Apr-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirk for a Dell laptop

When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0255,
SID: 0x1028067f), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

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


# 7c665932 14-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support of ALC288 codec

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 137bcc33 09-Apr-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirk for a Dell laptop

When we plug a 3-ring headset on the Dell machine (VID: 0x10ec0283,
SID: 0x10280667), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

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


# 0435b3ff 08-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add eapd shutup to ALC283

Add eapd shutup function to alc283_shutup.
It could avoid pop noise from speaker.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# be8ef16a 08-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Change model name alias for ChromeOS

Chrome OS was use model name of alc283-dac-wcaps for loading model as default.
Change the model name to same as model name of Chrome OS for future support.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# de9481cb 07-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Improve HP depop when system change power state on Chromebook

It is better to change Mic2-Vref to manual mode.
Manual control Mic2-Vref will solve pop noise issue.
It will improve pop noise for power on, power off, S3 and resume.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 415d555e 03-Apr-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent speaker output due to mute LED fixup

The recent fixups for HP laptops to support the mute LED made the
speaker output silent on some machines. It turned out that they use
the NID 0x18 for the speaker while it's also used for controlling the
LED via VREF bits although the current driver code blindly assumes
that such a node is a mic pin (where 0x18 is usually so).

This patch fixes the problem by only changing the VREF bits and
keeping the other pin ctl bits.

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


# 8314f225 03-Apr-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fixed single output machine get empty hp sense

If it only has single output of HP out of machine.
The driver parser will copy hp_pins to line_out_pins.
hp_pins will empty for alc283_init and alc283_shutup functions.
This will cause not have value for hp_pin_sense.
Add check line_out_type code will solve it .

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4b7f21d 29-Mar-2014 W. Trevor King <wking@tremily.us>

ALSA: hda - Enable beep for ASUS 1015E

The `lspci -nnvv` output contains (wrapped for line length):

00:1b.0 Audio device [0403]:
Intel Corporation 7 Series/C210 Series Chipset Family
High Definition Audio Controller [8086:1e20] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:115d]

Signed-off-by: W. Trevor King <wking@tremily.us>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a870593b 25-Mar-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirks for three Dell laptops

When we plug a 3-ring headset on the Dell machines (VID: 0x10ec0255,
SID: 0x10280632; VID: 0x10ec0293, SID: 0x1028062c; VID: 0x10ec0293,
SID: 0x1028062e), the headset mic can't be detected, after apply this
patch, the headset mic can work well.

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


# cb149cb3 18-Mar-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Restore default value for ALC282

Restore the registers to prevent the abnormal digital power supply
rising ratio/sequence to the codec and causing the incorrect default
codec register restoration during initialization.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7b5c7a02 18-Mar-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Fix the noise after suspend and resume on ALC282 codec

When the power state of ALC283 codec goes to D3 or return back to D0,
it gives a noise via headphone output. To follow the depop procedure,
it will be better.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6bd55b04 16-Mar-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Restore default value for ALC283

Restore the registers to prevent the abnormal digital power supply
rising ratio/sequence to the codec and causing the incorrect default
codec register restoration during initialization.

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


# 9b745ab8 07-Mar-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix loud click noise with IdeaPad 410Y

Lenovo IdeaPad 410Y with ALC282 codec makes loud click noises at boot
and shutdown. Also, it wrongly misdetects the acpi_thinkpad hook.
This patch adds a device-specific fixup for disabling the shutup
callback that is the cause of the click noise and also avoiding the
thinpad_helper calls.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=71511
Reported-and-tested-by: Guilherme Amadio <guilherme.amadio@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3b446752 04-Mar-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add automute fix for another dell AIO model

When plugging a headphone or headset, lots of noise is heard from
internal speaker, after changing the automute via amp instead of
pinctl, the noise disappears.

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


# 31278997 03-Mar-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add headset quirk for Dell DT

This quirk is needed for the headset microphone to work.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a6b92b66 02-Mar-2014 Marius Knaust <marius.knaust@gmail.com>

ALSA: hda - Added inverted digital-mic handling for Acer TravelMate 8371

Signed-off-by: Marius Knaust <marius.knaust@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fce0a0c7 26-Feb-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add more entry for enable HP mute led

I lost this SSID. Add it into the fixup table.

Signed-off-by: Kailang Yang <kailang@realtek.com>
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>


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

ALSA: hda - Avoid codec D3 for keeping mute LED up on Lenovo Yxx0

The GPIO line used for the mute LED control on Lenovo Yxx0 laptops is
cleared unexpectedly when the codec goes to D3, typically by
power-saving. For avoiding it, add a power filter in the fixup.

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


# c60666bd 21-Feb-2014 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add more entry for enable HP mute led

More HP machine need mute led support.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4913e0bf 17-Feb-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirks for two Dell laptops

When we plug a 3-ring headset on the Dell machines (Vendor ID:
0x10ec0255, Subsystem ID: 0x10280657; Vendor ID: 0x10ec0255,
Subsystem ID: 0x1028065f), the headset mic can't be
detected, after apply this patch, the headset mic can work well.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5100cd07 15-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Allow NULL bus->pci

Realtek codec driver contains some codes referring to the PCI
subdevice IDs, but most of them are optional, typically for checking
the codec name variants. Add NULL checks appropriately so that it can
work without PCI assignment.

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


# 2078600b 12-Feb-2014 Martin Kepplinger <martink@posteo.de>

ALSA: Revert "ALSA: hda/realtek - Avoid invalid COEFs for ALC271X"

This reverts commit d3c56568f43807135f2c2a09582a69f809f0d8b7.

The reverted commit breaks audio through headphone line out on
the Acer TravelMate B113 (Type1Sku0) Notebook, my main work
machine. I don't know much about it but this fixes my problem.
Bisected and tested.

Fixes: d3c56568f438 ('ALSA: hda/realtek - Avoid invalid COEFs for ALC271X')
Cc: <stable@vger.kernel.org>
Tested-by: Martin Kepplinger <martink@posteo.de>
Signed-off-by: Martin Kepplinger <martink@posteo.de>
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>


# 61a75f13 07-Feb-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add subwoofer quirks for Asus UX51VZH and N55SF

Bug reporter report that the -mode4 makes the subwoofer work.
I have simplified the quirk a bit to avoid possible regressions
with the microphones.

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


# 8e54b4ac 07-Feb-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Rename ASUS subwoofer quirks

Just a small refactoring to make the next patch slightly simpler.

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


# f88abaa0 06-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mic capture on Sony VAIO Pro 11

The very same fixup is needed to make the mic on Sony VAIO Pro 11
working as well as VAIO Pro 13 model.

Reported-and-tested-by: Hendrik-Jan Heins <hjheins@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f47e5dc4 07-Feb-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add a headset quirk for Dell XPS 13

This quirk is needed for the headset microphone to work.

Alsa-info at http://www.alsa-project.org/db/?f=8c7dfe857ceff462ca2de133e67023c0f68de9cb

Cc: stable@vger.kernel.org (3.10+)
Reported-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Fix inconsistent Mic mute LED

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

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

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


# c20f31ec 03-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing VREF setup for Mac Pro 1,1

Mac Pro 1,1 with ALC889A codec needs the VREF setup on NID 0x18 to
VREF50, in order to make the speaker working. The same fixup was
already needed for MacBook Air 1,1, so we can reuse it.

Reported-by: Nicolai Beuermann <mail@nico-beuermann.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d3c56568 03-Feb-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Avoid invalid COEFs for ALC271X

We've seen often problems after suspend/resume on Acer Aspire One
AO725 with ALC271X codec as reported in kernel bugzilla, and it turned
out that some COEFs doesn't work and triggers the codec communication
stall.

Since these magic COEF setups are specific to ALC269VB for some PLL
configurations, the machine works even without these manual
adjustment. So, let's simply avoid applying them for ALC271X.

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


# 3e887f37 10-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add mute LED support to Lenovo Ideapad

Lenovo Ideapad with ALC272 has a mute LED that is controlled via
GPIO1. Add a simple vmaster hook for it.

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


# 5e87d580 29-Jan-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirks for another Dell laptop

When we plug a 3-ring headset on the Dell machine (Vendor ID:
0x10ec0255, Subsystem ID: 0x1028064d), the headset mic can't be
detected, after apply this patch, the headset mic can work well.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Doro Wu <fan-cheng.wu@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e7729a41 24-Jan-2014 Adrien Vergé <adrienverge@gmail.com>

ALSA: hda - Fix silent output on MacBook Air 1,1

Similarly to other Apple products, MBA 1,1 needs a specific quirk.
Pin 0x18 must be set to VREF_50 to have sound output. This was no
longer done since commit 1a97b7f, resulting in a mute built-in speaker.

This patch corrects the regression by creating a fixup for the MBA 1,1.

Fixes: 1a97b7f22774 ("ALSA: hda/realtek - Remove the last static quirks for ALC882")
Cc: <stable@vger.kernel.org> [v3.4+]
Tested-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Adrien Vergé <adrienverge@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23870831 29-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply +5dB output amp on ASUS Zenbook UX31A

ASUS Zenbook UX31A has yet another problem -- softer output level than
others. According to the measurement, the peak output difference
between 31A and 31E is 5dB. As ALC269VB has a COEF for the class-D
pre-amp, let's apply it for +5dB.

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


# c48ae0ab 16-Jan-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - add headset mic detect quirks for some Dell machines

When we plug a 3-ring headset on some Dell machines, the headset
mic can't be detected, after apply this patch, the headset mic
can work well on all those machines.

On the machine with the Subsytem ID 0x10280610, if we use
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, the headset mic can be
detected and work well, but the sound can't be outputed via
headphone anymore, use ALC269_FIXUP_DELL3_MIC_NO_PRESENCE
can fix this problem.

BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: David Chen <david.chen@canonical.com>
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 493a52a9 13-Jan-2014 Hui Wang <hui.wang@canonical.com>

ALSA: hda - automute via amp instead of pinctl on some AIO models

On some AIO (All In One) models with the codec alc668
(Vendor ID: 0x10ec0668) on it, when we plug a headphone into the jack,
the system will switch the output to headphone and set the speaker to
automute as well as change the speaker Pin-ctls from 0x40 to 0x00,
this will bring loud noise to the headphone.

I tried to disable the corresponding EAPD, but it did not help to
eliminate the noise.

According to Takashi's suggestion, we use amp operation to replace the
pinctl modification for the automute, this really eliminate the noise.

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


# 58c57cfa 07-Jan-2014 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Minor code optimization for patch_realtek.c

No functional change.

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


# b2c53e20 01-Jan-2014 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Disable Front HP jack detection on Gigabyte Z87X-UD3H

This motherboard seems to have a flaky jack detection - when the
front HP is not present, the jack state quickly switches on and off.

This has been reported by three people in the bug, so I doubt it's
a user error this time.

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


# 0f4881dc 20-Dec-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Enable subwoofer on Dell Vostro 5460/5470

In this case, there are two DACs, and DAC 0x03 is mono. In order
to make headphones and front speaker use DAC 0x02, and subwoofer use
DAC 0x03, we artificially cut the connection from nodes 0x14 and 0x15
to node 0x03, so they can only use DAC 0x02.

In addition, the 5460 and 5470 differs in the sense that 5470 also
needs a headset mic patch, whereas 5460 has individual detection for
headphone and headset mic.

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


# 3a6c5d8a 18-Dec-2013 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add Dell headset detection quirk for one more laptop model

On the Dell machines with codec whose Subsystem Id is 0x10280640,
no external microphone can be detected when plugging a 3-ring headset.
Using ALC255_FIXUP_DELL1_MIC_NO_PRESENCE can fix this problem.

The codec (Vendor ID: 0x10ec0255) on the machine belongs to alc_269
family.

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


# c29cb5eb 12-Dec-2013 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Add Dell headset detection quirk for three laptop models

On the Dell machines with codec whose Subsystem Id is 0x10280610,
0x10280629 or 0x1028063e, no external microphone can be detected when
plugging a 3-ring headset. If we add "model=dell-headset-multi" for
the snd-hda-intel.ko, the problem will disappear.

The codecs on these machines belong to alc_269 family.

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


# 7dca4bc6 10-Dec-2013 Hui Wang <hui.wang@canonical.com>

ALSA: hda - One more Dell headset detection quirk

On the Dell machines with codec whose Subsystem Id is 0x10280624,
no external microphone can be detected when plugging a 3-ring
headset. If we add "model=dell-headset-multi" for the
snd-hda-intel.ko, the problem will disappear.

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


# 0dfb9809 10-Dec-2013 Hui Wang <hui.wang@canonical.com>

ALSA: hda - Another Dell headset detection quirk

On the Dell Inspiron 3045 machine (codec Subsystem Id: 0x10280628),
no external microphone can be detected when plugging a 3-ring
headset. If we add "model=dell-headset-multi" for the
snd-hda-intel.ko, the problem will disappear.

BugLink: https://bugs.launchpad.net/hwe-somerville/+bug/1259437
CC: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6c6eb427 10-Dec-2013 Hui Wang <hui.wang@canonical.com>

ALSA: hda - A Dell headset detection quirk

On the Dell Optiplex 3030 machine (codec Subsystem Id: 0x10280623),
no external microphone can be detected when plugging a 3-ring
headset. If we add "model=dell-headset-multi" for the
snd-hda-intel.ko, the problem will disappear.

BugLink: https://bugs.launchpad.net/hwe-somerville/+bug/1259435
CC: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b1e8972e 04-Dec-2013 Oleksij Rempel <linux@rempel-privat.de>

ALSA: hda - fix mic issues on Acer Aspire E-572

This patch add quirk for Acer Aspire E-572:
- fix external mic
- limit mic boost for internal mic with maximal noise level of -24dB

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0756f09c 04-Dec-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent output on MacBook Air 2,1

MacBook Air 2,1 has a fairly different pin assignment from its brother
MBA 1,1, and yet another quirks are needed for pin 0x18 and 0x19,
similarly like what iMac 9,1 requires, in order to make the sound
working on it.

Reported-and-tested-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb21aad9 04-Dec-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - remove hp_automute_hook from alc283_fixup_chromebook

I forgot to remove the hp_automute_hook from alc283_fixup_chromebook.
It doesn't need this for other chrome os machine.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 84d2dc3e 02-Dec-2013 Mengdong Lin <mengdong.lin@intel.com>

ALSA: hda - fixup ALC262 to skip depop delay before D3 on Intel BayleyBay

This patch sets a 0ms depop delay in fixup funtion 'alc_fixup_no_depop_delay'.
And Realteck ALC262 applies this on Intel Baytrail BayleyBay platform to reduce
codec suspend time.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Reviewed-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0202e99c 02-Dec-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Independent of model for HP

Create single model for HP.
The headset jack module was difference between other chrome book.
It need to manual control Mic jack detect.

Chrome OS loaded driver by models. Remove old assigned fixup table from
ALC269 fixup list entry.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d59915d0 02-Dec-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix headset mic input after muted internal mic (Dell/Realtek)

By trial and error, I found this patch could work around an issue
where the headset mic would stop working if you switch between the
internal mic and the headset mic, and the internal mic was muted.

It still takes a second or two before the headset mic actually starts
working, but still better than nothing.

Information update from Kailang:
The verb was ADC digital mute(bit 6 default 1).
Switch internal mic and headset mic will run alc_headset_mode_default.
The coef index 0x11 will set to 0x0041.
Because headset mode was fixed type. It doesn't need to run
alc_determine_headset_type.
So, the value still keep 0x0041. ADC was muted.

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


# e7ca237b 02-Dec-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Another fixup for ASUS laptop with ALC660 codec

ASUS Z35HL laptop also needs the very same fix as the previous one
that was applied to ASUS W7J.

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


# 6ddf0fd1 28-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent output on ASUS W7J laptop

The recent kernels got regressions on ASUS W7J with ALC660 codec where
no sound comes out. After a long debugging session, we found out that
setting the pin control on the unused NID 0x10 is mandatory for the
outputs. And, it was found out that another magic of NID 0x0f that is
required for other ASUS laptops isn't needed on this machine.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66081
Reported-and-tested-by: Andrey Lipaev <lipaev@mail.ru>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b5c6611f 28-Nov-2013 Mengdong Lin <mengdong.lin@intel.com>

ALSA: hda - fixup ALC262 to remove depop delay on Intel BayleyBay board

This patch defines a fixup 'alc_fixup_no_depop_delay', which sets alc_spec flag
'no_depop_delay' to indicate skipping delay in Realtek codec suspend/resume.

And Intel Baytrail BayleyBay board applies this fixup to reduce driver
suspend/resume time.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 97a26570 28-Nov-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Remove depop delay for suspend and resume if applicable

This patch defines a flag "no_depop_delay" in alc_spec. If this flag is set,
delay in alc_eapd_shutup and alc_resume will be skipped.

Machine-specific fixup can set this flag to reduce suspend/resume time, if
the codec and hardware analog design can avoid pop noise without this delay.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b016931 28-Nov-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add more codecs alias name for Dell

Dell assigned alias name for more codecs.
ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb82594b 29-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add mono speaker quirk for Dell Inspiron 5439

This machine also has mono output if run through DAC node 0x03.

Cc: stable@vger.kernel.org (v3.10+)
BugLink: https://bugs.launchpad.net/bugs/1256212
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>


# eb9ca3ab 28-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add LFE chmap to ASUS ET2700

As the previous commit 1f0bbf03cb82 added the pin config for the bass
speaker, this patch adds the corresponding LFE-only channel map on
ASUS ET2700.

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


# 1f0bbf03 28-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Initialize missing bass speaker pin for ASUS AIO ET2700

Add a fixup entry for the missing bass speaker pin 0x16 on ASUS ET2700
AiO desktop. The channel map will be added in the next patch, so that
this can be backported easily to stable kernels.

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


# 2cede303 27-Nov-2013 Oleksij Rempel <linux@rempel-privat.de>

ALSA: hda - limit mic boost on Asus UX31[A,E]

This both devices need limit for internal dmic.

[cosmetic change; renamed fixup name by tiwai]

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9ad54547 26-Nov-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Set pcbeep amp for ALC668

Set the missing pcbeep default amp for ALC668.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ba4c4d0a 26-Nov-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add support of ALC231 codec

It's compatible with ALC269.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5db4d34b 21-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)

current_headset_type should be of the HEADSET_TYPE enum, not the
HEADSET_MODE enum. Since ALC_HEADSET_TYPE_UNKNOWN and ALC_HEADSET_MODE_UNKNOWN
are both 0, this patch is just janitorial.

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


# d08c5ef2 22-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Provide missing pin configs for VAIO with ALC260

Some models (or maybe depending on BIOS version) of Sony VAIO with
ALC260 give no proper pin configurations as default, resulting in the
non-working speaker, etc. Just provide the whole pin configurations
via a fixup.

Reported-by: Matthew Markus <mmarkus@hearit.co>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b8362e70 21-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add headset quirk for Dell Inspiron 3135

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


# 0f5a5b85 21-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the headphone jack detection on Sony VAIO TX

BIOS sets MISC_NO_PRESENCE bit wrongly to the pin config on NID 0x0f.

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


# a30c9aaa 21-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing bass speaker on ASUS N550

The laptop has a built-in speaker on NID 0x1a. It's an LFE only on
the right channel, so we need to provide an explicit chmap, too.

There might be other surround speakers, but they can fixed in addition
at later point, so let's fix the easier bass speaker at first.

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


# 09d2014f 20-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - A casual Dell Headset quirk

You're looking at a casual headset patch,
for a specific hardware it will match,
and suddenly, the headset jack will work,
so please apply this simple quirk!

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


# 52129000 19-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup

The docking station is a Thinkpad thing, so it makes sense to check
for mute/micmute LEDs for that quirk type too.

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


# 2793769f 18-Nov-2013 David Henningsson <david.henningsson@canonical.com>

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

We're using the ACPI interface to detect whether we're dealing with a Thinkpad
or not. This way we're not loading the thinkpad_acpi module when we're not on
a Thinkpad, but at the same time, we give the opportunity to check for, and
potentially enable, both present and future Thinkpad with mute/micmute LEDs.

At least those running the ALC269 family (269 to 299) of Realtek codecs.

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


# 5959a6bc 12-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix Line Out automute on Realtek multifunction jacks

In case there is both a multifunction headset jack and a Line Out
jack, automuting was not working properly from the Line Out jack.
This patch fixes that issue.

Cc: stable@vger.kernel.org (3.10+)
BugLink: https://bugs.launchpad.net/bugs/1250377
Tested-by: Cyrus Lien <cyrus.lien@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9a22a8f5 08-Nov-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec ALC255/ALC3234 UAJ supported

New codec ALC255/ALC3234 support multifunction jacks.
It used for menual select the input device.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 38070219 01-Nov-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Make fixup regs persist after resume

Upon suspend / resume, the fixup register settings are lost because
sending HDA_FIXUP_ACT_PRE_PROBE is not part of the resume path. Instead,
write our registers in response to the HDA_FIXUP_ACT_INIT, which happens
after initial probe and upon resume.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad8ff99e 07-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Another Dell headset quirk

This machine has a multi-function headset jack.

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


# 487a588d 06-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add pincfg fixup for ASUS W5A

BIOS on ASUS W5A laptop with ALC880 codec doesn't provide any pin
configurations, so we have to set up all pins manually.

Reported-and-tested-by: nb <nb@dagami.org>
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8e35cd4a 06-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA - Limit mic boost and add mute LED for an HP machine

This machine has a mute LED as well as a noisy internal mic. Hence it needs
quirks for both limiting the mic boost as well as enabling the LED.

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


# d5b6b65e 06-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Make sure mute LEDs stay on during runtime suspend (Realtek)

Some HP machines with Realtek codecs have mute LEDs connected to VREF pins.
However when these go into runtime suspend, the pin powers down and its
pin control is disabled, thus disabling the LED too.

This patch fixes that issue by making sure that the pin stays in D0 with
correct pin control.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1248465
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>


# b67ae3f1 05-Nov-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Enable Thinkpad mute/micmute LEDs for Realtek

Same as we already have for Conexant. Right now it's only enabled
for one machine.

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


# 24eff328 04-Nov-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable SPDIF for Acer TravelMate 6293

BIOS on Acer TravelMate 6293 doesn't set up the SPDIF output pin
correctly as default, so enable it via a fixup entry.

Reported-and-tested-by: Hagen Heiduck <heiduck.suse@fmail.postpro.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8e383953 30-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add extra chmap for 2.1 outputs on ASUS laptops

ASUS N56VZ and N76VZ laptops have a bass speaker but its output comes
only from the right channel. This patch adds the extra chmap specific
to these models.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=846531
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6fc16e58 29-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for ASUS N76VZ

ASUS N76VZ needs the same fixup as N56VZ for supporting the boost
speaker.

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


# d2e92709 30-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable AA-loopback on ALC283 Chromebook

ALC283-based Chromebook suffers from occasional white noise, and it
turned out that this comes from AA-loopback. Disable this output path
by just clearing mixer_nid, then the generic parser will skip the
creation of AA-loopback path.

Reported-and-tested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ca16ec02 27-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove locally dead codes

Reported by coverity.

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


# 88011c09 24-Oct-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Raise the delay for alc283_shutup

Some machine with 85ms delay might be happen pop noise when codec
enter to D3. Raise up to 100ms delay will be match for more machine.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 161ebf29 24-Oct-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ALC285 / ALC293 codecs

Yet another variants of ALC269.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1d04c9de 24-Oct-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ALC255 codecs

It's just another variant of ALC269 & co.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fbc78ad6 11-Oct-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Sony VAIO Pro 13 (haswell) now has a working headset jack

Just got the positive confirmation from a tester:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1227093/comments/28

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


# 7c478f03 11-Oct-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add a headset mic model for ALC269 and friends

Using the headset mic model will cause the headset mic to be labeled
"headset mic" instead of just "mic".

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


# 88cfcf86 11-Oct-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix microphone for Sony VAIO Pro 13 (Haswell model)

The external mic showed up with a precense detect of "always present",
essentially disabling the internal mic. Therefore turn off presence
detection for this pin.

Note: The external mic seems not yet working, but an internal mic is
certainly better than no mic at all.

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


# c6cc3d58 08-Oct-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add fixup for ASUS N56VZ

ASUS N56VZ needs a fixup for the bass speaker pin, which was already
provided via model=asus-mode4.

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


# 338cae56 07-Oct-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix mono speakers and headset mic on Dell Vostro 5470

On this machine, DAC on node 0x03 seems to give mono output.

Also, it needs additional patches for headset mic support.
It supports CTIA style headsets only.

Alsa-info available at the bug link below.

Cc: stable@kernel.org (v3.10+)
BugLink: https://bugs.launchpad.net/bugs/1236228
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1bb3e062 27-Sep-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Enable internal mic on a Thinkpad machine with ALC283

More thorough testing showed that these verbs were necessary to
improve quality of the internal mic. Patch originally from Realtek.

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


# 068fd3a0 27-Sep-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix Internal Mic boost can't control with ALC283

ALC283 pin control for Line1 default control by hidden register.
Use line1 as internal Mic will not get sound when boost value up.
Set control by verb for hidden register will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7bba2157 06-Sep-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add dock speaker support for ASUS TX300

ASUS TX300 has a built-in speaker in the tablet part and in the dock
part, and the tablet speaker is supposed to be unused while the
machine is docked. The current HD-audio driver, however, doesn't
support the dock speaker, partly because BIOS doesn't set up the pin
for the corresponding output.

But, not only the missing pin config, also the missing unsol event
handling is another issue. Otherwise the automatic switching via
dock/undock won't work.

Through debugging sessions, we found out that the dock speaker pin is
NID 0x1b, and it generates an unsol event at docking/undocking, the
docking state can be inquired via the normal pin detection verb.
Also, it's turned out that GPIO 2 is needed as an amp. So, all
materials are ready to cook.

This patch provides the basic dock speaker support with TX300:
- The dock speaker is turned on/off via "Dock Speaker" mixer mute.
- The dock speaker is automatically muted when docked. This is
independently from the mixer mute switch, just like the headphone
auto-mute function.

The implementation is a bit tricky. Since we want to handle it as a
secondary speaker, we set it up a pin as a speaker with a jack
detection. Then, the fixup function registers the own unsol callback
for this pin because the standard automute can't handle the thing like
a "speaker jack". In the own automute hook, we apply the mute of the
tablet speaker in addition by checking the dock state.

Also, the speaker control names are slightly shuffled because the
generic parser doesn't give good names but blindly assumes a bass
speaker as a secondary speaker.

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


# cd217a63 22-Aug-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add workarounds for pop-noise on Chromebook with ALC283

The headphone automute on this machine triggers annoying pop noises.
It seems that only the first DAC can be used, the secondary DAC always
results in this problem. This patch disables the secondary DAC with
a few additional workarounds.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2af02be7 22-Aug-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix ALC283 headphone pop-noise better

Fixed ALC283 D3 to D0 and D0 to D3 Headphone pop noise.
The previous fix [c5177c86: ALSA: hda - Fix the noise after suspend on
ALC283 codec] doesn't work sufficiently for some laptops.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d3d3835c 19-Aug-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add inverted digital mic fixup for Acer Aspire One

Yet another entry, just use the existing fixup for this machine, too.

Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd5302c0 18-Aug-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Limit internal mic boost for a few more Thinkpad machines

The higher mic boosts (on internal mic) are so noisy they're unusable
in practice.

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


# aaedfb47 16-Aug-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix the order of a quirk table (janitorial)

This just cleans up the table, no functional changes.

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


# a4a9e082 16-Aug-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix internal mic boost on three Thinkpad machines

The internal mic boost is so noisy on boosts 2 and 3 so they are
unusable in practice.

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


# 1801928e 16-Aug-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for Gateway LT27

Gateway LT27 needs a fixup for the inverted digital mic.

Reported-by: "Nathanael D. Noblet" <nathanael@gnat.ca>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# db8a38e5 08-Aug-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add pinfix for LG LW25 laptop

Correct the pins for a line-in and a headphone on LG LW25 laptop with
ALC880 codec. Other pins seem fine.

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


# bde7bc60 05-Aug-2013 Chih-Chung Chang <chihchung@chromium.org>

ALSA: hda - Fix jack gating when auto_{mute,mic} is suppressed.

The snd_hda_jack_set_gating_jack() call didn't work when
auto_{mute,mic} is suppressed because (1) am_entry is
not filled with nid of the mic pin. (2) The jacks are not
created (by snd_hda_jack_detect_enable_callback) before the
snd_hda_jack_set_gating_jack call.

Now we use the first input pin nid directly, and create the jack if it
doesn't exist yet.

Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Fix invalid multi-io creation on VAIO-Z laptops

VAIO-Z laptops need to use the specific DAC for the speaker output
by some unknown reason although the codec itself supports the flexible
connection. So we implemented a workaround by a new flag,
no_primary_hp, for assigning the speaker pin first.

This worked until 3.8 kernel, but it got broken because the driver
learned for a better multi-io pin mapping, and not it can assign two
mic pins for multi-io. Since the multi-io requires to be the primary
output, the hp and two mic pins are assigned in prior to the speaker
in the end.

Although the machine has two mic pins, one of them is used as a noise-
canceling headphone, thus it's no real retaskable mic jack. Thus, at
best, we can disable the multi-io assignment and make the parser
behavior back to the state before the multi-io.

This patch adds again a new flag, no_multi_io, to indicate that the
device has no multi-io capability, and set it in the fixup for
VAIO-Z. The no_multi_io flag itself can be used generically, added
via a helper line, too.

Reported-by: Tormen <my.nl.abos@gmail.com>
Reported-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c5177c86 24-Jul-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix the noise after suspend on ALC283 codec

When the power state of ALC283 codec goes to D3, it gives a noise via
headphone output. This is because the driver tries to clear all pins
via snd_hda_shutup_pins(). Setting the mic pin to zero triggers such
a noise.

Define a new shutup call specific to this codec and control the pins
there more precisely. Also, add the power-save enable/disable
sequences in the resume and the new shutup calls.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9bfb2844 24-Jul-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Selectively call snd_hda_shutup_pins()

Instead of calling snd_hda_shutup_pins() unconditionally, allow it be
called in spec->shutup callback. In this way, we can avoid calling
this function if it causes a problem like we see in the next patch
following this.

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


# cd63a5ff 04-Jul-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Keep halting ALC5505 DSP

ALC5505 DSP is enabled even though we don't use the features yet at
all. This results in the unnecessarily high power consumption, more
than 100mV higher. Until we implement the DSP support, better to
bypass DSP for saving more power.

Reported-by: Mengdong Lin <mengdong.lin@intel.com>
[Patch modified by Mengdong to cal alc5505_dsp_init() with extra
acl5505_dsp_halt().]

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


# 05843c07 01-Jul-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add Dell SSID to support Headset Mic recording

This is X5 Precision - Diesel platform.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd6fb679 28-Jun-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Guess what, it's two more Dell headset mic quirks

Add two more machines that need quirks for headset mics to work.

Tested-by: Shawn Wang <shawn.wang@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1195636
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6c29d68a 28-Jun-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Yet another Dell headset mic quirk

This quirk is needed for the headset mic to work on this Dell
machine.

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


# ad60d502 27-Jun-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support for ALC5505 DSP power-save mode

This patch adds the power-saving control for ALC5505 DSP on some
Realtek codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Tested-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0623a889 25-Jun-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing alc_inv_dmic_sync() call in alc269_resume()

As some of ALC269 quirks use the inverted dmic feature, we need to
call alc_inv_dmic_sync() in the resume callback like in alc_resume(),
too.

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


# e32aa85a 17-Jun-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add models for Dell headset jacks

These headset jacks keep coming in on more and more platforms, and
it's possible I don't catch them all. Make it easier to test and
verify by making models.

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


# d81bf8cf 11-Jun-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Headset mic support for three more machines

They need these quirks to have headset mic support.

BugLink: https://bugs.launchpad.net/bugs/1189363
Tested-by: Shawn Wang <shawn.wang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 02b504d9 03-Jun-2013 Anisse Astier <anisse@astier.eu>

ALSA: hda - add mic fixup for ALC269VB on Ordissimo EVE2

This fixes the internal and external mic on Ordissimo EVE2, also known
as Malata PC-B1303.

We still don't know how to detect mic jack like Realtek's windows
driver.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3ee2102f 31-May-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add headset quirk for two Dell machines

This quirk is required for the headset mic to work on these
two machines.

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


# 6b4dc2bd 29-May-2013 Ebben Aries <earies@dscp.org>

ALSA: hda - add dock support for Thinkpad T431s

Add a model/fixup string "lenovo-dock", for Thinkpad T431s, to allow sound in docking station.

Tested on Lenovo T431s with ThinkPad Mini Dock Plus Series 3

Signed-off-by: Ebben Aries <earies@dscp.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 436c4a0c 15-May-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add headset mic support for another Dell machine

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


# 7fc7d047 25-Apr-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add the support for ALC286 codec

It's yet another ALC269-variant.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3e0d611b 22-Apr-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Limit internal mic boost for a few Asus machines

These are being reported as being so noisy at high mic boost levels,
so they are unusable in practice.
Therefore artificially limit the boosts.

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


# 6134b1a2 17-Apr-2013 Wei Yongjun <yongjun_wei@trendmicro.com.cn>

ALSA: hda - fix error return code in patch_alc662()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d240d1dc 14-Apr-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix headset mic support for Asus X101CH

With this patch, a TRRS headset mic cannot be successfully detected
on the Asus X101CH, and we can also distinguish between headphone
and headset automatically.

Buglink: https://bugs.launchpad.net/bugs/1169138
Co-authored-by: Kailang <kailang@realtek.com>
Tested-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 73bdd597 15-Apr-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Implement headset jack functionality for some Dell hw

On some machines, there is a headset jack that can support both
headphone, headsets (of both CTIA and OMTP type) and mic-in.

On other machines, the headset jack supports headphone, headsets
(both CTIA and OMTP), but not mic-in.

This patch implements that functionality as different capture sources.

Buglink: https://bugs.launchpad.net/bugs/1169143
Tested-by: David Chen <david.chen@canonical.com>
Co-authored-by: Kailang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 42397004 05-Apr-2013 Dylan Reid <dgreid@chromium.org>

ALSA: hda/realtek - Add a quirk for AC700 Chromebook.

Correct pin configs for the Acer AC700. Most importantly indicate
that SPDIF is connected, it routes to HDMI out.
Similar to Aspire models, chain in the DMIC fixup and allow it to be
applied to this codec (ALC269VB) as well.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1d87caa6 04-Apr-2013 Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>

ALSA: hda - Enabling Realtek ALC 671 codec

* Added the device ID to the modalias list and assinged ALC662 patches
for it
* Added 4 port support for the device ID 0671 in alc662_parse_auto_config

Signed-off-by: Rainer Koenig <Rainer.Koenig@ts.fujitsu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Add GPIO-based LED support on HP desktop machines

The new HP desktop machines have Realtek codecs and their LEDs are
controlled via GPIO as for many laptop models. Add similar hooks as
well as in patch_sigmatel.c for controlling LEDs.

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>


# f811c3cf 07-Mar-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Consolidate add_in_jack_modes and add_out_jack_modes hints

There is no big merit to distinguish these two hints. Instead, just
have a single flag, add_jack_modes, for creating the jack mode enum
ctls for both I/O directions.

The hint string parser code is left and translated as add_jack_modes
just for keeping compatibility.

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


# 5ebd3bbd 19-Feb-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add some model name strings for ALC260

In order to let user test the known workaround more easily, give a few
known fixups for ALC260 to the model strings so that it can be passed
via the module option.

Also, move the unusual setups found in FSC S7020 fixup into a special
model, fujitsu-jwse, Jonathan Woithe Special Edition.

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


# 84dfd0ac 07-Mar-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of new codec ALC233

It's compatible with ALC282.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8554ee40 25-Feb-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable beep for ASUS EeeBox EBP1501P

Reported-by: Harald Becker <ralda@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6e0ee50 18-Feb-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptop

In the recent update, Fujitsu S7020 laptop with ALC260 codec lost the
speaker output, no matter how the amps and the pins are set. After a
long debugging session, we found out that the default codec init code
is harmful for this machine, and we have to reset it to
ALC_INIT_NONE.

Reported-and-tested-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d06ac143 18-Feb-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - add quirks for mute LED on two HP machines

These two machines have no mute LED string in BIOS.

BugLink: https://bugs.launchpad.net/bugs/1128934
Tested-by: Tammy Yang <tammy.yang@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d9111496 12-Feb-2013 Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>

ALSA: hda - update documentation for no-primary-hp fixup

The problem addressed by this fixup is not specific to Vaio Z, affecting
some Vaio all-in-one desktop PCs too. Update the code comments accordingly.

Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 12e31a78 12-Feb-2013 Fernando Luis Vázquez Cao <fernando_b1@lab.ntt.co.jp>

ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889

Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by
the same issue that caused Vaio Z laptops to become silent: the speaker pin
must be connected to the first DAC even though the codec itself advertises
flexible routing through any of the DACs.

Use the no-primary-hp fixup for choosing the speaker pin as the primary so
that the right DAC is assigned on this device.

Cc: stable@vger.kernel.org
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fcd8f3b1 27-Jan-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - fix inverted internal mic on Acer AOA150/ZG5

This patch enables internal mic input on the machine.

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


# 5397145f 23-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add auto-mute support to PB desktop

Using the new chained_before flag, we can correct the headphone jack
detection capability easily over the existing ALC880 6stack model
(which disables the jack detection intentionally for compatibility
reason).

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846

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


# 0712eea3 23-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880

A Packard-Bell desktop machine gives no proper pin configuration from
BIOS. It's almost equivalent with the 6stack+fp standard config, just
take the existing fixup.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846

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


# 0db75790 23-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid snd_BUG_ON() in alc271_hp_gate_mic_jack()

The fixup function is called multiple times before parsing the pins,
so snd_BUG_ON() hits when loaded. Move it to the proper place in the
if block.

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


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

ALSA: hda - Combine snd_hda_codec_flush_*_cache() to a single function

Since both snd_hda_codec_flush_amp_cache() and
snd_hda_codec_flush_cmd_cache() are called usually at the same time,
we can simply combine them to a single function,
snd_hda_codec_flush_cache().

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


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

ALSA: hda - Remove superfluous header inclusions

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


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

ALSA: hda - Add fixup for Acer AO725 laptop

Acer AO725 needs the same fixup as AO756.

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

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


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

ALSA: hda - Fix speaker pin of FSC Lifebook S7110 laptop

Some BIOS version of FSC Lifebook S7110 laptop seems to give a wrong
default pin config for NID 0x15, which confuses the parser. Give a
fixup to correct the value.

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


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

ALSA: hda - Consolidate cap_sync_hook and capture_switch_hook

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

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

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


# e0434037 17-Jan-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix mute led for another HP machine

This machine also has the "HP_Mute_LED_0_A" string in DMI information.

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


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

ALSA: hda - Add prefer_hp_amp flag to hda_gen_spec

Add a new flag to indicate whether HP amp is turned on as default for
speaker or line-outs, and enable this for ALC260 codec, as many
machines with this codec require the HP amp even for speakers.

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


# 08fb0d0e 10-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Generic mute LED implementation for HP laptops

As David Henningsson recently suggested, some HP laptops use an unused
mic pin for controlling a mute LED, and this information is provided
via DMI string "HP_Mute_LED_X_Y" string. This patch adds the generic
support for such cases, as we've already done in patch_sigmatel.c.
This is applied generically to all devices with ID 0x103c.

But as we don't know whether the device 103c:1586 really contains
HP_Mute_LED_X_Y DMI string, still keep the static setup for this
device using the mic2 pin 0x19.

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


# 9bb1f06f 10-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix the timing for some fixups

Some fixups such as setting the flags influencing on the parser
behavior should be applied before actually parsing the tree.

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


# 39aedee7 10-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add a fixup for FSC S7020 laptop

Try to recover from the regression: set the HP amp for the speaker and
add the hp jack mode enum as default.

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


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

ALSA: hda - Add a new fixup type to override pinctl values

Add a new fixup type, HDA_FIXUP_PINCTLS, for overriding the pinctl
values of the given pins. It takes the same array of struct pintbl
like HDA_FIXUP_PINS, but each entry contains the pinctl value instead
of the pin default config value.

This patch also replaces the corresponding codes in patch_realtek.c.
Without this change, the direct call of verbs may be overridden again
by the later call of pinctl restoration by the driver.

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


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

ALSA: hda/realtek - Read the cached pinctl value in fixups

... instead of reading the value from the codec at each time.

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


# 1727a771 10-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop aliases for old fixups

Now the whole codebase has been changed from the earlier kernels, it
makes little sense to keep these aliases. Simply replace with the
official names.

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


# fce52a3b 06-Jan-2013 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add snd_hda_gen_free() and snd_hda_gen_check_power_status()

Just to remove duplicated codes.
Also fixed EXPORT_SYMBOL() in hda_generic.c.

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


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

ALSA: hda - Add spec->vmaster_mute_enum flag to generic parser

Add a flag to indicate whether the vmaster mute hook enum is exposed
or not. Conexant codecs may want not to expose the control depending
on the model.

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


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

ALSA: hda - Add snd_hda_codec_flush_*_cache() aliases

It makes easier to understand although these are identical with
snd_hda_codec_resume_*() functions.

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


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

ALSA: hda - Flush dirty amp caches before writing inv_dmic fix

The inverted dmic fix overwrites the right channel amp value, but it
would work only when the amp values have been already actually
written. Put snd_hda_codec_resume_amp() before the amp write for
flushing caches.

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


# 08c189f2 19-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use generic parser codes for Realtek driver

The next migration step is to use the common code in generic driver
for Realtek driver. This is no drastic change and there should be no
real functional changes, as the generic parser code comes from Realtek
driver originally.

As Realtek driver requires the generic parser code, it needs a
reverse-selection of CONFIG_SND_HDA_GENERIC kconfig.

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


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

ALSA: hda/realtek - Remove redundant argument from alc_mux_select()

The argument "force" is always false in the recent code.

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


# ab16c6dd 29-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - More generic auto-mic switching for Realtek codecs

This patch extends the capability of the auto-mic feature.
Instead of limiting the automatic input-source selection only to the
mics (internal, external and dock mics), allow it for generic inputs,
e.g. switching between the rear line-in and the front mic.

The logic is to check the attribute and location of input pins, and
enable the automatic selection feature only if all such pins are in
different locations (e.g. internal, front, rear, etc) and line-in or
mic pins. That is, if multiple input pins are assigned to a single
location, the feature isn't enabled because we don't know the
priority.

(You may wonder why this restriction doesn't exist for the headphone
automute. The reason is that the output case is different from the
input: the input source is an exclusive selection while the output
can be multiplexed.)

Note that, for avoiding regressions, the line-in auto switching
feature isn't activated as default. It has to be set explicitly via
spec->line_in_auto_switch flag in a fixup code.

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


# 7e35dd3d 19-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix split stereo dmic code

The previous commit passed an utterly wrong value for checking the
split inv dmic pin. This patch fixes it and also tries to remove
inv_dmic_split_idx field.

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>


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

ALSA: hda/realtek - Add conexant-style inverted dmic handling

To make the parser more generic, a few codes to handle the inverted
stereo dmic in a way Conexant parser does is added in this patch.

The caller should set spec->inv_dmic_split flag appropriately.

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


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

ALSA: hda/realtek - Allow multiple individual capture volume/switch controls

So far we create only "Capture Volume" and "Capture Switch" controls
for binding all possible amps, but we'd prefer creating individual
capture volume and switch controls per input in some cases
(e.g. conexant parser does it).

Add a new flag, spec->multi_cap_vol, to follow that policy.

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


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

ALSA: hda/realtek - Allow passing name=NULL to alc_kcontrol_new()

This prevents stupid typos.

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


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

ALSA: hda/realtek - Merge a few split functions

Merge a few functions that have been split due to historical reasons
to single functions. Splitting too much (and placing too far away)
actually worsens the readability.

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


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

ALSA: hda/realtek - Assign Master mixer when possible

There are a few more cases where we can assign "Master" mixer element
safely, e.g. when a single DAC is used in the whole output paths.

Also, when vmaster hook is present, avoid "Master" but assign "PCM"
instead. Otherwise vmaster hook won't work properly.

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


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

ALSA: hda/realtek - Handle vmaster hook in the parser side

... so that the fixup just needs to set the hook function in
FIXUP_ACT_PROBE. This will make easier to port for other codecs,
too.

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


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

ALSA: hda/realtek - Remove unused fields and macro definitions

Also arranged alc_spec definitions to optimize bit fields.
Use a bit field for spec->need_dac_fix, too.

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


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

ALSA: hda/realtek - Drop auto_mic_valid_imux flag

This flag is superfluous now and it's always as same as
spec->auto_mic. Let's drop.

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


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

ALSA: hda/realtek - Allow different pins for shared hp/mic vref check

Add a new field to indicate the possible pin NID for alternative vref
setup for the shared hp/mic. Although 0x18 is valid for all Realtek
codecs, it'll be different on other vendor's codecs.

Also, drop the sanity check in update_shared_mic_hp() since the
reference pin is set explicitly in the caller side.

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


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

ALSA: hda/realtek - Parse digital input path

This was the last forgotten path. Now it's parsed via the same path
parser.

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


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

ALSA: hda/realtek - Rename add_new_out_path() with add_new_nid_path()

Make the function more generic for both input and output directions,
and returns the assigned path pointer. The argument order is changed
to follow the standard (from, to) way.

Now this new function is used for analog input and loopback path
parser codes, too.

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


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

ALSA: hda/realtek - Remove superfluous input amp init

The amps will be initialized via activate_path(), thus it's
superfluous to set in alc_auto_init_analog_input().

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


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

ALSA: hda/realtek - Clean up some spec fields

Remove some fields from struct alc_spec, and clean up the usage.
Namely,
- spec->input_mux becomes a single element, private_imux[] is removed
- spec->adc_nids becomes an array by itself, and private_adc_nids[]
gets removed, too

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


# 666a70d4 17-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Make input path parser more generic

Now we reached to the final big piece of parser rewrite: the input
paths. While the old parser code assumes the more-or-less direct and
similar connections from input pin to ADC, the new code handles the
complete input paths. The capture source is switched by simple calls
of activate_path() function.

The parsing of capture volume and capture switches is, however, not
fully generalized. It assumes that amps are available in the vicinity
of ADCs (in three depth). This isn't perfect but it should cover all
codecs I know of.

Also, this commit removes some NID mapping of capture-related controls
temporarily for simplicity. It'll be restored in later commits.

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


# 183a444a 17-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Don't change connection at path deactivation

The widget connection selection must be changed only when the path is
enabled.

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


# 829f69ea 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Initialize loopback paths properly

Now we have a complete list of loopback paths, thus we can initialize
the paths more completely based on it, instead of assuming a direct
connection from pin to mixer.

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


# 8dd48678 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add boost volumes to path list

Don't forget to take boost volumes into account in the managed path
list. Since it's an additional volume, we need to extend the ctls[]
array.

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


# 3ebf1e94 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add missing initialization of multi-io routes

The paths used for multi-io haven't been initialized properly, so
far. It's usually no big matter because the pins are set to input as
default, but it's still cleaner to initialize the paths properly.

Now with the path active/inactive check, we can do it easily.

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


# 0250f7cb 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix the initialization of pin amp-in

The pin widget has only a single amp value for the input even if it
has multiple "sources". Handle the situation in activate_path().

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


# 6518f7ac 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rename get_out_path() to get_nid_path()

The function can be used not only for output paths but generically.
Also swap the argument order.

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


# fef7fbbc 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use path-based parser for digital outputs

Similar like analog output paths, use the path list for parsing and
initializing digital outputs as well.

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


# c9967f1c 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Consolidate to a single path list

We don't have to keep three individual path lists for input, output
and loopback.

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


# 9c64076e 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Consolidate is_reachable_path()

alc_auto_is_dac_reachable() can be replaced fully with
is_reachable_path(). The only difference is the order of arguments.

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


# 130e5f06 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add path active flag

... and rewrite the initialization of output paths as a generic
function that is applicable for both i/o directions.

The new flag, active, is introduced to each nid_path entry. This
indicates whether the given path is active, and it's used for checking
whether a certain widget can be turned off or changed when a path is
no longer used or newly enabled.

It's still used only in the output paths. More wider adaption for
input and loopback paths will be achieved in the later patch.

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


# b8a47c79 14-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Remove non-standard automute mode

We are using only AUTOMUTE_MODE_PIN in patch_realtek.c and all others
have been already dropped. Let's remove the old superfluous codes.

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


# 9366ede7 13-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix initialization of input amps in output paths

When initializing the output paths, we assumed the input amps have
almost two inputs blindly. It's not only generic but even incorrect
for some codecs like ALC268 & co. Also, the same assumption (two
sources) exists for the bind input-amp controls.

This patch changes the codes in these places to handle the input
connections in a more generic way.

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


# bd32f782 12-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Check amp capabilities of aa-mixer widget

For handling the analog-loopback paths more generically, check the amp
capabilities of the aa-mixer widget, and create only the appropriate
mixer elements.

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


# c2fd19c2 12-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Parse analog loopback paths more generically

Improve the parser of analog loopback paths and handle in a more
generic way. The following changes are included in this patch:

- Instead of assuming direct connections between pins and
the mixer widget, track the whole path between them. This fixes
some missing connections like ALC660.

- Introduce the path list for loopback paths like input and output
path lists. Currently it's not used for any real purposes, yet.

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


# 36f0fd54 12-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Parse input paths

Just like the output paths, parse the whole paths for inputs as well
and store in a path list. For that purpose, rewrite the output parser
code to be generically usable.

The input path list is not referred at all in this patch. It'll be
used to replace the fixed adc/capsrc array in later patches for more
flexible input path selections.

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


# 95e960ce 10-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Make path->idx[] and path->multi[] consistent

So far, idx[i] and multi[i] indicate the attribute of the widget
path[i - 1]. This was just for simplifying the code in
__parse_output_path(), but this is rather confusing for later use.
It's more natural if both idx[i] and multi[i] point to the same widget
of path[i]. This patch changes to that way.

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


# 78e635c9 10-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Simplify the output volume initialization

Simplify the output path initialization using the existing path
information instead of assuming the topology specific to Realtek
codecs. This is also implicitly a fix for some amp values on output
pins where the old parser missed (e.g. ALC260 output pins).

The same function alc_auto_set_output_and_unmute() can be used now for
the multi-io activation, since the output selection means nothing but
activating the given output path.

And, finally at this stage, we can get rid of alc_go_down_to_selector()
and other functions that are codec really specifically to Realtek
codecs.

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


# 792cf2fa 10-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Reduce vol/mute ctl lookups at parsing codec

So far, Realtek codec driver evaluates the NIDs for volume and mute
controls twice, once while parsing the DACs and evaluating the
assignment, and another while creating the mixer elements. This is
utterly redundant and even fragile, as it's assuming that the ctl
element evaluation is identical between both parsing DACs and creating
mixer elements.

This patch simplifies the code flow by doing the volume / mute
controls evaluation only once while parsing the DACs. The patch ended
up in larger changes than expected because of some cleanups became
mandatory.

As a gratis bonus, this patch also fixes some cases where the stereo
channels are used wrongly for mono amps.

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


# ba811127 06-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Manage mixer controls in out_path list

As we parse the output paths more precisely now, we can use this path
list for parsing the widgets for volume and mute mixer controls.
The spec->vol_ctls[] and sw_ctls[] bitmasks are replaced with the
ctls[] in each output path instance.

Interestingly, this move alone automagically fixes some bugs that the
conflicting volume or mute NIDs weren't properly detected.
Also, by parsing the whole path, there are more chances to get a free
widget for volume/mute controls.

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


# 30dcd3b4 06-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add output path parser

Add the output path parser to Realtek codec driver as we already have
in patch_via.c. The nid_path struct represents the complete output
path from a DAC to a pin. The alc_spec contains an array of these
paths, and a new path is added at each time when a new DAC is
assigned.

So far, this path list is used only in limited codes: namely in this
patch, only alc_is_dac_already_used() checks the list instead of dac
arrays in all possible outputs. In the later development, the path
list will be referred from more places, such as the mixer control
assignment / check, the mute/unmute of active routes, etc.

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


# 463419de 05-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - List up all available DACs

In the probing phase, create a list of all available DACs in the codec
and use it for checking the single DAC connections.
This list will be used in more other places in the later commits, too.

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


# 6a84c305 05-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Simplify alc_auto_is_dac_reachable()

Use the helper function snd_hda_get_conn_index() instead of open
codes. This also improves the detection of some routes to DAC on
ALC260 (although the difference doesn't influence on the end
results of the mapping).

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


# 065380f0 10-Jan-2013 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of new codec ALC284

Added the support for a new codec ALC284, which is compatible with
ALC269. Also add more codec variants to handle the SSID check
properly.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6d3cd5d4 06-Jan-2013 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)

The mute LED is in this case connected to the Mic1 VREF.

The machine also exposes the following string in BIOS:
"HP_Mute_LED_0_A", so if more machines are coming, it probably
makes sense to try to do something more generic, like for the
IDT codec.

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


# b78562b1 17-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup

The workaround to force VREF50 for dallas/hp model with ALC861VD
was introduced in commit 8fdcb6fe4204bdb4c6991652717ab5063751414e,
but it contained wrong pincap override bits.

This patch fixes to exclude VREF80 pincap bit correctly.

Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1098b7c2 17-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs

It turned out that Realtek codecs (ALC260, etc) with input amps in
audio-input widgets don't handle the multiple individual input amps.
Thus we need to set codec->single_adc_amp flag for them in general.

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


# b6adb57d 03-Dec-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Keep the channel count for multiple speakers

The current Realtek driver reconfigures the max PCM channels
dynamically according to the value of Channel Mode enum if the
multi-io retasking is available. It works fine for multi-io pins.
But when multiple speaker pins are available, the channels of speakers
also have to obey to the channel mode, which isn't nice.
(That is, when you select "2ch" in Channel Mode so that the line-in
and mic jack behave as input, you can't play surrounds properly from
the built-in speaker.)

This patch fixes the problem by taking the channel number for multiple
speakers into account in the channel-mode setup code.
Also it fixes the wrongly set up max_channels value in the case of
multi-io extension.

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>


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

ALSA: hda - Pass errors properly in alc_auto_check_switches()

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


# 668d1e96 29-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Refactor alc_kcontrol_new() usages

Allocate the name string and assign the structure in
alc_kcontrol_new() itself to reduce the code.

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


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

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

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

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

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


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

ALSA: hda - Remove shutup calls in free callbacks

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

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


# af02dde8 21-Nov-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add support for Realtek ALC292

We found a new codec ID 292, and that just a simple quirk would enable
sound output/input on this ALC292 chip.

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


# 08a978db 18-Nov-2012 Dylan Reid <dgreid@chromium.org>

ALSA: hda - Fix Acer Aspire models with analog mics.

The Acer Aspire AO756 has an analog built-in mic on nid 0x1b and an
external mic on nid 0x19. The BIOS doesn't set this up.

The mic detect on this Acer Aspire netbook and Acer C7 ChromeBook is
only valid when the headphone is plugged. The detect circuit relies on
the tip detect switch being closed on the jack. Tell hda_jack to ignore
the mic sense unless the headphones are plugged.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 05193639 12-Nov-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a missing quirk entry for iMac 9,1

This is another variant of iMac 9,1 with a different codec SSID.

Reported-and-tested-by: Everaldo Canuto <everaldo.canuto@gmail.com>
Cc: <stable@vger.kernel.org> [v3.3+]
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>


# 19a62823 08-Nov-2012 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1387e2d1 08-Nov-2012 Kailang Yang <kailang@realtek.com>

ALSA: hda - Improve HP depop when system enter to S3

alc269_toggle_power_output() was only use in ALC269VB. I rename it to
alc269vb_toggle_power_output().

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb766404 20-Oct-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent headphone output from Toshiba P200

By some reason, Toshiba laptop doesn't like the EAPD turned up for the
headphone pin. Add a fix up code to force to turn down EAPD for NID
0x15.

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

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


# 84f98fdf 19-Oct-2012 Stefán Freyr <stefan.freyr@gmail.com>

ALSA: hda - add dock support for Thinkpad T430

I have a Lenovo ThinkPad T430 and an UltraBase Series 3 docking
station.

Without this patch, if I plug my headphones into the jack on the
computer, everything works fine. The computer speakers mute and the
audio is played in the headphones. However, if I plug into the docking
station headphone jack the computer speakers are muted but there is no
audio in the headphones.

Addresses https://bugs.launchpad.net/bugs/1060372

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 71aa5ebe 16-Oct-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Always check array bounds in alc_get_line_out_pfx

Even when CONFIG_SND_DEBUG is not enabled, we don't want to
return an arbitrary memory location when the channel count is
larger than we expected.

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


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

ALSA: hda - Add workaround for conflicting IEC958 controls

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

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

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


# f7f4b232 10-Oct-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - do not detect jack on internal speakers for Realtek

This caused the internal speaker to mute itself because it was
present, which happened after powersave.
It was found on Dell XPS 15 (L502x), ALC665.

Reported-by: Da Fox <da.fox.mail@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7110005e 10-Oct-2012 Duncan Roe <duncan_roe@acslink.net.au>

ALSA: hda - Fix missing beep on ASUS X43U notebook

Signed-off-by: Duncan Roe <duncan_roe@acslink.net.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ff34ad8 06-Oct-2012 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add new codec ALC283 ALC290 support

These are compatible with standard ALC269 parser.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9f720bb9 27-Sep-2012 Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>

ALSA: hda/realtek - Fix detection of ALC271X codec

In commit af741c1 ("ALSA: hda/realtek - Call alc_auto_parse_customize_define()
always after fixup"), alc_auto_parse_customize_define was moved after
detection of ALC271X.

The problem is that detection of ALC271X relies on spec->cdefine.platform_type,
and it's set on alc_auto_parse_customize_define.

Move the alc_auto_parse_customize_define and its required fixup setup
before the block doing the ALC271X and other codec setup.

BugLink: https://bugs.launchpad.net/bugs/1006690
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Reviewed-by: David Henningsson <david.henningsson@canonical.com>
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>


# 148728f1 21-Sep-2012 Oleksij Rempel <linux@rempel-privat.de>

ALSA: hda - Add external mic quirk for Asus Zenbook UX31A

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Add standard channel maps

Although HD-audio allows pair-wise channel configurations, only the
fixed channel positions are used in this version. In future, this can
be changed and allow user to modify the channel positions.

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>


# 012e7eb1 08-Aug-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad

The same ID is twice in the quirk table, so the second one is not used.

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


# c8415a48 06-Aug-2012 Felix Kaechele <felix@fetzig.org>

ALSA: hda - add dock support for Thinkpad X230

As with the ThinkPad Models X230 Tablet and T530 the X230 needs a qurik to
correctly set up the pins for the dock port.

Signed-off-by: Felix Kaechele <felix@fetzig.org>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4407be6b 06-Aug-2012 Philipp A. Mohrenweiser <phiamo@googlemail.com>

ALSA: hda - add dock support for Thinkpad T430s

Add a model/fixup string "lenovo-dock", for Thinkpad T430s, to allow
sound in docking station.

Tested on Lenovo T430s with ThinkPad Mini Dock Plus Series 3

Cc: stable@kernel.org
Signed-off-by: Philipp A. Mohrenweiser <phiamo@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 707fba3f 02-Aug-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support dock on Lenovo Thinkpad T530 with ALC269VC

Lenovo Thinkpad T530 with ALC269VC codec has a dock port but BIOS
doesn't set up the pins properly. Enable the pins as well as on
Thinkpad X230 Tablet.

Reported-and-tested-by: Mario <anyc@hadiko.de>
Cc: <stable@vger.kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e427c237 29-Jul-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Workaround for silent output on VAIO Z with ALC889

On recent kernels, Realtek codec parser tries to optimize the routing
aggressively and take the headphone output as primary at first. This
caused a regression on VAIO Z with ALC889, the silent output from the
speaker.

The problem seems that the speaker pin must be connected to the first
DAC (0x02) on this machine by some reason although the codec itself
advertises the flexible routing with any DACs.

This patch adds a fix-up for choosing the speaker pin as the primary
so that the right DAC is assigned on this device.

Reported-and-tested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 108cc108 20-Jul-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - add dock support for Thinkpad X230 Tablet

Also add a model/fixup string "lenovo-dock", so that other Thinkpad
users will be able to test this fixup easily, to see if it enables
dock I/O for them as well.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1026953
Tested-by: John McCarron <john.mccarron@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4e01ec63 17-Jul-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add support for Realtek ALC282

This codec has a separate dmic path (separate dmic only ADC),
and thus it looks mostly like ALC275.

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


# a7a0a64d 04-Jul-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Always call standard unsolicited event for Realtek codecs

With the model parsers out of the way, we have no custom unsol
events to worry about, we can therefore simplify the code.

In addition, this fixes a bug on the ASUS TC710, which has only
a headphone jack and a mic jack, but no internal mic or speakers.
Therefore the unsol_event pointer was not set, and as a result,
the jack kcontrols were not correctly updated.

BugLink: https://bugs.launchpad.net/bugs/1021192
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>


# 8663ff75 29-Jun-2012 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix no sound from ALC662 after Windows reboot

Windows use hidden register to control EAPD.
Linux use verb to control EAPD.
If windows reboot to Linux, it must change the EAPD control to verb
control.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5780b627 27-Jun-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - give 3-pin jack the name "Headphone Mic Jack"

This 3-pin jack was labeled "Headphone Jack", but it could also be
used as a mic jack just by switching "Input Source". Therefore we need
to call the jack something else, to make sure PulseAudio can use the
speaker together with the external mic. (PulseAudio might mute the
speaker if it detects a headphone being plugged in.)

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


# 00227f15 27-Jun-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Support single 3-pin jack without VREF on the actual pin

Some ASUS device has a single 3-pin jack that can either be a mic or
a headphone, but the pin does not have VREF capabilities. We've been
told by Realtek to instead enable VREF on pin 0x18 in that case.

BugLink: https://bugs.launchpad.net/bugs/1018262
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
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>


# befae82e 25-Jun-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add Realtek ALC280 codec support

This chip looks very similar to ALC269 and ALC27* variants. The bug reporter
has verified that sound was working after this patch had been applied.

Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1017017
Tested-by: Richard Crossley <richardcrossley@o2.co.uk>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e6656369 25-Jun-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove suprefluous EAPD init verbs for ALC660vd

The EAPD on nodes 0x14 and 0x15 are initialized in alc_auto_setup_eapd().

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


# 6e72aa5f 25-Jun-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add inv-dmic model to possible Realtek codecs

For convenience, add "inv-dmic" model string for enabling the inverted
internal mic workaround to possible Realtek codecs, so far,
ALC882-variants, ALC262, ALC268, ALC269-variants, and ALC662-variants.

Also, the model strings for hardware inv-dmic workarounds,
"alc269-dmic" and "alc271-dmic", are added for ALC269(VA) and ALC271
codecs as well.

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


# 693b613d 22-Jun-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add inverted mic quirks for Asus U41SV, Acer 1810TZ and AOD260

These machines have inverted phase on right channel for their
internal mics.

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


# 125821ae 22-Jun-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add the inverted digital mic workaround to Realtek codecs

Some laptops are equipped with ForteMedia digital mics that give the
differential input. With such devices, summing stereo streams into a
mono (like PulseAudio does) results in almost silence.

This patch provides a workaround for this bug by adding a new mixer
switch to turn on/off the right channel of digital mic, just like a
similar fix for Conexant codecs.

When the new switch "Inverted Internal Mic Capture Switch" is off and
the current input source is the digital mic, the right channel of the
recording stream is muted. When another input source is selected, the
right channel is restored.

Tested-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8e5a0509 21-Jun-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC272X codec detection

The codec ALC272X is a special codec for some Dell machines, and its
detection got broken in the recent kernel because SSID check (required
by ALC272X check) was moved to the later point. Now we need to move
this codec check to the right place, too.

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>


# edfe3bfc 12-Jun-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Pin fixup for Zotac Z68 motherboard

Pin 0x1b was connected to the front panel connector, which according to
the HDA standard should contain a mic and a headphone. In this case,
the headphone was listed as "line out" by BIOS.

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


# adcc70b2 25-May-2012 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Add new codec support for ALC269VD

Also fix some settings applied only for ALC269VB.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8a390576 20-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix unused variable compile warning

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


# 09cf03b8 19-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix possible races of accesses to connection list array

Like the previous fixes for cache hash accesses, a protection over
accesses to the widget connection list array must be provided.
Together with this action, remove snd_hda_get_conn_list() which can be
always race, and replace it with either snd_hda_get_num_conns() or
snd_hda_get_connections() calls.

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>


# 3de95173 07-May-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Call a common helper for alc_spec initialization

Just a clean up by calling the same helper function.

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


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

ALSA: hda/realtek - Call alc_auto_parse_customize_define() always after fixup

The call for alc_auto_parse_customize_define() must be done after the
fixup pre-probe initialization. Otherwise SKU_IGNORE fixup won't work
properly (e.g. HP RP5800 with ALC662 codec).

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


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

ALSA: hda/realtek - Add missing CD-input pin for MSI-7350 mobo

Reported-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda/realtek - Add a fixup for Acer Aspire 5739G

Acer Aspire 5739G requires the same fix-up for 4930G to support the
surround / bass speakers.

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

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>


# 5ac57550 20-Apr-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E

According to the reporter, external mic starts to work if the
laptop-dmic model is used. According to BIOS pin config, all
pins are consistent with the alc269vb_laptop_dmic fixup, except
for the external mic, which is not present.

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


# 118cb4a4 18-Apr-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix regression on Quanta/Gericom KN1

Through the transition to the auto-parser, the support for
Quanta/Gericom KN1 got broken. There are two problems behind it:

- This machine doesn't like the default COEF setup for ALC260 we take
now as default

- BIOS doesn't set the pins correctly at all; especially the machine
uses only the pin 0x0f for both headphone and speaker

This patch adds the fixup as a workaround for these issues.

Reported-and-tested-by: Uros Vampl <mobile.leecher@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7d7eb9ea 12-Apr-2012 Jesper Juhl <jj@chaosbits.net>

ALSA: hda/realtek - Fix mem leak (and rid us of trailing whitespace).

In sound/pci/hda/patch_realtek.c::alc_auto_fill_dac_nids(), in the
'for (;;)' loop, if the 'badness' value returned from
fill_and_eval_dacs() is negative, then we'll return from the function
without freeing the memory we allocated for 'best_cfg', thus leaking.
Fix the leak by kfree()'ing the memory when badness is negative.

While I was there I also noticed some trailing whitespace in the
function that I removed (along with all other trailing whitespace in
the file) - it didn't seem worth-while to do that as two patches, so I
hope it's OK that I just did it all as one patch.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 29ebe402 12-Apr-2012 Josh Boyer <jwboyer@redhat.com>

ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines

A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine. Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option. All Mac machines are now explicitly
handled with a quirk and the auto-parser. This adds a quirk for the device
found on the Mac Pro 5,1 machines.

This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559

[sorted the new entry in the ID number order by tiwai]

Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fe97da1f 12-Apr-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G

It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.

Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 038d4fef 11-Apr-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co

Add GPIO1 setup explicitly for Acer Aspire 493x & co.
This could be set by alc_auto_init_amp(), but it's safer to set it
more explicitly in the fixup table.

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


# 912093bc 11-Apr-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add a few ALC882 model strings back

Since there are still many Acer models that might not be covered by
the current fixup table, let's add back a few typical model names so
that user can test the fixup without recompiling.

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


# 409a3e98 26-Mar-2012 Jonathan Woithe <jwoithe@just42.net>

Email/web address change

This patch updates Jonathan Woithe's contact details across the kernel tree.

Signed-off-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 26acaf08 22-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix ADC assignment with a shared HP/Mic pin

The recent Realtek driver tries to assign an extra input via the
headphone plug when only a single input source is found. The code
worked on Samsung Q1, but it broke ASUS 1015 where the mic is a
digital-mic and only a specific ADC works.

This patch fixes the assignment of ADC in the shared mic/hp case.
Instead of assuming the single ADC at first, reduce the ADCs after
trying to assign both mic and HP pins.

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

Cc: <stable@kernel.org>
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>


# 420b0feb 11-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rewrite the mute-LED control with vmaster hook for ALC269

We've had ugly static handling of the mute-LED with a powersave hook
for ALC269 HP laptops just like done in patch_sigmatel.c. This is now
rewritten with the new vmaster hook and a fixup code.

For that, the new fixup action, ALC_FIXUP_ACT_BUILD, is introduced.
It's called after build_controls is called. The reason of this new
action is that vmaster hook must be added at this stage (not in init
or probe).

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


# 546bb678 07-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Reuse init_hook for ALC269VB coef setup

Move the currently unused spec->init_hook at the beginning of the init
sequence so that the recently added ALC269VB coef setup can be put
there. The alc_init() is again clean without an ugly check.

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


# 526af6eb 07-Mar-2012 Kailang Yang <kailang@realtek.com>

ALSA: hda/realtek - Apply the coef-setup only to ALC269VB

The coef setup in alc269_fill_coef() was designed only for ALC269VB
model, and this has some bad effects for other ALC269 variants, such
as turning off the external mic input. Apply it only to ALC269VB.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 78f8baf1 06-Mar-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add Gigabyte GA-MA790X to the beep whitelist

Its BIOS suppresses the PC beep although it's implemented.

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


# 8f239214 05-Mar-2012 Marton Balint <cus@passwd.hu>

ALSA: hda - add quirk to detect CD input on Gigabyte EP45-DS3

My CD input got lost in commit 68ef0561efe494143516df38c03a16b837b8e79c.
Raymond helped me to add the necessary pin fixup to make it appear again. In
fact, this is basically his patch. It fixes alsa bug #5541.

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e21af485 05-Mar-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - fix broken automute/autoswitch for Realtek

The recent addition of volume-knob widget in the auto-parser broke
automute/autoswitch for some Realtek devices.

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


# 068b9394 25-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix resume of multiple input sources

When there are multiple input sources, the driver wrongly overwrites with
the value of the last input source on other slots at resume. Thus the
primary input source may be shown wrongly.

Reported-and-tested-by: Julian Sikorski <belegdol@gmail.com>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 070cff4c 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Small code cleanups

A few clean-ups for post-static-quirk time:
- Call alc_auto_init_std() statically in alc_init() instead of setting
spec->init_hook in each caller. spec->init_hook field is left
unused for any future use.

- Move the call of set_capture_mixer() to to alc_parse_auto_config()
instead of each caller.

- Get rid of the ADC-filling and imux check in each parser function.
This is no longer needed since the auto-parser always check ADCs and
imux. It was only for the static quirks.

- Kill unused defines

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


# f568291e 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix the wrong offset for two-speaker systems

When the machine has two speakers but wants to put more multi-io
jacks, the parser shouldn't consider about the shared DAC but try to
assign the individual DACs. Otherwise the channel mapping would be
fairly confused and lead to the wrong DACs.

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


# 689cabf6 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix the possible conflicts of Bass Speaker name

When the multi-io is added to the two speaker output configuration,
the parser would try to add yet another "Bass Speaker" control since
it checks only cfg->line_outs. Add a workaround for it by simply
passing the channel name in the case of multi-io outputs.

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


# c96f0bf4 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Create individual mute switches for shared DAC

Even if the outputs are using shared DACs, we can still create individual
mute siwtches since they are assigned per pin. This allows to create,
e.g. Speaker and Bass Speaker mute switches while the single volume is
used for these outputs.

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


# 5803a326 21-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix possible Oops with NULL input_mux

When BIOS is damn crazy and gives no pin-config at all, the driver might
lead to a NULL dereference. Let's add a NULL check for such a case.

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


# 164f73ee 21-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Parse aa-loopback items dynamically

Similarly in patch_via.c, parse the active analog-loopback connections
and create a list dynamically rather than static arrays.

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


# 1a97b7f2 21-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Remove the last static quirks for ALC882

Resitance is futile. The remaining static model quirks for Apple
machines with ALC882-compatible codecs are converted to the auto-parser
now. We can remove all alc*_quirks.c finally.

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


# 9155f82a 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add model=fixup not to apply fix-ups

If anyone wants to debug the driver and avoid the existing fix-ups,
pass model=nofixup option. Then the driver will skip to pick up the
fixup list.

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


# 67b6ec31 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop all ALC880 static quirks

Finally the all static quirks for ALC880 are converted to the
auto-parser. Since we are never sure whether the BIOS on so many old
machines are really correct, the quirk table entries are copied as
they are, but just providing the proper pin-config values
accordingly.

Since alc880_quirks.c is removed, alc882_quirks.c has to be adjusted
slightly to be built again. There might be some compile warnings due
to the remaining alc882 quirks, but these shall be killed sooner or
later, I don't care it much at this point.

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


# 29e3fdcc 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop model=asus* from ALC880

It turned out that BIOS on most of ASUS mobo's set the pin-config tables
reasonably well for the auto-parser. We'd need GPIO setups, but should
work as is other than that.

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


# 411225a0 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=asus-w1v with auto-parser

ASUS W1V has a sane pin-config table set by BIOS. The only missing piece
is the setup of GPIO1.

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


# 96e225f6 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=z71v with auto-parser

ASUS Z71V has a totally broken BIOS setup (at least the info I got),
thus we need to override the whole pin-config table to make the
auto-parser working correctly.

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


# 967b88c4 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=uniwill-dig with auto-parser

ALC880 model=uniwill-dig requires the fix-up of bogus BIOS pin default
configurations. Other than that, it's pretty normal.

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


# 817de92f 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=uniwill with auto-parser

The model=uniwill would work almost as is, but a couple of adjustments
are needed to make the mutli-io working correctly. The headphone and
speaker pins have to be marked properly in pin configs.

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


# 7833c7e8 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=uniwill-p53 with auto-parser

Uniwill p53 has a sane BIOS setup but just needs the volume-knob handling
like Fujitsu laptops with ALC880.

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


# ba533818 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=F1734 with auto-parser

Similar as the previous patch for model=fujitsu, we can now move the
static quirk for F1734 to the auto-parser. The only difference is the
default pin configurations: F1734 has less pins than Amilo's.

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


# cf5a2279 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=futjisu with auto-parser

Now adding the support for the volume-knob widget, we can move the static
quirk for ALC880 model=fujitsu to the auto-parser completely.

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


# 589876e2 20-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Apply probe-fixup really after probing

Move the call of alc_apply_fixup() with ALC_FIXUP_ACT_PROBE after the
whole setups of patch_ops & co, so that the fix-up function may override
the default setup. This will be needed for installing the own unsol
event handler (e.g. for volume-knob controls).

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


# b9368f5c 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Replace ALC880 model=tcl with auto-parser

It needs a few extra setups for EAPD, but others look fairly
straightforward.

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


# 27e917f8 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop ALC880 model=clevo

Clevo machines with ALC880 are all well with proper BIOS setup.
It seems still requiring the additional COEF setup for the EAPD.

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


# dc31b58d 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Refactor the DAC filler function

Refactor the DAC filling function to be used for both the primary
line outputs and extra outputs using the individual badness tables.

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


# f02aab5d 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=w810 with auto-parser

The Medion W810 with ALC880 has a typical BIOS bug, copying the
pin-defaults without disabling the unused pins. At least, the pin
0x17 must be disabled. Also, it requires GPIO-2 setup.

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


# dc6af52d 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC880 model=lg with the auto-parser

ALC880 model=lg could work fine with the auto-parser due to the recent
rewrite, but it still needs the manual adjustment; namely, the BIOS leaves
unused pins as some real active jacks. This confuses the parser.
Thus we just cover these pins and override the pin-configs as a fix-up.

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


# 276dd70b 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Adjust badness calculation for multi-ios

Try harder to fit the multi-io pins also by checking the hard-wired
connections for multi-ios. Also, the badness values are adjusted to
prioritize the multi-ios as more valuable. These changes will enable
the multi-io on some machines without losing the current capability.

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


# 6f453040 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Show multi-io pins in debug prints

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


# ef8d60fb 17-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix surround output regression on Acer Aspire 5935

The previous fix for the speaker on Acer Aspire 59135 introduced
another problem for surround outputs. It changed the connections on
the line-in/mic pins for limiting the routes, but it left the modified
connections. Thus wrong connection indices were written when set to
4ch or 6ch mode.

This patch fixes it by restoring the right connections just after
parsing the tree but before the initialization.

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

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 185d99f1 16-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Try harder to fit the single-connections

So far, the Realtek driver tires to assign the single-connected routes
for all pins only once at the beginning. However, since some DACs have
been already mapped, the rest pins might have also single conections.

In this patch, the driver does the single-connection assignment in a
loop until all possbile single-connections are checked. This will
improve the DAC assignment, e.g. for ASUS G72.

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


# 1c4a54b4 16-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Finer tuning of auto-parser with badness evaluation

This patch improves the Realtek auto-parser for assigning the DACs and
mixers in more suitable ways by evaluating the assignment with "badness"
calculations.

When assigning a DAC hinders the assignment of individual DACs for
other pins, some badness point is given. Similarly, when it blocks the
assignment of unique mixer controls, another badness point is added.
Also, if no DAC, even shared DAC, can be assigned, more badness is
pointed. Finally, comparing the accumulated badness, the best route is
chosen among several trials.

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


# 140547ef 16-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Improve the signel-connection check

When the connections from the pin selector contain only two
widgets, a route to DAC and the aa-mixer, it's certainly a
single connection. In such a case, get_dac_if_single() should
return the connected DAC, too.

This will improve the detection of the individual DAC
assignment for each pin.

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


# c14c95f6 16-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix overflow of vol/sw check bitmap

The bitmap introduced in the commit [527e4d73: ALSA: hda/realtek - Fix
missing volume controls with ALC260] is too narrow for some codecs,
which may have more NIDs than 0x20, thus it may overflow the bitmap
array on them.

Just double the number to cover all and also add a sanity-check code
to be safer.

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a7f3eedc 16-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Disable static fixups for ASUS with ALC269

We've enabled the static fixups for ASUS machines with ALC269 codec,
just for making things compatible during the transition to the auto-
parser. However, it seems that the static configurations do more harmful
than good, as some of entries don't match with the actual hardware setups.

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


# c3c2c9e7 15-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Remove leftover static quirks for ALC260

Now we can clean up all static quirks for ALC260.
Also many codes in alc_quirks.c can be ripped off since they have been
used only by ALC260 static quirks.

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


# b1f58085 15-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop model=favorit100 for ALC260

It's working with the auto-parser just with the standard GPIO 1 setup.

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


# 0a1c4fa2 15-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add the support for HP Presario B1900

HP Presario B1900 needs a similar hack like Replacer, toggling GPIO1
per the jack state, in addition to the COEF setup used for other Acer
laptops.

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


# 20f7d928 15-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Replace ALC260 model=replacer with the auto-parser

The support for Replacer 627V in the auto-parser needs the unique unsol
event handling: although the machine has a single output pin 0x0f, it's
used for both the headphone and the speaker, and the driver needs to
toggle the output route via GPIO 1.

In addition, it needs a special COEF setup with 0x3050.

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


# 15317ab2 15-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Replace ALC260 model=acer with the auto-parser

The ALC260 model=acer needs GPIO1 setup. It could be selected well
if the codec SSID is set properly by BIOS, but to make sure, enable it
forcibly.

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


# ca8f0424 16-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add the fixup codes for ALC260 model=will

The model=will for ALC260 requires the pin 0x0f to be a headphone and
some special verbs for the COEF to turn on the amp. Now added these as
fixup entries and removed the static model quirk.

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


# 02a237b2 13-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent speaker output on Acer Aspire 6935

Since 3.2 kernel, the driver starts trying to assign the multi-io DACs
before the speaker, thus it assigns DAC2/3 for multi-io and DAC4 for
the speaker for a standard laptop setup like a HP, a speaker, a mic-in
and a line-in. However, on Acer Aspire 6935, it seems that the
speaker pin 0x14 must be connected with either DAC1 or 2; otherwise it
results in silence by some reason, although the codec itself allows
the routing to DAC3/4.

As a workaround, the connection list of each pin is reduced to be
mapped to either only DAC1/2 or DAC3/4, so that the compatible
assignment as in kernel 3.1 is achieved.

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

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1565cc35 12-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add another jack-detection suppression for ASUS ALC892

Add the jack-detect suppression for an ASUS machine with ALC892 codec.

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

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


# e652f4c8 13-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Suppress auto-mute feature on some machines with ALC861

A few machines with ALC861 & co are reported not to work properly with
the auto-mute feature in software. The auto-mute feature is implemented
in the hardware level, and the jack-detection never works with them.

Also, rename the fixup index as ALC861_FIXUP_* to follow the standard.

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


# 416846d2 07-Feb-2012 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - add support for Uniwill ECS M31EI notebook

This hardware requires same fixup for the node 0x0f like Asus A6Rp.
More information: https://bugzilla.redhat.com/show_bug.cgi?id=785417

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


# eedec3d3 06-Feb-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix a wrong condition

sparse complains that "spec->multiout.dac_nids" is a pointer.

sound/pci/hda/patch_realtek.c:2321:37: error: incompatible types for operation (>)
sound/pci/hda/patch_realtek.c:2321:37: left side has type unsigned short const [usertype] *dac_nids
sound/pci/hda/patch_realtek.c:2321:37: right side has type int

It was meant to be num_dacs instead of dac_nids.
Although the current code still works as expected (when num_dacs is zero,
dac_nids should be NULL, too), better to fix now, of course.

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


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

ALSA: hda - Add suffix argument to snd_hda_add_vmaster()

In most cases, the slave strings for vmaster are identical between
volumes and switches except for "xxx Volume" and "xxx Switch" suffix.
Now snd_hda_add_vmaster() takes the optional suffix argument so that
each string can be composed with the given suffix, and we can share the
slave name strings in both volume and switch calls nicely.

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


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

ALSA: hda/realtek - Add missing Bass and CLFE as vmaster slaves

The recent changes in Realtek auto-parser added the new "Bass Speaker"
and "CLFE" mixer elements which should be tracked as vmaster slaves,
too.

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

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


# 3422a470 31-Jan-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Remove quirk for Toshiba Qosmio G50

The user reports that model=auto works better than current handling
on a 3.2 based kernel (with jack detection patches backported).
Since model=auto is what we prefer these days anyway, the quirk
should be removed.

Alsa-info for the relevant machine:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/923316/+attachment/2702812/+files/alsa-info.txt.Pbfno2x7bp

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


# 31150f23 30-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply 0x0f-VREF fix to all ASUS laptops with ALC861/660

It turned out that other ASUS laptops require the similar fix to
enable the VREF on the pin 0x0f for the secret output amp, not only
ASUS A6Rp. Moreover, it's required even when the pin is being used
as the output. Thus, writing a fixed value doesn't work always.

This patch applies the VREF-fix for all ASUS laptops with ALC861/660
in a fixup function that checks the current value and turns on only
the VREF value no matter whether input or output direction is set.

The automute function is modified as well to keep the pin VREF upon
muting/unmuting via pin-control; otherwise the pin VREF is reset at
plugging/unplugging a jack.

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

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a389d67c 27-Jan-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Remove quirk for Asus N53Jq

The user reports that he needs to add model=auto for audio to
work properly. In fact, since node 0x15 is not even a pin node,
the existing fixup is definitely wrong. Relevant information can
be found in the buglink below.

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


# b3a81520 26-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent output on Haier W18 laptop

The very same problem is seen on Haier W18 laptop with ALC861 as seen
on ASUS A6Rp, which was fixed by the commit 3b25eb69.
Now we just need to add a new SSID entry pointing to the same fixup.

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

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3b25eb69 25-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent output on ASUS A6Rp

The refactoring of Realtek codec driver in 3.2 kernel caused a
regression for ASUS A6Rp laptop; it doesn't give any output.
The reason was that this machine has a secret master mute (or EAPD)
control via NID 0x0f VREF. Setting VREF50 on this node makes the
sound working again.

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

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb0cdebb 19-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix a unused variable warning

Just overlooked.

sound/pci/hda/patch_realtek.c: In function ‘alc_sku_unsol_event’:
sound/pci/hda/patch_realtek.c:643:19: warning: unused variable ‘spec’ [-Wunused-variable]

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


# a7309792 19-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Remove use_jack_tbl field

Now that all quirks have the own unsol handlers, we don't need to check
use_jack_tbl flag any more. Let's kill it.

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


# f21d78e2 18-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Avoid conflict of unsol-events with static quirks

The recently added jack-kctl support sets the unsol event tags
dynamically, while static quirks usually set the fixed tags in the
init_verbs array. Due to this conflict, the own unsol event handler
can't retrieve the tag and handle it properly any more.

For fixing this, avoid calling snd_hda_jack_add_kctls() for static
quirks, and always let them use own handlers instead of the standard
one for the auto-pareser.

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


# b90bf1de 19-Jan-2012 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Avoid multi-ios conflicting with multi-speakers

When a machine has multiple speakers, we don't need to create the
controls for multi-ios. Check the number of primary outputs beforehand.

Note that this workaround might not work always with new codecs in
future; this assumes that both speakers and multi-io jacks share the
same mixers/DACs. If they are routed with different mixers, the
individual mixer controls should be needed. But, so far, this doesn't
happen with the existing ALC codecs.

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


# 2267ea97 03-Jan-2012 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix typo for ALC269VB_FIXUP_DMIC

This fixup is not actually used, so in practice this is just a
cosmetic fix.

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


# fde48a1f 09-Dec-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Realtek: Take vmaster dac from multiout dac list

With the auto-parser we can choose the dac nid for vmaster from
the DACs we already know, instead of hard-coding it. This is more
future-proof and was actually wrong on one machine.

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


# 0a34b42b 07-Dec-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix lost speaker volume controls

When there are the same or more number of HP pins are available, HP pins
are used as the primary outputs instead of the speaker pins. But, in
some cases (especially with ALC663 & co), some DACs are available only
with a later pin and it's assigned to a speaker, and since the driver
parses the pins from the lower NID, such a DAC was skipped eventually
without assignments. This resulted in a regression, the missing speaker
volume control in the new parser.

As a workaround for this, now the driver retries the pin->DAC mapping
again after restoring the speaker-pins as primary. This is still an ad
hoc fix, but it works so far for most of Realtek codecs.

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


# fbabc246 07-Dec-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Create "Bass Speaker" for two speaker pins

On systems with two speaker pins, the secondary speaker pin is mostly
assigned to a bass speaker instead of a surround. Thus it makes more
sense to rename the control properly.

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


# 766ddee6 07-Dec-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Don't create extra controls with channel suffix

The multiple headphone or speaker pins are usually provided to
output the same stream unlike line-out jacks (which are supposed
to be multi-channel surrounds). Thus giving a mixer name like
"Headphone Surround" is rather confusing. Instead, when multiple
headphone volumes are available, use index with the same "Headphone"
name.

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


# cce4aa37 02-Dec-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix Oops in alc_mux_select()

When no imux is available (e.g. a single capture source),
alc_auto_init_input_src() may trigger an Oops due to the access to -1.
Add a proper zero-check to avoid it.

Cc: <stable@kernel.org>
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>


# 61071594 22-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Minor cleanup

Use an inline function for the common pattern for assigning a capsrc.

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


# 6759dc32 22-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix missing inits of item indices for auto-mic

When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(),
the initialization of index field is missing. It may work without it
casually when the original imux was created by the auto-parser, but
it's definitely broken in the case of static configs where no imux was
parsed beforehand. Because of this, the auto-mic switching doesn't
work properly on some model options.

This patch adds the missing initialization of index field.

Reported-by: Dmitry Nezhevenko <dion@inhex.net>
Cc: <stable@kernel.org> [v3.1]
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>


# ee3b2969 15-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Move ALC880 model=medion-rim to auto-parser

Translate ALC880 medion-rim static configs to the auto-parser with the
additional GPIO2 verb and COEF setup.

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


# 5671087f 14-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Move ALC885 macpro and imac24 models to auto-parser

The ALC882 macpro and imac24 static configs can be transferred to the
auto-parser with the additional GPIO setup.

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


# b2539699 14-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Re-add the model string selection for ALC88x

In the commit [c3e837bb: ALSA: hda/realtek - Rewrite ALC882 acer-aspire-*
models with the auto-parser], the check of the model option got removed
mistakenly. Re-added the board_config check again.

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


# e29d3778 14-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Create mono volume controls for mono-outputs

When the pin or the DAC doesn't support the stereo, create a mono
control instead of creating a stereo control blindly.

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


# e53de8f0 13-Nov-2011 Jesper Juhl <jj@chaosbits.net>

ALSA: hda/realtek: remove redundant semicolon

Having just one semicolon after a break statement is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3e837bb 10-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC882 acer-aspire-* models with the auto-parser

Now we can move the big acer-aspire-* static quirks to the auto-paresr
with some additional pin-configs and verbs.

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


# 07b18f69 10-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Create multi-io jacks more aggresively

So far the driver creates the multi-io jacks only when a single output
jack, i.e. no multiple speakers are assigned. This patch adds the
similar multi-io detection even with multiple speakers are assigned
primarily, so that 5.1-speakers + HP/mic/LI combination can work.

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


# 68ef0561 09-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop ALC882 desktop model quirks

Now we're touching the desktop static configs for ALC88x codecs.
These are mostly OK with the auto-parser, but some models need careful
handling; ALC889 intel mobo requires the COEF setup, and W2JC needs
GPIO1 and COEF.

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


# eb844d51 09-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Remove ALC882 targa-* models

All ALC882 targa-* models can be replaced with the auto-parser just
with the additional GPIO3 setup. And it's generically applied to all
MSI boards unless other quirks are present.

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


# ac9b1cdd 09-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Reorder alc882_fixup_tbl[]

No, I'm not Mr. Monk, but can't resist...

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


# 8812c4f9 09-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Move ALC882 model=acer-aspire to auto-parser

The ALC882 model=acer-aspire requires the additional COEF setup.

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


# 7a6069bf 09-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Replace ALC882 arima, medion and laptop-eapd quirks

Move these quitks to the auto-parser. They just need some EAPD setups
in addition.

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


# 177943a3 08-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop ALC882 asus-a7j and asus-a7m models

These models work fine with the auto-parser with the additional COEF
setup. The iMac 7,1 (106b:3200) also uses the same quirk, so remove it
too.

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


# 596830ee 09-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Look through codec SSID for fix-up lists

Not only PCI SSIDs but also look through codec SSIDs for fix-up table
entries. MacBook tend to give the same PCI SSID but unique codec SSIDs.

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


# 0e7cc2e7 08-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Move ALC888 ASUS EEE1601 config to auto-parser

The ASUS EEE1601 works almost fine with the auto-parser but the static
configuration has a certain specific COEF verb. Add this to the fix-up
list so that we can drop the whole EEE1601 static config from
alc882_quirks.c.

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


# 5c0ebfbe 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Rewrite ALC882 model=vaio-tt with auto-parser

Providing a pincfg fix for VAIO-TT with ALC889 codec to work with the
auto-parser, and drop the static configuration.

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


# 42399f7a 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Remove all ALC262-quirk codes

Now that model=ultra is supported well by the auto-parser, we can get rid
of the whole alc262_quirks.c and its related codes.

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


# 24de183e 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Add the support of shared HP/Mic

A machine like Q1-ultra which has only a single HP but no mic-jack, we
can re-task the headhpone as an external mic jack. This was done formerly
in ALC262 model=ultra quirk, and now the auto-parser supports this mode.

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


# 82e14a47 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Drop ALC262 model=basic static configs

Now most of ALC262 stuff has been moved to the auto-parser, and no longer
need for keeping model=basic.

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


# 3dcd3be3 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Convert ALC262 model=fujitsu to auto-parser

It works well with the auto-parse and the default BIOS setup when an
additional COEF setup (for benq) is used.

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


# b42590b8 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Convert ALC262 benq and benq-t31 to fixup-lists

The conversion from ALC262 model=benq and model=benq-t31 static configs
to auto-parser requires the manual COEF setups for corresponding models.

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


# c470150c 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Convert ALC262 lenovo-3000 quirks to fixup-list

The static quirks for ALC262 Lenovo 3000 can be covered by the auto-
parser with a fixup of the mic-pin to VREF50 and the additional COEF
verb.

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


# 12837c98 06-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Convert ALC262 model=toshiba-rx1 to a fixup-list

Use the auto-parser for ALC262 model=toshiba-rx1 with the fixed pin-
configs. The BIOS table seems incorrect, so many pin entries are
overwritten to match with the former quirk.

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


# ea4e7af1 06-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Convert alc262 model=tyan to a fixup-list

Use the auto-parser for ALC262 model=tyan with a pin-config fix-up and
drop the static configuration.

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


# dccc1810 07-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Mute unused capture sources for Realtek codecs

When a Realtek codec has a matrix-style capture-source selection, we
need to scan all connections instead of only imux items. Otherwise some
input might be kept unmuted. Although the corresponding input must be
dead so there should be no input from it, it's still safer to mute the
route completely.

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


# 43dea228 06-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix silent output regression with ALC861

The 3.1 kernel has a regression for ALC861 codec where no sound output
is heard with the default setup. It's because the amps in DACs aren't
properly unmuted while the output mixers are assigned only to pins.

This patch fixes the missing initialization of DACs when no mixer is
assigned to them.

Tested-by: Andrea Iob <andrea_iob@yahoo.it>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 51e4152a 03-Nov-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Skip invalid digital out pins

Some BIOS report invalid pins as digital output pins. The driver checks
the connection but it doesn't do it fully correctly, and it leaves some
undefined value as the audio-out widget, which makes the driver spewing
warnings. This patch fixes the issue.

Reference: https://bugzilla.novell.com/show_bug.cgi?id=727348

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


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

ALSA: hda - Remove unused variables

Just clean-up what GCC caught.

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


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

ALSA: hda/realtek - Don't create alt-stream for capture when unnecessary

When the driver finds multiple ADCs, it tries to create an alternative
capture PCM stream. However, these secondary ADCs might be useless or
in uncontrolled paths in some cases, e.g. when auto-mic or dynamic
ADC-switching is enabled. Also, when only a single capture source is
available, the multi-streams don't make sense, too.

With this patch, the driver checks such condition and skips the alt
stream appropriately.

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


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

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

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

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


# 527e4d73 27-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix missing volume controls with ALC260

ALC260 has multiple mixer widgets connected to the shared DAC, but the
driver currently doesn't check this possibility and ignores when the DAC
is shared with others. This resulted in the silent output from some
routes because of lack of the amp setup.

This patch adds the workaround for it by checking the route even with the
shared DAC, but also checking the conflict with the existing control for
the very same widget NID.

Reference: https://bugzilla.novell.com/show_bug.cgi?id=726812

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


# 5cdf745e 26-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix pin-config for ASUS W90V

The association numbers of surround/CLFE speaker pins aren't correctly
mapped by the auto-parser. This patch fixes the CLFE speaker pin to the
right assoc value (from 3 to 1).

Tested-by: Nika Topolchanskaya <nanodesuu@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc667a72 18-Oct-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add new revision for ALC662

The revision 0x100300 was found for ALC662. It seems to work well
with patch_alc662.

Cc: stable@kernel.org
BugLink: http://bugs.launchpad.net/bugs/877373
Tested-by: Shengyao Xue <Shengyao.xue@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 716eef03 21-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix DAC assignments of multiple speakers

When a device has multiple speakers and still has the auto-mute support,
the driver copies line_outs[] to speaker_outs[]. And then it tries to
assign DACs for both. This ended up with the assignment only to the
primary DAC to all speakers.

This patch fixes the situation by checking the duplicated LO/SPK case
appropriately.

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


# 1bb7e43e 17-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Cache COEF 0 value

The COEF #0 value represents a sort of device id, so it's supposedly
constant while operation. Better to use the cached value instead of
reading it at each time from the performance POV.

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


# e16fb6d1 17-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Clean up codec renames

Use a static table for detecting the codec renames.
Also clean up the error paths in each patch_*() function.

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


# 84db9150 17-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Use alc_codec_rename()

Replaced with alc_codec_rename() in all possible places.

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


# 801f49d3 17-Oct-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - ALC888S-VC remark to ALC886

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 20ca0c35 17-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Check the error from alc_codec_rename()

Should be a rare case, but...

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


# 636030e9 12-Oct-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fixup Realtek headphone pin initialization

This typo caused headphone pins not to be initialized correctly.

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


# 06503670 06-Oct-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Choose more cleverly the primary outputs

When the speaker outputs are more than the headphone outputs, it implies
that the system has surround speakers while the headphones are only for
monitoring the front. In such a case, it's better to put speakers as
the primary outputs so that the driver can build up and keep the
surround setup. Otherwise the system will pick up the headphone as
primary, and offers less channels than the speakers do support.

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


# e0d32e33 26-Sep-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Don't detect LO jack when identical with HP

The spec->autocfg.line_out_pins[] may contain the same pins as hp_pins[]
depending on the configuration. When they are identical, detecting the
line_jack_present flag screws up the auto-mute because alc_line_automute()
is called unconditionally at initialization while it won't be triggered
by unsol events, thus the old line_jack_present flag is kept for the
whole run.

For fixing this buggy behavior, the driver needs to check whether the
line-outs are really individual, and skip if same as headphone jacks.

Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104

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


# 5fe6e015 26-Sep-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Avoid bogus HP-pin assignment

When the headphone pin is assigned as primary output to line_out_pins[],
the automatic HP-pin assignment by ASSID must be suppressed. Otherwise
a wrong pin might be assigned to the headphone and breaks the auto-mute.

Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104

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


# 42cf0d01 19-Sep-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Refactor Realtek's automute

Increase readability and understandability in the automute code.

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


# 8974bd51 19-Sep-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda/realtek - Fix auto-mute with HP+LO configuration

When the system has only the headphone and the line-out jacks without
speakers, the current auto-mute code doesn't work. It's because the
spec->automute_lines flag is wrongly referred in update_speakers().
This flag must be meaningless when spec->automute_hp_lo isn't set, thus
they should be always coupled.

The patch fixes the problem and add a comment to indicate the
relationship briefly.

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

Reported-by: David Henningsson <david.henningsson@canonical.com>
Tested-By: Jayne Han <jayne.han@canonical.com>
Cc: stable@kernel.org (3.0)
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Remove the rest of ALC662 quirks

The rest of ALC662 quirks are only for desktops, and they should work
with the auto-parser.

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


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

ALSA: hda - Prefer multi-io to speakers for realtek auto-parser

When the multi-io jacks are available, parse them first and assign DACs
before parsing speakers and headphones. This allows a better chance of
surround I/O in some desktops and laptops with limited DACs.

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


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

ALSA: hda - Fix Center/LFE mixer element creations for Realtek

The commit 23c09b00900c3fa6672148738cad29d6fc6ded7c
ALSA: hda - Support multiple speakers by Realtek auto-parser
changes the return value from alc_get_line_out_pfx(), and it breaks
the center/LFE mixer split check. The caller must test with a string
"CLFE" now.

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


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

ALSA: hda - Rewrite ALC269 laptop-amic,dmic,&co quirks with fixups

Similarly like ALC662 asus-mode* models, rewrite the laptop-amic and
dmic models with the static pin-config tables.

Now we can get rid of all alc269_quirks.c.

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


# 53c334ad 23-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rewrite ALC662 asus-mode* models with fixups

Re-implement the asus-mode[1-8] quirks with the pin-config tables.
They are provided in case where BIOS is broken on the device, so it's
not enabled in PCI SSID lookup table. User needs to specify it via model
option explicitly if the driver doesn't work with the BIOS setup as is.

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


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

ALSA: hda - Support multiple headphones in Realtek auto-parser

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


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

ALSA: hda - Remove all ALC861 and ALC861-VD quirks

Let's remove the rest of ALC861 and ALC861-VD quirks.
If any breakage is found, it can be fixed easily via the pin-config
table update.

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


# 8fdcb6fe 23-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Restore VREF50 setup for ALC861-VD dallas/hp models

During the cleanup by commit 6727b12669f255dbf65b3d63c32cce1e3e967398,
the specific setups for dallas and hp models, using VREF50 for mic pins,
were lost. Fixed now.

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


# 8cd0775d 23-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initialization of multi-speaker output paths for Realtek

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


# 3c715a98 22-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Update jack-sense info even when no automute is set

The internal states, jack_present and line_jack_present should be
updated upon unsolicited events even if no automute is set.
Otherwise the wrong state is referred when the automute behavior is
changed by the mixer control.

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


# 675c1aa3 22-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix output-path initialization for Realtek auto-parser

When the headphone or speaker output has no own DAC, initialize the path
using the primary DAC. Otherwise the path won't be set properly and
can result in the silence.

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


# 23c09b00 19-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support multiple speakers by Realtek auto-parser

Add the support of multiple speakers by Realtek auto-parser.
When all speaker pins have individual DACs, create each speaker volume
control. Otherwise, create a bind-volume control for all speaker outs.

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


# 2996bdba 18-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove ALC662 eeepc-p701 and ecs models

These are confirmed to work with the auto-parser with pincfg fixups.

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


# 3fe45aea 18-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add "PCM" volume to vmaster slave list

The new parser may use "PCM" volume, but it was missing the vmaster
slave list, thus "Master" volume didn't control it.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=41342

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


# 6ebb8053 16-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove ALC268 model quirks

Get rid of the rest of ALC268 model quirks. They are all confirmed to
work with the auto-parser, too.

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


# 24519911 16-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Replace ALC269 quanta and lifebook models with fixups

Implement new fixup entries for Quanta FL1 and Fujitsu Lifebook
specific COEF and pin configurations. Removed the model entries
from alc269_quirks.c.

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


# 1ebec5f2 15-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove ALC680 model quirks

The auto-parser works fine.

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


# d8897da3 15-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove ALC268 Dell, Toshiba and Zapto model quirks

These models work fine with the BIOS auto-parser.

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


# adabb3ec 02-Aug-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix digital-mic mono recording on ASUS Eee PC

The digital-mic unit on ASUS Eee PC gives PDM signals instead of the
normal stereo PCM, thus you can't record a mono stream from the stereo
stream as is; the summed stereo signal results in almost zero level, and
you'll hear only soft noise.

As a workaround, use ALC269-specific COEF to manipulate the dmic route
for mono, like used for ALC271x. This is implemented as a fix-up, thus
it works only with model=auto or without REALTEK_QUIRKS Kconfig.

Reported-and-tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c48a8fb0 27-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix duplicated DAC assignments for Realtek

Copying hp_pins and speaker_pins from line_out_pins may confuse the
parser, and it can lead to duplicated initializations for the same pin
with a wrong DAC assignment. The problem appears in 3.0 kernel code.

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


# 60a6a842 27-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix Oops with Realtek quirks with NULL adc_nids

Somce quirk models don't set adc_nids but let the parser filling it.
But the recent code has unnecessary NULL-checks of spec->input_mux,
and it resulted in NULL dereferences.
This patch fixes that regression.

Reported-and-tested-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Make CONFIG_SND_HDA_POWER_SAVE depending on CONFIG_PM

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

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


# 8f398ae7 23-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix DAC filling for multi-connection pins in Realtek parser

Fix a regression in the DAC filling code in patch_realtek.c. The already
filled DACs in multiout.dac_nids[] were ignored because of num_dacs=0,
thus always pointed to the first DAC.

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


# 7b1655f5 14-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Re-add need_dac_fix check for multi-io jacks of Realtek codecs

During the rewrite, the check of spec->need_dac_fix and the corresponding
num_dacs change was dropped from the channel-mode control.

This patch re-adds it, and also enables need_dac_fix for ALC880 as default,
as this feature was originally introduced to fix h/w bugs of this chip.

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


# 017f2a10 09-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Implement 44kHz workaround for IdeadPad as fixup

Instead of checking the model quirk, use a fixup table for workaround
of 44kHz-fixed PCM for Lenovo IdeaPad with ALC269.

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


# abaead6a 09-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix a copmile warning

It's harmless but annyoing.
sound/pci/hda/patch_realtek.c: In function ‘alc_cap_getput_caller’:
sound/pci/hda/patch_realtek.c:2722:9: warning: ‘err’ may be used uninitialized in this function

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


# 3e6179b8 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge alc*_parse_auto_config() functions in patch_realtek.c

Now all alc*_parse_auto_config() do almost same thing except for the
NID list to ignore and the PINs for SSID-check, we can merge all these
to a single function. A good amount of code reduction.

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


# 8452a982 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge ALC260 auto-parser code

Finally the last one.

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


# 4c11398e 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge ALC269 parser code

One more code reduction. This codec has less DACs, thus the wiring
to DAC can't be filled uniquely for all output pins, i.e. some outputs
share the same volume control.
Except for that, all seems working fine.

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


# be9bc37b 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge ALC268/269 auto-parser codes

Now coming to ALC268/269 parser codes.

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


# 72dcd8e7 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge ALC861 auto-parser code

Merge more auto-parser code in patch_realtek.c, now for ALC861.
The topology of this codec is pretty simple, and can be parsed well
by the current starndard parser.

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


# 44c02400 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix amp-cap checks in patch_realtek.c

query_amp_caps() may return non-zero if the amp cap isn't supported
by the codec. Thus one needs to check widget-caps first, then check
the corresponding amp-caps.

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


# a1f649d5 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge ALC861-VD auto-parse to the standard parser

The existing standard auto-parser can work well with this codec, too.
Let's merge.

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


# 268ff6fb 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

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

A regression fix from commit 21268961d3d1bbdd22a19b68adb80119e8c72dcd
ALSA: hda - More flexible dynamic-ADC switching for Realtek codecs

The auto-mic wasn't detected properly when no ADC-switch is needed.

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


# e4770629 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Provide the standard auto_init for Realtek codecs

Remove redundant definitions. Ideally, all init functions should be
identical in future.

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


# afcd5515 08-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge ALC680 auto-parser to the standard parser

Improved the standard Realtek auto-parser to support the codec topology
like ALC680.

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


# e59ea3ed 29-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fix-up for HP RP5800

The BIOS provides bogus pin configs, and also invalid SSID.

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


# 1d045db9 07-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Split quirk codes from patch_realtek.c

Put the all static quirk codes out of patch_realtek.c, split into the
file for each codec model. For controlling the build of quirk codes,
a new Kconfig, CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS is introduced.
By setting this off, all quirk codes won't be built, thus you can save
lots of memory.

The codes in patch_realtek.c are also shuffled and more comments are
given, but the contents aren't changed. This is just a refactoring.

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


# 0e4a73ae 07-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use common paser for digital I/O for ALC260

Avoid open-codes.

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


# 21268961 07-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - More flexible dynamic-ADC switching for Realtek codecs

This patch changes the auto-parser and the auto-mic handling codes to
allow more flexible dynamic ADC-switching with Realtek codecs.

In the new code, the following strategy is taken:

- When a cap-src can't handle all input-sources, either skip it, or
switch to the ADC-switching mode. In ADC-switching mode, like the
former dual-ADC mode for ALC275, it changes ADC on the fly according
to the current input source.
- When auto-mic is possible, always assign imux. If the mic pins are
set statically via a quirk, rebuild imux according to the pins.
In the auto-mic mode, the driver always changes the imux (although
the imux isn't exposed as a mixer element).

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


# a926757f 07-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix warning with ALC882 digital-out detection

The digital out pin on ALC882 may have multiple connections.

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


# c2d986b0 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean-up PCM assignments in patch_realtek.c

Instead of assigning each default hda_pcm_stream pointers, do NULL-checks
and assign default values in alc_build_pcms().

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


# f970de25 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Unify alc*_auto_init_input_src() in patch_realtek.c

The only different implmentation was alc880_auto_init_input_src(),
and now it covers this variant, and we can use the single function
for all codecs.

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


# d6cc9fab 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Parse ADCs and CAPSRCs dynamically for Realtek auto-parser

Now with the new code for looking for ADCs and MUXs, we can replace
the whole ADC assignment with the parsed results.

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


# 0a7f5320 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Unify alc_auto_init_analog_input() calls

All alc*_auto_init_analog_input() calls are identical, so let's use
the same function more clearly without aliases.

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


# b7821709 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Parse ADCs in alc_auto_create_input_ctls()

Parse ADCs and cap-srcs in alc_auto_create_input_ctls() by itself
instead of passing explicitly from the caller. By this change, all
alc*_auto_create_input_ctls() can be unified to the same calls.

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


# 343a04be 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Code consolidation for ALC88x and ALC662 auto-parsers

Use the same common code for auto-parsing the output paths and their
initializations, based on the existing ALC662 code, which is smarter
than the old ALC880/2 code.

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


# 97aaab7b 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create bind-mutes appropriately for ALC662 auto-parser

When multiple inputs are present on the mixer widget (typically a DAC
and a loopback), mute/unmute both inputs with the corresponding mixer
element.

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


# cd511556 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Initialize DACs in ALC662 auto-parser mode

The initialization of DACs was missing in ALC662 parser code.

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


# bb8bf4d4 06-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Parse HP and speaker DACs even for multi connections for ALC662

In alc662_auto_fill_dac_nids(), the HP and speaker DACs aren't parsed
when the corresponding pins aren't fixed with single DACs.
Now check these DACs even for non-fixed pins.

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


# 9c7a083d 07-Jul-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Change all ADCs for dual-adc switching mode for Realtek

When the dual-adc switching mode is active in Realtek auto-parser,
we need to couple all ADCs as a single capture-volume. Currently, the
volume control changes only the first ADC, thus others may remain silent.
This patch fixes the problem.

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


# b6878571 06-Jul-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add Realtek ALC269VC codec support

Add the support of ALC269VC codec.
Also delete the unnecessary codec_variant type enum list:
now only three variants (ALC269VA ALC269VB ALC269VC) are needed.

In addition, added some aliases:
- Add ALC269VB alias name ALC277
- Add ALC269VC alias name ALC259 ALC281X
- Add ALC269VC for Lenovo device 0x21f3 name ALC3202

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 350434ee 30-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing initialization in alc662 auto-parser

A missing initialization resulted in wrong DAC assignments in
ALC662 (and other) auto-parsers.

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>


# 4f574b7b 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - More volume-init fixes for ALC267 codec

More similar fixes like previous commits: handle the exceptional case
like ALC267 where no volume amp is found in ADC widget but in the
capsrc widget instead.

Also minor checks for avoiding possible erros: no connection-select
when the pin has a single selection, and add beep verbs only when the
0x1d is used for beep.

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


# 7ec9c6cc 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix volume-init for ALC259 with invalid widget caps

ALC259 seems to provide an invalid widget capability for the input-src
selector widget. The widget shows the input-amp while it's a selector,
and this confuses the current ALC882 initialization code that is used
for ALC259, too. For fixing this, check the amp capability and handle
the connection selection individually.

Also, ALC259 has no mute bit in DAC volume, so we need to initialize
it as ZERO instead of MUTE.

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


# 050ea753 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix volume-init of ALC299 & co

ALC269 and compatible codecs have the output volume in DACs, thus we
can't use the ALC880's code as is. Fixed by checking the amp caps and
picking up the right widget for initialization.

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


# 39fa84e9 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Simplify EAPD control in patch_realtek.c

Look through the known NIDs that may have EAPD capabilities and turn
on/off them appropriately instead of checking the individual vendor ids.

This will also avoid the forgotten entries of newly added codec ids
in future.

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


# 6d86b4fb 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix auto-init of output volumes of Realtek codecs

Fix the regression introduced by the commit
1f0f4b8036b1fe1347cb4f1f199601b87de9be46
ALSA: hda - Reduce static init verbs for Realtek auto-parsers

The input amps of mixer widgets should be unmuted as default (as
usually they have no assigned mixer switches).

More fixes in this commit are, however, for ALC260: ALC260 codec can
have multiple output mixers connnected to a single DAC althouh the
driver didn't pick up them properly.

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


# 3af9ee6b 26-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check hard-wired DACs at first for ALC662 & co

Some Realtek codecs have the output pins hardwired with certain DACs.
These DACs have to be assigned at first and assign the rest for
multi-DAC pins so that all DACs can be assigned properly.

Without such an optimization, speaker outputs may be assigned to the
same DAC as the headphone or others.

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


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

ALSA: hda - Call proper DAC-filler function for Realtek auto-parser

In alc_auto_add_multi_channel_mode(), when the primary HP workaround
is enabled, it re-initializes the DAC list but calls alc662's function
in a fixed way. This isn't pretty suitable for other codecs, of course.

Now we call it with fill_dac function pointer so that the proper
function can be called at that point.

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


# 1f0f4b80 27-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reduce static init verbs for Realtek auto-parsers

Instead of using fixed init verbs, initialize DACs, ADCs and mixers
more dynamically for Realtek auto-parsers.

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


# 2e925dde 24-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use alc_get_pfx_name() for all Realtek codecs

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


# 6843ca16 24-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up multi-channel mixer name assignment in patch_realtek.c

Change alc_get_line_out_pfx() in patch_realtek.c to provide the channel
specific name and assign the index so that each caller doesn't have to
set the channel name by itself.

Also, check the multi-io case with the primary hp-out; for the multi-io
channels, assign the channel name instead of "Headphone" with indices.
This makes the mixer names more intuitive and reduces confusion.

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


# 3fccdfd8 24-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Allow multi-io with HP output for ALC662 & co

Even if the machine has no line-out but only HP-out, try to detect the
multi-io. It'll allow more possibilities for 5.1 outputs on laptops.

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


# d2a19da7 22-Jun-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Pinfix quirk for HP Z200 Workstation

BIOS lists the internal speaker as an internal line-out. Change to
internal speaker + model=auto for better auto-mute capabilities.

BugLink: http://bugs.launchpad.net/bugs/754964
Reported-by: Marc Legris <marc.legris@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c9337906 20-Jun-2011 Tony Vroon <tony@linx.net>

ALSA: hda - Remove ALC268 model override for CPR2000

The "diverse" Quanta ID 0x0763 is overridden to ALC268_ACER.
This keeps headphone automute and microphone input from operating
on at least one laptop from Opti Systems.
Without the override, the BIOS parser does a fine job setting the
card up and everything works.

Tested-By: Peter Schneider <e.at.chi.kaen@googlemail.com>
Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6f2e810a 20-Jun-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Remove quirk for an HP device

The reporter, who is running kernel 2.6.38, reports that
he needs to set model=auto for the headphone output to work
correctly.

BugLink: http://bugs.launchpad.net/bugs/761022
Cc: stable@kernel.org (v2.6.38+)
Reported-by: Jo
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54463a66 13-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix wrong auto-mute type for Acer Aspire-one

The auto-mute setup for Acer Aspire-one with ALC268 was set wrongly
during the clean-up of auto-mute function. Fixed now.

Tested-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c0a20263 10-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initialization of hp pins with master_mute in Realtek

Some Reatlek model quirks use master_mute bool switch for controlling
the master-mute of outputs. For these cases, the initialization of HP
pins/amps were forgotten during the transition to the common automute
helper function in 3.0 development time, and resulted in the muted HP
output as default.

This patch fixes the issue by adjusting the HP output explicitly with
master_mute switch.

Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 20f5e0b3 10-Jun-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid unsol tag for some alc262 model quirks

The tag number was forgotten to be fixed after cleaning up the model
quirks for ALC262 fujitsu and lenovo-3000 models.

Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0a1896b2 06-Jun-2011 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Fix quirk for Dell Inspiron 910

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

The original reporter states that sound from the internal speakers is
inaudible until using the model=auto quirk. This symptom is due to an
existing quirk mask for 0x102802b* that uses the model=dell quirk. To
limit the possible regressions, leave the existing quirk mask but add
a higher priority specific mask for the reporter's PCI SSID.

Reported-and-tested-by: rodni hipp
Cc: <stable@kernel.org> [2.6.38+]
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>


# acb373da 19-May-2011 Raymond Yau <superquad.vortex2@gmail.com>

ALSA: hda - Remove PCM mixer elements from Virtual Master of realtek

Afer commit aa202455eec51699e44f658530728162cefa1307 , none of realtek
codec has hardware volume control "PCM Playback Volume" and
"PCM Playback Switch".

As Virtual Master require all slave controls must have same number of step
and dB range.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 39dfe138 19-May-2011 Madis Janson <madis@cyber.ee>

ALSA: hda - Enable Realtek ALC269 codec input layer beep

This fixes the input layer beep not working on some EeePC 1000 models by
adding the subsystem id into whitelist. Otherwise the corresponding ALSA
mixer is not enabled and stays muted, resulting in no console beep.

Signed-off-by: Madis Janson <madis@cyber.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b896b4eb 18-May-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix no sound after Windows boot with ALC269

Change power control register to default.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 296f0338 18-May-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ALC221 / ALC276 codecs

Compatible with ALC269.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b478b998 18-May-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ALC898/899 codec

These are compatible with ALC882 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

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

In addition to the normal mic jack, the mic (or line-in) jack on the
docking-station is checked also as a candidate for auto-selection.

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


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

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

Also replace more open-codes with this function.

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


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

ALSA: hda - Fix initialization of spec->automute_lines in patch_realtek.c

spec->automute_lines shouldn't be set unless the line-detection is
available.

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


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

ALSA: hda - Use is_jack_detectable() helper

Replaced the open-code with the new helper function.

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


# ce85c9ac 02-May-2011 Raymond Yau <superquad.vortex2@gmail.com>

ALSA: hda - fix NULL-dereference in patch_realtek

Fix NULL-dereference when try to use alt_playback since those codecs
which support multistreaming playback usually have more than 1 adc but
the driver should create alt_capture when spec->stream_analog_alt_capture
is also defined.

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Fix Realtek's chained fixup checks

The check of chained fixup list entry was done against the wrong element.
A stupid mistake during refactoring.

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


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

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

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


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

ALSA: hda - Constify some API function arguments

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

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


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

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

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


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

Revert "ALSA: hda - Fix pin-config of Gigabyte mobo"

This reverts commit c6b358748e19ce7e230b0926ac42696bc485a562.

It turned out that there are different pin configurations for this
PCI SSID, including multi-channel modes. And more proper fix for
allowing line-out mutes will come up in 2.6.40 tree, so we won't need
this fixup any more there.

Reported-by: Andrew Clayton <andrew@digital-domain.net>
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 94024cd1 29-Apr-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix automute for Gateway NV79

The PCI SSID is 1025:031c and the codec SSID is 1025:031d,
so the driver mistakes this for a SKU value, but looking at
the numbers, this is obviously wrong.

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


# a7e985e1 29-Apr-2011 Daniel Cordero <danielcordero@lavabit.com>

ALSA: hda: add beep quirk for Realtek 0x1043:831a

PC Beep was not being reported as enabled on my EeePC 901:
SKU: enable_pcbeep=0x0

Signed-off-by: Daniel Cordero <danielcordero@lavabit.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae8a60a5 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add Auto-Mute Mode enum for two-output cases

The Auto-Mute Mode control is useful even when only two outputs
(e.g. HP and speaker) are available. Then user can enable/disable
the auto-mute behavior on the fly.

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


# 1daf5f46 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - More line-out auto-mute support for Realtek

Not only supporting the line-out automute as additional feature
to the existing headphone automute, now the headphone jack can
mute the line-out alone even without the speaker outs.

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


# 1a1455de 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support for Line-Out automute to Realtek auto-parser

By popular demands, I add the functionality to mute / unmute the
line-out jacks per the headphone plug / unplug. For achieving this
and keeping the compatibility with the old behavior, the new mixer
enum "Auto-Mute Mode" is added. With this, user can control the
auto-mute behavior either disabled, speaker-only or lineout+speaker.

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


# 0f0f391c 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - More reduction of redundant automute codes in Realtek parser

Removed the redundant codes by replacing with the common helper
functions.

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


# e9427969 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Consolidate auto-mute with master-switch for Realtek

Yet another consolidation of auto-mute functions for the devices
controlling the output muts together with the master mixer switch,
typically found for ALC262 machines.

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


# e6a5e1b7 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support of line-out automute for Realtek

Add the common helper function and flags to support the auto-mute
per line-out jack detection, and also the mute of line-out jacks.

A few model-specific implementations are replaced with the common
helpers.

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


# 3b8510ce 28-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add common automute support for mxier-amp on/off for Reatek

Some models do mute on/off the connected mixer widget for the automatic
muting, instead of controlling the pin widget itself. This patch adds
the implementation of such type of auto-mute in the common helper
function, and reduces the redundant codes for each model preset.

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


# d922b51d 27-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Consolidate default automute functions for Realtek

There are two entry points for the headphone automute functions for
Realtek, alc_automute_amp() and alc_automute_pin(). These call the
same function in the end, so we can basically consolidate these
with a flag in spec.

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


# ce764ab2 27-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add channel-mode support to Realtek auto-parser

This patch adds the support of "Channel Mode" enum control to Realtek
auto-parser. When line-in or mic-in jacks are capable to output and
free DACs are available, the driver allows to switch to multi-channel
mode via "Channel Mode" enum switch, as already implemented in some
preset cases.

Not implemented in all Realtek codecs. Currently, ALC880, 882, 861,
662 and the compatible codecs are supported.

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


# 604401a9 27-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Minor update for alc662-parser functions

Allow alc662_dac_to_mix() and alc662_look_for_dac() to parse
down the selector widget that is found in ALC880-type codecs,
and rename them to alc_auto_*() accordingly.
This is for the next coming multi-io extensions.

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


# 6981d184 15-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a fix-up for Acer dmic with ALC271x codec

Acer laptops with ALC271x needs a magic initialization for digital-mic
to make it working with mono streams (and PulseAudio).
Added a fix-up applied to Acer with ALC271x generically.

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


# ad93ffe6 06-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix unused variable warning in patch_realtek.c

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


# 35ffe115 06-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous inits for ALC662 auto-parser

Since we now set up the connections and mutes dynamically in the
auto-parser, all static initializations via alc662_init_verbs & co are
no longer needed. Let's drop them.

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


# 10696aa0 06-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Mute ADC as default in ALC882 and other auto-parsers

Mute the ADC as default in the auto-parser dynamically instead of relying
on the static init verbs.

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


# 0e53f344 06-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Unmute mixer dynamically in alc662 auto-parser

Instead of static init array, better to determine the connection and
the mute status of the pin/mixer/DAC route dynamically. This fixes the
uninitialized mixer 0x0f on ALC892.

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


# 262ac22d 07-Apr-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix single internal mic on ALC275 (Sony Vaio VPCSB1C5E)

In cases where there is only one internal mic connected to ADC 0x11,
alc275_setup_dual_adc won't handle the case, so we need to add the
ADC node to the array of candidates.

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


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

ALSA: hda - Rewrite alc269_suspend to alc269_shutup

alc269_suspend is just calling the shut-up, so we can use the new shutup
callback for the purpose.

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


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

ALSA: hda - Introduce shutup callback to Realtek spec struct

Add shutup callback to be called codec-specifically for avoiding pop
noises at suspend or shutdown. As a generic callback, just turn EAPD
off.

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


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

ALSA: hda - Refactoring EAPD controls

Reduced the duplicated codes.

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


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

ALSA: hda - Split EAPD init to a separate array from alc662_init_verbs

So far, alc662_init_verbs[] is used for all ALC662-compatible chips,
but the EAPD controls for 0x15 in there is invalid for ALC892.
Also, since EAPDs should be set up in alc_auto_init_amp(), these static
elements aren't needed for auto-parser, too.

In this patch, the EAPD init verbs are split from alc662_init_verbs,
and applied only to static quirks.

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


# 1304ac89 06-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mix->DAC deduction for ALC892

The current alc662 parser doesn't set the DAC for the mixer 0x0f
properly for ALC892, which has 4 DACs while ALC662 has 3.
Fixed by implementing alc662_mix_to_dac() more genericly with the
dynamic widget list.

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


# 1bc7cf99 06-Apr-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Correct initial dac_nids for some ALC272-quirks

Some ALC272-quirks use alc662_dac_nids instead of alc272_dac_nids.
This patch fixes these entries. No functional change since the first
two elements are identical in both arrays.

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


# 4bf4a6c5 05-Apr-2011 Raymond Yau <superquad.vortex2@gmail.com>

ALSA: hda - Fix alc662_dac_nid and change "6stack-dig" to "5stack-dig"

alc662 series only have 3 DAC, so it can only support 5stack-dig
instead of 6stack-dig.

[updated HD-Audio-Models.txt as well by tiwai]

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

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


# c6b35874 27-Mar-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix pin-config of Gigabyte mobo

Use pin-fix instead of the static quirk for Gigabyte mobos 1458:a002.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=677256
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 20b67ddd 23-Mar-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix SPDIF out regression on ALC889

The commit 5a8cfb4e8ae317d283f84122ed20faa069c5e0c4
ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization
changed to use the default initialization method for ALC889, but
this caused a regression on SPDIF output on some machines.
This seems due to the COEF setup included in the default init procedure.
For making SPDIF working again, the COEF-setup has to be avoided for
the id 0889.

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


# 5a882646 23-Mar-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Realtek: Avoid unnecessary volume control index on Surround/Side

Similar to commit 7e59e097c09b82760bb0fe08b0fa2b704d76c3f4, this patch
avoids unnecessary volume control indices for more
Realtek auto-parsers, e g the ALC66x family, on the "Surround" and "Side"
controls.
These indices cause these volume controls to be ignored by PulseAudio and
vmaster and should be removed whenever possible.

Cc: stable@kernel.org
Reported-by: Jan Losinski <losinski@wh2.tu-dresden.de>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 75eb1c31 20-Mar-2011 Andres Mejia <mcitadel@gmail.com>

ALSA: hda - Set EAPD for Realtek ALC665

Set EAPD for Realtek ALC665 (Vendor Id: 0x10eSet EAPD for Realtek
ALC665 (Vendor Id: 0x10ec0665).

Signed-off-by: Andres Mejia <mcitadel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc90fd72 14-Mar-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove an unused variable in patch_realtek.c

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


# ae0ebbf7 10-Mar-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Move default input-src selection to init part

Move the default input-src selection code for alc268/269 to the init
part instead of the parser. The input-src selection might be overwritten
by init verbs.

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


# 584c0c4c 09-Mar-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Initialize special cases for input src in init phase

Currently some special handling for the unusual case like dual-ADCs
or a single-input-src is done in the tree-parse time in
set_capture_mixer(). But this setup could be overwritten by static
init verbs.

This patch moves the initialization into the init phase so that
such input-src setup won't be lost.

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


# 0a3fabe3 04-Mar-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Realtek ALC88x: Do not over-initialize speakers and hp that are primary outputs

Do not initialize again the what has already been initialized as
multi outs, as this breaks surround speakers.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7e59e097 04-Mar-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fixup unnecessary volume control index on Realtek ALC88x

Without this change, a volume control named "Surround" or "Side" would
get an unnecessary index, causing it to be ignored by the vmaster and
PulseAudio.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ebbeb3d6 04-Mar-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix volume control naming for surround speakers on Realtek auto-parser

When more than one pair of internal speakers is present, allow names
according to their channels.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 32eea388 04-Mar-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Enable surround and subwoofer on Lenovo Ideapad Y530

The pin config values would change the association instead of the
sequence, this commit fixes that up.

Tested-by: Bartłomiej Żogała <nusch88@gmail.com>
Cc: <stable@kernel.org>
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>


# c790ad31 24-Feb-2011 Chih-Wei Huang <cwhuang@linux.org.tw>

ALSA: hda - Fix unable to record issue on ASUS N82JV

The codec of N82JV is ALC269VB.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f0ce2799 28-Feb-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Realtek: Fixup jack detection to input subsystem

This patch fixes an error in the jack detection reporting,
causing the jack detection sometimes not to be reported
correctly to the input subsystem. It should apply to several
Realtek codecs.

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


# a2e2bc28 24-Feb-2011 Justin P. Mattock <justinmattock@gmail.com>

ALSA: hda - patch_realtek.c remove one to many l's in the word.

The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 786c51f9 24-Feb-2011 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

ALSA: hda - 4930g add internal lfe slider

Lately I sent patch that switched lfe with side in mixer for
acer-aspire-4930g. Then I connected 5.1 speaker system and noticed that
lfe slider wasn't working and that old lfe slider worked. What I'm doing
now is:

- reverting old patch
- adding internal lfe slider
- removing side as it is superfluous (ALC888S-VC is 7.1 but in fact
laptop can only do 5.1 and it is so in drivers for MS Windows)

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 965b76d2 10-Feb-2011 Anisse Astier <anisse@astier.eu>

ALSA: hda - add quirk for Ordissimo EVE using a realtek ALC662

This netbook has a only one jack output and an internal mic.

By default, mic and jack sense aren't working. Using lenovo-101e
parameters makes both work.

The device seems based on a Sharetronic Q70, so this should fix audio for
this model too.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a6c47a85 10-Feb-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add subwoofer quirk for Acer Aspire 8942G

According to the reporter, node 0x15 needs to be muted for subwoofer
to stop sounding. This pin is marked as unused by BIOS, so fix that.

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

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


# 460c92fa 07-Feb-2011 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

ALSA: hda - switch lfe with side in mixer for 4930g

Built-in sub-woofer can now be controlled by lfe slider instead of
side slider on Acer Aspire 5930g

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ded9f523 26-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix automute on Thinkpad L412/L512

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

More Thinkpad machines with invalid SKU found, that disables
automute between speakers and headphones on these machines.

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


# d2ebd479 19-Jan-2011 Anisse Astier <anisse@astier.eu>

ALSA: hda - Fix EAPD to low on CZC P10T tablet computer with ALC662

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb228af7 19-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add SKU ignore for another Thinkpad Edge 14

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

Thinkpad Edge 14 has one more SSID that suffers from disabled auto-mute.

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


# aa1d0c52 19-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix "unused variable" compile warning

sound/pci/hda/patch_realtek.c: In function ‘alc_apply_fixup’:
sound/pci/hda/patch_realtek.c:1724:14: warning: unused variable ‘modelname’

snd_printdd() is evaluated only when CONFIG_SND_DEBUG_VERBOSE=y.

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


# 5734a07c 19-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for HP Z-series workstation

It seems working well with model=hp-bpc.

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


# 569ed348 19-Jan-2011 Takashi Iwai <tiwai@suse.de>

Revert "ALSA: HDA: Create mixers on ALC887"

This reverts commit 03b7a1ab557efe34e8f79b78660e514bd7374248.

This commit was mistakenly re-introduced. While the change is harmless
(as ALC887 uses patch_alc888() now), we should get rid of any wrong code.

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>


# 361fe6e9 14-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Rearrange fixup struct in patch_realtek.c

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


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

ALSA: hda - Add fixup-call in init callback

In some cases, the fix-up is required in the init callback to be called
both at the first initialization and at the resume. The new action type
ALC_FIXUP_ACT_INIT is used for this case.

So far, only ALC275_FIXUP_SONY_HWEQ uses this.

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


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

ALSA: hda - Reorganize fixup structure for Realtek

Instead of keeping various data types in a single record, put the
type field and keep a single value in each entry, but allows chaining
multiple fixup entries. This allows more flexible data management
(see ALC275_FIXUP_SONY_HWEQ for example).

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


# 9fb1ef25 13-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply Sony VAIO hweq fixup only once

This should be applied also only once as a part of the initialization.

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


# 6fc398cb 13-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Apply mario fixup only once

The amp-override is necessary only once at initialization time.
Also fixed a coding style issue.

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


# 74dc8909 13-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove unused fixup entry for ALC262

... and a minor cleanup.

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


# 700b65ce 12-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO

With GPIO2-fixup, another fixup for NID 0x19 was missing because the
fixup is applied only once. Add the corresponding verb to the entry.

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


# 1a99d4a4 12-Jan-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO

SONY VAIO ALC275 default BIOS verb set the hardware EQ to disable.
Enable it when driver is loading.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 357f915e 12-Jan-2011 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low

Lenovo NB 0x9e54 use the external AMP in an inverted manner.
Set EAPD to low will enable the AMP.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2e93296 12-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing EAPD for Acer 4930G

The proper initializatio of NID 0x15 EAPD is missing in the quirk for
Acer 4930G.

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


# bcb2f0f5 10-Jan-2011 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support for multiple headphone/speaker controls for Realtek

So far, Realtek auto-parser assumed that the multiple pins are only for
line-outs, and assigned the channel names like Front, Surround, etc for
the multiple outputs. But, there are devices that have multiple
headphones, and these can be better controlled with the corresponding
control-name like "Headphone" with indicies.

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


# 5322bf27 05-Jan-2011 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix volume control indices for Mics (Realtek)

If more than one mic is present with different locations,
e g "Front Mic" and "Rear Mic", they can use the same index (0),
since their names are different.

Previous behavior was to have "Front Mic" as index 1, causing it
to be ignored by e g PulseAudio.

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>


# 7039c74c 23-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix GPIO2-fixup for Sony laptops

The fix-up entries by the commit 2785591a9760c677a7ee6f541e751c23086f5bfd
ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs
weren't applied in the right position. They had to be before the quirk
entry matching to all Sony devices.

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


# c793bec5 21-Dec-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Don't apply ALC269-specific initialization to ALC275

ALC275 doesn't require the ALC269 (and its variants) specific init
sequences. Add the check of codec id.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2785591a 21-Dec-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add fix-up for Sony VAIO with ALC275 codecs

Set GPIO2 for some Sony VAIO with ALC275 to fix speaker output.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: HDA: Rename "e-Mic" and "i-Mic" to "Mic" and "Internal Mic"

Change non-standard mic control names to standard control names
to clean up the namespace.

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>


# 022c92be 17-Dec-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add auto-mute for Thinkpad SL410/SL510

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

SKU turns off auto-mute for these machines, so ignore the SKU.

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


# 53e8c323 17-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix conflict of Mic Boot controls

Due to the recent change for multiple mics assignment, we need to handle
the index of each Mic Boost control respectively. Otherwise the driver
gets the control element conflicts, and gives the unsable state.

Reference: kernel bug 25002
https://bugzilla.kernel.org/show_bug.cgi?id=25002

Reported-and-tested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 30fac301 16-Dec-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up dead code in patch_realtek.c

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


# eeb43387 15-Dec-2010 Anisse Astier <anisse@astier.eu>

ALSA: hda - factorize an automute_mic realtek quirk function

Multiple quirk functions were using the exact same code to verify if the Mic
jack was plugged and mute the Mic accordingly

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ac612407 15-Dec-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Enable subwoofer on Asus G73Jw

Set default association/sequence right on pin 0x17 in order for
the automatic parser to recognize the subwoofer correctly.

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


# fe67b240 15-Dec-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Fix auto-mute on Lenovo Edge 14

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

The SKU value of this machine dictates that auto-mute should be
disabled. Since the SKU value is similar to the PCI SSID, the most
likely conclusion is that the SKU value should be ignored.

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


# 6be7948f 07-Dec-2010 Todd Broch <tbroch@chromium.org>

ALSA: hda: Add fixup for mario system

create fixup function for the mario model and override amp capabilities
for NID 0x2

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1eb5f10 06-Dec-2010 Todd Broch <tbroch@chromium.org>

ALSA: hda: Add modelname lookup and fixup for realtek codecs

Facilitate fixup for realtek codecs via modelname lookup of fixup
data. Fallback to quirk based lookup in absence of model definition.

Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 77c4d5cd 02-Dec-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use model=lg quirk for LG P1 Express to enable playback and capture

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

The original reporter states that audible playback from the internal
speaker is inaudible despite the hardware being properly detected. To
work around this symptom, he uses the model=lg quirk to properly enable
both playback, capture, and jack sense. Another user corroborates this
workaround on separate hardware. Add this PCI SSID to the quirk table
to enable it for further LG P1 Expresses.

Reported-and-tested-by: Philip Peitsch <philip.peitsch@gmail.com>
Tested-by: nikhov
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dc427170 28-Nov-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove dead md2 quirk code

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


# ac70eb13 27-Nov-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use BIOS auto-parsing instead of existing model quirk for MEDION MD2

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

A 2.6.35 (Ubuntu Maverick) user, burningphantom1, reported a regression
in audio: playback was inaudible through both speakers and headphones.
In commit 272a527c04 of sound-2.6.git, a new model was added with this
machine's PCI SSID. Fortunately, it is now sufficient to use the auto
model for BIOS auto-parsing instead of the existing quirk.

Playback, capture, and jack sense were verified working for both
2.6.35 and the alsa-driver snapshot from 2010-11-27 when model=auto is
used.

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


# 5a8cfb4e 26-Nov-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use ALC_INIT_DEFAULT for really default initialization

When SKU assid gives no valid bits for 0x38, the driver didn't take
any action, so far. This resulted in the missing initialization for
external amps, etc, thus the silent output in the end.

Especially users hit this problem on ALC888 newly since 2.6.35,
where the driver doesn't force to use ALC_INIT_DEFAULT any more.

This patch sets the default initialization scheme to use
ALC_INIT_DEFAULT when no valid bits are set for SKU assid.

Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=657388

Reported-and-tested-by: Kyle McMartin <kyle@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7167594a 24-Nov-2010 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Fix ALC660-VD/ALC861-VD capture/playback mixers

The mixer nids passed to alc_auto_create_input_ctls are wrong: 0x15 is
a pin, and 0x09 is the ADC on both ALC660-VD/ALC861-VD. Thus with
current code, input playback volume/switches and input source mixer
controls are not created, and recording doesn't work. Select correct
mixers, 0x0b (input playback mixer) and 0x22 (capture source mixer).

Reference: https://qa.mandriva.com/show_bug.cgi?id=61159

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc1c452e 24-Nov-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add an extra DAC for Realtek ALC887-VD

The patch enables ALC887-VD to use the DAC at nid 0x26,
which makes it possible to use this DAC for e g Headphone
volume.

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


# d9477207 23-Nov-2010 Denis Kuplyakov <dener.kup@gmail.com>

ALSA: hda - Fix Acer 7730G support

Fixes automatic EAPD configuration on Acer 7730G laptop.

Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 48c88e82 23-Nov-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Identify more variants for ALC269

Give more correct chip names for ALC269-variant codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1657cbd8 23-Nov-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix wrong ALC269 variant check

The refactoring commit d433a67831ab2c470cc53a3ff9b60f656767be15
ALSA: hda - Optimize the check of ALC269 codec variants
introduced a wrong check for ALC269-vb type. This patch corrects it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Add a generic fixup callback for Realtek codecs

Add a generic callback function for fixup elements. This can be used
to do some unusual things like overriding the AMP cache, etc.

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


# 01e0f137 22-Nov-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fixed ALC887-VD initial error

ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a0e90acc 20-Nov-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup

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

The original reporter states that the subwoofer does not mute when
inserting headphones. We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

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


# 86cbbad2 20-Nov-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup

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

The original reporter states that the subwoofer does not mute when
inserting headphones. We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

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


# 03b7a1ab 09-Nov-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Create mixers on ALC887

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

ALC887 does not have any volume control ability on the mixer NIDs,
so put the volume controls on the dac NIDs instead. Without this
patch, ALC887 users cannot use alsamixer at all.

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


# 693194f3 21-Oct-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix codec rename rules for ALC662-compatible codecs

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bf1b0225 21-Oct-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add alc_init_jacks() call to other codecs

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3d226ab 14-Oct-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Apply SKU override for Acer aspire 7736z

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

The current SKU value disables playback, so ignore the SKU value.

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


# 90622917 14-Oct-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Enable SKU quirks for Realtek

Realtek have ways of specifying external amps and more via a
special nid or via the Codec's subsystem ID, this is called "SKU".
The computer manufacturer sometimes gets this wrong, so we need
to be able to override or ignore the SKU customization value.

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


# 2df03514 10-Oct-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Add speaker pin to automute Acer Aspire 8943G

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

Add clause for handling Acer Aspire 8943G's subwoofer as additional
speaker pin for automuting.

Reported-by: RussianNeuroMancer
Cc: stable@kernel.org
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d4118588 01-Oct-2010 Valentine Sinitsyn <valentine.sinitsyn@gmail.com>

ALSA: hda - Added fixup for Lenovo Y550P

Signed-off-by: Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 01fdf180 24-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix auto-parse of SPDIF input of Realtek codecs

The SPDIF in audio widget must be searched through the list as the widget
that contains the given pin as the connection source. The current code
was implemented in a reverse way.

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


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

ALSA: hda - Apply ALC269 VAIO fix-up to all Sony laptops with ALC269

We've applied a fix-up for ALC269 VAIO only for two models. But all
Sony VAIO models with ALC269 codec seem to require the similar fix.
Let's apply it with vendor-id mask.

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


# 265a0247 21-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check invalid NIDs in alc_init_jacks()

The headphone and external-mic pin NIDs can be null, and the jack input
elements should be skipped in such a case.

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


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

ALSA: hda - Introduce hda_call_check_power_status() helper

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

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


# 0ec33d1f 20-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Refactor ALC269 power-ups/downs in PM callbacks

Create a helper function to simplify the code.
Also, cleaned up the ifdef SND_HDA_NEEDS_RESUME and
CONFIG_SND_HDA_POWER_SAVE. The former is always defined when the latter
is set.

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


# f3550d1b 20-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix capture widget for ALC269vb and co

ALC269vb and other variants don't use the widgets 0x24 but prefer the
widget 0x22 instead. We need to fix the input parser.

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


# d433a678 20-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Optimize the check of ALC269 codec variants

Don't call the COEF check for checking ACL269 codec variants at each
time in init but remember the type at the initialization.

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


# e1ca7b4e 20-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initialization of multiple output pins for ALC268/269

When multiple pins are assigned to headphones or speakers, they haven't
been initialized properly.

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


# f6837bbd 20-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix up autocfg output pin numbers in realtek parser

When quirks are applied, the numbers of output pins in autocfg aren't
set up properly but only pin arrays are changed. Let's fix it up so that
the rest of the parser can use autocfg.line_outs & co safely.

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>


# 30ea098f 16-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix input-pin setup for Realtek codecs

Through the transition of autocfg to individual inputs array, I forgot
to rewrite the argument passed to alc_set_input_pin(). This resulted in
wrongly setup input pins. Fixed now.

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


# 5855fb80 16-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initialization of secondary headphone and speaker

The secondary or later headphones or speakers aren't initialized preoprly
for some codecs.

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


# 145a902b 16-Sep-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Enable internal speaker on Dell M101z

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

In some cases a magic processing coefficient is needed to enable
the internal speaker on Dell M101z. According to Realtek, this
processing coefficient is only present on ALC269vb.

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


# 977ddd6b 15-Sep-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Set up COEFs for ALC269 to avoid click noises at power-saving

For avoiding the click noises at power-saving, set some COEF values
for ALC269* codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9ad0e496 14-Sep-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add input jack layer support to Realtek codec

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


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

ALSA: hda - Improve the input source name labels

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

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


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

ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}

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

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


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

ALSA: hda - Keep char arrays in input_mux items

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

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


# 6cb3b707 09-Sep-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Add fixup pins for Ideapad Y550

By adding the subwoofer as a speaker pin, it is treated correctly when auto-muting.

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


# 18675e42 08-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add fixup for FSC Celsius H270

Added a fixup table for ALC262 codec containing the entry for FSC
Celsius H270. Now both headphone jacks are detected properly as
headphones.

Reference: Novell bnc637263
https://bugzilla.novell.com/show_bug.cgi?id=637263

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


# 033688a5 08-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add multiple headphone support to ALC262 codec

This patch changes the alc262 auto-parser to allow multiple pins
assigned for a single purpose (line-out, headphone or speaker).

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


# bb35febd 08-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support multiple headphone auto-mute

Currently headphone auto-mute using alc_automute_pin() assumes only
the single pin used for the headphone output. Since there are devices
with multiple headphone jacks, we need to check all these pins there,
too.

Also this patch merges the common code between alc_automute_pin() and
alc_automute_amp() helper functions.

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


# 080dc7bc 08-Sep-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable PC-beep for EeePC with ALC269 codec

EeePC 1001HAG has a similar problem like other ASUS machine, which doesn't
set the codec SSID properly for indicating the beep capability.
To enable PC-beep again, put this to the whitelist.

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


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

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

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


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

ALSA: hda - embed alc_fixup contents into struct definitions

Instead of defining each content as a separate struct, put all into the
definition of struct alc_fixup arrays so that reader doesn't go back to
see the definition again.

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


# dbbcbc07 23-Aug-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Add Sony VAIO quirk for ALC269

The attached patch enables playback on a Sony VAIO machine.

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

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


# c69aefab 17-Aug-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix ALC680 base model capture

- Fix capture mixer elements for ALC680 base model
- Support auto change ADC for recording from MIC
- Cancel capture source assigned in auto mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
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>


# 81cd3fca 10-Aug-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: HDA: Use model=auto for LG R510

Two users report model=auto is needed to make the internal mic work properly.
BugLink: https://bugs.launchpad.net/bugs/495134

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


# 53bacfbb 07-Aug-2010 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec

I discovered tonight that ALSA no longer sets up a stream for the second ADC
provided by the Realtek ALC260 HDA codec. At some point alc_build_pcms()
started using stream_analog_alt_capture when constructing the second ADC
stream, but patch_alc260() was never updated accordingly. I have no idea
when this regression occurred. The trivial patch to patch_alc260() given
below fixes the problem as far as I can tell. The patch is against 2.6.35.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fe3eb0a7 06-Aug-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support for Acer ZGA ALC271 (1025:047c)

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fc091769 04-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add pin-fix for HP dc5750

The NID 0x11 on HP dc5750 with ALC260 should be a speaker although BIOS
gives it as a line-out. This patch adds a quirk to fix the pin config
so that the real line-out is used properly.

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

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


# 748cce43 03-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initial capsrc selection in patch_alc269()

In patch_alc269(), we initialize the primary capsrc so that the device
works from the beginning. It issues CONNECT_SEL verb no matter which
widget is although some widget (e.g. 0x23) has no connection selection
but a mixer, which requires unmuting instead.

This patch fixes the initialization of capsrc by re-using the code as
a helper function.

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


# e096c8e6 03-Aug-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add PC-beep whitelist for an Intel board

An Intel board needs a white-list entry to enable PC-beep.
Otherwise the driver misdetects (due to bogus BIOS info) and ignores
the PC-beep on 2.6.35.

Reported-and-tested-by: Leandro Lucarella <luca@llucax.com.ar>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7bfb9c03 02-Aug-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Do not try to create speaker NIDs for ALC268 if there aren't any

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


# c7a9434d 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a warning for ignored pins with ALC259/268/269

The current ALC259/268/269 parser ignores some pins as unhandled,
but user won't notice what goes wrong. So, added a warning message
for the ignored pins as a hint.

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


# b08b1637 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Handle pin NID 0x1a on ALC259/269

The pin NID 0x1a should be handled as well as NID 0x1b.
Also added comments.

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


# 954a29c8 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Prefer VREF50 if BIOS sets for Realtek codecs

If BIOS sets up the input pin as VREF 50, use the value as is instead of
overriding forcibly to VREF 80. This fixes the quality of inputs on
some devices like Packard-Bell M5210.

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


# 5d4abf93 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Handle missing NID 0x1b on ALC259 codec

Since ALC259/269 use the same parser of ALC268, the pin 0x1b was ignored
as an invalid widget. Just add this NID to handle properly.
This will add the missing mixer controls for some devices.

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


# 757899ac 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Share digital I/O parser in patch_realtek.c

Make a helper function to parse the digital I/Os of all Realtek codecs
to simplify the code and to ensure the setups.
Also, initialize digital I/O pins properly in init callbacks. Some BIOS
seem to leave pins uninitialized.

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


# ce503f38 30-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Increase the connection list size for ALC662

Some ALC662-compatible codecs like ALC892 may have more than 4
connections for the input source. Use HDA_MAX_CONNECTIONS instead of
the fixed magic number 4.

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


# 150b432f 29-Jul-2010 David Henningsson <david.henningsson@canonical.com>

ALSA: hda - Rename iMic to Int Mic on Lenovo NB0763

The non-standard name "iMic" makes PulseAudio ignore the microphone.
BugLink: https://launchpad.net/bugs/605101

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dc1eae25 29-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a PC-beep workaround for ASUS P5-V

ASUS P5-V provides a SSID that unexpectedly matches with the value
compilant with Realtek's specification. Thus the driver interprets
it badly, resulting in non-working PC beep.

This patch adds a white-list for such a case; a white-list of known
devices with working PC beep.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b6cbe517 28-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Assume PC-beep as default for Realtek

Enable PC-beep as default for hardwares that aren't compliant with the
SSID value Realtek requires. In such a case, better to enable the beep
to avoid a regression.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8af2591d 28-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't register beep input device when no beep is available

We check now the availability of PC beep and skip the build of beep
mixers, but the driver still registers the input device. This should
be checked as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 840b64c0 13-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support of dual-ADCs for Realtek ALC275

Some VAIO models with ALC275 have dual ADCs for both internal and external
mics, and the driver needs to switch one of them appropriately.
This patch adds a basic support for this functionality, dynamic switching
between two ADCs per jack plug state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f189efcd 05-Jul-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enable beep on Realtek codecs with PCI SSID override

When the PCI SSID gives an overriding SKU assno, PC-beep bit isn't
detected (since it's located over 16bit), resulting in no PC beep.
Also, many devices seem ignoring the requirement by Realtek's spec
for SSID numbers, and it also confuses the PC beep detection.

This patch assumes the PC beep is available on every machine with
PCI SSID override. It's a regression fix from 2.6.34.

Reference: Kernel bug 16251
http://bugzilla.kernel.org/show_bug.cgi?id=16251

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d4a86d81 23-Jun-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing ALC680_* definitions

Also update the documentation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1eb57f4 23-Jun-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Support ALC680 codec

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3bfea98f 21-Jun-2010 Luke Yelavich <luke.yelavich@canonical.com>

ALSA: hda - Add Macbook 5,2 quirk

BugLink: https://bugs.launchpad.net/bugs/463178

Set Macbook 5,2 (106b:4a00) hardware to use ALC885_MB5

Cc: <stable@kernel.org>
Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2f44f847 22-Jun-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix uninitialized variable

Fix the following compile warning. kctl should be NULL-initialized.

sound/pci/hda/patch_realtek.c: In function ‘alc_build_controls’:
sound/pci/hda/patch_realtek.c:2550:23: warning: ‘kctl’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b8f171e7 13-Jun-2010 Alex Murray <murray.alex@gmail.com>

ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2

The line-in input is 0x7 not 0x2 for MacBook (Pro) 5,1 / 5,2 models

Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fbe618f2 11-Jun-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't check capture source mixer if no ADC is available

With multiple codec configurations, some codec might have no ADC, thus
it keeps spec->adc_nids = NULL. This causes an Oops in alc_build_controls().

Reference: kernel bug #16156
https://bugzilla.kernel.org/show_bug.cgi?id=16156

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ab669967 06-Jun-2010 Justin P. Mattock <justinmattock@gmail.com>

ALSA: hda - Add SSID table for iMac7,1.

This patch add's the iMac7,1 SSID entry to
patch_realtek.c which adds sound support.
bug entry:
https://bugs.launchpad.net/mactel-support/+bug/360866

Note:I do not have this machine on hand only
codec#0 file for the machine so please
test if you have the appropriate equipment.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f53dae28 06-Jun-2010 Justin P. Mattock <justinmattock@gmail.com>

ALSA: hda - Add SSID table for MacBookAir1,1

This patch add's the MacBookAir1,1 SSID entry to
patch_realtek.c which adds sound support.
bug entry:
https://bugs.launchpad.net/mactel-support/+bug/268301

Note:I do not have this machine on hand only
codec#0 file for the machine so please
test if you have the appropriate equipment.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6e12970b 06-Jun-2010 Justin P. Mattock <justinmattock@gmail.com>

ALSA: hda - Add SSID table for MacBookAir2,1

This adds the SSID number to snd_pci_quirk for the
MacBookAir2,1 taken from codec#0 at:
http://launchpadlibrarian.net/49455483/Card0.Codecs.codec.0.txt

keep in mind I do not have one of these machines on hand
so please if you do have this machine please test for me..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26fd74fc 30-May-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use mb31 quirk for an iMac model

BugLink: https://launchpad.net/bugs/542550

Symptom: On the reporter's iMac, in Ubuntu 10.04 LTS neither playback
nor capture appear audible out-of-the-box.

Test case: Boot from an Ubuntu 10.04 LTS live cd or from an installed
configuration and attempt to play or capture audio.

Resolution: Specify the mb31 quirk for this machine in the codec SSID
table.

Reported-and-Tested-By: f3a97
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b7cccc52 23-May-2010 Justin P. Mattock <justinmattock@gmail.com>

ALSA: hda - iMac9,1 sound fixes

First issue:
With the original patch, I've noticed by unmuting the mic
(and even having it muted), there is a distorted("Noise")
coming from the internal speakers, even when the headphones are plugged in.
What my finding's revealed is:

/* Mic (rear) pin: input vref at 80% */
{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
{0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},

From the original patch. Looking at codec#0 0x18/0x1a is listed as:

Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0000373c: IN OUT HP Detect
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x90100141: [Fixed] Speaker at Int N/A
Conn = Unknown, Color = Unknown
DefAssociation = 0x4, Sequence = 0x1
Misc = NO_PRESENCE
Pin-ctls: 0x41: OUT VREF_50
Unsolicited: tag=00, enabled=0
Connection: 5
0x0c* 0x0d 0x0e 0x0f 0x26

seems this Node is listed as: [Fixed] Speaker while 0x15

Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Amp-In vals: [0x00 0x00]
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000373c: IN OUT HP Detect
Vref caps: HIZ 50 GRD 80 100
Pin Default 0x018b3020: [Jack] Line In at Ext Rear
Conn = Comb, Color = Blue
DefAssociation = 0x2, Sequence = 0x0
Pin-ctls: 0x01: VREF_50
Unsolicited: tag=00, enabled=0
Connection: 5
0x0c 0x0d* 0x0e 0x0f 0x26

is [Jack] Line In at Ext Rear.
(looking at the other apple products as examples
I came up with the fix below).

Second issue:
alc885_mbp_4ch_modes
The original patch does a good job with the
HP pin automute function, but from what I noticed is I would have to manually
change the channel form 2 to 4 after plugging the headphones in.
And not to mention having odd moments to where I was jamming out
with the headphones on, then later realized I had sound blasting out
of the speakers as well. My findings revealed that changing
alc885_mbp_4ch_modes to alc885_mba21_ch_modes and setting
- spec->autocfg.speaker_pins[0] = 0x15;
+ spec->autocfg.speaker_pins[0] = 0x18;
gets the automute function when the headphones plugged in working
flawlessly(and the no need to manually change the channel number
afterwards).

Third issue:
alc885_imac91_mixer
There probably doesnt need to be anything changed with this
(esspecially if your one to like lots of sliders),but my findings
revealed that mac osx only has a master on the top right,
another switch on itunes, and then a slider for the mic.

So the changes I did below try and mimic osx as much as possible
(only thing I had an issue with is just having one mute switch
on the master, instead of having two(still investigating)).

fourth issue:
alc882_capture_source
I endeded up creating alc889A_imac91_capture_source()
only because looking at alc882_capture_source I see
that the mic is set to 0x1 while this works, I also noticed
that adding 0x1 and 0x01 and testing that 0x1 somehow
stops working, and 0x01 works(so I figured 0x01 was more
of the alpha of the numbers(still need to figure out
where that valuse is)). In any case the microphone
does work with the original, and with the below patch, but both
still record not as clean(lots of "Noise", which I would like to
look into too).
Note: using alsamixer -Va reveals the capture switches.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fbc25669 20-May-2010 Tobias Klauser <tklauser@distanz.ch>

ALSA: hda: Storage class should be before const qualifier

The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 482c4533 10-May-2010 Stefan Lippers-Hollmann <s.l-h@gmx.de>

ALSA: Revert "ALSA: hda/realtek: quirk for D945GCLF2 mainboard"

This reverts commit 7aee67466536bbf8bb44a95712c848a61c5a0acd.

As it doesn't seem to be universally valid for all mainboard revisions of
the D945GCLF2 and breaks snd-hda-intel/ snd-hda-codec-realtek on the Intel
Corporation "D945GCLF2" (LF94510J.86A.0229.2009.0729.0209) mainboard.

00:1b.0 Audio device [0403]: Intel Corporation N10/ICH 7 Family High Definition Audio Controller [8086:27d8] (rev 01)

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: <stable@kernel.org> [2.6.33]
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ef5dbbcc 06-May-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous external amp setup for ALC888

We had a fixed external amp setup enabled for ALC888, but this seems
unnecessary. The amps are controlled rather by GPIOs.
Let's remove it now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3353541f 22-Apr-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use ALC880_F1734 quirk for Fujitsu Siemens AMILO Xi 1526

BugLink: https://launchpad.net/bugs/567494

The OR has verified that the existing model quirk, ALC880_UNIWILL,
is insufficient for audible playback and capture by default. Instead,
the ALC880_F1734 model quirk needs to be used.

This change is necessary for both 2.6.32.11 and 2.6.33.2.

Reported-by: Arnaud Malpeyre <amalpeyre@gmail.com>
Tested-by: Arnaud Malpeyre <amalpeyre@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1501ea8 15-Apr-2010 Joerg Schirottke <master@kanotix.com>

ALSA: hda - add a quirk for Clevo M570U laptop

Added the matching model for Clevo laptop M570U.

Signed-off-by: Joerg Schirottke <master@kanotix.com>
Tested-by: Maximilian Gerhard <maxbox@directbox.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ff818c24 12-Apr-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add fix-up for Sony VAIO with ALC269

Sony VAIO models with ALC269 need to initialize the pin 0x19 to VREF
ground or Hi-Z to make the headphone working. Other than that, model=auto
works fine, so let's use model=auto with a specific fix-up table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7fa90e87 12-Apr-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Enhance fix-up table for Realtek codecs

A few enhancement / fixes for fix-up table of some Realtek codecs:
- Apply fix-ups only for the auto model
- Apply additional verbs after normal init verbs
- Add a debug print to show the fix-up application

This is basically a preliminary work for the next fix for Sony VAIO.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7f311a46 09-Apr-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix initial capture source connections of ALC880/260

The widget connections of ADC of ALC880 and ALC2260 aren't initialized,
thus it might point to invalid pin. This can be a problem when mode=auto
and there is only one input pin. Then user can't change the connection
at all.

This patch adds the code to initialize the input pin connection of these
codecs.

Reference: Novell bnc#594363
https://bugzilla.novell.com/show_bug.cgi?id=594363

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 226b1ec8 09-Apr-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix setup for ALC269vb amic and dmic models

Corrected HP and mic pins for ALC269vb amic and dmic models.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 531d8791 09-Apr-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21

ALC269vb has an alternative HP pin 0x21 in addition.
Fix the parser to recognize it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ad7b218 06-Apr-2010 Maurus Cuelenaere <mcuelenaere@gmail.com>

ALSA: hda: Add support for Medion WIM2160

This adds support for the Medion WIM2160 soundcard.
There's no PCI quirk added because it has the same PCI id as the
Medion MD2.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 25e8d9b6 07-Apr-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove left-over debug printk in patch_realtek.c

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 489008cd 07-Apr-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC882 DAC connections in auto mode

Assign DACs properly to each output. Currently, the front output is bound
to HP/speaker outputs blindly, but they should be assigned to individual
DACs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f9700d5a 05-Apr-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix a wrong array range check in patch_realtek.c

The commit 6a4f2ccb467e00281470cde2dee08fe5ecde62d1 introduced a wrong
comparision for the array range check, which effectively skips the whole
initialization of DAC connections. Fixed now.

Reference: bko#15689
https://bugzilla.kernel.org/show_bug.cgi?id=15689

Reported-by: Adrian Ulrich <kernel@blinkenlights.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1284182 05-Apr-2010 Tony Vroon <tony@linx.net>

ALSA: hda - Enable amplifiers on Acer Inspire 6530G

After more tests it appears that EAPD needs to be enabled
on both the 0x14 and 0x15 NIDs to enable the main speaker
and headphone amplifiers. The maximum volume setting is
now equal to what the machine achieves under other operating
systems.
Disabling Front or LFE playback triggers EAPD and disables
the amplifier. As such, these two playback switches have
been removed from the mixer.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a68d5a54 30-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - introduce snd_hda_codec_update_cache()

Add a new helper, snd_hda_codec_update_cache(), for reducing the unneeded
verbs. This function checks the cached value and skips if it's identical
with the given one. Otherwise it works like snd_hda_codec_write_cache().

The alc269 code uses this function as an example.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad35879a 30-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add mute LED support for HP laptop with ALC269

Some HP laptops have a mute LED that is controlled over the unused
MIC2 VREF pin. Implement the LED updater like patch_sigmatel.c for this
model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1f85d72d 29-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing printk argument in previous patch

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6694635d 29-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ADC/MUX assignment of ALC269 codec

ALC269 codec has a few different variants, and each of them may have
different ADC and MUX widgets. For example, one model has ADC 0x08
with MUX 0x23 while others has ADC 0x09 or ADC 0x07 with MUX 022 or
0x24. The difference of ADC appears usually as the capability of
the digital mic pin (0x12), and the current driver sometimes misses
the internal mic pin due to the mismatching ADC.

This patch adds a bit more clever way to find the matching ADC instead
of the static list. Now the driver checks all active input pins and
fills only the ADC/MUX's that contain all of them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5dbd5ec6 29-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()

The mask and value parameters passed to snd_hda_codec_amp_stereo()
should be 8-bit values for mute and volume. Passing AMP_IN_MUTE() is
wrong, which is found in many places in patch_realtek.c as a left-over
from the conversion to snd_hda_codec_amp_stereo().

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6a4f2ccb 25-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't set invalid connection index in Realtek initialiaiton

Skip initialization of connections of DAC widgets that aren't used,
which resulted in invalid verb parameters.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7fb56223 22-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix uninitialized variable warning in alc_auto_parse_customize_define()

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bae84e70 22-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix access-after-free in patch_realtek.c

alc_free_kctls() has to be called after all jobs done in alc_build_controls().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c027ddcd 19-Mar-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add alc_codec_rename() helper

Added alc_codec_rename() helper for renaming codec->chip_name.
Added Acer-specific codec naming for ALC269/662.

[Clean-up and refactoring by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# da00c244 19-Mar-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add parse customize define function for Realtek codecs

Added alc_auto_parse_customize_define() to parse the Realtek-specific
attributes from SKU. Also enable beep controls only when the proper
attribute bit is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 572c0e3c 14-Mar-2010 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212

BugLink: https://bugs.launchpad.net/bugs/538895

The OR has verified that both position_fix=1 and model=6stack-dig are
necessary to have capture function properly. (The existing 3stack-6ch
model quirk seems to be incorrect.)

Reported-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Tested-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b43f6e5e 10-Mar-2010 Anisse Astier <anisse@astier.eu>

ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220

This should make the speakers and jack detection work on MSI all-in-one
computers NetOn AP1900 and Wind Top AE2220.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9c4cc0bd 15-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix secondary ADC of ALC260 basic model

Fix adc_nids[] for ALC260 basic model to match with num_adc_nids.
Otherwise you get an invalid NID in the secondary "Input Source" mixer
element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 5311114d 07-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix input source elements of secondary ADCs on Realtek

Since alc_auto_create_input_ctls() doesn't set the elements for the
secondary ADCs, "Input Source" elemtns for these also get empty, resulting
in buggy outputs of alsactl like:
control.14 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
iface MIXER
name 'Input Source'
index 1
value 0
}

This patch fixes alc_mux_enum_*() (and others) to fall back to the
first entry if the secondary input mux is empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 50ae0aa8 07-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix wrong model range check for ALC268

Fix a wrong value passed to snd_hda_check_board_codec_sid_config() as
the upper-limit in parse_alc268(), so that any wrong value can't be
passed.

So far, no bogus value was set in the quirk entries, so this won't give
any behavioral changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2db09b8 05-Mar-2010 Frederik Deweerdt <frederik.deweerdt@xprog.eu>

ALSA: hda: uninitialized variable fix

Commit eaa9b3a748539651f50e3a234c8854e1b42a839a introduced the following
uninitialized warning:

sound/pci/hda/patch_realtek.c: In function 'set_capture_mixer':
sound/pci/hda/patch_realtek.c:4928: warning: 'pin' is used uninitialized in this function
sound/pci/hda/patch_realtek.c:4918: note: 'pin' was declared here

It appears indeed that 'pin' needs to be initialized to 0.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 20645d70 02-Mar-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing hp_pins definitions for ALC269 quirks

In 2.6.33 ACL269 unsol event handler was changed to look up the pre-defined
pins, but the headphone pins aren't defined properly in each quirk.
This patch adds the missing definitions, and fixes the speaker auto-mute
regression on some ASUS (and possibly other) laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 61c2d2b5 25-Feb-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add/fix ALC269 FSC and Quanta models

Specify proper quirk models for FSC and Quanta machines with ALC269 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6227cdce 25-Feb-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add ALC670 codec support

- Fixed alc_subsystem_id( ) typo and add new function.
- !(ass & 0x100000)) ==> Delete this check. It is unnecessary check.
- Add porti
- ALC670 support

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 76e6f5a9 23-Feb-2010 Reimundo Heluani <rheluani@gmail.com>

ALSA: add support for Macbook Air 2,1 internal speaker

Add support for Macbook Air 2,1 (late 2008) internal speaker and
headphones. Create a "mba21" model for snd-hda-intel.

Signed-off-by: Reimundo Heluani <rheluani@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d01aecdf 23-Feb-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove identical definitions for macmini3 model

The channel mode definitions for macmini3 model are identical with mb5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9d54f08b 22-Feb-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up Intel Mac unsol codes

Use the standard unsol_event callback with each setup callback for
IntelMac models with Realtek ALC885 codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e458b1fa 11-Feb-2010 Luke Yelavich <luke.yelavich@canonical.com>

ALSA: hda - Add Macmini 3,1 support

BugLink: https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/343989

Add a model quirk for the NVIDIA based Macmini hardware, aka Macmini 3,1. The
pinout is almost identical to the mb5 quirk, except for no microphone and
the line-in mixer controls being on a different index. Everything works in
2ch mode, but as I am not sure what needs to be changed for 6ch mode, or
whether the Mac Mini's chip supports 6ch mode, I have simply duplicated
the code from the mb5 quirk for the mac mini chmode management. The new
model parameter for this quirk is "macmini3".

Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cec27c89 04-Feb-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ALC665

- Add support for ALC665
- Add more ASUS model
- Modify common patch for ALC272 ALC273 ALC661 ALC662 ALC663 ALC665

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 84898e87 04-Feb-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add ALC269VB support

- Add new models ALC269VB_AMIC ALC269VB_DMIC
- Add alc269vb_laptop_dmic_setup
The record source index Dmic is 0x6 for ALC269VB.
- Change eeepc words for ALC269
- Modify init_verb tables of patch_alc269 patch_alc662 patch_alc882
- Modify common patch for ALC270 ALC269VB ALC275

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88102f3f 04-Feb-2010 Kailang Yang <kailang@realtek.com>

ALSA: hda - Remove superfluous init verb entries for ALC88[235]

The default values are no need to be set in init_verbs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0aea778e 25-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove the COEF setup for ALC267/ALC268

The COEF setup for model=auto seems problematic on some laptops,
resulting in the silent speaker output. Better to disable it for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95f475f7 25-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove coef output in Realtek proc files

The output of COEF index/value in the proc file for Realtek codecs is
rather useless since the value varies together with the index.
Let's get rid of it again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 973b8cb0 24-Jan-2010 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

ALSA: hda - add possibility to choose speakers configuration for 4930g

Now one can choose speaker configuration in e.g. PulseAudio mixer

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dc99be47 20-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix HP T5735 automute

This patch fixes the aut-mute setup on HP T5735 with ALC262 codec.
Instead of wrong amp, use pin control toggling for muting the speaker now.

Tested-by: Lee Trager <lee.trager@hp.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3fb4a508 19-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Turn on EAPD only if available for Realtek codecs

Some codecs disable widgets used for output pins and reserve as vendor-
spec widgets. Thus we need to check the widget type and pin cap before
actually sending SET_EAPD verbs in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4feabefe 19-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix parsing pin node 0x21 on ALC259

ALC259 has a widget NID 0x21 for the output pin, but it wasn't handled
properly in alc268_new_analog_output().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eaa9b3a7 17-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix capture on Sony VAIO with single input

Sony VAIO VGN-P11G with ALC262 codec has only one input pin, and the
recording doesn't work with model=auto because ALC262 parser sets the
wrong cap NIDs to choose the route and the default route for the sole
input pin wasn't initialized properly. This patch solves these issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c7a8eb10 13-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing capture mixer for ALC861/660 codecs

The capture-related mixer elements are missing with ALC861/ALC660 codecs
when quirks are present, due to missing call of set_capture_mixer().

Reference: Novell bnc#567340
http://bugzilla.novell.com/show_bug.cgi?id=567340

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# a76221d4 13-Jan-2010 Alex Murray <murray.alex@gmail.com>

ALSA: hda - Improved MacBook (Pro) 5,1 / 5,2 support

This patch adds support for automatically muting the speakers when headphones
are inserted, as well as relabelling the headphone widgets from the
non-standard "HP" to the standard "Headphone" for the mb5 model.

Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4dee8baa 13-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix Toshiba NB20x quirk entry

The alc664-mode4 model doesn't seem to fit with Toshiba NB205 correctly.
NB205 uses the pin 0x17 connected with the mixer 0x0f for the speaker
output, which isn't controlled by mode4 model at all.
Rather model=auto works fine as is on the latest driver, so let it back
again.

Tested-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9c0afc86 12-Jan-2010 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC861-VD capture source mixer

The capture source or input source mixer element wasn't created properly
for ALC861-VD codec due to the wrong NID passed to
alc_auto_create_input_ctls().

References: Novell bnc#568305
http://bugzilla.novell.com/show_bug.cgi?id=568305

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# c97259df 27-Dec-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Refactor powerdown for Realtek HDA codecs

This patch converts the alc889 Aspire-specific powerdown to a generic
one. Like the previous effort, it currently only handles Front and PCM
but can be easily extended to cover other nids. The existing hook for
alc889 Aspire-specific remains enabled. Upon further testing, I've added
its use for ALC861_AUTO as well. Following patches will enable them for
other quirks.

Tested-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4e09aa3 27-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix click noises at suspend/free with Realtek codecs

Call snd_hda_shutup_pins() at suspend and free for avoiding click noises.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 21949f00 23-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix NID association for capture mixers

Fix the wrong implementation of NID <-> kctl mapping for capture mixers
introduced by the ocmmit 5b0cb1d850c26893b1468b3a519433a1b7a176be.
So far, the driver returns an error at probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f5de24b0 20-Dec-2009 Hector Martin <hector@marcansoft.com>

ALSA: HDA: add powersaving hook for Realtek

The current Realtek code makes no specific provision for turning stuff
off. The codec chip is placed into low-power mode generically, but this
doesn't turn off any external hardware connected to it, in particular
external amplifiers.

This patch creates a hook function that is called by the codec
suspend/resume functions. It ought to disable any external hardware in a
device-specific way. I've implemented a generic ALC889 function that
sets the EAPD pin properly, and used it for the Acer Aspire 8930G which
can benefit from this feature.

On my laptop, this results in ~0.5W extra savings.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 556eea9a 20-Dec-2009 Hector Martin <hector@marcansoft.com>

ALSA: HDA: remove useless mixers on Aspire 8930G

This patch removes some extra mixers that do nothing on the Acer Aspire
8930G.

The CD mixer is useless because the SATA DVD/Blu-Ray drive has no analog
audio output, and the Side mixer is useless because we max out at 6ch
anyway.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0f86a228 20-Dec-2009 Hector Martin <hector@marcansoft.com>

ALSA: HDA: simplify Aspire 8930G verb array

This patch just simplifies the 8930G verb array a bit. Just use the
common ALC889 EAPD verb array to make things more consistent. The file
is already huge enough already.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e2595322 19-Dec-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410

BugLink: https://bugs.launchpad.net/bugs/479373

The OR has verified with hda-verb that the internal microphone needs
VREF50 set for audible capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 440b004c 19-Dec-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ef86f581 19-Dec-2009 Julia Lawall <julia@diku.dk>

ALSA: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2fef62c8 18-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix quirk for Maxdata obook4-1

Works fine with the auto-parser.

Reference: Novell bnc#564940
https://bugzilla.novell.com/show_bug.cgi?id=564940

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d1409ae4 17-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix NULL dereference in kctl-NID mapping in patch_realtek.c

capsrc_nids can be NULL, and adc_nids should be taken as fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 035eb0cf 17-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing capsrc_nids for ALC88x

Some model quirks missed the corresponding capsrc_nids. This resulted in
non-working capture source selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# ebb83eeb 16-Dec-2009 Kailang Yang <kailang@realtek.com.tw>

ALSA: hda - More ALC663 fixes and support of compatible chips

1. Add more ASUS NB model.
2. Fixed alc663_m51va_setup
M51VA has Digital Mic that NID is 0x12. The record source index is
0x9 for ALC663.
So, to modify the alc663_m51va_setup function to index 0x9
and add analog Mic aupport function alc663_mode1_setup.
3. Add ASUS mode7 and mode8 modules for ALC663

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
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>


# 5b0cb1d8 08-Dec-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - add more NID->Control mapping

This set of changes add missing NID values to some static control
elemenents. Also, it handles all "Capture Source" or "Input Source"
controls.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 950200e2 13-Dec-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)

BugLink: https://bugs.launchpad.net/bugs/418627

The original reporter states that this quirk is necessary to obtain
reasonable gain for playback. Without it, sound is inaudible. Tested
with playback (spkr and hp) and capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7aee6746 08-Dec-2009 David Santinoli <david@santinoli.com>

ALSA: hda/realtek: quirk for D945GCLF2 mainboard

Quirk for the ALC662 found on the Intel D945GCLF2 (and possibly other)
mainboards.

Signed-off-by: David Santinoli <david@santinoli.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d11f74c6 07-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Exclude unusable ADCs for ALC88x

On Realtek codecs, a digital mic pin is connected often only to a single
ADC. But the parser tries to set up all ADCs no matter whether the
digital mic is available, and results in non-selectable input source.

This patch adds a check of input-source availability of each ADC, and
excludes ones that don't support all input sources.

Reference: Novell bnc#561235
http://bugzilla.novell.com/show_bug.cgi?id=561235

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23033b2b 07-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing Line-Out and PCM switches as slave

Realtek codecs may have "PCM" and "Line-Out" playback switches, and
they can be slaves for vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b7e1803 07-Dec-2009 Justin P. Mattock <justinmattock@gmail.com>

ALSA: hda - iMac 9,1 sound patch.

This is an updated patch for the Apple iMac 9,1 model to add sound.
Original patch posted here:
http://article.gmane.org/gmane.linux.alsa.devel/61361/match=

I have been using this patch for a while now
and have to say it works vary well, except for a few minor
things:

With the iMac 24-inch 3.06GHz Intel Core 2 Duo
everything seems to be working as it should,
although I have not looked into the microphone
(never really use one, nor have any apps to test,
my guess is it doesn't work, or I never figured out how
to get it to work).

With the iMac 24-inch 2.66GHz Intel Core 2 Duo
everything is the same as with the above machine
except I'm hearing a light scratchy/distortion noise
come out of the speakers when using headphones(above machine
does not do this).

Other than that the sound level is great(especially with good Dj headphones).

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Tested-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# af901ca1 14-Nov-2009 André Goddard Rosa <andre.goddard@gmail.com>

tree-wide: fix assorted typos all over the place

That is "success", "unknown", "through", "performance", "[re|un]mapping"
, "access", "default", "reasonable", "[con]currently", "temperature"
, "channel", "[un]used", "application", "example","hierarchy", "therefore"
, "[over|under]flow", "contiguous", "threshold", "enough" and others.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# ac2c92e0 03-Dec-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix memory leaks in the previous patch

The previous hack for replacing the codec name give memory leaks at
error paths. This patch fixes them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 274693f3 03-Dec-2009 Kailang Yang <kailang@realtek.com.tw>

ALSA: hda - Add ALC661/259, ALC892/888VD support

Fixed List:
1. Add alc_read_coef_idx function
2. Add ALC661 ALC259
3. Add ALC892 ALC888VD

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cfc9b06f 30-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a pin-fix for FSC Amilo Pi1505

FSC Amilo Pi 1505 has a buggy BIOS and doesn't set up the HP and
speaker pins properly. Add the pinfix entry for that.

Reference: Novell bnc#557403
https://bugzilla.novell.com/show_bug.cgi?id=557403

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 83dd7408 24-Nov-2009 Takashi Iwai <tiwai@suse.de>

Revert "ALSA: hda - Change quirk for Acer Aspire 5930G"

This reverts commit f2624791a0c2a2d7664b12d75ca327917141fd3b.

Łukasz Wojniłowicz reported that the change causes both internal and
external mics not working any more. The headphone jacking issue was
fixed by his previous patch, it's better to revert to acer-aspire-4930g
model.

Reported-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7cef4cf1 19-Nov-2009 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>

ALSA: hda - 4930g mute lfe and side when pluging in headphones

Fixes first issue from comment 0021423 in bug 0004317 for Acer Aspire 5930g

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f2624791 19-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Change quirk for Acer Aspire 5930G

Change the quirk for Acer Aspire 5930G from model=acer-aspire-4930g to
model=acer-aspre-6530g. The tuba bass gets muted along with the other
built-in speakers upon headphones insertion, the internal mic works
perfectly etc.

Reported-by: Claudio Viano <claudio.viano@gmail.com>
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>


# 864f92be 17-Nov-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda - introduce snd_hda_jack_detect() and snd_hda_pin_sense()

This helps merge duplicate code.

v2: add snd_hda_jack_detect() and comments recommended by Takashi.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c5b5165c 17-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable default quirk for Sony VAIO with ALC262 codec

The ALC262 has a quirk entry matching with all Sony Vaio laptops
to use model=sony-assamd as default. But, model=auto works much better
for new models in the recent driver versions, thus it's safer to disable
that default quirk entry.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 12929bae 17-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix quirk for VAIO type G

Vaio type G laptop doesn't work with the current quirk setup.
After some tests, it turned out that it should be model=auto as default.

Reported-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 67d634c0 16-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=n

Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9c96fa59 16-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Get rid of magic digits for subdev hack

Define a proper const for a magic 31bit flag for subdev / NID setup
with a brief comment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4d02d1b6 12-Nov-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - proc - add support for dynamic controls to mixer<->NID mapping

This patch adds support for dynamically created controls to proc codec file
(Control: lines).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3911a4c1 11-Nov-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignment

This is an initial patch to show universal control<->NID assigment in
proc codec file. The change helps to debug codec related problems.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 123c07ae 21-Oct-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda_intel: Digital PC Beep - change behaviour for input layer

Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.

Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 46ef6ec9 11-Nov-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use model=mb5 for MacBookPro 5,2

BugLink: https://bugs.launchpad.net/bugs/462098

Until we can look closer at the verbs, let's use ALC885_MB5 for
codec SSID 0x106b4600 to enable playback and capture for MacBookPro
5,2s.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 71121d9f 10-Nov-2009 Roel Kluin <roel.kluin@gmail.com>

ALSA: hda - possible read past array alc88[02]_parse_auto_config()

The test of index `i' is after the read - too late - and
unsafe: if snd_hda_get_connections() fails in the last
iteration a read beyond the array is possible.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4ac55982 10-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid quirk for HP dc5750

The present quirk for HP dc5750 seems broken and maps the pins wrongly.
Since the auto-parser works well for this device, set the default entry
to use model=auto.

Reference: Novell bnc#552154
https://bugzilla.novell.com/show_bug.cgi?id=552154

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 95491d90 08-Nov-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use model=auto quirk for Sony VAIO VGN-FW170J using ALC262

BugLink: https://bugs.launchpad.net/bugs/478309

The internal microphone on this VAIO model does not work unless the
"auto" quirk is used.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d355c82a 03-Nov-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: rename "PC Speaker" and "PC Beep" controls to "Beep"

To avoid confusion in control names for the standard analog PC Beep generator
using a small Internal PC Speaker, rename all related "PC Speaker" and "PC
Beep" controls to "Beep" only. This name is more universal and can be also
used on more platforms without confusion.

Introduce also "Internal Speaker" in ControlNames.txt for systems with
full-featured build-in internal speaker.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ad87c64f 02-Nov-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't check invalid HP pin

alc_automute_pin() might be called even if any HP pin is defined, and
it will result in verbs with NID=0.

This patch adds a check for the validity of HP widget before issuing
any verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a1bf8088 01-Nov-2009 Daniel T Chen <crimsun@ubuntu.com>

ALSA: hda: Use quirk mask for Dell Inspiron Mini9/Vostro A90 using ALC268

BugLink: https://bugs.launchpad.net/bugs/368629

We should use a quirk mask for these Dell Inspiron Mini9s and Vostro
A90s, as the model=dell quirk appears to enable audio on them.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b7348a1 14-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix capture source checks for ALC662/663 codecs

The ALC662/663 parser calls wrongly alc880_auto_create_input_ctls()
to check the capture source selections. This should be alc882, instead.

Reference: Novell bnc#546918
http://bugzilla.novell.com/show_bug.cgi?id=546918

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2d9c6482 13-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix overflow of spec->init_verbs in patch_realtek.c

ALC861-VD lenovo model causes overflow of spec->init_verbs entries due to
the recent changes. Simply increase the array size to avoid the overflow.

Reported-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# defb5ab2 07-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix yet another auto-mic bug in ALC268

Since patch_alc268() doesn't call set_capture_mixer() (due to its h/w
design different from other siblings), it needs to call fixup_automic_adc()
explicitly to set up the auto-mic routing. Otherwise the indices for
int/ext mics aren't set properly.

Reference: Novell bnc#544899
http://bugzilla.novell.com/show_bug.cgi?id=544899

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 01d4825d 06-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't pick up invalid HP pins in alc_subsystem_id()

alc_subsystem_id() tries to pick up a headphone pin if not configured,
but this caused side-effects as the problem in commit
15870f05e90a365f8022da416e713be0c5024e2f.

This patch fixes the driver behavior to pick up invalid HP pins; at least,
the pins that are listed as the primary outputs aren't taken any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f8f25ba3 06-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a workaround for ASUS A7K

ASUS A7K needs additional GPIO1 bit setup; it has to be cleared.
Added a new fixup hook for this laptop so that it works as is.

Refernece: Novell bnc#494309
http://bugzilla.novell.com/show_bug.cgi?id=494309

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 15870f05 05-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid initializations for ALC861 auto mode

The recent auto-parser doesn't work for machines with a single output
with ALC861, such as Toshiba laptops, because alc_subsystem_id() sets
the hp_pins[0] while it's listed in line_outs[0].
This ends up with the doubled initialization of the same mixer widget,
and it mutes the DAC route because hp_pins has no DAC assigned.

To fix this problem, just check spec->autocfg.hp_outs and speaker_outs
so that they are really detected pins.

Reference: Novell bnc#544161
http://bugzilla.novell.com/show_bug.cgi?id=544161

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0afe5f89 02-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up name string creation in patch_realtek.c

Use a common helper to create playback controls.
This gives less chance of typos.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7085ec12 02-Oct-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix / improve ALC66x parser

The auto-parser for ALC662/663/272 codecs doesn't work properly when
a speaker is connected to mono NID 0x17, and doesn't handle the dynamic
DAC assignment properly.

This patch fixes the issues and also improves the assignment of DACs
so that HP and speakers can have independent volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3db6c037 22-Sep-2009 Manoj Iyer <manoj.iyer@canonical.com>

ALSA: hda - Added quirk to enable sound on Toshiba NB200

Patch was tested on Toshiba NB200 and is found to enable sound.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 432fd133 30-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Resurrect input-source mixer of ALC268 model=acer

In the commit fdbc66266c21976027938642f60e0f047149a61a, I mistakenly
replaced the capture mixer array for ALC268_ACER to nosrc version
although this should be kept to alt_mixer. Now fixed back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b99dba34 17-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix MSI GX620 mixer

The headphone and speaker mixer elements aren't properly set for
MSI GX620 with targa-8ch-dig quirk.
Also fixed the speaker volume control for other ALC883-targa quirks,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3d3792cb 10-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing model=auto entry for ALC269

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 33d78674 08-Sep-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use auto model for HP laptops with ALC268 codec

The HP laptops with ALC268 codec seem working better with model=auto
than model=toshiba; e.g. the auto model fixes missing digital outputs.
Let's fix quirk entry to choose auto model explicitly.

Tested-by: Jens Jorgensen <jbj1@ultraemail.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a65cc60f 05-Sep-2009 ddiaz@cenditel.gob.ve <ddiaz@cenditel.gob.ve>

ALSA: hda/realtek: Added support for CLEVO M540R subsystem, 6 channel + digital

The model clevo-m540r was created with 6-channel and digital support. All
functions verified except spdif. Tested with a VIT D2000 laptop which has:

[lspci extract]
Audio device [0403]: Intel Corporation 82801H (ICH8 Family) HD Audio
Controller [8086:284b] (rev 03)
Subsystem: CLEVO/KAPOK Computer Device [1558:5409]

[/proc/asound/card0/codec\#0 header]
Codec: Realtek ALC883
Address: 0
Function Id: 0x1
Vendor Id: 0x10ec0883
Subsystem Id: 0x15585409
Revision Id: 0x100002

[Added a comment about HP mute and the model description by tiwai]

Signed-off-by: Dhionel Diaz <ddiaz@cenditel.gob.ve>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e9af4f36 29-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC268/ALC269 headphone pin routing

Fix the headphone pin routing of ALC268/ALC269 codecs. Using alc882
routine doesn't work because alc268/alc269 parser assumes the
independent DACs for both HP and speaker outputs. Need to assign the
DAC depending on the pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a3f730af 31-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix MacBookPro 3,1/4,1 quirk with ALC889A

This patch fixes the wrong headphone output routing for MacBookPro 3,1/4,1
quirk with ALC889A codec, which caused the silent headphone output.
Also, this gives the individual Headphone and Speaker volume controls.

Reference: kernel bug#14078
http://bugzilla.kernel.org/show_bug.cgi?id=14078

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# fc86f954 25-Aug-2009 Denis Kuplyakov <dener.kup@gmail.com>

ALSA: hda - Add full audio support on Acer Aspire 7730G notebook

1) Added support of internal subwoofer (it sounds!!!)
2) Auto muting front speakers and internal subwoofer on headphones plug.
3) Internal mic works.
4) 3 channel mods (jack maps):
black pink blue
2ch: front ext mic line in
4ch: front ext mic surround
6ch: front CLFE surround
Can be changed in mixer.
5) Sound can be recorded from:
Internal mic
Ext mic
Cd
Line in
6) 2 separate capture channels.

Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0d884cb9 25-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve auto-cfg mixer name for ALC662

The last patch in this series is for ALC662; pretty similar as the
previous patch for ALC861-VD.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4fcd491 25-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve auto-cfg mixer name for ALC861-VD

One more patch to give a better name for the primary output controls,
this time for ALC861-VD codec. The change is simple, just checking the
pin connection whether it's a speaker-out. When both speaker and HP
are assigned, we name the volume as "PCM" as this influences on both
outputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c3fc1f50 25-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve auto-cfg mixer name for ALC262

Similar improvements for ALC262 codec like previous two commits:
assign a better name, either Master or Speaker, for the primary output
controls.

However, in the case of ALC262 codec, the necessary changes are larger
than others because we need to check the possibility of different mixer
amps depending on the pins. The pin 0x16 is mono, and bound with the
dedicated mixer 0x0e while other pins are bound with 0x0c. Thus, there
are two possible volumes.

When only one of them is used, we can name it as "Master". OTOH, when
both are used at the same time, they have to be named uniquely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23112d6d 25-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve auto-cfg mixer name for ALC260

Instead of fixed "Front" mixer name, try to assign a better name, e.g.
"Master" or "Speaker" fot the primary output volume controls of ALC260
codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb162b6b 25-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve auto-cfg mixer name for ALC880

When there is only one DAC is used for ALC880, try to assign a better
name, either Speaker or Front, depending on the output pin type.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 05f5f477 25-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Generalize input pin parsing in patch_realtek.c

Provide a standard parser for input pins to create the input mixer
and input source controls instead of having a difference one for each
Realtek codec. The new helper parses the codec connections dynamically
isntead of fixed indicies.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9d0b71b1 24-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reuse ALC268 parser for ALC269

Reuse a part of the code of ALC268 parser for ALC269.
This will change the default output volume either to Front or Speaker
depending on the pin configuration.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3abf2f36 19-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix probe of Toshiba laptops with ALC268 codec

There are many variants of Toshiba laptops with ALC268 codec, and
it seems that a few of them don't work with model=toshiba preset
since they have the secondary ALC268 codec just for HDMI output.
This is a regression due to the previous clean-up work to merge all
Toshiba quirk entries into a single check.

This patch adds the identification of such laptops to apply the
standard BIOS-probing method. Unfortunately, Toshiba laptops have
all the same PCI SSID, so we need to check the codec SSID to identify
each device.

Tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fdbc6626 18-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid capture mixers with some ALC268 models

The auto-mic clean-up patches caused regressions on some ALC268 models
that have no proper input_mux but with "Input Source" mixer elements.
Such a combination results in Oops when accessed.

[A reason why set_capture_mixer() isn't used in patch_alc268() is that
ALC268 codec have HDA_OUTPUT direction for capture volumes unlike other
codecs. Thus it needs own definitions of capture elements.]

This patch fixes the issues:
- Add a capture mixer definition without input-source
- Use the new capture mixer appropriately

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5908589f 11-Aug-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - fix noise issue when recording from digital mic with alc268

With auto config model of alc268 realtek codec, it allows to select any
of possible available digital microphone inputs when only one is
available. For example, when only digital mic in nid 0x12 is available,
on second input source it will allow you to select unavailable digital
mic in nid 0x13. The problem is that selecting unavailable digital mic
creates a source of noise when recording (I'm not sure if this happens
on all machines with alc268 and only one digital mic input, but testing
on a quanta uw1 netbook a lot of noise is introduced in recording from
digital mic 0x12/first input source, when you select the unavailable
digital mic 0x13 for capture source 0x24 in the second input source in
mixer).

Then to avoid noise when recording from digital mic with auto model in
this case, prevent a digital mic input source to be selected if
microphone is not available.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4f5d1706 11-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up init and setup hooks for Realtek codecs

Move static codes to setup from init_hook for each model.

Also, use the common auto-mic selection helper for devices that support
auto-mic selection. They just need to set up ext_mic, int_mic and
auto_mic flag in the setup section.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e9c364c0 11-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add setup hook to ALC preset struct

Added setup hook to ALC preset struct to be called at in the parser
but not at each init callback.
This can be used for setting up the static pins, etc, while the
init hook should be used for updating the status again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b59bdf3b 11-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Check connectivity for auto-mic of Realtek codecs

Some Realtek codecs don't provide the full connections for certain pins
from each ADC; e.g. ACL662/ALC272 gives only one of two digital-mic pins
for each ADC. Thus, depending on the digital mic pin, the ADC/MUX to be
used has to be chosen properly.

This patch adds the check of the connectivity of pins at auto-mic mode.
If no proper connectivity is found, auto_mic flag is turned off to be
sure.

Also the mux_idx is determined during this check so it won't be checked
in the unsol event any more.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dd704698 11-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't override ADC definitions for ALC codecs

ALC269 and ALC861-VD parsers override the ADC definitions
unconditionally without checking the spec definition. This causes
the problem when any inconsistent ADC is set up in the device quirk
(like ALC272 with digital-mic).

This patch avoids the overriding by adding the proper checks.

Reference: Novell bnc#529467
https://bugzilla.novell.com/show_bug.cgi?id=529467

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2a22d3f8 10-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use only one capture stream for auto-mic

When the auto-mic feature is enabled, we should support only one
capture stream.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6c819492 10-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add auto-mic support for Realtek codecs

Added the support for automatic mic selection via plugging for
Realtek codecs (in auto-probing mode). The auto-mic mode is enabled
only when one internal mic and one external mic are present.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 100d5eb3 10-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing vmaster initialization for ALC269

Without the initialization of vmaster NID, the dB information got
confused for ALC269 codec.

Reference: Novell bnc#527361
https://bugzilla.novell.com/show_bug.cgi?id=527361

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 4b35d2ca 02-Aug-2009 Roel Kluin <roel.kluin@gmail.com>

ALSA: hda - Read buffer overflow

Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ce577e8c 03-Aug-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix quirk for Toshiba Satellite A135-S4527

Use model=lenovo instead of model=dallas for Toshiba Satellite A135-S4527
with ALC861-VD codec.

Reference: Novell bnc#526325
https://bugzilla.novell.com/show_bug.cgi?id=526325

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa563af7 31-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Increase PCM stream name buf in patch_realtek.c

The name buf with size 16 is too short for some codec names, e.g.
truncated like "ALC861-VD Analo". Now the size is doubled.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6732bd0d 30-Jul-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda: add HP automute support to Intel ALC889/ALC889A models

It auto mutes all 8-channel outputs at rear panel when
the front panel headphone is connected.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dd7714c9 30-Jul-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda: add 2-channel mode to Intel ALC889/ALC889A models

This 2-channel mode is useful in that it will broadcast
a 2-channel audio stream to all front/side/... ports.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9a11f1aa 28-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reword information messages for BIOS auto-probing mode

The sentense "Unknown model for xxx, ..." makes people too nervous
and drives them to a direction to a wrong "fix" by giving any
mismatching model option.

Let's rephrase the messages to be more nice and easy (at least that
won't make people suspect conspiracies).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a22d543a 26-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Introduce get_wcaps_type() macro

Add a helper macro to retrieve the widget type from wiget cap bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8de56b7d 24-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix mute control with some ALC262 models

The master mute switch is wrongly implemented as checking the pointer
instead of its value, thus it can be never muted. This patch fixes
the issue.

Reference: Novell bnc#404873
https://bugzilla.novell.com/show_bug.cgi?id=404873

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# 87a8c370 23-Jul-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda - Add better Intel IbexPeak platform support

Here are the new sound enabling patches for IbexPeak.

Summary of tested features:

- playback
- Front Headphone: OK
- 8 channel audio: Front/Rear/CLFE/Side all OK

- recording
- Front Mic/Rear Mic: both OK
(front/rear/line mics are selectable in the "Input source" alsamixer control)
- Line In: not working
(in 6ch mode, its amp/mute, direction and route all looks fine,
so I'm a little puzzled)
(hopefully no one will care this feature)

- digital SPDIF input/output: not tested (no equipment)

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 16a433d8 22-Jul-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda-intel: Cleanups for widget connection list handling

This patch adds a check to snd_hda_get_connections() routine for
presence of AC_WCAP_CONN_LIST. Also, make sure that negative error
codes from noted route are handled on all places as errors.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1c20930a 22-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC861 auto-mode parser

Fix the logic of ALC861 auto-mode parser for the outputs.
Instead of assuming the fixed DAC list, parse the conection and assign
the DAC dynamically.

Also, unmute the unused output connections to avoid noises on inputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3f3b7c1a 17-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC268 parser for mono speaker

- Parse the mono output pin 0x16 correctly even as the primary output
- Create "Speaker" volume control if the primary output is a speaker
- Fix the wrong direction of (optional) "Mono" switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9d30937a 09-Jul-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda_intel: more strict alc880_parse_auto_config dig_nid checking

On some IbexPeak systems with ALC889A errors like "azx_get_response
timeout, switching to polling mode: last cmd=0xaf9f000b" are produced,
because non-existent codec #10 is wrongly accessed.

The problem is that snd_hda_get_connections() returns out-of-range result
for NID 0x1c (something like 0xf8f9 or 0xffff).

This patch adds a check to alc880_parse_auto_config() to avoid using
of this out-of-range NIDs. A better fix maybe to improve
snd_hda_get_connections() routine to check for valid NID ranges if
NIDs are expected as result.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 31909b83 09-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the merge error

Fix the merge error at the commit 305355aad89f1b7eb27cb210fad2f9d3c67b2572,
an addition of the missing alc880_gpio3_init_verbs to ALC882_TARGA model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 005b1076 09-Jul-2009 David Heidelberger <d.okias@gmail.com>

ALSA: hda - targa and targa-2ch fix

Simplify ALC882_TARGA and return gpio3 to ALC883_TARGA_DIG and
ALC883_TARGA_2ch_DIG, which I accidentally removed in commit id
64a8be74357477558183b43156c5536b642de134

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 508f7110 08-Jul-2009 Darren Salt <linux@youmustbejoking.demon.co.uk>

ALSA: hda - Missing volume controls for Intel HDA (ALC269/EeePC)

There is a regression, introduced in aa202455eec51699e44f658530728162cefa1307
(in alsa-kernel) which I noticed when trying to use the headphone socket on
my EeeCPC 901: the output was *very* quiet, practically silent.

This patch corrects the control types to that which was obviously intended in
the referenced commit.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b1e4422f 08-Jul-2009 William Weston <weston@sysex.net>

ALSA: hda - Add quirks for RTL888 & RV630/M76 based MSI GX710

Signed-off-by: William Weston <weston@sysex.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa202455 03-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Improve ASUS eeePC 1000 mixer

The mixer elements created for ASUS eeePC 1000 with ALC269 aren't
standard but strange words like "LineOut". Rename the element names
to follow the standard one like "Headphone" and "Speaker".
Also, split the volumes to each so that the virtual master can control
them.

The alc269_fujitsu_mixer is removed because it's now identical with
the new eeepc mixer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8ab9e0af 03-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Manually expand alc882_init_verbs

Instead of expanding alc882_init_verbs to two elements via a macro,
manually expand to each entry. This makes clear that some have already
the full slot for init_verbs array (currently 5).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb638122 03-Jul-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing mixer amp initialization for ALC882

After merting patch_alc882() and patch_alc883(), the initialization of
mixer amp 0x0b was missing in alc882_base_init_verbs[].
This is usually no critical problem, but it can disable the power-saving
as the default state, so better to put to mute these channels.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0d971c9f 30-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix input pinctl for ALC882 auto mode

alc882_auto_init_analog_input() sets the input pins to VREF-80 regardless
of the input pin types although it shouldn't be for line-in pins.

This patch fixes the behavior to follow other codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4953550a 30-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Merge patch_alc882() and patch_alc883()

Merge patch_alc882() and patch_alc883() to the former one since both
codecs have fairly similar connections but just a slight difference.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1d955ebd 29-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing initializations for ALC268 and ALC269

During the changes to clean up / fix the realtek codec initialization
routines in commit 4a79ba34cada6a5a4ee86ed53aa8a73ba1e6fc51,
I forgot to add the check for ALC268 and ALC269.
This resulted in the missing EAPD and COEF setup for these codecs.

This patch adds the missing checks for these codecs.

Reference: bko#13633
http://bugzilla.kernel.org/show_bug.cgi?id=13633

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 684a8842 26-Jun-2009 Tony Vroon <tony@linx.net>

ALSA: hda - Line In for Acer Inspire 6530G model

The Line In connector is set up as PIN_IN by default, using
VREF_HIZ. It is connected to both ADCs, so add it to both
input selectors.
Also add the ability to use the input mix (on a SoundBlaster
one would call this "What You Hear").

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dde65356 25-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G

For Acer Aspire 6930G (1025:015e), acre-aspire-6530g model matches
obviously better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 320d5920 25-Jun-2009 Emilio López <buhitoescolar@gmail.com>

ALSA: hda - Fix acer-aspire-6530g model quirk

Fix the following bugs of acer-aspire-6530g model with ALC888:
- HP jack to mute all speaker outputs including LFE
- Make digital built-in mic working

Signed-off-by: Emilio López <buhitoescolar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 261c2407 25-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add pin-sense trigger when needed for Realtek codecs

Realtek codecs require the pin-sense trigger call before actually
reading the pin-sense. Without this, the pin-detection might not be
done accurately.

This patch adds the pin-capability check and issues the trigger call
if required.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c927b4a 22-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add digital-mic support to ALC262 auto model

Add the digital-mic support with ALC262 auto model.
The new ALC262 models have the digital mic at NID 0x12. This widget
isn't checked in the current alc262_auto_create_analog_input_ctls()
since it's under 0x18. So, just reuse the routine for alc269 to fix
the behavior.

But, it doesn't suffice: the digital mic is supported only with the
ADC0, we have to exclude other ADCs when d-mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0169b6b3 22-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix check of input source type for realtek codecs

Fix the check of the input-source type by checking the widget type of
each capture-source item. Since some codecs can have both the mixer
and selector types depending on the ADC, alc_mux_enum_put() needs to
check each widget.

With this change, spec->capture_style gets unneeded, so it's removed,
too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 376b508f 22-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Sony VAIO Z21MN

It needs model=toshiba-s06 to work with the digital-mic.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# ae14ef68 22-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model

The commit f9e336f65b666b8f1764d17e9b7c21c90748a37e
ALSA: hda - Unify capture mixer creation in realtek codes
removed the "Input Source" mixer element creation for toshiba-s06 model
because it contains a digital-mic input.

This patch take the control back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>


# b1a91469 21-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add model=6530g option

Add the new model string corresponding to the previous Acer Aspire
6530G support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2fd4b09 20-Jun-2009 Tony Vroon <tony@linx.net>

ALSA: hda - Acer Inspire 6530G model for Realtek ALC888

The selected 4930G model seemed to keep the subwoofer 'tuba'
function from operating correctly. Removing the existing PCI
ID match made this work again, but it was mapped to 'Side'
instead of to LFE as one would expect.
This attempts to enable all functionality and keep the amount
of available mixer sliders low. Any slider that had no audible
effect on the output audio has been removed, and as such EAPD
is not currently enabled.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# def319f9 16-Jun-2009 Sasha Alexandr <brina_keith@ns.sympatico.ca>

ALSA: HDA - Correct trivial typos in comments.

Correct some trivial typos in comments.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c259249f 16-Jun-2009 Sasha Alexandr <brina_keith@ns.sympatico.ca>

ALSA: HDA - Name-fixes in code (tagra/targa)

Correct some cut+paste typos from 'tagra' to 'targa'.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# df01b8af 16-Jun-2009 Sasha Alexandr <brina_keith@ns.sympatico.ca>

ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.

Add pci-quirk for MSI MS-7350 motherboard with Realtek ALC888.

Signed-off-by: Sasha Alexandr <brina_keith@ns.sympatico.ca>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e46b0c8c 13-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Acer Aspire 6935G

Added model=acer-aspire-8930g for Acer Aspire 6935G (1025:0146).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f03ecf50 08-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the previous tagra-8ch patch

- Fix a typo in the patch
- Adapted to follow the recent change for unsol event handling

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 64a8be74 08-Jun-2009 David Heidelberger <d.okias@gmail.com>

ALSA: hda - Add 7.1 support for MSI GX620

Added 7.1 support for MSI GX620 and jack quirk.

Reference: kernel bug#13430
http://bugzilla.kernel.org/show_bug.cgi?id=13430

Signed-off-by: David Heidelberger <d.okias@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3e1647c5 04-Jun-2009 Guido Günther <agx@sigxcpu.org>

ALSA: support Sony Vaio TT

with BIOS probing only we offer a non functional headphone swith and
volume slider.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 018df418 03-Jun-2009 Hector Martin <hector@marcansoft.com>

ALSA: hda - More Aspire 8930G fixes

Enable all three capture channels, including the missing nid 7 which is
the only one capable of capturing DMIC input

Enable Headphone amp for the HP jack. This causes a volume boost for
headphones, but does not cause any noticeable effect for light loads
like other amps, so there is no need to make it configurable.

Add Input Mix capture mux setting to capture the output of the playback
input mux (that is, what goes out the speakers except for PCM)

Hack another coef register because the stereo DMIC for some reason
produces a nonstandard sum/difference signal. I found a bit to make it
just use the sum signal for both channels, which makes it behave like a
standard mono microphone. The stereo is useless anyway (they're 1cm apart).

Tested working: Three capture channels, mic in, line in, DMIC.

Tested not working: CD. Not sure why, might be unconnected in the actual
hardware or a CD drive issue.

Also looked at SPDIF. It appears to work (emitter lights up inside the
HP out jack) but I lack a proper miniTOSLINK cable to test it.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3b315d70 02-Jun-2009 Hector Martin <hector@marcansoft.com>

ALSA: hda - Acer Aspire 8930G support

Short story: this laptop has 5.1 built-in speakers which you *really*
want to use (the not-so-"sub" woofer is what makes the audio above
average for a laptop), so 6-channel support is important (plus a decent
asound.conf to upmix stereo). It also has the 3 typical jacks that ought
to have a selectable mode. And it's based on ALC889, which sucks.

Rationale/explanations:

The const_channel_count stuff was added because, for a laptop like this,
you always have 6 channels available (internal speakers) but still need
to set the mode for the 3 external jacks. Therefore, the device always
needs to be in 6-channel mode but there still needs to be a mixer
control for the jack mode. You could use line/mic-in at the same time as
the 6 internal speakers, for example. You might be tempted to make it
even smarter by dynamically switching the max channel count when
headphones are plugged in (therefore muting the internal speakers and
reducing the physical channel count to the jack channel mode), but as a
user I consider this to be harmful because I want the audio to blow up
to 6 channels / upmixed as soon as I unplug the headphones, and having
opened the device while in 2-channel mode would prevent this from
working (and always making 6-channel mode available doesn't do any harm).

The hardware needs EAPD turned on and the DACs routed to the internal
speaker pins, so the patch adds those verbs.

The ALC889 CLFE and subsequent (side/aux, here unused) DACs do NOT work
by default, at least here. I wasted much time trying to talk to
Realtek/pshou about this, but they just kept sending me useless updates
to patch_realtek.c that did nothing relevant. In the end I gave up and
brute forced the issue by trying to flip every bit in the proprietary
coefficient registers, and eventually found the two magic registers that
need to be cleared to enable all DACs. I have only heard Acer users
complain, but that might be because ALC889 is pretty new and using 5.1
(and noticing the missing center/lfe channels) might not be that common.
If this is a generalized issue with all ALC889 systems then those verbs
should probably be moved to a common verb array.

The internal mic is untested and probably doesn't work.

These settings will probably work for other Acer Gemstone laptops with
the same 5.1 speaker config. When identified, those should be added to
the PCI subsystem ID list.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8871e5b9 01-Jun-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Reorder and clean-up ALC268 quirk table

Rearrange alc268_cfg_tbl[] in the order of vendor id, and group some
entries using SND_PCI_QUIRK_MASK().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d22142aa 01-Jun-2009 Ozan Çağlayan <ozan@pardus.org.tr>

ALSA: hda - fix audio on LG R510

Currently, LG R510 is only able to produce sound on headphones, the
internal speakers are not working.

The user tested and confirmed that with model=Dell headphones,
internal speakers and the microphone are working flawlessly.

Tested-by: Serdar Soytetir <tulliana@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92b9de83 01-Jun-2009 Kacper Szczesniak <kacper@qwe.pl>

ALSA: hda - Macbook[Pro] 5 6ch support

this is a patch against current snapshot that adds:
6 channels support for the MB5 model

Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0e4835c1 25-May-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: hda-intel: improve initialization for ALC262_HP_BPC model

Fix issues for 3 generations of HP workstations.

The modest modifications do the following:
1. Change the second MIC from device 3 to device 1
2. Init the "boost" values to "0" by default

From: John Brown <john.brown3@hp.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 461c6c3a 25-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs

Some Realtek codecs like ALC861 seem to support only VREF50 while the
current driver assumes it's only VREF80. Check other VREF bits to set
the correct value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 87488957 21-May-2009 Adam Williamson <awilliam@redhat.com>

ALSA: hda - fix audio on HP TX25xx series notebooks

Fixes https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4121

Taken from https://bugzilla.redhat.com/show_bug.cgi?id=498060

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb4c41d3 18-May-2009 Torben Schulz <public@letorbi.de>

ALSA: hda - Improved MacBook 3,1 support

This patch adds support for MacBook 3,1 sound by adding a model new
"mb31" with the appropriate init verbs, mixers and channel modes to
the ALC883 configuration. patch_alc882() and patch_alc883() are
modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A)
correctly.

Signed-off-by: Torben Schulz <public@letorbi.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6c627f39 17-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Show the actual chip name in 'unkown model' messages

Show the actual chip name in 'unknown model..' info messages for
Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 812a2cca 16-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Split codec->name to vendor and chip name strings

Split the name string in hda_codec struct to vendor_name and chip_name
strings to be stored directly from the preset name.
Since mostly only the chip name is referred in many patch_*.c, this
results in the reduction of many codes in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7442f9da 14-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a quirk entry for Macbook Pro 5,1

Added the codec SSID for MacBook Pro 5,1 as compatible as MP51.
However, the headphone auto-muting function doesn't work. So,
this is just a tentative solution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 22b530e0 13-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable fallback to model=acer for Acer laptops

The model=acer for ALC883/889 doesn't work well for the recent Acer
Aspire laptops. Since model=auto works better nowadays, it's safer
to use the default fallback instead of the Acer specific one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9541ba1d 12-May-2009 Chris Pockelé <chris.pockele.f1@gmail.com>

ALSA: hda - Add support of Samsung NC10 mini notebook

Add specific configuration for Samsung NC10 mini notebook. Internal
mic/speakers will be correctly muted when plugging in external ones.
Mixer controls are added for speakers, headphones and PC beep.
"Boost" is added for the microphones.

Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 01f2bd48 11-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing models for Realtek codecs

Added the missing descriptions and the model names for Realtek codecs
to the documentation and the config table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a9fd4f3f 08-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up Realtek auto-mute unsol routines

Most of unsol handlers defined in patch_realtek.c can be classified to
two types, mute via amp of pins and mute via ctl bits of pins.
Thus there are a big room to generalize each implementation.

This patch creates two generic functions, alc_automute_amp() and
alc_automute_pin(). The latter is actually changed from the previous
alc_sku_automute(). Each caller needs to initialize hp_pins and
speaker_pins properly at own init_hook.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b72519b5 08-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up for ALC262 HP model auto-mute functions

Just clean up, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 42171c17 08-May-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix and clean up hippo-compat HP auto-muting

The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible
devices is slightly buggy as the "Master" or "Front" mixer control can
still toggle the speaker output even if the headphone is plugged.

This patch fixes the issue, and clean up the hippo-related codes
together with fixes of some inconsistent mixer names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 41d5545d 06-May-2009 Kacper Szczesniak <kacper@qwe.pl>

ALSA: hda - Add support for MacBook 5.1 (Aluminium)

Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb6605c1 28-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix a typo in patch_realtek.c again

The commmit dfed0ef9b3ff9e37903920b6938ed33344ad0b3d was reverted
accidentally by the merge of auto-detection fix patch.

Fixed again now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2a2ed0df 28-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c

Enable auto-muting in model=auto only for devices with HP and speakers.
For devices with HP and line-outs, don't enable the auto-muting.

Also, add a debug print to show the auto-mute feature.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a79ba34 22-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add amp initialization for realtek auto mode

In the realtek auto-probing mode, the initialization of amp with
some magic COEF or EAPD verbs is applied only when the codec SSID
has valid values to satisfy the realtek's definition.
However, many devices don't provide in that way, thus the device
doesn't work as is.

This patch allows the same initialization code even if the SSID
doesn't pass the bit test. Also, alc_subsystem_id() is changed
just to check and define the type, so that it's called in the
parser, instead of the initializer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5bd3729f 21-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Packard Bell RS65

Added a quirk (model=m51va) for Packard Bell RS65 with ALC663.

Reference: Novell bnc#496787
https://bugzilla.novell.com/show_bug.cgi?id=496787

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dfed0ef9 21-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix a typo in debug print for realtek auto-detection

The NID and ASS numbers were swapped...

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 586be3fc 24-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add debug prints for Realtek auto-init

Added a couple of debug prints to show the checked id numbers in
alc_subsystem_id().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 622e84cd 20-Apr-2009 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add quirks for Realtek codecs

- Support ASUS F81Se F5Q P80 U20A U80 U50 UX50 for ALC269
- Support ASUS F70SL UX20 X58LE F50Z N80Vc N81Te N505Tp Vx3V N5051A
for ALC663
- Support DELL ZM1 for ALC272

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bb023080 20-Apr-2009 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix alc662_init_verbs

Don't unmute unneeded amps for input mixers of ALC662 & co.
It caused possible recording noises.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bfb53037 14-Apr-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk mask for Fujitsu Amilo laptops with ALC883

Added the models for quirk bitmask 1734:110x and 1734:113x of
Fujitsu laptops.

This will fix the model detection for Amilo Xa3540.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f3cd3f5d 02-Apr-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda - enable SPDIF output for Intel DX58SO board

ALC889 has two SPDIF outputs: 0x06, 0x10. Board vendors can use either or both.
DX58SO uses 0x10, but the driver assumes 0x06. The safe solution is to add
0x10 as slave output to the existing 0x06.

Reported-by: Jeroen Van Breedam <jeroen.vanbreedam@sgr5.be>
Tested-by: Jeroen Van Breedam <jeroen.vanbreedam@sgr5.be>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b6682ff 23-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Acer Ferrari 5000

Add a quirk model=acer-aspire for Acer Ferrari 5000 with ALC883 codec.
Note that model=auto doesn't work for this laptop because of broken BIOS
(that doesn't set the subsystem id properly).

Tested-by: Russ Dill <russ.dill@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a23b688f 23-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't create empty/single-item input source

In patch_realtek.c, don't create empty or single-item "Input Source"
control elements that are simply superfluous.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e82c025b 23-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix the wrong pin-cap check in patch_realtek.c

The check for the amp-output must be done for widget-caps rather than
pin-caps as implemented in the recent change... Simply a thinko.

Also, add the similar checks to all places that put output-amp mutes
in the initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1327a32b 23-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Cache pin-cap values

Added snd_hda_query_pin_caps() to read and cache pin-cap values
to avoid too frequently issuing the same verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 52ca15b7 22-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid output amp manipulation to digital mic pins

Don't set amp-out values to pins without PINCAP_OUT capability,
which are usually assigned for digital mics on ALC663/ALC272.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2d864c49 19-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Detect digital-mic inputs on ALC663 / ALC272

Fix the detection of digital-mic inputs on ALC663 / ALC272 codecs
in the auto-detection mode. The automatic mic switch via plugging
isn't implemented yet, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b9591448 16-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC662 beep again

The previous commit breaks the (digital-) beep on ALC662.
ALC662 has the connection index 0x05 while ALC662 and ALC272 have the
index 0x04 for the beep widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b8dbed0f 16-Mar-2009 Jaroslav Kysela <perex@perex.cz>

ALSA: snd-hda-intel: Fix ALC662/ALC663 Beep Amplifier Index

ALC662/663 codecs have Beep Amplifier Index 0x04 not 0x05 in 0x0b NID.
Confirmed by testing on real hardware.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f03d3115 05-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: Fix sample rate of Lenovo Ideapad to 44.1kHz

Noises can be heard on analog outputs of (some model of) Lenovo
Ideapad due to the hardware problem, and the only workaround right now
is to fix the sample rate to 44.1kHz.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 37db623a 05-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix check of ALC888S-VC in alc888_coef_init()

Fixed the wrong bits check to identify ALC888S-VC model in
alc888_coef_init().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7ec30f0e 04-Mar-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Map 3stack-hp model (ALC888) for HP Educ.ar

Added model=3stack-hp for HP Educ.ar desktop machine (103c:2a72).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8718b700 04-Mar-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Add headphone automute support for 3stack-hp model (ALC888)

Mute speaker outputs on headphone insertion for machines that use
3stack-hp model.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3ea0d7cf 04-Mar-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Add 4 channel mode for 3stack-hp model (ALC888)

Add additional 4 channel mode for 3stack-hp models.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bd6afe3f 04-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix conflict of mixer controls on Sony VAIO VGN-AR71S

The recent update enabled the model=sony-assamd for all ALC262 with
PCI SSID 104d:90xx. But this includes the VAIO VGN-AR* that has the
primary codec of STAC92xx and the secondary ALC262 as a slave
digital-only codec. For this device, the model=auto must be chosen
to work properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 892981ff 02-Mar-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't create a beep control for digital-only ALC268

When an ALC268 codec is set up as the digital-only (as found in Toshiba
laptops), it shouldn't contain any beep control that conflict with the
primary codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c82c8abd 27-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix an "unused variable" compile warning

Forgot to remove an unused variable.
sound/pci/hda/patch_realtek.c: In function ‘alc882_auto_init_analog_input’:
sound/pci/hda/patch_realtek.c:7018: warning: unused variable ‘vref’

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 53eff7e1 27-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Match all 103c:17xx devices for HP BPC model

Use SND_PCI_QUIRK_MASK() to match all devices with 103c:17xx for
HP BPC model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bb543c96 27-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for new HP xw series

Added model=hp-bpc for new HP xw series (103c:170b).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 23f0c048 26-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up the input pin setup in automatic mode

Clean up the input-pin setup in automatic mode in patch_realtek.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f872a919 25-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Clean up / fix quirk for Sony laptops with ALC262

Clean up / fix quirk entries for Sony laptops with ALC262 codec
using NSD_PCI_QUIRK_MASK().

This also fixes the kernel bug #12780
http://bugme.linux-foundation.org/show_bug.cgi?id=12780

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc374c47 23-Feb-2009 Juan Jesus Garcia de Soria <skandalfo@gmail.com>

ALSA: hda - Quirk for Acer Aspire 6530G

The Acer Aspire 6530G needs the 4930G "model" for the front mic to
work properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2d466381 22-Feb-2009 Luke Yelavich <themuso@ubuntu.com>

ALSA: hda - add another MacBook Pro 3,1 SSID

Reference: Ubuntu bug #33245
https://bugs.launchpad.net/bugs/332456

Signed-off-by: Luke Yelavich <themuso@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cc959489 22-Feb-2009 Michael Schwingen <michael@schwingen.org>

ALSA: hda - add support for "Maxdata Favorit 100XS" (Intel HDA/ALC260)

Signed-off-by: Michael Schwingen <michael@schwingen.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0e8a21b5 20-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove realtek codec-specific pin save/restore functions

Now it's done in the common code.
Also use the common access functions for pin defaults.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7e0e44d4 19-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add digital-only mode for ALC268

ALC268 can be configured as digital-only, e.g. for HDMI, on some
machines. Allow the parser to set up the digital-only mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ab9fec09 19-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Avoid doubly beep attachment in patch_alc268()

Remove the doubly attachment in patch_alc268().
The input beep is attached conditionally only when needed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 07eba61d 19-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't enable beep for digital-only ALC262

When ALC262 codec is configured as digital-only, it's meaningless to
add the digital beep input.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b3bdb30b 18-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Acer X3200

Acer X3200 needs model=auto, otherwise model=acer is pre-selected.

Reference: Novell bnc#476268
https://bugzilla.novell.com/show_bug.cgi?id=476268

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6a05ac4a 13-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Support multiple digital outs with auto-probing

Added the support of multiple digital outputs via auto-probing for
Realtek ALC88x codecs. The multiple outputs are handled as slave
streams, so only one PCM stream (and the corresponding IEC958*
elements) is provided to control both digital outputs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9b5f12e5 13-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add proper cleanup for multiout-dig for ALC codecs

The recent patch_realtek.c contains the slave digital-out support
as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 94683507 13-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Acer AX1700-U3700A

Force model=auto for Acer AX1700-U3700A with ALC888 codec.
Since Acer devices are handlded as model=acer as default, the auto
parsing has to be specified explicitly.
(Maybe it's better rather to remove this default model=acer handling,
though.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0852d7a6 11-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Detect multiple digital-out pins

Detect multiple digital-out pins in snd_hda_parse_pin_defconfig().
The dig_out_pin and dig_out_type fields become arrays.

The codec parser still doesn't use this multiple pins detection, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 44a678d0 10-Feb-2009 Mackenzie Morgan <macoafi@gmail.com>

ALSA: hda - Add quirk for Asus z37e (1043:8284)

Added a quirk for Asus Z37E for fixing suspend/hibernation problem.

Reference:
https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/25896
http://launchpadlibrarian.net/17053575/0001-Add-quirk-for-ASUS-Z37E-to-make-sound-audible-afte.patch
https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=4282

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 22971e3a 10-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - add digital beep support for ALC268

Added the digital beep support for ALC268. It was missing in the
last patches.

However, ALC268 has a strange pin use for widget 0x1d, which could be
used as another purpose. So, the patch adds a check of the beep control
before creating the hook for input layer.

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>


# cfb9fb55 06-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix unused variable compile warning

sound/pci/hda/patch_realtek.c:12693: warning: unused variable ‘i’

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a4ddeba9 06-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Remove superfluous code in patch_realtek.c

codec->spec is reset in the caller side.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 45bdd1c1 06-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create beep mixer controls dynamically for Realtek codecs

Create beep mixer controls dynamically for Realtek codecs instead of
static arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a5a4c56 05-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing COEF initialization for ALC887

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c6e8f2da 05-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing initialization for ALC272

ALC272 needs EAPD for speaker outputs as well as other similar ALC
codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b25c9da1 06-Feb-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: enable concurrent digital outputs for ALC1200

Add the SPDIF pin as slave digital out to enable concurrent
HDMI/SPDIF outputs for ASUS M3A-H/HDMI with ALC1200 codec.

Tested-by: Thomas Schneider <nailstudio@gmx.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 939778ae 05-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add missing KERN_* prefix to printk

... and disable the annoying debug message.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f67d8176 04-Feb-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for FSC Amilo Xi2550

Added model=fujisu-pi2515 for FSC Amilo Xi2550 with ALC883 codec.

Refernece: Novell bnc#450979
https://bugzilla.novell.com/show_bug.cgi?id=450979

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 680cd536 04-Feb-2009 Kusanagi Kouichi <slash@ma.neweb.ne.jp>

ALSA: hda: Add digital beep generator support for Realtek codecs.

A digital beep generator can be used via input layer.

Signed-off-by: Kusanagi Kouichi <slash@ma.neweb.ne.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ba340e82 02-Feb-2009 Tony Vroon <chainsaw@gentoo.org>

ALSA: hda - Add tyan model for Realtek ALC262

The Realtek ALC262 on the Tyan Thunder n6650W (S2915-E) mainboard has a
rather odd configuration template. As a result, the white AUX connector
can not be used. This rewrites the default config to more accurately
reflect the connector layout, colour and function.
Unfortunately the black CD_IN connector, which is suspected to be widget
0x1c refuses to switch into input (0x20), instead opting to remain on 0x0.
As such, no mixer controls are exposed for it. Autoswitching is implemented
between the front headphone output and back line output.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3077e44c 31-Jan-2009 Mark Eggleston <mark_r_eggleston@yahoo.co.uk>

ALSA: hda - Add support of iMac 24 Aluminium

Added the support for 24" Aluminium iMac (106b:3e00)

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b98b7b34 29-Jan-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - make alc882_auto_init_input_src aware of selectors

In the case of having a selector instead of mixer while initing input
sources, the case that happens with ALC889, we must select instead
of muting input. Problem was found while testing with hda-emu.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 61b9b9b1 28-Jan-2009 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Consider additional capture source/selector in ALC889

Currently code for capture source support in ALC889 only considers
capture mixers. This change adds additional support for ADC+selector
present in ALC889, taking into account also the presence of an
additional DMIC connection item in the selector.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2a88464c 27-Jan-2009 Luke Yelavich <themuso@ubuntu.com>

ALSA: hda - add another MacBook Pro 4, 1 subsystem ID

Add another MacBook Pro 4,1 SSID (106b:3800). It seems that latter revisions,
(at least mine), have different IDs to earlier revisions.

Signed-off-by: Luke Yelavich <themuso@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4cfb91c6 22-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix invalid amp init for ALC268 codec

Fix some invalid AMP initializations for ALC268 codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e64f14f4 20-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Allow digital-only I/O on ALC262 codec

Some laptops like VAIO have multiple codecs and uses ALC262 only for
the SPIDF output without analog I/O. So far, the codec-parser assumes
the presence of analog I/O and returned an error for such a case.

This patch adds some hacks to allow the digital-only configuration for
ALC262.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8c441982 20-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Assign proper digital I/O type for STAC/IDT

Assign the proper PCM digital I/O type (HDA_PCM_TYPE_*) for the digital
I/O on STAC/IDT codecs. HDA_PCM_TYPE_HDMI is assigned for the HDMI I/O.

A similar framework is implemented to patch_realtek.c, but it's not
set up and still using only HDA_PCM_TYPE_SPDIF yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2de686d2 15-Jan-2009 Luke Yelavich <themuso@ubuntu.com>

ALSA: hda - add quirks for some 82801H variants to use ALC883_MITAC

Add the 82801H variants 1071:8227 and 8086:2503 to use ALC883_MITAC

Reference: Ubuntu bug 210865
https://bugs.launchpad.net/bugs/210865

Signed-off-by: Luke Yelavich <themuso@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3e420e78 15-Dec-2008 Luke Yelavich <themuso@ubuntu.com>

ALSA: hda - Add automatic model setting for Samsung Q45

Have the Samsung Q45 (144d:c510) select ALC262_HIPPO by default

Reference: Ubuntu bug 200210
http://launchpad.net/bugs/200210

Signed-off-by: Luke Yelavich <themuso@ubuntu.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4b558991 11-Jan-2009 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda - add support for Intel DX58SO board

The Intel DX58SO board works fine with model ALC883_3ST_6ch_INTEL.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5a9e02e9 09-Jan-2009 Wu Fengguang <wfg@linux.intel.com>

ALSA: hda - create hda_codec.control_mutex for kcontrol->private_value

Fix the following lockdep warning by not reusing the hda_codec.spdif_mutex.

ALSA sound/pci/hda/hda_codec.c:882: hda_codec_cleanup_stream: NID=0x2

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.28-next-20090102 #33
-------------------------------------------------------
mplayer/3151 is trying to acquire lock:
(&pcm->open_mutex){--..}, at: [<ffffffffa004ced3>] snd_pcm_release+0x43/0xd0 [snd_pcm]

but task is already holding lock:
(&mm->mmap_sem){----}, at: [<ffffffff810c0252>] sys_munmap+0x42/0x80

which lock already depends on the new lock.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 57d13927 08-Jan-2009 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Dell Inspiron Mini9

Added a quirk, model=dell, for Dell Inspiron Mini9 with ALC268 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a8e4f9dd 07-Jan-2009 Lukasz Wojnilowicz <lukasz.wojnilowicz@gmail.com>

ALSA: hda - Add quirks for Acer Aspire 5930G and 6930G

This is a patch which adds correct auto detection of model for
snd-hda-intel for Acer Aspire 5930G and 6930G. Tested on my 5930G. It
finally adds hp jack sense and 5.1 speaker system sliders.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 06bf3e15 01-Jan-2009 Chris Bagwell <chris@cnpbagwell.com>

LSA: hda - Add HP Acacia detection

Add automatic mapping of HP Acacia motherboards to 3stack-hp. Allows
for greater then 2 channel audio by enabling Channel Mode option in mixer.

Motherboard specs:
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01321559&lc=en&dlc=en&cc=us&product=3829353&os=2093&lang=en#

Signed-off-by: Chris Bagwell <chris at cnpbagwell dot com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3fea2cb0 25-Dec-2008 Wu Fengguang <fengguang.wu@intel.com>

ALSA: hda - fix name for ALC1200

Move the more specific preset for ALC1200 above the general one for
ALC888, so that it will have the chance to get matched and selected.

Reported-by: Thomas Schneider <nailstudio@gmx.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 57a5ef48 28-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for Sony VAIO VGN-SR19XN

Added model=sony-assamd for Sony VAIO VGN-SR19XN with ALC262 codec.
Reference: Novell bnc#450080
https://bugzilla.novell.com/show_bug.cgi?id=450080

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# daead538 27-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add codec-specific proc hook

Added a hook for proc outputs of codec-specific stuff.

Moved realtek-specific coeff output into patch_realtek.c as well.

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>


# 30d72e9f 27-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix creation of automatic capture mixers

Fixed a wrong boundary check of num_adc_nids in set_capture_mixer()
in patch_realtek.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ee09543c 25-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add quirk for MSI 7260 mobo

Added preset model=targa-dig for MSI 7260 mobo.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ef8ef5fb 22-Nov-2008 Vincent Petry <PVince81@yahoo.fr>

ALSA: hda: Added an ALC888 model entry for Fujitsu-Siemens Amilo Xa3530

This patch fixes the bug 0004240: ALC888 - Intel HDA - Headphone Controlling.
It is made against the 2008-11-23 snapshot.

Added Realtek ALC888 model entry for the Fujitsu-Siemens Amilo Xa3530
laptop. It has 4 jacks: HP out, Mic-in, Line-in and Line-out/Side/SPDIF
(this one is on the laptop side, the other ones are on the rear).

Model detection works.
Headphone jack sense works now.
Front mic works now, was same as Acer Aspire 4930G.
Added channel mode from 2 to 8 channels.

In 2ch and 4ch modes, the front is also sent to the Line-out/side jack
for convenience instead of just muting the Line-out/side jack like other
models do.

When using the Mic-in jack as CLFE, the sound is very low (bug?). To
work it around, in 6ch mode the CLFE channel is duplicated to the
Line-out/side jack because this one has a better amp.

Cc: manu@frogged.de
Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5b2d1eca 18-Nov-2008 Vincent Petry <PVince81@yahoo.fr>

ALSA: hda: Added Realtek ALC888 model entry for Acer Aspire 4930G laptop

Added Realtek ALC888 model entry for the Acer Aspire 4930G laptop that
fixes the following features:
- internal microphone
- heaphone jack sense
- channel mode

Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cd896c33 17-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Allow multiple imux for matrix-type mixers of ALC codecs

Allow the multiple imux instances for matrix-type mixers like ALC882.
So far, only ALC260 used this feature, but other codecs may need a
similar stuff.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3ab90935 17-Nov-2008 Wu Fengguang <wfg@linux.intel.com>

ALSA: hda: alc883 model for ASUS P5Q-EM boards

Add a new alc883 model ALC1200_ASUS_P5Q for ASUS P5Q-EM boards.
It is the same as ALC883_6ST_DIG except that the SPDIF digital
output nid is 0x10.

Tested-by: Andrei Tanas <andrei@tanas.ca>
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 30cde0aa 07-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC260 hp3013 master switch

The master switch doesn't influence on NID 0x15, the headphone jack
on HP 3013 model because alc260_hp_master_update() ignores the passed
arguments.

Also, corrected the wrong arguments of hp3013 (0x10 and 0x15) although
this doesn't change any behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 64154835 06-Nov-2008 Tony Vroon <tony@linx.net>

ALSA: hda - Add lifebook model for Realtek ALC269

The widget layout of the Fujitsu Lifebook S6420 (which is ICH9M-based
and uses an ALC269) is similar but not identical to the Lifebook
S6410/E8410 (which are ICH8M-based and use an ALC262).

It is named lifebook as fujitsu is in use for Amilo machines. This builds
on the Quanta FL1 work and supports all analog inputs & outputs that I am
aware of. Microphone autoswitch is implemented. The laptop mic port takes
precedence over the dock mic port if both happen to have a jack plugged in.
This made sense to me as a design decision (imagine a presentation
environment with the dock fully wired in and the presenter quickly wanting
to override the mic with a headset).

There is mention of a digital audio path on the codec graph, so perhaps
the headphone socket is dual-function analog/digital. I will follow up
with another patch if I can acquire equipment to test this.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c238b4f4 05-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Split ALC268 acer model

There are actually two variants of ALC268 Acer implementation, one
with an analog built-in mic (pin 0x19) and another with a digital
mic (pin 0x12). Created a new model, acer-dmic, for the latter case
now.

So far, all known models are assigned to be analog-mic, according to
the BIOS setup. If this doesn't match with the actual case, one needs
to try model=acer-dmic, and fix the entry to point ALC268_ACER_DMIC
if it works.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 959973b9 05-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a quirk for MEDION MD96630

Use model=lenovo-ms7195-dig for MEDION MD96630 laptop (17c0:4085)
with ALC888 codec.
Reference: Novell bnc#412548
https://bugzilla.novell.com/show_bug.cgi?id=412528

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 13c94744 05-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add ASUS V1Sn support

Asus V1s series laptops have an ALC660VD with PCI id: 0x1043, 0x1633.
1.) remove the previous behaviour of mapping that to the ALC861VD_LENOVO
device.
2.) add a new ALC660VD_V1S device based on ALC861VD_LENOVO, with an
added digital out.

Signed-off-by: Tristan Aston <astrotris@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4ef0ef19 03-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix missing ADC list in ALC260 auto-probe mode

The commit f9e336f65b666b8f1764d17e9b7c21c90748a37e
ALSA: hda - Unify capture mixer creation in realtek codes
removed the ADC check for ALC260 auto-probe mode accidentally.
Re-added to patch_alc260() again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 26f5df26 03-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add ALC299 fujitsu preset model

Added a preset model for FSC Amilo with ALC269 codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 69e50282 03-Nov-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add a quirk for another Acer Aspire (1025:0090)

Added a quirk for another Acer Aspier laptop (1025:0090) with ALC883
codec. Reported in Novell bnc#426935:
https://bugzilla.novell.com/show_bug.cgi?id=426935

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3c3e9892 31-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Re-add input-source control for Realtek

Re-added again "Input Source" control that was removed mistakenly
in the previous patchset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f9e336f6 31-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Unify capture mixer creation in realtek codes

Unified the capture mixer creation in patch_realtek.c.

ALC268 is still an exception since it has no AMP in ADC but in
MUX widget.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54cbc9ab 31-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Unify capture callbacks in realtek codes

Unify the capture callbacks in patch_realtek.c.
The difference of matrix or mux style is checked via spec->is_mix_capture
flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d88897ea 31-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Use macros to check array overflow

Use macro to add mixer and verb elements to check the possible
array overflow.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ee956e09 31-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add digital-mic for ALC269 auto-probe mode

The digital mic wasn't detected properly for ALC269 auto-probing mode
because of its widget number. Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4605b718 31-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Disable broken mic auto-muting in Realtek codes

The recent addition of automatic mic-muting is broken in some cases.
The code assumes that the pin nids <= 0x18, but the digital pins can
be less than 0x18.
Also, it assumes the front-mic being the internal mic, but it depends
on the hardware implementation actually.

Instead of complex case-fixes, better to disable the code as now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e044c39a 27-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Restore default pin configs for realtek codecs

Some machines have broken BIOS resume that doesn't restore the default
pin configuration properly, which results in a wrong detection of HP
pin. This causes a silent speaker output due to missing HP detection.
Related bug: Novell bug#406101
https://bugzilla.novell.com/show_bug.cgi?id=406101

This patch fixes the issue by saving/restoring the default pin configs
by the driver itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 863b4518 21-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix conflicting volume controls on ALC260

ALC260 auto-parsing mode may create multiple controls for the same volume
widget (0x08 and 0x09) depending on the pin. For example, Front and
Headphone volumes may control the same volume, just the latter one wins.

This patch adds a proper check of the existing of the volume control
and avoid the doulbed creation of the same volume controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 80ffe869 15-Oct-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix quirk lists for realtek codecs

- Fix Toshiba S06 SSID to 1179:ff7b
- Fix ASUS G50V quirk name
- Add ASUS N20 quirk

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 01afd41f 15-Oct-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ALC272

Added the support of ALC272 codec. It's almost compatible with ALC663.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a385a529 15-Oct-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add ALC887 support

Added ALC887 support. It's almost compatible with ALC883/888.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4442608d 15-Oct-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add ALC1200 support

Add ALC1200 codec support. Almost compatible with ALC888.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a01c30cb 15-Oct-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Fix PCI SSID of ASUS M90V

ASUS M90V has PCI SSID 1043:1873. Corrected in the quirk list.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7fb0d78f 15-Oct-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add auto mic switch in realtek auto-probe mode

Add the automatic mic switch via jack sensing in auto-probe mode
for Realtek codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
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>


# 238713d4 05-Oct-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix PCI SSID for ASROCK K18N78FullHD-hSLI

The PCI SSID for ASROCK mobo in commit
ac56445dd6a38a36c2fa91989f5f6220a9bdf97c is wrong.
This patch fixes to the correct one, 1849:3662.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 669faba2 30-Sep-2008 Clive Messer <clive@vacuumtube.org.uk>

ALSA: hda - Fix another ALC889A (rev 0x100101)

ALC889A hardware (id 0x10ec0885 rev 0x100101) to use patch_alc883

Signed-off-by: Clive Messer <clive@vacuumtube.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 19c009aa 29-Sep-2008 Vedran Miletic <rivanvx@gmail.com>

ALSA: hda: add more board-specific information for Realtek ALC662 rev1

I recently got a chance to play with two boards with ALC662 rev1:
* BIOSTAR TA780G M2+
* ASROCK K10N78FullHD-hSLI R3.0
Both use 3 stack, 6ch mode with digital out. Since autodetection isn't able
to figure that out from BIOS, we need to specify that manually.

Signed-off-by: Vedran Miletic <rivanvx@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f3911c5a 27-Sep-2008 Peter Korsgaard <jacmet@sunsite.dk>

ALSA: hda: appletv support

The AppleTV needs the same handling as the 24" iMac.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 95fe5f2c 26-Sep-2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Map ALC662 model for Foxconn 45CMX/45GMX/45CMX-K

Use 3stack-6ch-dig ALC662 model for Foxconn 45CMX/45GMX/45CMX-K motherboard.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# cb55974c 26-Sep-2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Map ALC662 model for Gigabyte 945GCM-S2L

Use 3stack-6ch-dig ALC662 model for Gigabyte 945GCM-S2L motherboard.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b69ce01a 18-Sep-2008 Herton Ronaldo Krzesinski <herton@mandriva.com.br>

ALSA: hda - Fix ALC662 DAC mixer mutes also for auto config model

In previous change "[ALSA] hda-codec - Fix ALC662 DAC mixer mutes", I
missed to fix the mixer mute switches also for the auto config model of
ALC662. Now mute for mixer items "Front", "Surround", "Center" and "LFE"
when available will work too with "auto" model.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 9c95c43d 18-Sep-2008 David Woodhouse <dwmw2@infradead.org>

ALSA: hda - Add PCI subsystem ID for MacBookPro4,1

This seems to work if I tell it that it's a mbp3. Not sure if there are
actually any differences.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2346d0cd 01-Sep-2008 Travis Place <wishie@wishie.net>

ALSA: hda - Add model for Toshiba L305 laptop

Added Subsystem IDs (0x1179, 0xff64) for the Toshiba Satellite L305
laptop, so it automatically uses the ALC268_TOSHIBA quirk.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ee979a14 02-Sep-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add mic-boost controls to ALC662/663 auto configuration

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 24fb9173 02-Sep-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC663 auto-probe

Fix the wrong DAC assignment for NID 0x17 mono-pin on ALC663.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 9f99a638 28-Aug-2008 Hiroshi Miura <miurahr@acm.org>

ALSA: hda - Add support of Toshiba RX1

Added the support of Toshiba RX1 laptop with ALC262 codec chip.
Related ALSA bug#3386:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3386

Signed-off-by: Hiroshi Miura <miurahr@acm.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2922c9af 27-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add descriptions of missing model values

Added the descriptions of missing model values.
Also, fixed the model strings of a few new models to a standard style.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f1d4e28b 26-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add more ALC662/663 codec support

- Add support for ECS (1019:9087)
- Delete G71V record from alc662_cfg_tbl[]
The PCI SubsystemID was the same with M70V
- Add more ASUS notebook support

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e2757d5e 26-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - support more ALC888 devices

- Add Lenovo Sky support (17aa:101d)
- Add ASUS M90V support (1043:8317)
- Add ASUS Eee 1601 support (1043:835f)

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 60db6b53 26-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of Quanta FL1

Added the support of Quanta FL1 with ALC269 code chip.
Also a bit space clean-ups.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 8ef355da 26-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of Acer Aspire One

Added the support of Acer Aspire One with ALC269 codec chip.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4e555fe5 26-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of Toshiba S06

Added the support of Toshiba S06 with ALC262 codec chip.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 3f878308 26-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of HP DC7600

Fixed the support of HP DC7600 with ALC260, which was formerly handled
as model=hp-3013.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ea1fb29a 25-Aug-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - fix spaces in patch_realtek.c

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 93a1a5eb 26-Aug-2008 Takashi Iwai <tiwai@suse.de>

Revert "ALSA: hda - Added model selection for iMac 24""

This reverts commit 3e0e469fa216ec70c93b1593821b759d19ee2e6b.

The patch introduced a wrong detection of other intel Macs with
ALC88* codec because they share the same PCI SSID (but have different
codec subsystem-IDs). See http://lkml.org/lkml/2008/8/24/143

Reported-and-tested-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e01bf509 21-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix ALC269 capture source

ALC269 capture source wasn't properly set up.
It's an independent MUX (0x23), not a source of ADC.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2005af24 20-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Create beep control on ALC269 codec

ALC269 codec has a beep, but it was not used, so far.
Create a beep control appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 1082c748 22-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix call of alc888_coef_init()

Using init_hook to call alc888_coef_init() is problematic for configurations
that already set another init_hook. Better to put it in alc_init() as is
(although it looks a bit hackish).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f511b01c 15-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Fix capture source widgets on ALC codecs

On some Realtek codecs like ALC882 or ALC883, the capture source is
no mux but sum widget. We have to initialize all channels properly
for this type, otherwise noises may come in from the unused route.

The patch assures to mute unused routes, and unmute the currently
selected route.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>


# 963f803f 11-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Don't reset SPDIF in each status change

The SPDIF output is toggled at each time any SPDIF status bits are changed
because of the known problems on some codecs. But, this also results in
loosing the sync, and the problem is more obvious on HDMI output over
SPDIF. Since the toggle is necessary only for some codecs, we should
check whether this workaround is needed and skip if unnecessary.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# da3cec35 08-Aug-2008 Takashi Iwai <tiwai@suse.de>

ALSA: Kill snd_assert() in sound/pci/*

Kill snd_assert() in sound/pci/*, either removed or replaced with
if () with snd_BUG_ON().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e8f9ae2a 04-Aug-2008 Pascal Terjan <pterjan@mandriva.com>

ALSA: hda - Fix sound on NEC Versa S9100

This patch adds sound support for NEC Versa S9100
With it, we get sound on the internal speaker and headphone (with
automute working) while there is no sound by default.
External mic also works fine but I don't know if there is an internal
one (if there is an internal mic it does not work currently), and I
had to send back the hardware.

Signed-off-by: Pascal Terjan <pterjan@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 0b18cb18 28-Jul-2008 Jaroslav Kysela <perex@perex.cz>

ALSA: Fix commit: Add automatic model setting for the Acer Aspire 5920G laptop

There is a whitespace at the end of added line. Remove it.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# fe7e873f 27-Jul-2008 Travis Place <wishie@wishie.net>

ALSA: hda - Add automatic model setting for the Acer Aspire 5920G laptop

Make the Acer Aspire 5920G (1025:0121) select ALC883_ACER_ASPIRE
by default.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f53281e6 17-Jul-2008 Kailang Yang <kailang@realtek.com>

ALSA: hda - Add support of ASUS Eeepc P90*

- Support ASUS_P900A = P703
- Support ASUS_P901

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2522d735 17-Jul-2008 Alexander Holler <holler@ahsoftware.de>

ALSA: hda - Added support for Asus V1Sn

Added the necessary ID for Asus V1Sn to patch_realtek.c
to use ALC861VD_LENOVO on these laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 34ec8a0a 10-Jul-2008 Jaroslav Kysela <perex@perex.cz>

ALSA: HDA - HP dc7600 with pci sub IDs 0x103c/0x3011 belongs to hp-3013 model

As reported and tested by an RedHat customer, HP dc7600 with pci sub IDs
0x103c/0x3011 works with the hp-3013 model and not with the hp only model.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# be321a89 07-Jul-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add support for Lenovo 3000 N200

Added the model entry (model=lenovo) for Lenovo N3000 N200 laptop
with ALC861-VD. Reference below:
https://bugzilla.novell.com/show_bug.cgi?id=406425

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 0701e064 27-Jun-2008 Takashi Iwai <tiwai@suse.de>

ALSA: ALSA: hda - Fix ALC883 medion model

ALC883 medion model doesn't unmute the proper amps so no output can be heard.
Replaced the mute switches to behave just like other models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# c7e0757a 26-Jun-2008 Takashi Iwai <tiwai@suse.de>

ALSA: hda - Add MacBook 3.1 support

MacBook 3.1 is compatible with model=mbp3.
Added the codec SSID 10b6:3600.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 1d11604e 23-Jun-2008 Travis Place <wishie@wishie.net>

ALSA: hda - Added SSID for 'Fujitsu Siemens Amilo M1451G' laptop

Add the SSID for the "Fujitsu Siemens Amilo M1451G" laptop to
patch_realtek.c , so that it uses ALC880_FUJITSU by default.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 3e0e469f 20-Jun-2008 Travis Place <wishie@wishie.net>

ALSA: hda - Added model selection for iMac 24"

Added the SSID of a known iMac 24" to automatically use
ALC885_IMAC24 quirk.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 36ca6e13 09-Jun-2008 Akio Idehara <zbe64533@gmail.com>

[ALSA] hda - Add Toshiba dynabook SS RX1 support

I have Toshiba dynabook SS RX1 and this patch adds that support.

Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 7b1e8795 09-Jun-2008 Akio Idehara <zbe64533@gmail.com>

[ALSA] hda - Fix "alc262_sony_unsol[]" hda_verb array

I think that hda_verb array must have "terminator (empty array)".
But alc262_sony_unsol[] does not have it.
And it causes gcc-4.3's buggy behavior
with snd_hda_sequence_write().

Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2c3bf9ab 03-Jun-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Fix PLL gating control on Realtek codecs

On some Realtek codecs, the analog PLL gating control bit must be set
off while the default value is 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 17bba1b7 03-Jun-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda - support intel DG33 motherboards

These two motherboards's pin configuration are not covered by driver.
I wrote a new model to support them.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 378bd6a5 03-Jun-2008 Tony Vroon <tony@linx.net>

[ALSA] hda - COMPAL IFL90/JFL-92 laptop quirk

Use quirk table to assign ALC268_TOSHIBA to COMPAL IFL90/JFL-92 laptops.
No analog output on autoprobe.

Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Guri <gurashka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 07bc76df 03-Jun-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Fix resume of auto-config mode with Realtek codecs

The auto-config mode of Realtek ALC codecs has a bug since 2.6.25
that it cannot resume properly. The problem was the wrong assignment
of init_hook that overrides the whole initialization.

Relevant bug reports:
http://bugzilla.kernel.org/show_bug.cgi?id=10662
https://bugzilla.novell.com/show_bug.cgi?id=385473

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f9423e7a 26-May-2008 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda - Fix EAPD and COEF setups for realtek codecs

Fixed EAPD and COEF setups for Realtek ALC662/663, 660-VD and 888 codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2f893286 26-May-2008 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda - show correct codec chip in PCM stream names

Show more exact codec chip name in the PCM stream name strings.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 531240ff 26-May-2008 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda - Fix vref pincap check in alc882 auto-detection

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 6dda9f4a 26-May-2008 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda - Add ALC663 support

Added the support of ALC663 codec, including specific models for
ASUS M51VA, ASUS G71V, ASUS H13 and ASUS G50V.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 97ec710c 23-May-2008 Travis Place <wishie@wishie.net>

[ALSA] hda - Added support for Foxconn P35AX-S mainboard

Added IDs for the Foxconn P35AX-S mainboard to patch_realtek.c, so
that ALC883_6ST_DIG is used by default.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 20a3a05d 23-May-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Fix COEF and EAPD in ALC889 auto-configuration mode

Fix the missing COEF and EAPD initialization in ALC889 auto-configuration
mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 186c3117 20-May-2008 Travis Place <wishie@wishie.net>

[ALSA] hda - Fix ASUS P5GD1 model

Corrected the model assignment for the ASUS P5GD1 w/SPDIF after reports of
surround sound not being possible.

Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ebc7a406 20-May-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Fix ALC262 fujitsu model

Fixed the speaker auto-mute with two laptop and docking headphones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Tony Vroon <tony@linx.net>


# 564c5bea 03-May-2008 Jacek Luczak <luczak.jacek@gmail.com>

[ALSA] Revert migration to alc_set_pin_output() in alc861_auto_set_output_and_unmute()

Change done by:
commit f6c7e5461e9046445d50c5c7a9a4587824239623
[ALSA] hda-codec - Fix auto-configuration of Realtek codecs
broke sound on ALC861 Analog.

Signed-off-by: Jacek Luczak <luczak.jacek@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# df99cd33 25-Apr-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Add support of Medion RIM 2150

Added the support of Medion RIM 2150 laptop with ALC880 codec.
ALSA bug#3708:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3708

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a0b8f7d8 22-Apr-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Fix model for Acer Aspire 5720z

Set the proper model=acer for Acer Aspire 5720z with ALC268 codec.
ALSA bug#3550:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3550

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7943a8ab 16-Apr-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Avoid unexpected breakage with ALC889A hack

The last ALC889A hack may break on some devices with certain model presets
since patch_alc*() have different model tables. So, now it's handled in
the original patch_alc882() but fly to patch_alc883() in model=auto
appropriately.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cb308f97 16-Apr-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda - Fix ALC889A codec support

ALC889A is recognized ALC885/ALC882 but it's actually closer to
ALC888/ALC883.

Cc: Kasper Sandberg <lkml@metanurb.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eb5a6621 14-Apr-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-intel: Add Quanta IL1 ALC267 model

This adds support for Quanta IL1 mini-notebook to alsa, defining a new model
for it. It comes with an ALC267 codec chip. Some notes about this model:

* In headphone automute, I use AC_VERB_SET_PIN_WIDGET_CONTROL instead of common
amp mute, to avoid conflict with mixer switch (mixer and automute use the
same nid).
* The only connected capture sources in the hardware are the internal mic and
external mic jack. So instead of using an input source selector like on other
ALC268 models, the mic automute automatically switch between captures.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 06a9c30c 14-Apr-2008 Tony Vroon <tony@linx.net>

[ALSA] hda - Fujitsu Lifebook PC speaker signal

The legacy PC speaker signal was not routed to outputs. The codec is not
prevented from powering down in this patch, although I suppose one could
argue that perhaps it should be. Let me know if anyone feels strongly one
way or the other.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 64654c2f 14-Apr-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda - Should use HDA_OUTPUT instead of HDA_INPUT to mute pin 15 of ALC880

To mute the output of Pin widget 15 in ALC880, we should use the
HDA_OUTPUT. However, current code looks like :
snd_hda_codec_amp_stereo(codec, 0x15, HDA_INPUT, 0, HDA_AMP_MUTE, bits);
It may be a misspelling.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4383fae0 13-Apr-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - PCI quirk for MSI laptop

Please refer to [0003848] on the alsa mantis.
This patch adds the pci quirk and Mic-Int controller.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0c4cc443 22-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Support mic automute for Clevo M720R/SR

Add support for mic automute in clevo-m720r ALC883 model, and rename it
to more generic clevo-m720. Also change model entry in ALSA-Configuration.txt
accordingly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 213f0bfe 22-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Map clevo-m720r ALC883 model for Clevo M720SR

Map clevo-m720r ALC883 model for Clevo M720SR.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# eea6419e 19-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Use common 3stack-6ch mixer for 3stack-hp model

Forgot one more: 3stack-hp model also have now the same mixer as
3stack-6ch (after DAC assignment fix in ALC883), so use it avoiding
duplicating the same mixer definition.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f24dbdc6 19-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Use base ALC883 mixer for 6stack-dell model

After DAC assignment fix in ALC883, alc888_6st_dell_mixer is now the
same as alc883_base_mixer. Avoid duplicated code and use
alc883_base_mixer in 6stack-dell model, removing alc888_6st_dell_mixer
definition.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5d85f8d0 19-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Remove now uneeded 6stack-hp model from ALC883

After DAC assignment fix in ALC883, the 6stack-hp model is now the same
as 6stack-dig. So just remove 6stack-hp model and replace its use with
6stack-dig.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0e31daf7 19-Mar-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - model for alc262 to support Lenovo 3000

This model is to support the Lenovo 3000 y410.
ALSA bug#3856:
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3856

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 888afa15 18-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - keep the format verb at closing PCM streams

Keep the format verb at closing PCM streams.
Introduced snd_hda_codec_cleanup_stream() for the parcicular purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 86d34b7e 18-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Map 3stack-6ch-dig ALC883 model for MSI 945GCM5 V2 (MSI-7267)

Map 3stack-6ch-dig ALC883 model for MSI 945GCM5 V2 (MSI-7267).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f32a19e3 18-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Fix DAC assignment order in ALC883

Actually clfe and surround DACs are inverted in alc883_dac_nids array
(see ALC883 datasheet). I discovered this while testing multi-channel
setup (using 3stack-6ch-dig model) on MSI 945GCM5 V2 motherboard that
has an ALC883 codec. Simply Rear Left/Right and Center/LFE were swapped
in 6 channel mode (also in 4 channel mode you didn't get rear left/right
output). Other models also were affected by this bug, as can be seen by
the mixer layouts that "workaround" this (the real bug was not noticed,
and some other models simply played with mixer and initial verbs). Thus
along with fixing the order of dac nids, also change the models that
relied on previous dac ordering properly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5d9fab2d 14-Mar-2008 Tony Vroon <tony@linx.net>

[ALSA] hda-codec - Fujitsu Lifebook port replicator/dock headphone jack sense

The docking station headphone output had no audio and jack sense
was not considered.

Jack information from the laptop itself and the dock are combined, as
the dock does not obscure the connector.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3da23cac 13-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Map 3stack-6ch-dig ALC662 model for Asus P5GC-MX

Map 3stack-6ch-dig ALC662 model for Asus P5GC-MX.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7055ad8a 13-Mar-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Fix ALC662 DAC mixer mutes

Currently ALC662 doesn't suport amp mute for AmpOut in nids 0x02, 0x03,
0x04 (see block diagram in ALC662 datasheet page 3, does M correspond to
mute?). The result is that currently mute for "Front Playback Switch",
"Surround Playback Switch", "Center Playback Switch" and "LFE Playback
Switch" mixer items doesn't work (tested on Asus P5GC-MX motherboard
with 3stack-6ch model).

The solution I found for this is to mute the proper inputs in 0x0c,
0x0d, 0x0e audio mixers.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bb9f76cd 11-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Improve ALC262 ultra model

Improved ALC262 ultra model for Samsung Q1 Ultra series.

- clean up mixers
- support of input from HP jack as a mic
- add quirk for Q1 EL

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ee7a9c7c 10-Mar-2008 Michael Gruber <lists.mg@googlemail.com>

[ALSA] hda-intel - Fix microphone capture with ALC880 F1734 model

The default capture source should be the mic which is 0x01 on this model.
In addition to that the change to VREF50 allows for higher capture volume.

Signed-off-by: Michael Gruber <lists.mg@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b419f346 07-Mar-2008 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA Codecs: add support for Toshiba Equium L30

This patch adds support for the Toshiba Equium L30 laptop and renames the mixer
controls to match Laptop usages.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0ccb541c 06-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add internal mic item for ALC268 acer model

Added the internal mic as a capture source item for ALC268 acer model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7194cae6 06-Mar-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix dmics on ALC268 in auto configuration

Fixed the handling of dmics on ALC268 in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fb97dc67 06-Mar-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - model for alc883 to support FUJITSU Pi2515

There is no suitable model for Pi2515.
This model is to support it. ALSA bug#3800.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82808236 04-Mar-2008 Pascal Terjan <pterjan@mandriva.com>

[ALSA] ALC288 - Add NEC S970 to the quirk table

NEC S970 has no sound in the internal speakers when autodetection is
used.
With targa-dig model, there is sound in the speakers and it gets
correctly muted when pluging headphones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 368c7a95 04-Mar-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - model for alc883 to support M720R

There is no suitable model for M720R (ALSA bug#3781).
This patch is to support HP jack-sensing and mixer.

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>


# 67ebcb03 19-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Don't create multiple capture streams for single inputs

When the device has only one input source, it makes no sense to have
multiple capture streams.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 85860c06 19-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC268 capture source

Initialize the capture source properly for auto model.
It's especially important for cases that only mic is detected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aef9d318 19-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add beep volume control to ALC268

Added the beep volume control to ALC268 codec support code.
Since the codec doesn't return the correct AMP caps, we need to override
the value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 77a261b7 19-Feb-2008 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Fix ALC662 recording

Fixed ALC662 recording issue.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1c82ed1b 18-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] Keep private TLV entry in vmaster itself

Use a private array for TLV entries of virtual master controls instead
of (supposed) static array. This cleans up the existing codes.

Also, now vmaster assumes the simple dB-range TLV that is the only type
it can handle.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 88c71a99 14-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix missing capsrc_nids for ALC262

ALC262 must have capsrc_nids defined as well as in ALC882.
Also, add a NULL check in alc882_mux_enum_put to avoid Oops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d260cdf6 13-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix breakage of resume in auto-config of realtek codecs

The last patch for fixing the auto-config pin setting breaks the resume
due to a wrong use of snd_hda_codec_amp_stereo(). The code in the init
hook shouldn't touch the amp cache.

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>


# f6c7e546 12-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix auto-configuration of Realtek codecs

This patch fixes some bugs in the auto-configurator of Realtek codecs:
- add missing pin set-up for speaker pins
- fix the speaker auto-mute function not to conflict with the existing
"Speaker" mixer switch

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e1406348 11-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Clean up capture source selection of Realtek codecs

Clean up the codes of the capture source selection for Realtek codecs.
Now using common helper functions with the new capsrc_nids field.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 937b4160 11-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC880 F1734 model

Fixed some issues with ALC880 F1734 model
- fix capture via mic
- enable volume-wheel control

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# aa27a443 07-Feb-2008 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda-codec - remove duplicate controls in alc268 test mixer

I've just noticed that there are a handful of duplicate controls in the
ALC268 test model mixer. This patch (against alsa-driver 1.0.16) removes
them.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
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>


# f12462c5 03-Feb-2008 Mirco Tischler <mt-ml@gmx.de>

[ALSA] hda-codec - Add support of Zepto laptops

Adds support for zepto laptops with alc268 intel_hda codec.

Signed-off-by: Mirco Tischler <mt-ml@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b4818494 23-Feb-2008 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Adapt eeepc p701 mixer for virtual master control

Fix the line-out volume control of eeepc p701 to be a proper slave of
the virtual master control.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 31bffaa9 27-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix mixer names of realtek codecs to adapt mater controls

Some models like eeepc ep20 have invalid mixer names that aren't
handled properly by virtual master controls. Rename them to the
proper names.

Also fixed some typos in the mixer names but they are not compiled
in right now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0b167bf4 03-Feb-2008 Andrew Paprocki <andrew@ishiboo.com>

[ALSA] hda_intel - Add model quirk for Albatron KI690-AM2 motherboard

This adds a quirk to the Realtek ALC883 table for the Albatron KI690-AM2
motherboard to use the 6stack-dig model.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3f1eeaed 25-Feb-2008 Tony Vroon <tony@linx.net>

[ALSA] hda-codec - Add Fujitsu Lifebook E8410 to quirk table

Add the proper model entry for Fujitsu Lifebook E8410 with ALC262 codec.

From: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cced83b6 22-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC882 capture source selection

The capture source selection for ADC list with two elements is buggy
becaues of a wrong capture mux list. This patch fixes the starting
index based on spec->num_adc_nids.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 614ca92b 22-Feb-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix wrong capture source selection for ALC883 codec

The widget list of capture source selection for ALC883 contains the
wrong NIDs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# edb54a55 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Control SPDIF as slave

Add SPDIF playback switch to the slave element list so that it
can be toggled via the master control as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ce875f07 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add speaker automute to ALC262 HP models

Added the speaker-automute function to ALC262 HP models.
Also, 'Mono' mixer elements are renamed as more intuitive 'Speaker'.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# bec15c3a 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add speaker automute to ALC260 HP models

Added the speaker-automute function to ALC260 HP models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f2f48e18 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC262 HP-RP5700 model

Removed the PCM mixer elements conflicting with others.
Also renamed Master control to Headphone, which isn't a real master.
(The Master control is still created as a virtual master even after
this rename.)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4bb26130 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix mixer controls with ALC262 HP T5735 model

The PCM mixer elements in HP T5735 model of ALC262 codec conflict
with Speaker and Headphone volumes. They should be removed.
Ditto for LineOut that is identical with Speaker.
Also, fixed/cleaned up the auto-mute callback to use the amp cache
correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 86cd9298 28-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Rename non-standard 'iSpeaker'

Renamed the non-standard mixer elements 'iSpeaker' to 'Speaker'
in Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 4444704c 27-Jan-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - Add model for Gigabyte P35 DS3R


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>


# dafc8357 25-Jan-2008 Andy Shevchenko <andy@smile.org.ua>

[ALSA] hda-codec - Add model for Acer Aspire 5310

Simplify usage of the Acer Aspire 5310 laptop with the ALC268 based codec
sound card via add correct PCI SSID.

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 29a52c24 24-Jan-2008 Andy Shevchenko <andy@smile.org.ua>

[ALSA] hda-codec - Add model for Acer Aspire 5315

Simplify usage of the Acer Aspire 5315 laptop with the ALC268 based codec
sound card via add correct PCI SSID.

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 6330079f 24-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix handling of multiple capture streams

Fixed the bug that multiple capture streams conflict on Realtek codec
routines.
Also, this adds a framework to enable the alternative playback stream,
e.g. for VoIP. It's not fully implemented yet, though.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 3866f0b0 14-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add the support of Dell OEM laptops with ALC268

Added the support of Dell OEM laptops (Vostro 1200) with ALC268 codec.
The new model=dell is provided.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f0747ee6 15-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Disable PCBEEP mixer element in test model

It turned out that the PCBEEP element (0x1d) is disabled on some hardwares
although it's defined in the datasheet. Because of the error at info of
this element, the mixer gets totally unusable.
Since the PCBEEP isn't that important feature, it's safer to disable this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 52a1d4f9 12-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Remove obsolete FIXME's

Removed 'FIXME' comments that have been already fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 5795b9e6 13-Jan-2008 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda: Fix 5.1 sound in Dell 6stack ALC888 HDA

This patch fixes 5.1 surround output and headphone detection in the
Dell Inspiron 530 and possibly other Dell systems using the ALC888
codec (mode 6stack-dell).

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ce22e03e 11-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Don't build boost controls for digital mics

The ALC auto-probe creates mic boost controls automatically for the
probed pins, but it assumes that they are analog mics. The digital
mics have no boost controls and must be skipped.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 2134ea4f 10-Jan-2008 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add virtual master controls

Add master controls using vmaster to codecs that have no real hardware
master volume registers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 3d5fa2e5 10-Jan-2008 Jiang zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - Device ID for Macbook sound card

Please refer to the [0003680] on ALSA bugtracking system.
The user found that 'model=mbp3' works and provided the ID.
From: Jiang zhe <zhe.jiang@intel.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 8c427226 10-Jan-2008 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Update realtek codec support

1. Support HP rp5700
2. Fixed alc_subsystem_id function (Bug fixed and support Desktop)
3. Support ASUS EP20

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
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>


# 86c53bd2 07-Jan-2008 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda-codec - Add test model for ALC268

This implements a test model for the ALC268. It depends on the feature
added by alc260-test-eapd-0.2.diff. This patch also adds a mention of
the ALC260 test model to ALSA-Configuration.txt since this seems to have
been missed.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f8225f6d 07-Jan-2008 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda-codec - Add EAPD controls for ALC260 test model

This implements a switch control for the EAPD signal output by the ALC26x
chips. Since some laptops may utilise this to activate useful things it
is handy to have a control for this in the ALC26x test models. The patch
includes the control in the ALC260 test model.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# a9b3aa8a 20-Dec-2007 Jiang Zhe <zhe.jiang@intel.com>

[ALSA] hda-codec - alc268 input_mux should be a selector instead of mixer

According to the [0003659], the node 0x23,0x24 is a selector.
I checked the alc268 spec on the REALTEK website and it showed that they
were selectors indeed.
However, current code implement the alc268 input_mux in a mixer way.

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>


# 6e7939bb 19-Dec-2007 Herton Ronaldo Krzesinski <herton@mandriva.com>

[ALSA] hda-codec - Fix capture mixers of ALC662 models

The commit that added support for ASUS P701 eeepc also changed the
mixers of other ALC662 models, duplicating entries for the Capture
items, making them to not work anymore. This fixes it by removing
duplicated entries using where possible the common alc662_capture_mixer.
Also alc662_capture_mixer should use alc662* functions and not alc882
(I checked /proc/asound/card0/codec* on an eepc model and it's ok).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 3982d17e 18-Dec-2007 Andrew Paprocki <andrew@ishiboo.com>

[ALSA] hda-codec - Add missing #defines (and 1 rename) in hda_codec.h

Added AC_VERB_GET_DIGI_CONVERT_2 and renamed AC_VERB_GET_DIGI_CONVERT to
AC_VERB_GET_DIGI_CONVERT_1 to stay consistent with the SET variants. Added
AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK, AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK,
and AC_PINCAP_LR_SWAP. The missing fields were listed in the ALC883 datasheet
rev 1.3.

Signed-off-by: Andrew Paprocki <andrew@ishiboo.com>
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>


# a8848bd6 13-Dec-2007 Andy Shevchenko <andy@smile.org.ua>

[ALSA] hda-codec - Initial support of the Mitac 8252D (based on ALC883)

The attached patch adds initial support of the Mitac 8252D
(http://www.mitac-mtc.com.tw/English/products/8252Dspec.htm).
Working:
- Front speakers (volume + mute)
- Center/LFE speakers (volume + mute)
- HP out (with Front Volume)
- HP individual mute switch
- HP Jack sense
- Front Mic and its volume
Not tested:
- external mic and its volume
Not working while now:
- Mic Jack sense
Questionable:
- is Mic have Jack sense?
- one or two Mic volume controls?
- CD/Line-in: presense in the mixer

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f6a92248 13-Dec-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add ALC889/ALC267/ALC269 support

Added the support of new Realtek codecs:
1. New ALC889 Support
2. New ALC267 Support
3. New ALC269 Support

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# bba8dee7 13-Dec-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Device ID for MSI L745

Added the model targa-2ch-dig for MSL L745 (ALSA bug#3641).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# e3cde64a 03-Dec-2007 Andy Shevchenko <andy@smile.org.ua>

[ALSA] hda-codec - Fix typo in the ALC883 initial code

The attached patch should fix typo in auto initialization verbs for ALC883
codec.

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 61dc35de 13-Nov-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model=hp-tc-t5735 for ALC262

Added the missing model string for the new support of HP TC T5735.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 66d2a9d6 13-Nov-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add support of HP Thin Client T5735

Added the support of HP Thin Client T5735 [0x103c 0x302f] with ALC262 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b98f9334 07-Nov-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - new PCI SSID for HP machines

Added new PCI SSIDs for HP machines with ALC262 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# f651b50b 25-Oct-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA: Add support for Samsung Q1 Ultra Vista edition

This patch adds full record and playback support for the Samsung Q1
Ultra - Vista model (different codec than the earlier Q1 Ultra models).

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# b995d76d 17-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing eeepc-p701 model for ALC662

Added the missing model string 'eeepc-p701' for ALC662 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# ea45d153 27-Oct-2007 Al Viro <viro@ftp.linux.org.uk>

duplicate initializer in sound/pci/hda/patch_realtek.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 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>


# c9b58006 16-Oct-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Fix SKU ID function for realtek codecs

Fixed SKU ID function for realtek codecs. It's used by the automatic
BIOS configuration mode. Now it supports the correct jack-detection
mechanism, too.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 291702f0 16-Oct-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] Support ASUS P701 eeepc [0x1043 0x82a1] support


Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>


# 39d3ed38 12-Oct-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix for Fujitsu Lifebook C1410

Fixed ALC262 fujitsu model to support Fujitsu Lifebook C1410 properly.
It requires EAPD and has separate int/ext mic inputs (which was missing
in the current driver).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ac8842a0 19-Sep-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Missing support ASUS A7J

Added the missing support for ASUS A7J [0x1043 0x1243]

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# b60dd394 19-Sep-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Fix ALC662 codec support

* Fixed ALC662 init verbs (wrong NIDs)
* Fixed ALC662 auto model issue (wrong DAC index)

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 11370ee2 16-Sep-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec: Add two new systems to ALC883

This patch adds support for the Asus M2A-VM HDMI and Abit IP35-PRO
motherboards.

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>


# b201131c 16-Sep-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec: Add 4 channel support for Realtek ALC883

I had a request for a 4 channel mode. This should implement front
and surround outputs, leaving the 3rd plug for mic input.

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>


# 8e7f00f9 07-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Toshiba A305

Added the proper model=toshiba for Toshiba A305 with ALC268 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 96fe7cc8 07-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing Mic Boost for some ALC882 models

Mic Boost mixer volume was missing in some ALC882 models. Added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# b875bf3a 06-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add quirk entry for Casper CPR2000

Added the quirk entry for Casper CPR2000 (model=acer) with ALC268 codec
(ALSA bug#3343).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0438a00e 06-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing model names for ALC882 codecs

Added the missing model option strings for ALC882 codecs.
Also added the corresponding description in ALSA-Configuration.txt.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 914759b7 06-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for ASUS A7M

Added the support for ASUS A7M with ALC882 codec.
It's slightly different from ASUS A7J.
The patch taken from ALSA bug#3000
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3000

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8da6470e 05-Sep-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Acer Aspire 9303

Add the entry for Acer Aspire 9303 (model=acer-aspire) with ALC883 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# accbe498 30-Aug-2007 zhejiang <zhe.jiang@intel.com>

[ALSA] hda-codec - Fix capture on ALC262 HP machines

Fix the index for Front Mic capture source on ALC262 HP machines.
Also, added the new capture source list for HP BPC DC7000 series
to work properly.
From: zhejiang <zhe.jiang@intel.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 776e184e 29-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add Mic Boost control with auto-configuration

Some codecs need Mic Boost mixer controls for obtaining a proper recording
level, but the auto-configuration doesn't create them.
This patch adds the creation of mic-boost controls on corresponding codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 889c4395 23-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC268 unsol event

The unsol event of ALC268 is in the standard bit 26.
Also, fixed the Acer master controls, and added Extensa 5210
to the quirk list.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0724ea2a 22-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix mater mixer switch of ALC262 sony-amd model

Fixed the master mixer switch of ALC272 sony-amd model.
It used a simple bind-control, but it resulted in unexpected
unmute of speaker output. Now the control checks the HP jack
state apropriately, just like fujitsu model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 33bf17ab 21-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing capture boost for ALC268

Added missing capture boost controls for ALC268 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# d53d7d9e 20-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add SPDIF support on ALC880 fujitsu model

Some Fujitsu laptops have SPDIF output jack (ALSA bug#3009).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 189609ae 20-Aug-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add support for Haier W66

1. Support Lenovo 420A (PCI SSID: 0x17aa 0x3bfc)
2. Support Haier W66 (PCI SSID: 0x1991 0x5625)

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6bc96857 17-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC268 acer model

ALC268 has different NIDs from ALC262. Acer model should use NID 0x02 and
0x03 instead of 0x0c and 0x0d for the master volume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 542d7c66 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Toshiba Satellite P205

Add model=lenovo for Toshiba Satellite P205 with ALC861VD codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 87350ad0 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Macbook Pro rev3

Added the support for Macbook Pro rev3 with ALC885 codec chip.
The patch taken from ALSA bug#3242.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 38baf5ad 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Toshiba A135 model selection

Fixed the double entries in the model presets.
Toshib A135 prefers model=lenovo rather than dallas.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 64ca1c29 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for MSI m673x

Added model=targa-dig for MSI m673x with ALC883 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 676a9b53 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add unsol_event to ALC883 Acer Aspire

Added unsol_event handling to ALC883 Acer Aspire codes.
Also, removed unneeded channel-mode mixer control from 2-ch only presets.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6c726dc6 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Remove superfluous code

Remove the superfluous code that's actually not used at all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7debbe51 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix PM on ALC885 Intel Macs

Fix power-management on ALC885 Intel Macs.
It fixes the problem with power-saving mode, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# d273809e 16-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add ALC268 acer model

Added model=acer for ALC268 codec support.
The configuration is: headphone = 0x14, speaker = 0x15
needs hp-jack auto-detection. The same routine as alc262-fujitsu model
is used.
Also, added the auto-muting routine for ALC268 model=toshiba.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 983f8ae4 15-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add option texts and descriptions for new Realtek models

Added the missing text entries and descriptions for the newly added
model values for Realtek codec chips.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 39c5d41f 15-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Biostar NF61S SE mobo

Added the support for Biostar NF61S SE mobo with ALC861VD codec,
model=6stack-digout (ALSA bug#3190).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# d1a991a6 15-Aug-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Update realtek codec support

1. Support Acer Aspire 9810
2. Support TOSHIBA A205
3. Support HP TX1000

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 765c24ef 15-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Remove conflicting capture mixers for ALC861VD

Removed conflicting capture mixers for ALC861VD model=dallas.
It fixes the ALSA bug#3236.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cb53c626 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-intel - Add POWER_SAVE option

Added CONFIG_SND_HDA_POWER_SAVE kconfig. It's an experimental option
to achieve an aggressive power-saving. With this option, the driver
will turn on/off the power of each codec and controller chip dynamically
on demand.
The patch introduces a new module option 'power_save'. It specifies
the second of time-out for automatic power-down. As default, it's
10 seconds. Setting 0 means to suppress the power-saving feature.
The codec may have analog-input loopbacks, which are usually represented
by mixer elements such as 'Mic Playback Switch' or 'CD Playback Switch'.
When these are on, we cannot turn off the mixer and the codec chip has
to be kept on. For bookkeeping these states, a new codec-callback is
introduced.
For the bus-controller side, a new callback pm_notify is introduced,
which can be used to turn on/off the contoller appropriately.
Note that this power-saving might cause slight click-noise at
power-on/off. Also, it might take some time to wake up the codec, and
might even drop some tones at the very beginning. This seems to be the
side-effect of turning off the controller chip.
This turn-off of the controller can be disabled by undefining
HDA_POWER_SAVE_RESET_CONTOLLER in hda_intel.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cca3b371 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Clean up bind-controls

We have already a generic bind-control helper, so let's clean up the codes
using it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 47fd830a 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - add snd_hda_codec_stereo() function

Added snd_hda_codec_amp_stereo() function that changes both of stereo
channels with the same mask and value bits. It simplifies most of
amp-handling codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 82beb8fd 10-Aug-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - optimize resume using caches

So far, the driver looked the table of snd_kcontrol_new used for creating
mixer elements and forces to call each of its put callbacks in PM resume
code. This is too ugly and hackish.
Now, the resume is simplified using the codec amp and command register
caches. The driver simply restores the values that have been written
in the cache table. With this simplification, most codec support codes
don't require any special resume callback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2880a867 07-Aug-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Acer Aspire laptops

This patch adds support for some Acer Aspire systems.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 625dc0bf 30-Jul-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for the ASRock K8NF6G-VSTA motherboard

This patch adds ALC861VD support for the ASRock K8NF6G-VSTA motherboard.

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>


# 532d5381 27-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add a generic bind-control helper

Added callbacks for a generic bind-control of mixer elements.
This can be used for creating a mixer element controlling multiple
widgets at the same time. Two macros, HDA_BIND_VOL() and HDA_BIND_SW(),
are introduced for creating bind-volume and bind-switch, respectively.
It taks the mixer element name and struct hda_bind_ctls pointer, which
contains the real control callbacks in ops field and long array for
private_value of each bound widget.
All widgets have to be the same type (i.e. the same amp capability).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5b31954e 26-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix the initial mixer state of ALC262 sony-assamd model

Many of ALC262 codes don't call the automute function at the beginning,
which may keep the silence until the HP jack is replugged. Now proper
init_hook is added.
Also, sony-assamd model doesn't handle the widget 0x14 properly, thus
calling automute isn't enough. Now Front switch handles both widgets.

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>


# c54728d8 19-Jul-2007 Nicola Fagnani <nicfagn@iol.it>

[ALSA] hda-intel: support for iMac 24'' released on 09/2006

Basic audio support for the iMac 24'' model released on 09/2006,
including
headphone jack detection with automatic speaker muting.
This iMac uses the Realtek ALC885 codec, not a Sigmatel one as in
other models.
Functionality has been tested for internal speakers, headphone and
microphone.

Signed-off-by: Nicola Fagnani <nicfagn@iol.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c5d9f1cd 19-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add quirk for Asus P5LD2

Without the proper model setting, the Asus P5LD2 rear outputs remain
completely silent unlike other systems where the front speakers usually
work. This patch adds the P5LD2 to the quirk table.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ef64adbb 13-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add quirks for HP dx2200/dx2250

HP dx2200 and dx2250 use Micro-Star International (MSI) motherboards
(models MS-7254 and MS-7297 respectively) with an ALC862 codec in
threestack configuration. Adding this quirk allows correct 5.1 sound
output in these systems.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4723c022 13-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Rename HP model-specific quirks

Rename ALC888_HP_NETTLE and ALC888_HP_LUCKNOW models to the more generic
names ALC888_6ST_HP and ALC888_3ST_HP since HP seems to be consistent
in the wiring of their 3stack and 6stack ALC888-based systems.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# e87f97a3 13-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add quirk for HP Samba

This patch fixes 5.1 surround output for the HP Samba using the same
quirk as the HP Lucknow. If HP machines are uniform in their wiring,
we should rename ALC888_HP_NETTLE to ALC888_6ST_HP and ALC888_HP_LUCKNOW
to ALC888_3ST_HP for generic HP 6stack and 3stack configurations.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# e4f41da9 13-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add LG LW20 line-in capture source

Add line-in to the list of LG LW20 capture sources. Also fix the LG LW
pin assignment list comment.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2dcd522f 10-Jul-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] HDA-Intel - Add support for MSI K9AGM2-FIH motherboard

This patch adds support for the MSI K9AGM2-FIH on-board audio.

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>


# f95474ec 09-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix default pin config of Abit AW9D-MAX

Fix the default pin configuration of Abit AW9D-MAX. The board has a
broken BIOS that doesn't set the correct pin default configs, which
screws up the auto-configuration of snd-hda-intel driver.
The patch enables the override of default pin config values.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 341d4eb0 09-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Toshiba A100 with ALC861

One of the newly added model entries causes a regression on Toshiba A100.
It works fine with model=auto. So, let's deselect the entry again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0f40502e 05-Jul-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing model parameter strings for ALC262

Added the missing model option values for ALC262.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8341de60 05-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add HP Lucknow 5.1 support

Added HP Lucknow (ALC888) 5.1 surround support based on ALC883 6-channel
threestack with changes in channel routing.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cd1e3b40 05-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Fix HP Nettle 5.1 output

Fixed HP Nettle 6ch/8ch channel routing based on ALC883 sixstack and
swapping rear and center/LFE in verbs and mixer settings.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 067b5a84 04-Jul-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Fix ALC662 auto mode

Fixed ALC662 auto mode, wrong NIDs were chosen.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 83c34218 05-Jul-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Some fixes for Realtek codec supports

- Added BenQ T31-16 AMD Turion64x2 (ALC262) support
- Added models for ASUS machines with ALC861

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 0a8c5da3 04-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Fix 5.1 output in LG LW20

Implemented LG LW20 5.1 support based on ALC880 threestack modes. It was
previously set to use one DAC and 2 jack modes, giving 2-channel output
only. Analog CD playing support is still missing.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8f41b566 03-Jul-2007 Claudio Matsuoka <cmatsuoka@gmail.com>

[ALSA] hda-codec - Add support for HP Nettle

Added the model for HP Nettle mobo with ALC883.
From: Claudio Matsuoka <cmatsuoka@gmail.com>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# d10ad1a2 02-Jul-2007 Adrian Bunk <bunk@stusta.de>

[ALSA] sound/pci/hda/patch_realtek.c: remove dead code

This patch removes some dead code spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6963f84c 24-Jun-2007 Mike Crash <mike@mikecrash.com>

[ALSA] hda: support for S/PDIF out on ASUS M2V

Added support for S/PDIF digital output on ASUS M2V motheboard - added
new model '3stack-660-digout' and ALC660VD_3ST_DIG

Signed-off-by: Mike Crash <mike@mikecrash.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 8c87286f 18-Jun-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC662 auto-configuration code

The auto-configuration code didn't initialize the verbs correctly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a18519e1 13-Jun-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for Toshiba A135

Added model=lenovo for Toshiba A135 with ALC861VD codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# febe3375 12-Jun-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add HP Pavillion quirk to Realtek code

This patch adds the HP Pavillion a1589L desktop system to the ALC883
configuration table.

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>


# 6f3bf657 08-Jun-2007 Daniel T Chen <crimsun@ubuntu.com>

[ALSA] hda-codec - Add quirk for another MSI laptop to alc883_cfg_tbl[]

This hg commit adds the SSID of another MSI laptop to the
alc883_cfg_tbl[] quirk list. Verified in #alsa/Freenode
on Thu, Jun 7, 2007.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 35739bb1 06-Jun-2007 Dave Jones <davej@redhat.com>

[ALSA] Yet another Uniwill laptop with ALC861 codec

From: Dave Jones <davej@redhat.com>
Rediffed version of the patch from ..
http://bugzilla.kernel.org/show_bug.cgi?id=8016
that seems to be lingering for some time.
Original patch by: Andy Shevchenko <andy@smile.org.ua>

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a361d84b 04-Jun-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add support of ALC268 codec

Added the support of new ALC268 codec chip.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7d87de2d 04-Jun-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add proper model for HP xw series

Set the proper model for HP xw4550, xw4600, xw6600 and xw8600.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 799f88a3 29-May-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for MSI K9N Ultra

This patch adds the MSI K9N Ultra system to the realtek patch.

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>


# e60623b4 29-May-2007 Daniel T Chen <crimsun@ubuntu.com>

[ALSA] hda-codec - Add quirk for Supermicro PDSBA to alc883_cfg_tbl[]

Tested and verified in #alsa/Freenode on Tuesday, May 29, 2007.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: crimsun@Box.ncat.edu
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# dd146a60 24-May-2007 Baruch Even <baruch@ev-en.org>

[ALSA] hda-codec - Add quirk for MSI S420

Add a quirk for MSI S420 (based on a guess work).
From: Baruch Even <baruch@ev-en.org>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 36c3b4e6 20-May-2007 Daniel Drake <dsd@gentoo.org>

[ALSA] hda-intel: fix ASUS M2V detection

Commit f32610edab47f36946d23b883aeae91e15986121 added ALC660VD support, but
this caused a 2.6.21 regression for some users. The ASUS M2V device is
now detected as ALC660VD rather than ALC660/861 but the PCI quirk was not
carried over.
This patch allows affected users to use audio again.
http://bugzilla.kernel.org/show_bug.cgi?id=8273
https://bugs.gentoo.org/show_bug.cgi?id=178243

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 272a527c 14-May-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops

Fixed some platform no sound and Add JD Function for below platform list:
Sony(0x104d) 0x9015, 0x900e, 0x1f00
Toshiba(0x1179) DALLAS 0xff00, 0xff01
Targa(0x1462) 0x28fb
Asus(0x1043) A7J 0x060d
Lenovo(0x17aa) 0x3bfd, 0x2085
MEDION(0x17c0) MD2 0x4071

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# bdd148a3 08-May-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add ALC861VD Lenovo support

- Added ALC861VD Lenovo support (17aa:3802, 17aa:2066)
- Modify alc_subsystem_id

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 458a4fab 04-May-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC880 uniwill auto-mutes

Fix the auto-mute controls of ALC880 uniwill model. Split to two
individual functions to handle HP and front-mic mutes. For front-mic
mute, use snd_hda_codec_amp_update() to be consistent with mixer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f223a9fc 25-Apr-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix model for ASUS A9rp

Fixed the model (asus-laptop) for ASUS A9rp with ALC660 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# baba8ee9 23-Apr-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix output pin types in auto configuration

Use PIN_HP output type for HP pin widgets accordingly, instead of
always applying PIN_OUT.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 57b14f24 18-Apr-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Gigabyte S-Series GA-M57SLI-S4 motherboard

Added the support for Gigabyte S-Series GA-M57SLI-S4 motherboard
(model=6stack-dig).

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>


# f12ab1e0 12-Apr-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - clean up patch_realtek.c

Trivial code clean-ups of patch_realtek.c: indent and whitespace fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# bc9f98a9 12-Apr-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add ALC662 support

- Add ALC662 support
- Fixed no sound for [0x1631, 0xc017, 'PB V7900', ALC260_WILL]
- Fixed no sound for [0x161f, 0x2057, 'Replacer 672V', ALC260_REPLACER_672V]
- Add SKU ID for auto mode

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
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>


# 07e038b3 15-Feb-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix models for some lpatops/mobos

Added the missing models for some laptops / mobos:
ASUS z35m, ASRock board

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a8a5d067 15-Mar-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for HP Compaq d5750

Added model=hp-3013 for HP Compaq d5750 with ALC260 codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 9720b718 13-Mar-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for HP Compaq d5700

Added model=hp-3013 for HP Compaq d5700 desktop with ALC260 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cc69d12d 15-Feb-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing Mic Boost controls for ALC262

Added missing Mic Boost controls for ALC262 codec chip.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 081d17c4 15-Feb-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add method for configuring Mac Pro without PCI SSID

This patch adds a switch to configure systems that do not provide
PCI SSID's for HD Audio like Mac Pro with ALC885.

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>


# 2cf9f0fc 07-Feb-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Fujitsu PI1556 Realtek ALC880

This patch adds support for the Fujitsu PI1556 laptop.
Issue: Volume knob on system maxes out lower than alsamixer (0x35 vs 0x40).
Everything else works, and audio quality is good at 0x35.

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>


# f32610ed 02-Feb-2007 Jakub Schmidtke <sjakub@gmail.com>

[ALSA] hda-codec - Add ALC861VD/ALC660VD support

o Added ALC861VD support to patch_realtek.c under hda-intel
o Added ALC660VD as a model of 861VD
o Added pci quirks for Asus G1 as well as for two devices found in Realtek's
driver to point at ALC660VD model (3stack-660)
o Added pci quirk for Lenovo 3000 C200 - although untested, it should work
with ALC861VD 3stack model
o Changed preset id = 0x10ec0660 to point at new patch_alc861vd instead of
patch_861
o Organised the list of presets

Signed-off-by: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4147dab6 31-Jan-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for Uniwill X40AIx

Added model=uniwill-m31 for Uniwill X40AIx with ALC861 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cd7509a4 26-Jan-2007 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add HP BPC-D7000 support

Add HP BPC-D7000 support.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 32360416 24-Jan-2007 Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

[ALSA] hda-codec - Missing Mic Boost on Realtek ALC882/883

This patch adds Mic Boost controls for Realtek ALC882 and ALC883 chips.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 687a47bd 10-Jan-2007 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix a typo in the last patch_realtek.c change

Fixed a typo in the last patch_realtek.c change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 30e80a27 09-Jan-2007 Jaroslav Kysela <perex@suse.cz>

[ALSA] hda-codec - add ASUS W7J (0x1043, 0x1205) to quirk list - 3stack

See Novell-bug#228201 .

Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2a296cb6 08-Jan-2007 Leonard Norrgard <leonard.norrgard@refactor.fi>

[ALSA] sound: hda: detect ALC883 on MSI K9A Platinum motherboards (MS-7280)

Recognize the Realtek ALC883 chip on MSI K9A Platinum motherboards (model
no. MS-7280), enabling full sound capabilities.
Error messages seen before this patch:
cannot find the slot for index 0 (range 0-0)
hda-intel: Error creating card!
HDA Intel: probe of 0000:00:14.2 failed with error -12
[akpm@osdl.org: updated to match recent ALSA table changes]

Signed-off-by: Leonard Norrgard <leonard.norrgard@refactor.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ad5e7737 08-Jan-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Toshiba M105 to Realtek patch

This patch adds support for the Toshiba M105-S3041 laptop (ALC861).

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>


# 0e4ceb75 08-Jan-2007 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Change default config for Asus P5GD1

This patch changes the default configuration for the Asus P5GD1
motherboard from 5stack to asus, as reported by stelek on
linuxquestions.org
http://www.linuxquestions.org/questions/showthread.php?p=2556497#post2556497

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>


# 7b9470d8 28-Dec-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add Asus P5W DH to alc882_cfg_tbl

This patch adds the Asus P5W DH to the ALC882 config table
as a 6stack-dig system.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# dc041e0b 19-Dec-2006 Robert P. J. Day <rpjday@mindspring.com>

[ALSA] sound: Change final two instances of kcalloc(1,...) to kzalloc()

Change the two remaining instances in the tree of kcalloc(1,...) to
the corresponding kzalloc() call.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4dc53e28 18-Dec-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add quirk for Turbo-X Coeus G610P

This patch adds the Turbo-X Coeus G610P to the alc880 config table,
based on user provided information.

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>


# 9102cd1c 15-Dec-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec (realtek): add support for MacPro series workstations

This patch adds limited support for Intel-based MacPro workstations.
Currently, the front headphone jack is not functioning, but line out
and line in are working. S/PDIF not tested.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# bd869485 28-Nov-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda-codec - Make internal speaker work on Acer C20x tablets

The following patch creates a new 'Mono speaker' control in alsamixer
when the Realtek 'acer' model is used with hda_intel. This is needed so
the internal mono speaker (when present) can be controlled.
This new control won't do anything in Acer laptops which are not fitted with
a mono speaker. Acer models which are known to have a mono speaker are the
C20x tablet series but there may be others. I guess we could define a new
model specifically for Acers with mono speakers but this seems a bit silly
given that such a model will be identical to the normal 'acer' model except
for this added control.
This patch also adds the C20x tablets to the list of PCI ids associated with
the 'acer' model. This means that owners of C20x machines will no longer
have to supply 'model=acer' when loading hda_intel.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f5fcc13c 24-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Use snd_pci_quirk_lookup() for board config lookup

Use snd_pci_quirk_lookup() for looking up a board config table.
The config table is sorted in numerical order of PCI SSIDs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# d1d985f0 23-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix obsolete *_t typedefs

Fixed obsolete *_t typedefs. Now completely removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 56bb0cab 22-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add asus-laptop model for ALC861 (ALC660)

Added a new model 'asus-laptop' for ASUS F2*/F3* laptops
with ALC861 (equivalent with ALC660) codec chip.
Also fixed the model for PCI SSID 1043:1338.
Corresponding to ALSA bug#2480.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 761ccb24 19-Nov-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Evesham Voyager C530RD laptops

This patch adds support for the Evesham Voyager C530RD series laptops.
So far, only playback has been tested, but microphone should also work.

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>


# 9dece1d7 16-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC861 connection of front-output

Fix the wrongly set SET_CONNECTION verb for NID 0x0f of ALC861.
The widget has only a single connection although the init verb
sets to 0x01.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a2ee4702 16-Nov-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Change Gigabyte K8N51 from 6stack to 6stack-digout

This patch moves the entry for the Gigabyte K8N51 from the 6stack
grouping to the 6stack-digout grouping, allowing for S/PDIF output
functionality.

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>


# d1f67547 13-Nov-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Sony UX-90s

Added the model entry (model=hippo) for Sony UX-90s with ALC262 codec.
Although the device has no SPDIF output, the hippo model adds a
PCM output, but it must be harmless.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# b373bdeb 07-Nov-2006 Andrew L. Neporada <nepal@asplinux.ru>

[ALSA] hda-codec - Clevo M540JE, M550JE laptops (Nvidia MCP51 chipset, ALC883 codec)

We need to enable External Amplifier on this laptops. This patch basicly
adds laptop-eapd model to ALC883 codec.

Signed-off-by: Andrew L. Neporada <nepal@asplinux.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7cdbff94 23-Oct-2006 Mariusz Domanski <mariook@wp.pl>

[ALSA] hda-codec - Add asus model to ALC861 codec

This patch adds support for Asus laptops (for example: Asus
A6Rp-AP002).

Signed-off-by: Mariusz Domanski <mariook@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# ccc656ce 16-Oct-2006 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add new modesl for Realtek codecs

Changes from Realtek driver:
- New models hippo and hippo_1 for ALC262
- New models tagra-dig and tagra-2ch-dig for ALC883
- New id for ALC660 codec chip

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# a53d1aec 16-Oct-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add toshiba model to ALC861 codec

This patch adds support for Toshiba laptops. Code is from
RealTek's alsa-driver-1.0.12-4.05b tree.

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>


# 35f60839 12-Oct-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add missing comma

Added a missing comma in the medion patch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c07584c8 12-Oct-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] hda-codec - Add support for Medion laptops

This patch adds audio support for Medion's line of laptops,
based on code shipped with the laptops. Microphone support is
still being explored.

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>


# e22a9a8b 01-Jan-2007 Leonard Norrgård <leonard.norrgard@refactor.fi>

[PATCH] sound: hda: detect ALC883 on MSI K9A Platinum motherboards (MS-7280)

Recognize the Realtek ALC883 chip on MSI K9A Platinum motherboards
(model no. MS-7280), enabling full sound capabilities.

Signed-off-by: Leonard Norrgård <leonard.norrgard@refactor.fi>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# efeccac5 24-Oct-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model for HP q965

Added a model entry (HP_BPC) for HP q965 with ALC262 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# bd2033f2 10-Oct-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix wrong error checks in patch_{realtek,analog}.c

Fix wrong error checks of *_ch_mode_put() in patch_realtek.c and
patch_analog.c. snd_hda_ch_mode_put() could return a positive
value for success, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 282e0c87 05-Nov-2006 John W. Linville <linville@tuxdriver.com>

[ALSA] hda: fix typo for xw4400 PCI sub-ID

The PCI sub-device ID for the HP xw4400 is actually 0x280c.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c06134d7 11-Oct-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix assignment of PCM devices for Realtek codecs

Fixed the assignment of PCM devices for Realtek codecs.
The secondary analog capture should be statically asigned to the
third device regardless whether SPDIF exists or not.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7a997954 26-Sep-2006 Tobin Davis <tdavis@dsl-only.net>

[ALSA] Add new subdevice ids for hda-intel

This patch adds a couple of device ids for Acer laptops. In both cases,
the owners got the driver working by adding 'model=acer' to their
modprobe.conf files.

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>


# eb06ed8f 20-Sep-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Support multiple headphone pins

Some machines have multiple headpohne pins (usually on the lpatop
and on the docking station) while the current hda-codec driver
assumes a single headphone pin. Now it supports multiple hp pins
(at least for detection).
The sigmatel 92xx code supports this new multiple hp pins.
It detects all hp pins for auto-muting, too.
Also, the driver checks speaker pins in addition. In some cases,
all line-out, speaker and hp-pins coexist.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# e08a007d 07-Sep-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix SPDIF device number of ALC codecs

Assign the SPDIF always to the secondary device (dev#1) to keep
the same configuration. Move the optional capture device to the
third device (dev#2).
hda_intel now just ignores the NULL entries in the pcm arrays
from codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# cd417d4f 06-Sep-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for LG LW25 laptop

Added the support for LG LW25 laptop with ALC880 codec.
It's the same codec model as LG LW20 (model=lg-lw).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# bab282b9 22-Aug-2006 Vladimir Avdonin <vldmrrr@yahoo.com>

[ALSA] hda-codec - Fix for Acer laptops with ALC883 codec

Patch enables the internal speaker on acer laptops with ALC883.

Signed-off-by: Vladimir Avdonin <vldmrrr@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 2aaeee8b 21-Aug-2006 Tobin Davis <tobinx.b.davis@intel.com>

[ALSA] hda-codec - add missing device ids

This patch adds missing device ids for Intel 915 and D102GGC
motherboards.

Signed-off-by: Tobin Davis <tobinx.b.davis@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# c2566524 17-Aug-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add missing TLV callbacks for HD-audio codecs

Added missing TLV callbacks for HD-audio codec supports.
Also cleaned up the tlv callback for ad1986a (no mutex is needed there).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 22309c3e 09-Aug-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Added model for Uniwill laptop with ALC861

Added a new model 'uniwill-m31' for Uniwill laptops with ALC861
codec chip. The patch is taken from ALSA bug#2035, and modifeid.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# f5a5ffad 08-Aug-2006 Danny Tholen <danny@mailmij.org>

[ALSA] [snd-hda-intel] fix sound on some Asus W6A chips

This patch adds support in ALSA snd-hda-intel driver for Asus W6A
motherboard as reported in MDV Bugzilla #19962
(see http://qa.mandriva.com/show_bug.cgi?id=19962)

Signed-off-by: Danny Tholen <danny@mailmij.org>
Signed-off-by: Thomas Backlund <tmb@mandriva.org>
Signed-off-by: Thierry Vignaud <tvignaud@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 25b6c43b 08-Aug-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix the preselected model for HP machine

Fixed the preselected model for a HP machine with SSID 103c:3010
to use hp-3013 (ALSA bug#2157).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4e195a7b 28-Jul-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix noisy output with shared channel mode with hd-audio

- Fix the wrong initialization of num_dacs when changing the channel
mode between 2 and multi-channel modes. It must be evaluated
after calling snd_hda_ch_mode_put()
- Added the similar check of num_dacs fix in Realtek code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 4b146cb0 28-Jul-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Misc fixes for Realtek HD-audio codecs

- Added model=arima for Arima W820Di1 with ALC882 codec chip
- Added EAPD-control verbs to TCL S700 init verbs
- Added missing model strings for Realtek codecs (to be specified
via module option explicitly for testing/debugging)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 304dcaac 25-Jul-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add support of Benq laptop with ALC262

Added the support of Benq laptop with ALC262 codec.
A model string 'benq' is added, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 6d177ba7 25-Jul-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add hp-bpc model type for HP laptops

Added 'hp-bpc' model type for HP xw4400-compatible laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 5a053d01 25-Jul-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add model entry for Clevo m665n laptop

Added the proper model entry for Clevo m665n laptop with ALC880 codec.
Also, added a model string 'clevo' to enable the clevo-type model option.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 9c7f852e 28-Jun-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix/add support of Realtek ALC883 / ALC888 and ALC861 codecs

Patch from Realtek:
- Fix ALC883 support code
- Add support of ALC888 codec
- Add ALC660 support (ALC861-compatible)
- Add HP xw4400/6400/8400/9400 support (model=hp-bpc)
- Code clean-up: fix spaces and indentation

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 766a6c36 26-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix model for HP dc7600

Changed the assigned model for HP dc7600 with ALC260 codec
to match better with the actual I/O assignment.
Patch taken from ALSA bug#2157.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 474167d6 17-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix init verbs for ALC260 hp model

Use the basic init verbs for ALC260 instead of hp init verbs
since hp init verbs seem incomplete and not working on some machines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0defb267 11-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix handling of capture controls on ALC882 3/6-stack models

Fixed the handling of capture controls on ALC882 3/6-stack models.
Now the driver checks the availability of NID 07h.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3206b9ca 10-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for Sony Vaio VGN-S3HP

Added the missing support for Sony Vaio VGN-S3HP with ALC260 codec.
The patch taken from ALSA bug#2101.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 886da867 02-May-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for LG S1 laptop

Added the model entry for LG S1 laptop.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5e1b1518 28-Apr-2006 Kenneth Crudup <kenny@panix.com>

[ALSA] hda-codec - Add support for Sony Vaio VGN-A790 laptop

Added the model entry for Sony Vaio VGN-A790 laptop with ALC260 codec.
From: Kenneth Crudup <kenny@panix.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 531213a9 18-Apr-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add entry for Epox EP-5LDA+ GLi

Added the SSID entry for Epox EP-5LDA+ GLi with ALC880 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a1e8d2da 27-Mar-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/Realtek: multiple input mux definitions and pin mode additions

The following patch relative to CVS from 20060324 adds the following
features to the Realtek HDA codec.

1) Define two new pin modes: ALC_PIN_DIR_IN_NOMICBIAS and
ALC_PIN_DIR_INOUT_NOMICBIAS. These can be used with jack mode switch
definitions in mixers to prevent the user being offered the mic bias
options if the hardware doesn't support it.

2) Add the ability to have different input mux definitions for different
ADCs. This is needed because the ALC260 chip uses different mux layouts
for the two onboard ADCs. A new field (num_mux_defs) was added to the
alc_spec and alc_config_preset structures to support this.

3) Adjust numerous comments to make them consistent with the above changes.

4) Utilise the new multi-mux definition functionality for the ALC260 fujitsu
model to allow recording of the mixer output.

5) Utilise the new multi-mux definition functionality for the ALC260 test
model to make the mux selections a little less confusing.

6) Allow the headphone jack of the ALC260 acer model to be retasked in
the mixer.

6) Utilise the new multi-mux definition functionality for the ALC260 acer
model to give access to the mixer output and the retasked headphone
jack.

At this stage the *_NOMICBIAS modes are not used. We have reports that the
"Line" jack of at least some Acer models doesn't pass the bias out, and we
also know that NIDs 0x0f and 0x10 don't seem to accept the mic bias requests
at all. However, I feel we need to collect more evidence on both counts
before committing to the use of *_NOMICBIAS. In the case of the Acers, it's
not clear whether this issue (probably caused by the inclusion of DC
blocking capacitors) affects all Acer models or just a small number. With
the issue with NIDs 0x0f and 0x10 it's unclear whether this is a hardware
bug which will be addressed in later chip revisions or if it's an
intentional restriction. The datasheet makes no mention of the restriction
so at this stage I'm inclined to consider it a hardware bug. Comments in
the source reflect this reasoning.

On a similar theme, the headphone jack of the Fujitsu S7020 also doesn't
appear to pass mic bias voltage. I'm still investigating this however.

With the ability to retask the headphone jack, owners of ALC260-based Acer
laptops should now be able to record 4 channels of audio if they desire. The
multiple mux definitions allow this jack to be presented from both ADCs
(since this mux input is one of those which differs between the muxes).

This patch has been tested on a Fujitsu S7020 laptop and appears to behave
itself both for the "test" and "fujitsu" models. Definitions using only a
single mux specification also work. Other ALC chips should be fine but I
cannot test these myself. The "auto" modes should also continue to function
but again I have not verified this.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d681518a 23-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add support of LG LW20 laptop

Add support of LG LW20 laptop with ALC880 codec (ALSA bug#1572).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 84f3430c 21-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support for ASUS P4GPL-X

Modules: HDA Codec driver

Added the support ASUS P4GPL-X with ALC880 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 82bc955f 21-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix BIOS auto-configuration

Modules: HDA Codec driver,HDA generic driver

- Fix autoconfig speaker/hp detection
Now it allows multiple speaker pins (e.g. Dell laptops have such config)

- Use speaker or hp pins if no line-outs are available
This fixes the silence output on recent Dell laptops with STAC9200
(ALSA bug#1843)

- Fix analog/realtek/sigmatel autoconfig parser

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a12606cf 15-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model entry for FIC P4M-915GD1

Modules: HDA Codec driver

Add model entry for FIC P4M-915GD1 with ALC880 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ede3531e 13-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Aopen i915GMm-HFS mobo

Modules: HDA Codec driver

Add a model entry for Aopen i915GMm-HFS mobo with ALC880 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c1fc8047 06-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] Add default entry for CTL Travel Master U553W

Modules: HDA Codec driver

Added the default entry of ALC880 configuration table for
CTL Travel Master U553W.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# ae6b813a 03-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add lg model for LG laptop

Modules: Documentation,HDA Codec driver

Added a new model 'lg' for LG laptop (m1 express dual) with ALC880 codec.
Also clean up the initialization/unsol_event hooks in patch_realtek.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 834be88d 01-Mar-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC262 for Fujitsu laptop

Modules: HDA Codec driver,HDA generic driver

Add 'fujitsu' model for ALC262 patch to support a FSC laptop.
The internal speaker is turned on/off with jack sensing.

Also fixed alc262 'basic' model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92621f13 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 7/7 - add SPDIF enable to test model

Modules: HDA Codec driver

This patch adds mixer controls to the 'test' ALC260 model which allow the
user to selectively enable or disable the SPDIF output pins. This should
assist people identify digital outputs on machines which bring them to the
outside world.

Note that while the patch *should* work, I cannot personally verify it since
my laptop doesn't bring the SPDIF lines out.

As for the GPIO switches added in patch 4, these controls are currently
only compiled in if debug mode is selected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# f7ace40d 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 6/7 - Fujitsu/test model tweaks

Modules: HDA Codec driver

This patch is janitorial - it cleans up a number of cosmetic issues with
the 'fujitsu' and 'test' models. Issues addressed:

* spaces instead of tabs used for some indents,

* clarified/corrected selected comments.

Unlike a patch from earlier this week, this keeps both ADCs connected to
the mic1 pin widget by default. I believe this is the better default, since
some laptops don't bring the line1 widget to the outside world. Most (if
not all) do bring mic1 out though, so it seems to me that this default
should remain in place.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0bfc90e9 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 5/7 - add 'acer' model

Modules: HDA Codec driver

This patch adds a new 'acer' model. It is based on work by Rimas and many
other dedicated Acer owners over the past few weeks (see bug number
1618) - kudos to them. This adds support for a variety of Acer laptops,
although we are still in the process of collecting pci/subsystem IDs to add.
There are still some potentially outstanding issues: there are reports that
the CD control might not yet be functional for example. However, the time
is probably right to get a 'first cut' into the kernel which can be refined
as more test reports come in.

From the reports by various Acer owners, this code allows them to record
from internal mics and external jacks. Playback also seems to work to all
external jacks and the internal speaker. The 'beep' control doesn't appear
functional at the moment.

This patch depends on the changes made in patch 3/7.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5c8f858d 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 4/7 - add GPIO switches to test model

Modules: HDA Codec driver

This patch adds 'test' model mixer switches for the GPIO controls found on
the ALC260. It has been found that some laptops (eg: Acer) can use these to
enable particular controls, so it would be useful to have access to these
via the 'test' model. It will make testing new models easy, especially if
certain outputs cannot be made to work any other way.

This patch *should* work, but because the GPIO pins don't do anything in
my laptop I cannot personally verify that all this works as expected.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d57fdac0 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 3/7 - generalise some structures

Modules: HDA Codec driver

This patch generalises a structure added for the 'fujitsu' model but which
is potentially useful for other models as well. It turns the
'alc260_fujitsu_adc_nids' array into 'alc260_dual_adc_nids'; for other
models which decide to utilise the dual ADC functionality there's really
no reason why they need to define their own list of ADC nids.

The 'fujitsu' model preset is adjusted accordingly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# cdcd9268 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 2/7 - switch pin buffer enables

Modules: HDA Codec driver

This patch adds functionality which switches the input/output buffer enables
of retasking pins when the user changes their mode with the mode control.
This probably reduces noise *slightly* for recording compared to the case
where both input and output buffers were enabled simultaneously.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 17e7aec6 28-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] HDA/ALC260: 1/7 - Fix test model input mux label

Modules: HDA Codec driver

This patch fixes input mux labels used for the ALC260 'test' model. This is
needed to avoid confusion which comes about because the two ADCs in the
ALC260 have slightly different mappings for their input selectors. Since
this is just the test model it's sufficient to simply report both options
where they exist. If a model comes along for which this becomes an issue,
the ALC260 input mux code will have to be extended to allow different mux
layouts for different ADCs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7cf51e48 08-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda: ALC260 test model implementation

Modules: HDA Codec driver

The following patch adds a 'test' ALC260 model specification to the
patch_realtek.c driver if CONFIG_SND_DEBUG is set. This is similar to the
'test' ALC880 model in that it sets up mixer controls for almost everything
to make it easier for people to test their laptop/soundcard when working out
what pin widgets are connected to which real-world devices.

This patch assumes my previous patch (adding the second PCM to the ALC260)
has previously been applied since it uses infrastructure added by that
patch.

In developing this patch it was found that not all retasking pins accept all
the modes - in particular, some ignore the VREFxx variants. The pin mode
control has therefore been tweaked to prevent this becoming a problem in
mixer applications.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8b33a5aa 09-Feb-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda: minor correction to fujitsu ALC260 initverbs

Modules: HDA Codec driver

Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

The following patch changes the initverbs associated with the output sum
widgets 0x08, 0x09 and 0x0a used with the fujitsu model in patch_realtek.c.
It is against alsa 1.0.11rc3.

Currently these widgets have their output muted, but a close reading of the
datasheet suggests that they don't actually have an output mute. They have
an *input* mute for each of their two inputs and a single output gain. This
patch therefore activates the input mutes and zeros the output gain. It has
not yet been tested but the above interpretation of the ALC260 datasheet
seems correct.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4c5186ed 09-Feb-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda: add PCM for 2nd ADC on ALC260

Modules: HDA Codec driver

The following patch against alsa 1.0.11rc3 creates a PCM device (pcm1c) for
the second ADC present on the ALC260 codec used by the hda driver. It also
defines a new mixer control allowing the mode of retasking pins to be set;
this means a user can (for example) designate the headphone jack to be a
second input. With this patch in place it is possible to do 4 channel
recording on laptops equipped with an ALC260 codec assuming both a stereo
line-in jack is provided in addition to a headphone jack.

Mixer controls are provided to allow the headphone jack to be switched as
an input. In addition, an (input only) mode control is configured for
the line-in jack to allow a bias voltage to be requested (VREF80 or VREF50)
so headsets based on condensor microphones have a chance of working.

This patch has been tested on a Fujitsu S7020 laptop and as such these
features are currently only configured for the 'fujitsu' model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1494a92f 31-Jan-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix typos in alc882 model table

Modules: HDA Codec driver

Fixed typos in alc882 model table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bae2bdb3 26-Jan-2006 Arnaud Patard <apatard@mandriva.com>

[ALSA] patch_realtek.c: Add new model

Modules: HDA Codec driver

This little patch add the model for the motherboard K8N51 from Gigabyte
to the known models of ALC boards.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fd56f2db 24-Jan-2006 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda-codec - Fix init verb of ALC260

Modules: HDA Codec driver

Fixed the wrong widget id for line-2 selector in the init verb
of ALC260.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b14e77e6 11-Jan-2006 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model entry for Sony VAIO

Modules: HDA Codec driver

Added an ALC260 model entry (basic) for Sony VAIO.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 041dec01 22-Dec-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add model entry for Shuttle ST20G5

Modules: HDA Codec driver

Added the model entry for Shuttle ST20G5.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7632c7b4 07-Dec-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add the model entry for ASUS P5GD1-HVM

Modules: HDA Codec driver

Add the model entry (ALC880 6stack) for ASUS P5GD1-HVM.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 4a471b7d 07-Dec-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Small clean up and fixes

Modules: HDA Codec driver,HDA generic driver

- Common labels for input pins
- Fix and clean up of Realtek codec parsers

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a3bcba38 06-Dec-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix Oops with ALC260 auto-probe

Modules: HDA Codec driver

- Fix Oops with auto-probing of ALC260 with digital I/O
- Fix a typo

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c5f2ea08 06-Dec-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix ALC codec probing

Modules: HDA Codec driver

- Fix ALC882 BIOS auto-probe
- Fix ALC262 basic model
- Add assert for debugging Oops

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# df694daa 05-Dec-2005 Kailang Yang <kailang@realtek.com.tw>

[ALSA] hda-codec - Add the support of ALC262,ALC883,ALC885,ALC861

Modules: HDA Codec driver,HDA generic driver

This patch adds the support of ALC262,ALC883,ALC885,ALC861 to driver
More models and improvements for ALC880, ALC260 and ALC882 codecs, too.

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5014f193 23-Nov-2005 Libin Yang <libin.yang@intel.com>

[ALSA] hda-codec - Fix auto-probe of ALC880

Modules: HDA Codec driver

This patch is to fix the problem of calculating the nid incorrectly
when auto-probe for ALC880. The problem to be fixed often behaves
with such words when using dmesg, 'num_steps = 0 for NID=0x8' when
auto-probe for ALC880.

The patch contains:
- alsa-kernel/pci/hda/patch_realtek.c: replace 'alc880_dac_to_idx'
with 'alc880_idx_to_dac' in function 'alc880_auto_fill_dac_nids()'

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 54d17403 21-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix connection list parsing

Modules: HDA Codec driver,HDA generic driver

- Fix connection list parsing (with ranged flag).
- Increase the max number of connections
- Introduce widget capabilities cache
- Power up/down widgets at init, suspend and resume

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# c8b6bf9b 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Remove xxx_t typedefs: HD-Audio codec

Modules: HDA Codec driver,HDA generic driver

Remove xxx_t typedefs from the HD-Audio codec support codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8d88bc3d 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix assignment of speaker pin

Modules: HDA Codec driver,HDA generic driver

Fix the auto-assignment of speaker pin. Handle it independently from
line-out pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# d2a6d7dc 17-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add channel-mode helper

Modules: HDA Codec driver,HDA generic driver

Add common channel-mode helper functions for all codec patches.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 985be54b 02-Nov-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Minor rewrites

Modules: HDA Codec driver,HDA generic driver

- Make bound controls global to all patches
- Clean up analog patches (for the upcoming extension to AD1988)

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a9430dd8 16-Sep-2005 Jonathan Woithe <jwoithe@physics.adelaide.edu.au>

[ALSA] hda-codec - A new model for Fujitsu S7020

Modules: HDA Codec driver

Added a new model 'fujitsu' to ALC260 config for Fujitsu S7020.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 35451088 29-Sep-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix confliction of capture controls on ALC880 test model

HDA Codec driver
Fixed the confliction of capture controls on ALC880 'test' model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 92447f3f 29-Sep-2005 John W. Linville <linville@tuxdriver.com>

[ALSA] fix HD audio ALC882 lfe (un)mute

HDA Codec driver
Mark the ALC882 'LFE Playback Switch' as an input, like the other
playback switch settings.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1c1fa8b6 29-Sep-2005 John W. Linville <linville@tuxdriver.com>

[ALSA] fix alc880_test_mixer typo

HDA Codec driver
Fix a typo (cut & paste) in the alc880_test_mixer structure.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# a7175aab 29-Sep-2005 John W. Linville <linville@tuxdriver.com>

[ALSA] fix HD audio ALC260 mono (un)mute

HDA Codec driver
The ALC260 'Mono Playback Switch' is marked as an output in
patch_realtek.c. It actually does not work unless it is marked as an
input. Go figure... This was tested and confirmed on an HP xw4300.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# e560d8d8 09-Sep-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Replace with kzalloc() - pci stuff

AD1889 driver,ATIIXP driver,ATIIXP-modem driver,AZT3328 driver
BT87x driver,CMIPCI driver,CS4281 driver,ENS1370/1+ driver
ES1938 driver,ES1968 driver,FM801 driver,Intel8x0 driver
Intel8x0-modem driver,Maestro3 driver,SonicVibes driver,VIA82xx driver
VIA82xx-modem driver,AC97 Codec,AK4531 codec,au88x0 driver
CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,HDA Codec driver
HDA generic driver,HDA Intel driver,ICE1712 driver,ICE1724 driver
KORG1212 driver,MIXART driver,NM256 driver,Trident driver,YMFPCI driver
Replace kcalloc(1,..) with kzalloc().

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 8648811f 09-Sep-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Added ASUS A6

HDA Codec driver
Added ASUS A6 support for ALC880 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 0ca21611 05-Sep-2005 Davide Libenzi <davidel@xmailserver.org>

[ALSA] hda-codec - Bring the Vaio's RA826G HDA (82801) to life ...

HDA Codec driver
Add the subsystem PCI devid to the list (on top of 2.6.13).

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 3c10a9d9 23-Aug-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add beep support for Uniwill

HDA Codec driver
Added the missing beep support for Uniwill laptop (ALSA bug#1358).

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 5a47fe3c 15-Aug-2005 Jaroslav Kysela <perex@suse.cz>

[ALSA] hda-patch-realtek - added pci subdevice ID for Acer TravelMate 8100 (3 stack model + digital out)

HDA Codec driver

Signed-off-by: Jaroslav Kysela <perex@suse.cz>


# 7a318a70 28-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add entry for Acer APFV

HDA Codec driver
Added the model entry for Acer APFV.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b6482d48 27-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add 6stack model for ALC880

Documentation,HDA Codec driver
- Added a new '6stack' model for ALC880.
- Fixed the typo in 6stack-digout model name.
- Added description for missing models in ALSA-Configuration.txt.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# b0af0de5 21-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Fix oops with ALC880

HDA Codec driver
- Fixed oops with ALC880 auto-config mode
- Fixed a wrong config table entry for ALC880

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 543537bd 23-Jun-2005 Paulo Marques <pmarques@grupopie.com>

[PATCH] create a kstrdup library function

This patch creates a new kstrdup library function and changes the "local"
implementations in several places to use this function.

Most of the changes come from the sound and net subsystems. The sound part
had already been acknowledged by Takashi Iwai and the net part by David S.
Miller.

I left UML alone for now because I would need more time to read the code
carefully before making changes there.

Signed-off-by: Paulo Marques <pmarques@grupopie.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# e9edcee0 13-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - More fix of ALC880 codec support

Documentation,HDA Codec driver,HDA generic driver,HDA Intel driver
- Fix some invalid configurations, typos in the last patch
- Make init_verbs chainable, so that different configs can share the same
init_verbs
- Reorder and clean up the source codes in patch_realtek.c
- Add the pin default configuration parser, used commonly in cmedia
and realtek patch codes.
- Add 'auto' model to ALC880 for auto-configuration from BIOS
Use this model as default, and 3-stack as fallback

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 16ded525 10-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Add support of more models with ALC codecs

HDA Codec driver,HDA Intel driver
Merged the work of pshou <pshou@realtek.com.tw> for the support of
more models with ALC codecs: ALC880 ASUS, Uniwill, FSC1734, generic 6-stack,
and ALC260 HP. Tests with the real hardwares are appreciated.

The codec patch is cleaned up: The preset configuration of codecs are
stored in the table and copied to the spec instance.

Added/fixed comments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 05acb863 10-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] hda-codec - Clean up and fix ALC-codec support code

HDA Codec driver
Clean up and fix ALC-codec support code.

The last addition of bound volume is fixed now to handle correctly
the bound 'mute switches'. The analog loopback should work better.
The init verbs are fixed together with this change.

The numbers are replaced with macros for better readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 41e41f1f 08-Jun-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix the analog loopback volumes of ALC codecs

HDA Codec driver
Fix the analog loopback volumes of ALC codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 71fe7b82 25-May-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Fix ALC880 capture problems

HDA Codec driver
Fixed the capture on some ALC880 devices.
The node 0x07 is sometimes invalid as an ADC. Also, the intialization
of ADC nodes are fixed on some models.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# fd2c326d 13-May-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Allow more than 2 channel modes

HDA Codec driver
Allow 'Channel Mode' control to have more than 2 modes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 7291548d 12-May-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Rename pci_vendor/pci_device to pci_subvendor/pci_subdevice

HDA Codec driver,HDA generic driver
Renamed pci_vendor/pci_device fields to pci_subvendor/pci_subdevice.
They are really PCI subsystem IDs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 2fa522be 12-May-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Add test model for debugging ALC880 devices

HDA Codec driver
Added 'test' model for testing/debugging the devices with ALC880 codec.
This model is built only when CONFIG_SND_DEBUG is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# dfc0ff62 12-May-2005 Takashi Iwai <tiwai@suse.de>

[ALSA] Add ASUS Z71V support

Documentation,HDA Codec driver
Added the ASUS Z71V (or similar) laptop support.

Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!