Commit Graph

1620 Commits

Author SHA1 Message Date
David Henningsson eb82594b75 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>
2013-11-29 08:21:15 +01:00
Takashi Iwai eb9ca3ab21 ALSA: hda - Add LFE chmap to ASUS ET2700
As the previous commit 1f0bbf03cb 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>
2013-11-28 15:24:34 +01:00
Takashi Iwai 1f0bbf03cb 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>
2013-11-28 15:21:21 +01:00
Oleksij Rempel 2cede30379 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>
2013-11-28 11:38:27 +01:00
Kailang Yang 9ad54547cf 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>
2013-11-26 13:40:14 +01:00
Kailang Yang ba4c4d0a90 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>
2013-11-26 13:40:14 +01:00
David Henningsson 5db4d34b54 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>
2013-11-22 12:58:01 +01:00
Takashi Iwai d08c5ef2a0 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>
2013-11-22 08:10:03 +01:00
David Henningsson b8362e70cb 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>
2013-11-21 14:19:13 +01:00
Takashi Iwai 0f5a5b8515 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>
2013-11-21 09:17:34 +01:00
Takashi Iwai a30c9aaa90 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>
2013-11-21 08:02:11 +01:00
David Henningsson 09d2014fb0 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>
2013-11-20 12:59:32 +01:00
David Henningsson 521290003a 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>
2013-11-19 11:28:41 +01:00
David Henningsson 2793769f44 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>
2013-11-18 13:08:47 +01:00
David Henningsson 5959a6bc11 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>
2013-11-12 11:35:31 +01:00
Kailang Yang 9a22a8f558 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>
2013-11-08 13:52:59 +01:00
Kailang Yang 380702192f 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>
2013-11-08 07:43:45 +01:00
David Henningsson ad8ff99e6b 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>
2013-11-07 09:53:11 +01:00
Takashi Iwai 487a588d09 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>
2013-11-07 07:35:31 +01:00
David Henningsson 8e35cd4ac9 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>
2013-11-06 12:11:16 +01:00
David Henningsson d5b6b65e75 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>
2013-11-06 11:08:12 +01:00
David Henningsson b67ae3f1c9 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>
2013-11-05 13:42:21 +01:00
Takashi Iwai 24eff328f6 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>
2013-11-04 21:11:04 +01:00
Takashi Iwai 8e38395360 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>
2013-10-30 17:41:12 +01:00
Takashi Iwai 8d684b430b Merge branch 'for-linus' into for-next 2013-10-30 17:40:54 +01:00
Takashi Iwai 6fc16e58ad 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>
2013-10-30 12:31:35 +01:00
Takashi Iwai d2e92709e8 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>
2013-10-30 07:52:44 +01:00
Takashi Iwai ca16ec02e1 ALSA: hda - Remove locally dead codes
Reported by coverity.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 11:37:30 +01:00
Takashi Iwai 6913a9dbf1 ASoC: Updates for v3.13
- Further work on the dmaengine helpers, including support for
    configuring the parameters for DMA by reading the capabilities of the
    DMA controller which removes some guesswork and magic numbers fromm
    drivers.
  - A refresh of the documentation.
  - Conversions of many drivers to direct regmap API usage in order to
    allow the ASoC level register I/O code to be removed, this will
    hopefully be completed by v3.14.
  - Support for using async register I/O in DAPM, reducing the time taken
    to implement power transitions on systems that support it.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSajLdAAoJELSic+t+oim9MVEQAJ3t7df5K9R/OynjhKiEFxpP
 cBWo306CegZ5oO17UqG+SReJkOWgUI8zIUkNC818suTjtgyhv4WUBx1QgXG8akO5
 arHZEQGyReLxgWbnO5ScP7BJt5ZYldfQWN+NPnNlzwvVA8R4xChvAwuHL+kUSSYW
 DrOb0ag/Gtn2jQo3o9GbZb5c3UhZqoMg/pQSoVtnvG/O8N/xR0yoeXGsdJv1su6g
 OKhCJTRWU8v3FONatR2wWXnSrCBOeJ2Ec7YUJil1FQQdENYZfV3AOsFHxmqsyG2O
 Xj2P7CioY0JY7dtFcKjrXgsnjvgZmVdVsdegTJPWS9RjunjyupvSyhMhZYkoA60j
 V7RxyIbHAx7hILQqCYYhlOczYHom4MSwAGGt7y7T3oKt0432RvIjE2fP7sTGaqD8
 wzuVYuVl4km03xX9g9abF6xjyDE6e+4wun+d8kSvOosvd/nF47gkXUXEvPZh0Ley
 013e5fHNDaNF4uaSVXE169JyVxVnHP6nXJDRWZakXsryGXGUpn0quIzobf6fb6XE
 fY5Q3QoyP5rHdSMIvGN5Gi76KsHF5CWILWqcWLEVPLnaf9gJmrp3IypmF1c8i7VE
 CrcTim5mhNePEX56skRaHhpYHmsxYApSAzxNAA/t3cJ2rtwb87jMM4jOcjHi/war
 emSVe5lXkcwv/lU/Pa0N
 =rVsK
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.13

 - Further work on the dmaengine helpers, including support for
   configuring the parameters for DMA by reading the capabilities of the
   DMA controller which removes some guesswork and magic numbers fromm
   drivers.
 - A refresh of the documentation.
 - Conversions of many drivers to direct regmap API usage in order to
   allow the ASoC level register I/O code to be removed, this will
   hopefully be completed by v3.14.
 - Support for using async register I/O in DAPM, reducing the time taken
   to implement power transitions on systems that support it.
2013-10-25 11:43:47 +02:00
Kailang Yang 88011c0911 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>
2013-10-24 15:45:24 +02:00
Kailang Yang 161ebf295e 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>
2013-10-24 11:36:33 +02:00
Kailang Yang 1d04c9de5c 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>
2013-10-24 11:35:18 +02:00
David Henningsson fbc78ad624 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>
2013-10-11 13:49:43 +02:00
David Henningsson 7c478f0337 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>
2013-10-11 10:23:49 +02:00
David Henningsson 88cfcf86aa 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>
2013-10-11 10:23:42 +02:00
Takashi Iwai c6cc3d58b4 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>
2013-10-08 19:57:50 +02:00
David Henningsson 338cae565c 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>
2013-10-07 10:49:37 +02:00
Kailang Yang 1bb3e062d4 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>
2013-09-27 14:10:52 +02:00
Kailang Yang 068fd3a081 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>
2013-09-27 14:04:05 +02:00
Takashi Iwai 3d0049e852 ASoC: Fixes for v3.12
A few small fixes, nothing with any broad impact but all useful for the
 affected systems.  The Kirkwood compatible string change is fixing up a
 string just added in the merge window so that we don't get any changes
 in released kernels.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSMEN7AAoJELSic+t+oim9fUcP/2/JSlEzCnf9mnIVu5JUb4o0
 N9sqvZ3FuBmB2s+X7XdzHHatn/SRcj8bdPIUDyghsM+Ax6inzHCkLLxF0gMfgo1k
 YmbVamD9x+Odj7ovs/M7/pRji9vBUFRmTdh6DnxIcQUGyuZRIMEIYxgnu//tXQ6+
 vL2dJ3d3S37k4NtqHebKf1iL4ExGMAkp6f7Rig3YXc/N+jc8O/uUWAitfvBnzuBH
 ZlFTCxkHhZ9mYi/xRBUSOFbb96bQnHN2KQ3soss1xDKhJVpjuo1rOWfTZE9c7bMY
 OvqsMJDwaPNiCF0UzdCPQ1SMdE8r8U2lMMjyeQN76R9tqSVBtgxPeLvjzN0l3Xkf
 mnHd1LZXGOF5cSfrA/Diy4leFk0A0pJQSxdDt54vlRcCG3aV7IRJOkPi4C0tMHQE
 hkXOfgF6XERDsNV4RgzangAAvjKeXPqItWITZx+qtK7AxtCC6xpMc5EHV4wbFmTP
 bYz6oKBehQy5gaI/z5Ad0mU1JK1vJH6n2ENtu/zNxBzfHIiyhF5fBPSuE+IGxvJf
 /ANQf44DkkXLHZv5766lYUbldGmFYbiva2us+uDxaEfjSW5DDSSn/aYn73IsYJ16
 L5MsX0s/J2o/i10kuXPlWMWIkoat1Y2vDUrdjg1xQ1IrkZRAZDnIYJz4yS8TwNyT
 8rToadF2zYPKxwDVb37E
 =oTEO
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v3.12

A few small fixes, nothing with any broad impact but all useful for the
affected systems.  The Kirkwood compatible string change is fixing up a
string just added in the merge window so that we don't get any changes
in released kernels.
2013-09-11 12:38:45 +02:00
Mark Brown c34c0d7684 Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-09-11 11:17:15 +01:00
Takashi Iwai 7bba2157c5 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>
2013-09-06 15:54:42 +02:00
Takashi Iwai 68538bf2bc ASoC: Updates for v3.12
- DAPM is now mandatory for CODEC drivers in order to avoid the repeated
   regressions in the special cases for non-DAPM CODECs and make it
   easier to integrate with other components on boards.  All existing
   drivers have had some level of DAPM support added.
 - A lot of cleanups in DAPM plus support for maintaining controls in a
   specific state while a DAPM widget all contributed by Lars-Peter Clausen.
 - Core helpers for bitbanged AC'97 reset from Markus Pargmann.
 - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a),
   Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based
   machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung
   Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson
   Microelectronics WM8997.
 - Support for building drivers that can support it cross-platform for
   compile test.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJSF0rqAAoJELSic+t+oim9YK0P/0CwP7lAjL87EF+dUKW51raB
 7K8xtOgObec1+Fnc1FEbN6us1hXRkjZJMJyRqa3DO5EaNM5TUoxUa/+MNsKmyGXs
 UhoW7J2TUizxgStxszXdxLEZG5oErxwCtJR3xlIkAq4kcnUI0LwRtGctmguZH74a
 UFxd34tcq8LxytvBp1HaNgaG1OQqIqYUNHYXKCwZZMJRxk8TQU9NfAzlCOtWfPWp
 jjdsBkX6bypWzSV/0P8rdSvjhHlJ1vBw3XTD9jD1/EuC5J7qqKQvwo5Oid98QHiv
 /guV0zx6EPdW5IgyGVvlyc4e5zLrtrckj05Kjyy426mZUpLmGoQCPj+ZAZA+jdqo
 qX3M9lXdisx4FI1Ke+y00G64q9fOuNEyjHKnoMPbZXC7zBTLPC8znncM6Xk5MOx/
 Y+fSChecYzkCrBJqHZGUcMdl0/xL1cRrH6BP2I5ISn5ruEjmTuj3dD0JTUVRi1HM
 KGrLP6TnuY+yBMhoqbGsH7YtNN5NDbqnJrUXQy82GGHH++LlHs/0ljDdOCuwX774
 qu1PsyTwrBvCU9erJS4yTG1KIiFFLTn+exPvUOyjaTFVbs8PoX2NOC4/Ihqj+dvU
 UDj/Lh+/zF2BzrkxN65BwuXULElxjtoFvleWLzt7V8qOCb5LOzBVW8a7f5HQzfU6
 LsEXDtB4VkjGjOGAAsII
 =qzif
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.12

- DAPM is now mandatory for CODEC drivers in order to avoid the repeated
  regressions in the special cases for non-DAPM CODECs and make it
  easier to integrate with other components on boards.  All existing
  drivers have had some level of DAPM support added.
- A lot of cleanups in DAPM plus support for maintaining controls in a
  specific state while a DAPM widget all contributed by Lars-Peter Clausen.
- Core helpers for bitbanged AC'97 reset from Markus Pargmann.
- New drivers and support for Analog Devices ADAU1702 and ADAU1401(a),
  Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based
  machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung
  Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson
  Microelectronics WM8997.
- Support for building drivers that can support it cross-platform for
  compile test.
2013-08-23 14:12:22 +02:00
Kailang Yang cd217a6395 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>
2013-08-22 11:55:33 +02:00
Kailang Yang 2af02be71a 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>
2013-08-22 11:54:58 +02:00
Takashi Iwai d3d3835ce9 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>
2013-08-19 20:07:28 +02:00
David Henningsson cd5302c0d4 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>
2013-08-19 15:45:51 +02:00
David Henningsson aaedfb4761 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>
2013-08-16 14:50:00 +02:00
David Henningsson a4a9e08267 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>
2013-08-16 14:49:50 +02:00
Takashi Iwai 1801928e0f 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>
2013-08-16 08:17:05 +02:00
Takashi Iwai db8a38e506 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>
2013-08-12 11:04:17 +02:00
Chih-Chung Chang bde7bc6014 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>
2013-08-05 11:19:59 +02:00
Takashi Iwai da96fb5b01 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>
2013-07-29 16:54:36 +02:00
Kailang Yang c5177c861e 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>
2013-07-24 14:44:40 +02:00
Takashi Iwai 9bfb2844a2 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>
2013-07-24 14:31:50 +02:00
Takashi Iwai cd63a5ffd2 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>
2013-07-08 09:42:42 +02:00
Kailang Yang 05843c07ee 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>
2013-07-01 11:27:16 +02:00
David Henningsson cd6fb6793a 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>
2013-06-28 12:13:52 +02:00
David Henningsson 6c29d68a82 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>
2013-06-28 12:13:47 +02:00
Kailang Yang ad60d502fb 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>
2013-06-28 12:12:54 +02:00
Takashi Iwai 0623a889d1 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>
2013-06-25 09:29:40 +02:00
Takashi Iwai a8b083a24b Merge branch 'for-linus' into for-next
* for-linus:
  ALSA: hda - Add models for Dell headset jacks
2013-06-17 11:16:16 +02:00
David Henningsson e32aa85ab4 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>
2013-06-17 11:15:56 +02:00
Takashi Iwai ddf753efa4 Merge branch 'for-linus' into for-next
* for-linus: (635 commits)
  ALSA: usb-audio: Fix invalid volume resolution for Logitech HD Webcam c310
  ALSA: hda - Fix pin configurations for MacBook Air 4,2
  ALSA: usb-audio: work around Android accessory firmware bug
  ALSA: hda - Headset mic support for three more machines
  Linux 3.10-rc6
  smp.h: Use local_irq_{save,restore}() in !SMP version of on_each_cpu().
  powerpc: Fix missing/delayed calls to irq_work
  powerpc: Fix emulation of illegal instructions on PowerNV platform
  powerpc: Fix stack overflow crash in resume_kernel when ftracing
  snd_pcm_link(): fix a leak...
  use can_lookup() instead of direct checks of ->i_op->lookup
  move exit_task_namespaces() outside of exit_notify()
  fput: task_work_add() can fail if the caller has passed exit_task_work()
  xfs: don't shutdown log recovery on validation errors
  xfs: ensure btree root split sets blkno correctly
  xfs: fix implicit padding in directory and attr CRC formats
  xfs: don't emit v5 superblock warnings on write
  mei: me: clear interrupts on the resume path
  mei: nfc: fix nfc device freeing
  mei: init: Flush scheduled work before resetting the device
  ...
2013-06-17 10:45:28 +02:00
David Henningsson d81bf8cf54 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>
2013-06-17 09:47:41 +02:00
Takashi Iwai c9e34d1525 Merge branch 'for-linus' into for-next
* for-linus: (778 commits)
  ALSA: usb-audio - Fix invalid volume resolution on Logitech HD webcam c270
  ALSA: usb-audio - Apply Logitech QuickCam Pro 9000 quirk only to audio iface
  ALSA: hda/via - Clean up duplicated codes
  ALSA: hda/via - Fix wrongly cleared pins after suspend on VT1802
  ALSA: hda - Add keep_eapd_on flag to generic parser
  ALSA: hda - Allow setting automute/automic hooks after parsing
  ALSA: hda/via - Disable broken dynamic power control
  ALSA: usb-audio: fix Roland/Cakewalk UM-3G support
  ALSA: hda - Add headset quirk for two Dell machines
  ALSA: hda - add dock support for Thinkpad T431s
  ALSA: sis7019: fix error return code in sis_chip_create()
  ASoC: cs42l52: fix default value for MASTERA_VOL.
  ASoC: wm8994: check for array index returned
  ASoC: wm8994: Fix reporting of accessory removal on WM8958
  ASoC: wm8994: use the correct pointer to get the control value
  Linux 3.10-rc3
  ipc/sem.c: Fix missing wakeups in do_smart_update_queue()
  score: remove redundant kcore_list entries
  ASoC: wm5110: Correct DSP4R Mixer control name
  ARC: lazy dcache flush broke gdb in non-aliasing configs
  ...
2013-06-05 15:21:29 +02:00
Anisse Astier 02b504d9d8 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>
2013-06-05 12:24:16 +02:00
David Henningsson 3ee2102fbe 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>
2013-05-31 10:45:26 +02:00
Ebben Aries 6b4dc2bd7e 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>
2013-05-31 08:19:46 +02:00
David Henningsson 436c4a0cfb 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>
2013-05-16 07:19:09 +02:00
Kailang Yang 7fc7d04721 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>
2013-04-25 11:06:54 +02:00
David Henningsson 3e0d611b20 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>
2013-04-22 14:50:41 +02:00
Wei Yongjun 6134b1a25b 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>
2013-04-18 09:55:26 +02:00
Takashi Iwai ad2109d7d2 ASoC: Updates for v3.10
A bunch of changes here, the most interesting one subsystem wise being
 Morimoto-san's work to create snd_soc_component which doesn't do much
 for now but will be pretty important going forwards:
 
  - Add a new component object type which will form the basis of moving
    to a more generic handling of SoC and off-SoC components, contributed
    by Kuninori Morimoto.
  - A fairly large set of cleanups for the dmaengine integration from
    Lars-Peter Clausen, starting to move towards being able to have a
    generic driver based on the library.
  - Performance optimisations to DAPM from Ryo Tsutsui.
  - Support for mixer control sharing in DAPM from Stephen Warren.
  - Multiplatform ARM cleanups from Arnd Bergmann.
  - New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJRa//sAAoJELSic+t+oim95J8P/A0ia+ergNHjM7VuV89XyDxJ
 qT+hciD2F7HGiGqCluyIxWTWY4NCG8JUMVj4j+qDltc+DZA7DGX654gUXOlyYIFb
 Otbt7s8CNGIGRuUkRAzoSCewL2B/veFjOdnw6XW2w9YcYHeYbjl9BOlXOdCJtPRb
 yroKHl6mzD99eD8y26QVjk7z3bJGmdBkckilYz+Fws+NACGZqu5KpzF11+DnrAL+
 0Bl3F/fafDEUwFqDvWaQD2728aXxJL1pg0aR8mueRCcGBPnk3qWycj9kQZqVFBpV
 i8Q+xNEnIVECfDKclT0j0bAL+2ftcg2Jm2lryupMtopGxR3Uii1kgGKSMwYHz82E
 bvQ8y3phLc6u5VtIIJj0iPE7ZE5H/2///KgFEj6z/P2tZPWobMkURb+9bGQTJ8Qv
 pUYGiOV0S/+59WAv0qnN4XpomA69EPPu5AuiPd30T+iNna998OjFEBRmIc/wJ519
 QYlhj1ThWsa3Uoi1V0hmhAPHCXVtOKHnZfj95cyaD4Vq8zdqUmptJI+UvUJFgRUm
 30eVVNwcIb0XE+0K4skMbVbpCkRA4m+pBGE7+Z+x72kYTfmg6uVET1T/sGgDFIAG
 XCZ8QOXXYxpmpXMDqTKO30oBHdN6V0tClkSCuQ6H2PoICi0VYX3ZZWT8/Qno3JuN
 bBxyWhz3gYL/MII6qJpE
 =lx37
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v3.10

A bunch of changes here, the most interesting one subsystem wise being
Morimoto-san's work to create snd_soc_component which doesn't do much
for now but will be pretty important going forwards:

 - Add a new component object type which will form the basis of moving
   to a more generic handling of SoC and off-SoC components, contributed
   by Kuninori Morimoto.
 - A fairly large set of cleanups for the dmaengine integration from
   Lars-Peter Clausen, starting to move towards being able to have a
   generic driver based on the library.
 - Performance optimisations to DAPM from Ryo Tsutsui.
 - Support for mixer control sharing in DAPM from Stephen Warren.
 - Multiplatform ARM cleanups from Arnd Bergmann.
 - New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
2013-04-15 19:45:16 +02:00
David Henningsson d240d1dcd5 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>
2013-04-15 16:03:53 +02:00
David Henningsson 73bdd59782 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>
2013-04-15 15:52:55 +02:00
Dylan Reid 423970042e 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>
2013-04-07 09:42:40 +02:00
Rainer Koenig 1d87caa69c 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>
2013-04-04 08:53:51 +02:00
Takashi Iwai 9f5c6faf72 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>
2013-03-18 14:15:58 +01:00
Takashi Iwai 7504b6cd22 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>
2013-03-18 12:58:42 +01:00
Takashi Iwai cf30f46acd Merge branch 'for-linus' into for-next
Back-merged for refactoring beep stuff.
2013-03-18 11:04:42 +01:00
Takashi Iwai f811c3cf8f 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>
2013-03-07 18:32:59 +01:00
Takashi Iwai 5ebd3bbdcc 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>
2013-03-07 18:30:07 +01:00
Kailang Yang 84dfd0ac23 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>
2013-03-07 09:21:01 +01:00
Takashi Iwai 8554ee4057 ALSA: hda - Enable beep for ASUS EeeBox EBP1501P
Reported-by: Harald Becker <ralda@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-25 09:54:43 +01:00
Takashi Iwai e6e0ee507f 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>
2013-02-18 17:04:20 +01:00
David Henningsson d06ac14399 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>
2013-02-18 11:46:46 +01:00
Fernando Luis Vázquez Cao d911149625 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>
2013-02-12 10:12:39 +01:00
Fernando Luis Vázquez Cao 12e31a78c7 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>
2013-02-12 10:11:01 +01:00
Takashi Iwai 2faea5274f Merge branch 'for-linus' into for-next
Merge pending fixes that haven't pulled into 3.8.
2013-02-05 14:48:03 +01:00
David Henningsson fcd8f3b1d4 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>
2013-01-28 09:50:50 +01:00
Takashi Iwai 5397145f4f 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>
2013-01-23 18:25:11 +01:00
Takashi Iwai f7c0bfa060 Merge branch 'for-linus' into for-next
Merge the 3.8 devel branch for correcting the newly added PB desktop
fixup with the automute support.
2013-01-23 18:25:00 +01:00
Takashi Iwai 0712eea349 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>
2013-01-23 18:24:05 +01:00
Takashi Iwai 0db75790e2 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>
2013-01-23 13:57:20 +01:00
Takashi Iwai 2cf215bfaa Merge branch 'topic/hda-gen-parser' into for-next
This is a merge of really big changes: the generic parser is heavily
enhanced for handling all cases, based on the former Realtek codec
driver code.  And all codec drivers except for a few ones (CA0132,
HDMI and modem) have been converted to use the new generic driver.

Conflicts:
	sound/pci/hda/patch_realtek.c
2013-01-23 08:34:12 +01:00
Takashi Iwai dc870f38e9 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>
2013-01-22 15:25:25 +01:00
Takashi Iwai 6efcc52653 ALSA: hda - Remove superfluous header inclusions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-21 16:10:56 +01:00
Takashi Iwai ec50b4cea6 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>
2013-01-19 12:17:54 +01:00
Takashi Iwai 7513e6dae5 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>
2013-01-18 15:41:34 +01:00
Takashi Iwai a90229e051 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>
2013-01-18 14:34:22 +01:00
David Henningsson e04340375a 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>
2013-01-18 12:29:10 +01:00
Takashi Iwai ea46c3c87c 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>
2013-01-15 18:45:53 +01:00
Takashi Iwai 08fb0d0ee1 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>
2013-01-12 08:44:43 +01:00
Takashi Iwai 9bb1f06fe0 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>
2013-01-12 08:44:42 +01:00
Takashi Iwai 39aedee7a1 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>
2013-01-12 08:44:40 +01:00
Takashi Iwai fd1082159d 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>
2013-01-12 08:44:35 +01:00
Takashi Iwai d3f02d60ee 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>
2013-01-12 08:44:33 +01:00
Takashi Iwai 1727a771b4 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>
2013-01-12 08:44:32 +01:00
Takashi Iwai fce52a3bb1 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>
2013-01-12 08:43:56 +01:00
Takashi Iwai fd25a97a97 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>
2013-01-12 08:34:12 +01:00
Takashi Iwai 0c3d47b007 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>
2013-01-12 08:33:59 +01:00
Takashi Iwai c4f3ebed3c 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>
2013-01-12 08:33:57 +01:00
Takashi Iwai 08c189f2c5 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>
2013-01-12 08:31:03 +01:00
Takashi Iwai fdf52cab88 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>
2013-01-12 08:30:51 +01:00
Takashi Iwai ab16c6dd79 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>
2013-01-12 08:30:50 +01:00
Takashi Iwai 7e35dd3d6b 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>
2013-01-12 08:30:46 +01:00
Takashi Iwai c9ce6b260b 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>
2013-01-12 08:30:45 +01:00
Takashi Iwai 81fede89ed 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>
2013-01-12 08:30:43 +01:00
Takashi Iwai 9bf387b612 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>
2013-01-12 08:30:41 +01:00
Takashi Iwai bc54976721 ALSA: hda/realtek - Allow passing name=NULL to alc_kcontrol_new()
This prevents stupid typos.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-12 08:30:40 +01:00
Takashi Iwai 2eab694a6c 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>
2013-01-12 08:30:38 +01:00
Takashi Iwai 52a8efab10 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>
2013-01-12 08:30:36 +01:00
Takashi Iwai 3bd7b644d0 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>
2013-01-12 08:30:35 +01:00
Takashi Iwai 20c18f562a 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>
2013-01-12 08:30:33 +01:00
Takashi Iwai 480967db6c 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>
2013-01-12 08:30:32 +01:00
Takashi Iwai 37c0420765 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>
2013-01-12 08:30:30 +01:00
Takashi Iwai df1d1fb09a 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>
2013-01-12 08:30:28 +01:00
Takashi Iwai 965ccebccd 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>
2013-01-12 08:30:27 +01:00
Takashi Iwai 62343997e4 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>
2013-01-12 08:30:25 +01:00
Takashi Iwai 27d3153651 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>
2013-01-12 08:30:23 +01:00
Takashi Iwai 666a70d42b 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>
2013-01-12 08:30:22 +01:00
Takashi Iwai 183a444a6d 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>
2013-01-12 08:30:20 +01:00
Takashi Iwai 829f69ea59 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>
2013-01-12 08:30:18 +01:00
Takashi Iwai 8dd4867858 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>
2013-01-12 08:30:17 +01:00
Takashi Iwai 3ebf1e940a 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>
2013-01-12 08:30:15 +01:00
Takashi Iwai 0250f7cbea 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>
2013-01-12 08:30:14 +01:00
Takashi Iwai 6518f7ac51 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>
2013-01-12 08:30:12 +01:00
Takashi Iwai fef7fbbc5d 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>
2013-01-12 08:30:10 +01:00
Takashi Iwai c9967f1cba 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>
2013-01-12 08:30:09 +01:00
Takashi Iwai 9c64076e54 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>
2013-01-12 08:30:07 +01:00
Takashi Iwai 130e5f0642 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>
2013-01-12 08:30:05 +01:00
Takashi Iwai b8a47c79b2 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>
2013-01-12 08:30:04 +01:00
Takashi Iwai 9366ede7fd 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>
2013-01-10 10:34:30 +01:00
Takashi Iwai bd32f782b9 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>
2013-01-10 10:34:29 +01:00
Takashi Iwai c2fd19c2fc 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>
2013-01-10 10:34:29 +01:00
Takashi Iwai 36f0fd540e 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>
2013-01-10 10:34:28 +01:00
Takashi Iwai 95e960cece 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>
2013-01-10 10:34:28 +01:00
Takashi Iwai 78e635c93b 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>
2013-01-10 10:34:28 +01:00
Takashi Iwai 792cf2fa2e 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>
2013-01-10 10:34:27 +01:00
Takashi Iwai ba8111276f 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>
2013-01-10 10:34:27 +01:00
Takashi Iwai 30dcd3b404 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>
2013-01-10 10:34:26 +01:00
Takashi Iwai 463419de86 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>
2013-01-10 10:34:26 +01:00
Takashi Iwai 6a84c305f0 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>
2013-01-10 10:34:26 +01:00
Kailang Yang 065380f088 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>
2013-01-10 10:27:46 +01:00
David Henningsson 6d3cd5d444 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>
2013-01-07 17:29:55 +01:00
Takashi Iwai b78562b10f 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 8fdcb6fe42,
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>
2012-12-17 20:10:50 +01:00
Takashi Iwai 1098b7c228 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>
2012-12-17 20:03:15 +01:00
Takashi Iwai b6adb57df1 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>
2012-12-03 10:39:36 +01:00
Takashi Iwai dda415d418 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>
2012-11-30 18:34:38 +01:00
Takashi Iwai 475c3d21e8 ALSA: hda - Pass errors properly in alc_auto_check_switches()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30 11:49:02 +01:00
Takashi Iwai 668d1e9673 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>
2012-11-30 10:55:44 +01:00
Takashi Iwai 361dab3ec2 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>
2012-11-28 09:03:39 +01:00
Takashi Iwai 2ba509a6ba Merge branch 'for-linus' into for-next 2012-11-22 21:22:39 +01:00
Takashi Iwai e15f1b43e1 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>
2012-11-21 15:06:13 +01:00
David Henningsson af02dde8a6 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>
2012-11-21 09:06:04 +01:00
Takashi Iwai 87af0b80c9 Merge branch 'for-linus' into for-next
Merge the recent HD-audio codec change for fixing recursive suspend
calls.

Conflicts:
	sound/pci/hda/hda_codec.c
2012-11-19 21:25:27 +01:00
Dylan Reid 08a978db51 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>
2012-11-19 19:50:34 +01:00
Takashi Iwai 05193639ca 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>
2012-11-12 10:07:36 +01:00
Takashi Iwai ee81abb623 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>
2012-11-08 17:13:59 +01:00
Takashi Iwai 17a4adbe68 Merge branch 'for-linus' into for-next 2012-11-08 15:58:25 +01:00
Kailang Yang 19a62823ea 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>
2012-11-08 10:29:22 +01:00
Kailang Yang 1387e2d127 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>
2012-11-08 10:29:20 +01:00
Takashi Iwai a5d00dc3a4 Merge branch 'for-linus' into for-next
... for migrating the core changes for USB-audio disconnection fixes
2012-10-30 11:08:25 +01:00
Takashi Iwai cb766404e6 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>
2012-10-20 18:20:55 +02:00
Stefán Freyr 84f98fdf78 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>
2012-10-19 22:46:00 +02:00
David Henningsson 71aa5ebe36 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>
2012-10-17 13:00:18 +02:00
Takashi Iwai dcda580616 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>
2012-10-17 08:42:00 +02:00
David Henningsson f7f4b2322b 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>
2012-10-10 17:13:22 +02:00
Duncan Roe 7110005e8d 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>
2012-10-10 14:19:50 +02:00
Kailang Yang 7ff34ad80b 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>
2012-10-06 17:02:30 +02:00
Herton Ronaldo Krzesinski 9f720bb940 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>
2012-10-06 16:47:24 +02:00
David Henningsson 29adc4b9e6 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>
2012-10-06 16:43:40 +02:00
Oleksij Rempel 148728f1f7 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>
2012-09-21 19:17:46 +02:00
Takashi Iwai 9c9a5175e6 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>
2012-09-06 18:01:18 +02:00
Takashi Iwai 83012a7ccb 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>
2012-08-30 07:50:13 -07:00
Takashi Iwai 8a5354140a 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>
2012-08-22 16:48:17 +02:00
David Henningsson 012e7eb1e5 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>
2012-08-08 09:03:13 +02:00
Felix Kaechele c8415a48fc 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>
2012-08-07 08:02:49 +02:00
Philipp A. Mohrenweiser 4407be6ba2 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>
2012-08-06 13:16:08 +02:00
Takashi Iwai 707fba3fa7 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>
2012-08-02 09:05:06 +02:00
Takashi Iwai e427c23756 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>
2012-07-29 10:06:19 +02:00
David Henningsson 108cc108a3 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>
2012-07-20 10:45:07 +02:00
Takashi Iwai 1558eb838f Merge branch 'topic/pm-convert' into for-next
This merges the changes for converting to new PM ops for platform
and some other drivers.
Also move some header files to local places from the public
include/sound.
2012-07-19 08:21:57 +02:00
Takashi Iwai 61eab000f3 Merge branch 'topic/hda' into for-next
This is a large chunk merge for 3.6 HD-audio things
2012-07-18 13:53:06 +02:00
David Henningsson 4e01ec636e 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>
2012-07-18 07:51:26 +02:00
David Henningsson a7a0a64dab 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>
2012-07-05 12:22:47 +02:00
Takashi Iwai 68cb2b5592 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>
2012-07-03 08:23:03 +02:00
Kailang Yang 8663ff75cd 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>
2012-06-29 09:44:44 +02:00
David Henningsson 5780b627e2 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>
2012-06-27 20:21:02 +02:00
David Henningsson 00227f15a0 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>
2012-06-27 20:20:40 +02:00
Takashi Iwai b54f8abad6 Merge branch 'fix/hda' into topic/hda 2012-06-26 18:06:01 +02:00
Takashi Iwai ee48df57c9 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>
2012-06-26 14:56:20 +02:00
David Henningsson befae82e29 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>
2012-06-25 21:24:41 +02:00
Takashi Iwai e6656369da 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>
2012-06-25 11:03:12 +02:00
Takashi Iwai 6e72aa5f51 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>
2012-06-25 10:52:25 +02:00
David Henningsson 693b613dc4 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>
2012-06-25 10:20:08 +02:00
Takashi Iwai 125821ae53 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>
2012-06-25 09:45:54 +02:00
Takashi Iwai 8e5a050901 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>
2012-06-21 15:52:57 +02:00
Takashi Iwai 2e8b2b29d1 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>
2012-06-13 16:47:32 +02:00
David Henningsson edfe3bfc1b 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>
2012-06-12 17:55:46 +02:00
Linus Torvalds be87cfb47c Sound updates #2 for 3.5-rc1
This is the second updates for 3.5-rc1.  It's mainly for OMAP4 HDMI
 updates and the device tree updates for OMAP, in addition to a couple
 of PCM accuray improvement and Realtek ALC269VD codec support.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvz1xAAoJEGwxgFQ9KSmk6eoQAILf1oW24ZoYfN4daJRmM0dj
 aQP1YqOCio0llgYZEM+VpuEdvRjfopUC00/TGyp/NGzWApJdkxZps6Ia8Dvuw215
 CG079u4z6fPqO82IeTkn9GkDkVo+BPkuvW2dz9j9QobkALZ7YNYNVXnNZ10qo8tU
 JqbNBSgn/bIOJ8nkbu7X1WwecVdZbqgj+xlobi/IidyNqJMkm95NR6OmFGJjyyAO
 dyA/i8WdMO1V2eypDvVAD7+0oLcJeTilkSj337UJex7SL/KlopBVdTgDqUyhXHtq
 +2G+2L3jHDjs+38d3DosPik5DRQkGswJWK08jNC5VAE+/SggLSf1aRDWUouJ1zqd
 0rpDZs9lB8XD8pt3/AYPVai6Yo+dGBVmoexvru1VnKivQ5R78kG+UV27yfhyjxeu
 hsr+NEdRNoN56953eZjRWoELh10+iZCH6ARDsAOLV1qRBgAEMe+ayiVdr5k6+12C
 pmVoBq/54NpDQ7M6FHR1KcgShxQ3mhwWbjmfPbJ36xuCZISRKXVDmt6GYjx0X4W6
 /frJqbv9sy/Ap09JQ6YPdUtmGz+Eh09QyfzpoyMq5vZbu4Y0YIzRS18R4YKdXD6g
 lmQ5tv01Fn3C0IQ1SHMaWiRqi0a2gtmXUEE0s4Pu5Oi9MNP2mFtcWuEivrMbysrL
 vLWGubKFTRIjmMQ7mtqx
 =88ho
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound update from Takashi Iwai:
 "This is the second updates for 3.5-rc1.  It's mainly for OMAP4 HDMI
  updates and the device tree updates for OMAP, in addition to a couple
  of PCM accuray improvement and Realtek ALC269VD codec support."

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits)
  ALSA: hda/realtek - Add new codec support for ALC269VD
  ALSA: core: group read of pointer, tstamp and jiffies
  ASoC: OMAP: HDMI: Rename sound card source file
  ASoC: OMAP: HDMI: Make sound card naming more generic
  ASoC: OMAP: HDMI: Make build config options more generic
  ASoC: OMAP: HDMI: Expand capabilities of the HDMI DAI
  ASoC: OMAP: HDMI: Improve how the display state is verified
  ASoC: OMAP: HDMI: Expand configuration of hw_params
  ASoC: OMAP: HDMI: Use the DSS audio interface
  ASoC: OMAP: HDMI: Create a structure for private data of the CPU DAI
  ASoC: OMAP: HDMI: Change error values in HDMI CPU DAI
  ASoC: OMAP: HDMI: Update the platform device names
  ASoC: omap-abe-twl6040: Introduce driver data for runtime parameters
  ASoC: omap-abe-twl6040: Move Digital Mic widget into dapm table
  ASoC: omap-abe-twl6040: Keep only one snd_soc_dai_link structure
  ASoC: omap-dmic: Add device tree bindings
  ASoC: omap-mcpdm: Add device tree bindings
  ASoC: omap-mcbsp: buffer size constraint only applies to playback stream
  ASoC: omap-mcbsp: Use the common interrupt line if supported by the SoC
  ASoC: omap-mcbsp: Remove unused FRAME dma_op_mode
  ...
2012-05-25 08:45:25 -07:00
Kailang Yang adcc70b249 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>
2012-05-25 08:08:38 +02:00
Linus Torvalds 2e341ca686 Sound updates for 3.5-rc1
This is the first big chunk for 3.5 merges of sound stuff.
 There are a few big changes in different areas.  First off, the
 streaming logic of USB-audio endpoints has been largely rewritten
 for the better support of "implicit feedback".  If anything about USB
 got broken, this change has to be checked.
 
 For HD-audio, the resume procedure was changed; instead of delaying
 the resume of the hardware until the first use, now waking up immediately
 at resume.  This is for buggy BIOS.
 
 For ASoC, dynamic PCM support and the improved support for digital links
 between off-SoC devices are major framework changes.
 
 Some highlights are below:
 
 * HD-audio
 - Avoid the accesses of invalid pin-control bits that may stall the codec
 - V-ref setup cleanups
 - Fix the races in power-saving code
 - Fix the races in codec cache hashes and connection lists
 - Split some common codes for BIOS auto-parser to hda_auto_parser.c
 - Changed the PM resume code to wake up immediately for buggy BIOS
 - Creative SoundCore3D support
 - Add Conexant CX20751/2/3/4 codec support
 
 * ASoC
 - Dynamic PCM support, allowing support for SoCs with internal routing
   through components with tight sequencing and formatting constraints
   within their internal paths or where there are multiple components
   connected with CPU managed DMA controllers inside the SoC.
 - Greatly improved support for direct digital links between off-SoC
   devices, providing a much simpler way of connecting things like digital
   basebands to CODECs.
 - Much more fine grained and robust locking, cleaning up some of the
   confusion that crept in with multi-component.
 - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
   ST-Ericsson MSP I2S controolers
 - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124, Texas
   Instruments LM49453.
 - Some regmap changes needed by the Tegra I2S driver.
 - mc13783 audio support.
 
 * Misc
 - Rewrite with module_pci_driver()
 - Xonar DGX support for snd-oxygen
 - Improvement of packet handling in snd-firewire driver
 - New USB-endpoint streaming logic
 - Enhanced M-audio FTU quirks and relevant cleanups
 - Increment the support of OSS devices to 256
 - snd-aloop accuracy improvement
 
 There are a few more pending changes for 3.5, but they will be
 sent slightly later as partly depending on the changes of DRM.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPvD/9AAoJEGwxgFQ9KSmkPsIP/AuBGpAZy7b7FiEEIy1Hhdws
 US8WVuPzyDslMVdzZ8OFqyPXanIcL9gscoOGMZOEy7UFtMBiR4GuYiPRPubEMxuP
 /gopUqK4SqIsIwT238qqYszSJSxE7gNEZ/2jhSGtkX4EkaSZ4bAskn0iOKX5uw2f
 kTUQknA1rNLIGba2z6rJbgIW7hdxGfpFy05ruv3ct81nO+5JlgyLuP/v5R6jL+do
 cum0N4dJFRd9YSEi2BG612gdz8LJyzOgPqBKmxMEva6BfqLkR8EdP80FtE3eEOiP
 Et1q2LhZwOlBt0BEjsjjOVxMsgxVax6ps9cuNRTk5ECEOldU5dbDatC45L/e9mSD
 OQVUjYAX1mQAtYva4U4PPn6WU6ma2L5yjy4peCObtyCMkEchXk1bfs4CEfVqCXUP
 yFYN8C+y6osZOyWE3+Enn9ifZdWyLeSVq6CT33Yt+fyKlswp6gRkhKYiEPqTA5aU
 p71X59Pp7q1y3tQwiMJNpf2QdkxuxfKURHswdc4BS9ct0mdZhQX0GyDS7OffkTd4
 Lq5UkVMHA1rLlF9oRPd2C9P4BuMEuvLjf662YCKiw+mWFYdBC036DHLLjm1Hcwuj
 UkpQ2PSrrdHG1u0c3ooZ9dQj1BNX4LoABLqvaMtce6sESD/hJ5gcprYJWvtituwM
 ZzZiJavIWsoJ+SWQWBHe
 =+JSm
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "This is the first big chunk for 3.5 merges of sound stuff.

  There are a few big changes in different areas.  First off, the
  streaming logic of USB-audio endpoints has been largely rewritten for
  the better support of "implicit feedback".  If anything about USB got
  broken, this change has to be checked.

  For HD-audio, the resume procedure was changed; instead of delaying
  the resume of the hardware until the first use, now waking up
  immediately at resume.  This is for buggy BIOS.

  For ASoC, dynamic PCM support and the improved support for digital
  links between off-SoC devices are major framework changes.

  Some highlights are below:

  * HD-audio
   - Avoid accesses of invalid pin-control bits that may stall the codec
   - V-ref setup cleanups
   - Fix the races in power-saving code
   - Fix the races in codec cache hashes and connection lists
   - Split some common codes for BIOS auto-parser to hda_auto_parser.c
   - Changed the PM resume code to wake up immediately for buggy BIOS
   - Creative SoundCore3D support
   - Add Conexant CX20751/2/3/4 codec support

  * ASoC
   - Dynamic PCM support, allowing support for SoCs with internal
     routing through components with tight sequencing and formatting
     constraints within their internal paths or where there are multiple
     components connected with CPU managed DMA controllers inside the
     SoC.
   - Greatly improved support for direct digital links between off-SoC
     devices, providing a much simpler way of connecting things like
     digital basebands to CODECs.
   - Much more fine grained and robust locking, cleaning up some of the
     confusion that crept in with multi-component.
   - CPU support for nVidia Tegra 30 I2S and audio hub controllers and
     ST-Ericsson MSP I2S controolers
   - New CODEC drivers for Cirrus CS42L52, LAPIS Semiconductor ML26124,
     Texas Instruments LM49453.
   - Some regmap changes needed by the Tegra I2S driver.
   - mc13783 audio support.

  * Misc
   - Rewrite with module_pci_driver()
   - Xonar DGX support for snd-oxygen
   - Improvement of packet handling in snd-firewire driver
   - New USB-endpoint streaming logic
   - Enhanced M-audio FTU quirks and relevant cleanups
   - Increment the support of OSS devices to 256
   - snd-aloop accuracy improvement

  There are a few more pending changes for 3.5, but they will be sent
  slightly later as partly depending on the changes of DRM."

Fix up conflicts in regmap (due to duplicate patches, with some further
updates then having already come in from the regmap tree).  Also some
fairly trivial context conflicts in the imx and mcx soc drivers.

* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (280 commits)
  ALSA: snd-usb: fix stream info output in /proc
  ALSA: pcm - Add proper state checks to snd_pcm_drain()
  ALSA: sh: Fix up namespace collision in sh_dac_audio.
  ALSA: hda/realtek - Fix unused variable compile warning
  ASoC: sh: fsi: enable chip specific data transfer mode
  ASoC: sh: fsi: call fsi_hw_startup/shutdown from fsi_dai_trigger()
  ASoC: sh: fsi: use same format for IN/OUT
  ASoC: sh: fsi: add fsi_version() and removed meaningless version check
  ASoC: sh: fsi: use register field macro name on IN/OUT_DMAC
  ASoC: tegra: Add machine driver for WM8753 codec
  ALSA: hda - Fix possible races of accesses to connection list array
  ASoC: OMAP: HDMI: Introduce codec
  ARM: mx31_3ds: Add sound support
  ASoC: imx-mc13783 cleanup
  mx31moboard: Add sound support
  ASoC: mc13783 codec cleanups
  ASoC: add imx-mc13783 sound support
  ASoC: Add mc13783 codec
  mfd: mc13xxx: add codec platform data
  ASoC: don't flip master of DT-instantiated DAI links
  ...
2012-05-23 13:05:43 -07:00
Linus Torvalds e8650a0823 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
2012-05-22 19:22:50 -07:00
Takashi Iwai 8a39057628 ALSA: hda/realtek - Fix unused variable compile warning
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-21 03:07:42 +02:00
Takashi Iwai 09cf03b80c 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>
2012-05-19 17:25:23 +02:00
Takashi Iwai 23d30f2827 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>
2012-05-08 18:01:33 +02:00
Takashi Iwai 3de9517356 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>
2012-05-08 16:38:14 +02:00
Takashi Iwai ffd344444f Merge branch 'fix/hda' into topic/hda 2012-05-08 16:38:02 +02:00
Takashi Iwai af741c150f 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>
2012-05-08 14:10:31 +02:00
Takashi Iwai bca4013855 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>
2012-05-07 11:14:53 +02:00
Takashi Iwai f5c53d898c 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>
2012-05-07 10:07:33 +02:00
Takashi Iwai 4740860b53 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>
2012-04-20 13:06:53 +02:00
Takashi Iwai cdd03cedc5 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>
2012-04-20 12:38:48 +02:00
David Henningsson 5ac57550f2 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>
2012-04-20 10:08:08 +02:00
Takashi Iwai 118cb4a408 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>
2012-04-19 07:33:27 +02:00
Jesper Juhl 7d7eb9ea31 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>
2012-04-13 07:35:57 +02:00
Josh Boyer 29ebe40284 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>
2012-04-12 20:00:48 +02:00
Takashi Iwai fe97da1f70 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>
2012-04-12 19:57:18 +02:00
Takashi Iwai 038d4fef37 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>
2012-04-12 07:58:19 +02:00
Takashi Iwai 912093bc7c 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>
2012-04-11 14:10:57 +02:00
Jiri Kosina e75d660672 Merge branch 'master' into for-next
Merge with latest Linus' tree, as I have incoming patches
that fix code that is newer than current HEAD of for-next.

Conflicts:
	drivers/net/ethernet/realtek/r8169.c
2012-04-08 21:48:52 +02:00
Jonathan Woithe 409a3e9813 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>
2012-03-28 10:35:15 +02:00
Takashi Iwai 26acaf0855 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>
2012-03-22 15:15:51 +01:00
Takashi Iwai f29735cbef 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>
2012-03-13 07:55:10 +01:00
Takashi Iwai d2f344b5e0 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>
2012-03-13 07:46:50 +01:00
Takashi Iwai 420b0febe5 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>
2012-03-12 14:52:43 +01:00
Takashi Iwai 546bb67852 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>
2012-03-07 09:07:04 +01:00
Takashi Iwai fc7a1627c1 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2012-03-07 09:05:15 +01:00
Kailang Yang 526af6eb4d 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>
2012-03-07 09:03:29 +01:00
Takashi Iwai 78f8baf138 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>
2012-03-06 14:02:32 +01:00
Marton Balint 8f23921423 ALSA: hda - add quirk to detect CD input on Gigabyte EP45-DS3
My CD input got lost in commit 68ef0561ef.
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>
2012-03-06 10:44:01 +01:00
David Henningsson e21af48583 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>
2012-03-05 15:15:40 +01:00
Takashi Iwai 7c589750a7 Merge branch 'fix/hda' into topic/hda
Speaker-Out renames are merged.

Conflicts:
	sound/pci/hda/patch_realtek.c
2012-03-02 09:00:33 +01:00
Takashi Iwai e49a3434f1 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>
2012-03-02 08:59:23 +01:00
Takashi Iwai 068b939431 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>
2012-02-25 11:13:16 +01:00
Takashi Iwai 070cff4cfd 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>
2012-02-21 13:48:35 +01:00
Takashi Iwai f568291ef5 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>
2012-02-21 12:37:00 +01:00
Takashi Iwai 689cabf6d0 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>
2012-02-21 12:36:37 +01:00
Takashi Iwai c96f0bf4ad 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>
2012-02-21 12:12:57 +01:00
Takashi Iwai 5803a32646 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>
2012-02-21 11:59:45 +01:00
Takashi Iwai 164f73ee93 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>
2012-02-21 11:28:51 +01:00
Takashi Iwai 1a97b7f227 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>
2012-02-21 11:11:48 +01:00
Takashi Iwai 9155f82a6a 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>
2012-02-20 18:42:04 +01:00
Takashi Iwai 67b6ec3196 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>
2012-02-20 18:20:42 +01:00
Takashi Iwai 29e3fdcc84 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>
2012-02-20 17:56:57 +01:00
Takashi Iwai 411225a01e 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>
2012-02-20 17:48:19 +01:00
Takashi Iwai 96e225f692 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>
2012-02-20 17:43:00 +01:00
Takashi Iwai 967b88c477 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>
2012-02-20 17:31:02 +01:00
Takashi Iwai 817de92f1b 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>
2012-02-20 17:30:49 +01:00
Takashi Iwai 7833c7e8b4 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>
2012-02-20 17:11:38 +01:00
Takashi Iwai ba5338185d 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>
2012-02-20 17:06:04 +01:00
Takashi Iwai cf5a22793c 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>
2012-02-20 16:31:07 +01:00
Takashi Iwai 589876e243 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>
2012-02-20 15:50:20 +01:00
Takashi Iwai b9368f5c10 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>
2012-02-17 17:59:22 +01:00
Takashi Iwai 27e917f82b 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>
2012-02-17 17:59:16 +01:00
Takashi Iwai dc31b58dbc 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>
2012-02-17 17:59:10 +01:00
Takashi Iwai f02aab5d7f 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>
2012-02-17 17:59:00 +01:00
Takashi Iwai dc6af52dea 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>
2012-02-17 16:18:59 +01:00
Takashi Iwai 276dd70bae 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>
2012-02-17 16:17:03 +01:00
Takashi Iwai 6f45304091 ALSA: hda/realtek - Show multi-io pins in debug prints
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-17 14:09:20 +01:00
Takashi Iwai ef8d60fb79 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>
2012-02-17 10:28:06 +01:00
Takashi Iwai 185d99f192 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>
2012-02-16 18:39:45 +01:00
Takashi Iwai 1c4a54b451 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>
2012-02-16 18:08:39 +01:00
Takashi Iwai 140547ef4e 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>
2012-02-16 17:29:24 +01:00
Takashi Iwai 00bc0ce913 Merge branch 'fix/hda' into topic/hda
The fix for bitmap-overflow in Realtek codec driver is needed for the
further development of the auto-parser with badness evaluation.
2012-02-16 16:43:09 +01:00
Takashi Iwai c14c95f62e 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>
2012-02-16 16:39:14 +01:00
Takashi Iwai a7f3eedc88 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>
2012-02-16 13:05:22 +01:00
Takashi Iwai c3c2c9e7ff 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>
2012-02-16 12:59:55 +01:00
Takashi Iwai b1f58085a9 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>
2012-02-16 12:45:03 +01:00
Takashi Iwai 0a1c4fa208 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>
2012-02-16 12:42:30 +01:00
Takashi Iwai 20f7d928fa 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>
2012-02-16 12:39:35 +01:00
Takashi Iwai 15317ab216 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>
2012-02-16 12:20:02 +01:00
Takashi Iwai ca8f04247e 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>
2012-02-16 11:51:19 +01:00
Takashi Iwai a68f20ef80 Merge branch 'fix/acer-alc889-fix' into fix/hda
Conflicts:
	sound/pci/hda/patch_realtek.c

Merged back the fix for Acer Aspire 6935 with ALC889 codec.
The fix commit was based on 3.2 kernel so that it can be applied to
stable kernel cleanly.
2012-02-13 15:34:31 +01:00
Takashi Iwai 02a237b24d 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>
2012-02-13 15:26:41 +01:00
Takashi Iwai 1565cc3585 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>
2012-02-13 12:07:59 +01:00
Takashi Iwai e652f4c861 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>
2012-02-13 12:07:40 +01:00
Takashi Iwai 374a69e76e Merge branch 'fix/hda' into topic/hda
Necessary for working on the jack-detection suppression feature.
2012-02-13 12:05:30 +01:00
Jaroslav Kysela 416846d2b3 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>
2012-02-07 15:43:15 +01:00
Takashi Iwai eedec3d385 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>
2012-02-06 10:27:06 +01:00
Takashi Iwai 9322ca5497 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>
2012-02-03 14:28:01 +01:00
Takashi Iwai b544d1e0e2 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>
2012-02-03 14:04:11 +01:00
David Henningsson 3422a47041 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>
2012-01-31 15:12:08 +01:00
Takashi Iwai 31150f2327 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>
2012-01-30 16:26:07 +01:00
David Henningsson a389d67cf9 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>
2012-01-27 15:06:46 +01:00
Takashi Iwai b3a81520bd 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>
2012-01-26 15:59:25 +01:00
Takashi Iwai 3b25eb690e 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>
2012-01-25 09:59:57 +01:00
Takashi Iwai cb0cdebbf8 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>
2012-01-20 12:14:12 +01:00
Takashi Iwai a7309792c4 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>
2012-01-19 15:03:48 +01:00
Takashi Iwai f21d78e269 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>
2012-01-19 12:10:29 +01:00
Takashi Iwai b90bf1de7c 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>
2012-01-19 11:42:55 +01:00
David Henningsson 2267ea9762 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>
2012-01-08 09:59:30 +01:00
Takashi Iwai 78c058df6a Merge branch 'test/hda-jack' into topic/hda
Conflicts:
	sound/pci/hda/patch_hdmi.c
	sound/pci/hda/patch_via.c
2011-12-20 15:42:57 +01:00
David Henningsson fde48a1f80 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>
2011-12-12 12:21:30 +01:00
Takashi Iwai ffe7e40639 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2011-12-07 17:33:09 +01:00
Takashi Iwai 0a34b42b62 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>
2011-12-07 17:32:24 +01:00
Takashi Iwai fbabc24619 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>
2011-12-07 17:32:24 +01:00
Takashi Iwai 766ddee68b 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>
2011-12-07 17:32:24 +01:00
Takashi Iwai cce4aa378a 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>
2011-12-02 15:29:12 +01:00
Takashi Iwai 31ef225793 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>
2011-12-01 17:47:54 +01:00
Takashi Iwai b37c0096b4 Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2011-11-23 17:08:42 +01:00
Takashi Iwai 61071594f6 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>
2011-11-23 07:52:15 +01:00
Takashi Iwai 6759dc3238 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>
2011-11-23 07:45:21 +01:00
Takashi Iwai aad37dbd56 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>
2011-11-16 11:14:04 +01:00
Takashi Iwai 3a93897ea3 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>
2011-11-16 11:14:03 +01:00
Takashi Iwai 01a61e12b4 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>
2011-11-16 11:12:17 +01:00
Takashi Iwai 1835a0f9a2 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>
2011-11-16 11:11:15 +01:00
Takashi Iwai 8b940fc457 Merge branch 'fix/hda' into topic/hda 2011-11-16 11:05:55 +01:00
Takashi Iwai ee3b29693c ALSA: hda/realtek - Move ALC880 model=medion-rim to auto-parser
Translate ALC880 medion-rim static configs to the auto-parser with the
additional GPIO2 verb and COEF setup.

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

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

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

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

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-14 10:41:46 +01:00
Takashi Iwai c3e837bbcc ALSA: hda/realtek - Rewrite ALC882 acer-aspire-* models with the auto-parser
Now we can move the big acer-aspire-* static quirks to the auto-paresr
with some additional pin-configs and verbs.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-10 15:42:54 +01:00
Takashi Iwai 68ef0561ef ALSA: hda/realtek - Drop ALC882 desktop model quirks
Now we're touching the desktop static configs for ALC88x codecs.
These are mostly OK with the auto-parser, but some models need careful
handling; ALC889 intel mobo requires the COEF setup, and W2JC needs
GPIO1 and COEF.

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

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

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

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

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

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

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-09 12:42:48 +01:00
Takashi Iwai 5c0ebfbe56 ALSA: hda/realtek - Rewrite ALC882 model=vaio-tt with auto-parser
Providing a pincfg fix for VAIO-TT with ALC889 codec to work with the
auto-parser, and drop the static configuration.

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

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

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

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

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

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

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

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

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-08 07:52:19 +01:00
Linus Torvalds 32aaeffbd4 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
* 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
  Revert "tracing: Include module.h in define_trace.h"
  irq: don't put module.h into irq.h for tracking irqgen modules.
  bluetooth: macroize two small inlines to avoid module.h
  ip_vs.h: fix implicit use of module_get/module_put from module.h
  nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
  include: replace linux/module.h with "struct module" wherever possible
  include: convert various register fcns to macros to avoid include chaining
  crypto.h: remove unused crypto_tfm_alg_modname() inline
  uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
  pm_runtime.h: explicitly requires notifier.h
  linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
  miscdevice.h: fix up implicit use of lists and types
  stop_machine.h: fix implicit use of smp.h for smp_processor_id
  of: fix implicit use of errno.h in include/linux/of.h
  of_platform.h: delete needless include <linux/module.h>
  acpi: remove module.h include from platform/aclinux.h
  miscdevice.h: delete unnecessary inclusion of module.h
  device_cgroup.h: delete needless include <linux/module.h>
  net: sch_generic remove redundant use of <linux/module.h>
  net: inet_timewait_sock doesnt need <linux/module.h>
  ...

Fix up trivial conflicts (other header files, and  removal of the ab3550 mfd driver) in
 - drivers/media/dvb/frontends/dibx000_common.c
 - drivers/media/video/{mt9m111.c,ov6650.c}
 - drivers/mfd/ab3550-core.c
 - include/linux/dmaengine.h
2011-11-06 19:44:47 -08:00
Takashi Iwai 43dea228a3 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>
2011-11-06 11:25:34 +01:00
Takashi Iwai 51e4152a96 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>
2011-11-03 17:00:27 +01:00
Takashi Iwai 112daa7a4c ALSA: hda - Remove unused variables
Just clean-up what GCC caught.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-11-02 21:40:06 +01:00
Takashi Iwai 1fa1757366 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>
2011-11-02 21:30:51 +01:00