Commit Graph

2315 Commits

Author SHA1 Message Date
Takashi Iwai f68b3b291d ALSA: hda - Check the external mic pin more strictly for Conexant chips
The external mic jack for auto-mic switch must be really an external
jack and with a presense-detection capability.  This patch makes the
check more paranoia.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 14:45:14 +02:00
Takashi Iwai 99ae28bea9 ALSA: hda - Make snd_hda_get_input_pin_attr() helper
Make the helper function to give the input-pin attribute for jack
connectivity and location.  This simplifies checks of input-pin jacks
a bit in some places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 14:42:34 +02:00
David Henningsson 5637edb2e1 ALSA: HDA: Sort CXT5066 quirk table
It was just a boring day.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 11:17:46 +02:00
David Henningsson 1feba3b736 ALSA: HDA: Fix spelling (change VOSTO to VOSTRO)
It was just a boring day.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 11:17:34 +02:00
Takashi Iwai 41c89ef3aa ALSA: hda - Fix mic attribute check for internal mics
Now Windows claims that the BIOS sets pins for internal mics to be
BOTH connection instead of FIXED.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 10:28:20 +02:00
Charles Chin 9907790aa0 ALSA: hda - Fix automatic MIC switching and include dock MIC for IDT codecs
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-17 10:22:32 +02:00
Takashi Iwai 30ea098fc0 ALSA: hda - Fix input-pin setup for Realtek codecs
Through the transition of autocfg to individual inputs array, I forgot
to rewrite the argument passed to alc_set_input_pin().  This resulted in
wrongly setup input pins.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 18:47:56 +02:00
Takashi Iwai 5855fb8076 ALSA: hda - Fix initialization of secondary headphone and speaker
The secondary or later headphones or speakers aren't initialized preoprly
for some codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 18:24:02 +02:00
David Henningsson 145a902bfe ALSA: HDA: Enable internal speaker on Dell M101z
BugLink: http://launchpad.net/bugs/640254

In some cases a magic processing coefficient is needed to enable
the internal speaker on Dell M101z. According to Realtek, this
processing coefficient is only present on ALC269vb.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 10:18:54 +02:00
Takashi Iwai 3b119f662d ALSA: hda - Add quirk for Acer laptop with CX20585 codec
Its pin configuration is compatible with ideapad.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:36:14 +02:00
Takashi Iwai b686453543 ALSA: hda - Reduce pci id list for Intel with class id
Most of Intel controllers work as generic HD-audio without quirks,
and it'll be hopefully so in future.  Let's mark pci id with the
PCI_CLASS_MULTIMEDIA_HD_AUDIO for Intel so that the driver will work
with any new control chips in future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:35:46 +02:00
Takashi Iwai f2e5731dfd ALSA: hda - Preliminary support for new Conexant audio codecs
This patch adds the preliminary support for new Conexant audio codecs with
14f1:5097, 14f1:5098, 14f1:50a1, 14f1:50a2, 14f1:50ab, 14f1:50ac,
14f1:50b8 and 14f1:50b9.

Unlike other Conexant parsers, this is designed to be mostly automatic,
parsing from BIOS pin configurations.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:34:55 +02:00
Takashi Iwai c91925db49 Merge branch 'fix/hda' into topic/hda 2010-09-16 07:33:21 +02:00
Kailang Yang 977ddd6b2e ALSA: hda - Set up COEFs for ALC269 to avoid click noises at power-saving
For avoiding the click noises at power-saving, set some COEF values
for ALC269* codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-16 07:32:30 +02:00
Stephen Warren 3894335876 ALSA: patch_nvhdmi.c: Fix supported sample rate list.
22050 isn't a valid HDMI sample rate. 32000 is.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-By: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-14 23:28:18 +02:00
Kailang Yang 9ad0e49651 ALSA: hda - Add input jack layer support to Realtek codec
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-14 23:22:00 +02:00
Anisse Astier 2ca9cac965 ALSA: hda - Add quirk for Toshiba C650D using a Conexant CX20585
Add a quirk for laptop Toshiba Satellite C650D to have proper external HP and
external Mic support.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-13 12:33:32 +02:00
Seth Heasley cea310e8f8 ALSA: hda_intel: ALSA HD Audio patch for Intel Patsburg DeviceIDs
This patch adds the Intel Patsburg (PCH) HD Audio Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-13 08:37:27 +02:00
Takashi Iwai 4a4d4a6985 ALSA: hda - Sort input pins in snd_hda_parse_pin_def_config()
Sort inputs[] array in autocfg so that the codec parsers can filter out
easily per input pin types.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 22:22:02 +02:00
Takashi Iwai 990061c28a ALSA: hda - Add comments to new helper functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 22:08:44 +02:00
Takashi Iwai a1c9851583 ALSA: hda - Reduce redundant mic location prefix in input source labels
When the mic pins are assigned to the same location, we can omit the
redundant location prefix like "Front" or "Rear".

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 21:36:27 +02:00
Takashi Iwai 10a20af7c9 ALSA: hda - Improve the input source name labels
This patch improves the input-source label strings to be generated from
the pin information instead of fixed strings per AUTO_PIN_* type.
This gives more suitable labels, especially for mic and line-in pins.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 16:46:03 +02:00
Takashi Iwai 86e2959a10 ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}
We can assign multiple pins to a single role now, let's reduce the
redundant FRONT_MIC and FRONT_LINE.  Also, autocfg->input_pins[] is
no longer used, so this is removed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 16:46:01 +02:00
Takashi Iwai b5786e85cb ALSA: hda - Keep char arrays in input_mux items
Keep char array in the input_mux item itself instead of pointing to
an external string.  This is a preliminary work for improving the
input-mux name based on the pin role.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 16:45:58 +02:00
David Henningsson 6cb3b707f9 ALSA: HDA: Add fixup pins for Ideapad Y550
By adding the subwoofer as a speaker pin, it is treated correctly when auto-muting.

BugLink: https://launchpad.net/bugs/611803
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-09 09:10:01 +02:00
Takashi Iwai 18675e4283 ALSA: hda - Add fixup for FSC Celsius H270
Added a fixup table for ALC262 codec containing the entry for FSC
Celsius H270.  Now both headphone jacks are detected properly as
headphones.

Reference: Novell bnc637263
	https://bugzilla.novell.com/show_bug.cgi?id=637263

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:55:44 +02:00
Takashi Iwai 033688a5a8 ALSA: hda - Add multiple headphone support to ALC262 codec
This patch changes the alc262 auto-parser to allow multiple pins
assigned for a single purpose (line-out, headphone or speaker).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:50:07 +02:00
Takashi Iwai bb35febd16 ALSA: hda - Support multiple headphone auto-mute
Currently headphone auto-mute using alc_automute_pin() assumes only
the single pin used for the headphone output.  Since there are devices
with multiple headphone jacks, we need to check all these pins there,
too.

Also this patch merges the common code between alc_automute_pin() and
alc_automute_amp() helper functions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:48:29 +02:00
Takashi Iwai 03642c9a44 ALSA: hda - Clear left-over hp_pins in snd_hda_parse_pin_def_config()
In snd_hda_parse_def_config(), some unused values may remain in hp_pins[]
array during the headphone-reassignment workaround.  This patch clears
the unused array members.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 15:30:20 +02:00
Takashi Iwai eb7f80c179 Merge branch 'fix/hda' into topic/hda 2010-09-08 15:28:03 +02:00
Takashi Iwai 122661b678 ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config()
snd_hda_parse_pin_def_config() has some workaround for re-assigning
some pins declared as headphones to line-outs.  This didn't work properly
for some cases because it used memmove() stupidly wrongly.

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

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 14:59:26 +02:00
Vitaliy Kulikov 263d0328c4 ALSA: hda - Improve input control names for IDT/STAC codecs
Changing the way the input controls are named using port connection
type and jack location info.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 09:01:28 +02:00
Vitaliy Kulikov ab5a6ebee3 ALSA: hda - Adding support for new IDT 92HD90BXX and 92HD91BXX codecs
Adding support for digital MIC in 92HD83/90/91XXX codecs family.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 09:00:17 +02:00
Takashi Iwai 83c0de892d Merge branch 'fix/hda' into topic/hda 2010-09-08 08:42:26 +02:00
Takashi Iwai 080dc7bc25 ALSA: hda - Enable PC-beep for EeePC with ALC269 codec
EeePC 1001HAG has a similar problem like other ASUS machine, which doesn't
set the codec SSID properly for indicating the beep capability.
To enable PC-beep again, put this to the whitelist.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 08:38:41 +02:00
Brian Austin a769cbcf60 ALSA: hda - Add errata initverb sequence for CS42xx codecs
Add init verb sequence for errata ER880C3
http://www.cirrus.com/en/pubs/errata/ER880C3.pdf

Signed-off-by: Brian Austin <brian.austin@cirrus.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-08 08:35:56 +02:00
Takashi Iwai 9737731d64 Merge branch 'fix/hda' into topic/hda 2010-09-07 12:18:43 +02:00
Takashi Iwai 4d155641c8 ALSA: hda - Add quirk for Lenovo T400s
Lenovo T400s requires the quirk to make automatic HP/mic switching working.

Reported-by: Frank Becker <fb@alien8.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07 12:04:48 +02:00
David Henningsson 048e78a5bc ALSA: hda - Add a new hp-laptop model for Conexant 5066, tested on HP G60
This new model adds the following functionality to HP G60:
- Automute of internal speakers
- Autoswitch of internal/external mics
- Remove SPDIF not physically present

BugLink: http://launchpad.net/bugs/587388
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-02 11:49:17 +02:00
Takashi Iwai 7b315bb498 ALSA: hda - Use new inputs[] field to parse input-pins for VIA codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:06:30 +02:00
Takashi Iwai eea7dc932b ALSA: hda - Use new inputs[] field to parse input-pins for STAC/IDT codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:06:15 +02:00
Takashi Iwai 66ceeb6bc2 ALSA: hda - Use new inputs[] field to parse input-pins for Realtek codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:05:52 +02:00
Takashi Iwai c1e0bb9217 ALSA: hda - Use new inputs[] field to parse input-pins for CirrusLogic codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:05:30 +02:00
Takashi Iwai fa4968a8b2 ALSA: hda - Use new inputs[] field to parse input-pins for CA-IBG codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:05:08 +02:00
Takashi Iwai 9e042e7132 ALSA: hda - Use new inputs[] field to parse input-pins for AD codecs
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:04:44 +02:00
Takashi Iwai d7b1ae9d88 ALSA: hda - Add snd_hda_get_input_pin_label() helper function
Added snd_hda_get_input_pin_label() helper function to return the
string that can be used for control or capture-source ids.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 13:00:16 +02:00
Takashi Iwai 75e0eb24ee ALSA: hda - Add inputs[] to auto_pin_cfg struct
Added the new fields to contain all input-pins to struct auto_pin_cfg.
Unlike the existing input_pins[], this array contains all input pins
even if the multiple pins are assigned for a single role (i.e. two
front mics).  The former input_pins[] still remains for a while, but
will be removed in near future.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 12:56:55 +02:00
Takashi Iwai f3268512c3 ALSA: hda - Refactor input-pin parser for VIA codecs
patch_via.c has redundant codes for parsing the input-pins.  Although
they are pretty similar, but all implemented in different functions
just because of hard-coded ids and slight incompatibilities.
This patch refactors the codes to use the common helper function,
resulting in the reduction of many lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 11:00:19 +02:00
Takashi Iwai 73413b120d ALSA: hda - embed alc_fixup contents into struct definitions
Instead of defining each content as a separate struct, put all into the
definition of struct alc_fixup arrays so that reader doesn't go back to
see the definition again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-30 09:39:57 +02:00
David Henningsson dbbcbc073a ALSA: hda - Add Sony VAIO quirk for ALC269
The attached patch enables playback on a Sony VAIO machine.

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

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-26 08:36:46 +02:00
Jerone Young 6f0ef6ea1d ALSA: hda - Add support for Lenovo S10-3t
This patch adds quirk for the Lenovo S10-3t so the headphone &
microphone jacks will now work.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-23 08:35:52 +02:00
Takashi Iwai 3f50ac6a0e ALSA: hda - Fix stream and channel-ids codec-bus wide
The new sticky PCM parameter introduced the delayed clean-ups of
stream- and channel-id tags.  In the current implementation, this check
(adding dirty flag) and actual clean-ups are done only for the codec
chip.  However, with HD-audio architecture, multiple codecs can be
on a single bus, and the controller assign stream- and channel-ids in
the bus-wide.

In this patch, the stream-id and channel-id are checked over all codecs
connected to the corresponding bus.  Together with it, the mutex is
moved to struct hda_bus, as this becomes also bus-wide.

Reported-and-tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-20 09:49:42 +02:00
Takashi Iwai 4f34760787 ALSA: hda - Fix conflict of sticky PCM parameter in HDMI codecs
Intel and Nvidia HDMI codec drivers have own implementations of
sticky PCM parameters.  Now HD-audio core part already has it,
thus both setups conflict.  The fix is simply remove the part in
patch_intelhdmi.c and patch_nvhdmi.c and simply call
snd_hda_codec_setup_stream() as usual.

Reported-and-tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-20 09:49:18 +02:00
Takashi Iwai 274714f55c ALSA: hda - Fix build error with CONFIG_PROC_FS=n
hdmi_eld_update_pcm_info() must be always compiled in.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-19 08:11:53 +02:00
Charles Chin 4d8ec5f3b6 ALSA: hda - Add support for IDT 92HD89XX codecs
Just added new codec ids.  These are almost compatible with existing ones.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-19 08:10:04 +02:00
Kailang Yang c69aefabe0 ALSA: hda - Fix ALC680 base model capture
- Fix capture mixer elements for ALC680 base model
 - Support auto change ADC for recording from MIC
 - Cancel capture source assigned in auto mode.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-17 10:39:22 +02:00
Takashi Iwai c3e68fad88 ALSA: hda - Add quirk for Dell Vostro 1220
model=dell-vostro is needed for Dell Vostro 1220 with Coexnat 5067.

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

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-16 10:15:57 +02:00
Takashi Iwai f0cea79724 ALSA: hda - Fix dynamic ADC change working again
The commit eb541337b7
    ALSA: hda - Make converter setups sticky
changes the semantics of snd_hda_codec_cleanup_stream() not to clean up
the stream at that moment but delay the action.  This broke the codes
expecting that the clean-up is done immediately, such as dynamic ADC
changes in some codec drivers.

This patch fixes the issue by introducing a lower helper,
__snd_hda_codec_cleanup_stream(), to allow the immediate clean up.
The original snd_hda_codec_cleanup_stream() is kept as is now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-13 11:56:53 +02:00
Takashi Iwai bbbe33900d ALSA: hda - Restrict PCM parameters per ELD information over HDMI
When a device is plugged over HDMI, it passes some information in ELD
including the supported PCM parameters like formats, rates, channels.
This patch adds the check to PCM open callback of HDMI streams so that
only valid parameters the device supports are used.

When no device is plugged, the parameters the codec supports are used;
it's mostly all parameters the hardware can work.  This is for apps
that are started before device plugging and do probing (e.g. a sound
daemon), so that at least, probing would work even before the device
plugging.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-13 08:45:23 +02:00
Charles Chin 8a345a042a ALSA: hda - Adding support for new IDT 92HD87XX codecs
Added the entries for 92HD87B1/3 and 92HD87B2/4 codecs.
These are compatible with existing 83xxx codecs.

Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-10 11:43:25 +02:00
David Henningsson 81cd3fca64 ALSA: HDA: Use model=auto for LG R510
Two users report model=auto is needed to make the internal mic work properly.
BugLink: https://bugs.launchpad.net/bugs/495134

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-10 09:30:42 +02:00
Stephen Warren 9cf2657d05 ALSA: hda - patch_nvhdmi.c: Add missing codec IDs, unify names
* Add missing codec IDs.
* Modify some existing codec names for discrete GPUs to match newly
  added IDs. Note: existing names were a mixture of marketing and
  engineering GPU names. Equally, there's no reason that codec IDs
  have to be specific to a particular GPU or board, so identify
  codecs in a less marketing-oriented fashion.
* Reformat codec ID table so it's easier to read, for me at least.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-10 08:41:14 +02:00
Takashi Iwai 850eab9d1b ALSA: hda - add support for Conexant CX20584
The Conexant CX20584 with 141f:5068 seems compatible with other
cxt5066 code.  Just add the missing id.

Tested-by: Cristopher Camacho Leandro <ccamacho@linuxmail.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-09 13:44:27 +02:00
Steven Eastland 4831559018 ALSA: hda - New snd-hda-intel model/pin config for hp dv7-4000
This provides a new model and pin config for the snd-hda-intel
92HD83XXX codec for hp laptop model dv7-4000, enabling the subwoofer.

Signed-off-by: Steven Eastland <seastland at gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-09 08:41:02 +02:00
Jonathan Woithe 53bacfbbb2 ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec
I discovered tonight that ALSA no longer sets up a stream for the second ADC
provided by the Realtek ALC260 HDA codec.  At some point alc_build_pcms()
started using stream_analog_alt_capture when constructing the second ADC
stream, but patch_alc260() was never updated accordingly.  I have no idea
when this regression occurred.  The trivial patch to patch_alc260() given
below fixes the problem as far as I can tell.  The patch is against 2.6.35.

Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-09 08:38:40 +02:00
Takashi Iwai eb541337b7 ALSA: hda - Make converter setups sticky
So far, we reset the converter setups like the stream-tag, the
channel-id and format-id in prepare callbacks, and clear them in
cleanup callbacks.  This often causes a silence of the digital
receiver for a couple of seconds.

This patch tries to delay the converter setup changes as much as
possible.  The converter setups are cached and aren't reset as long
as the same values are used.  At suspend/resume, they are cleared
to be recovered properly, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-06 13:48:11 +02:00
Kailang Yang fe3eb0a73c ALSA: hda - Add support for Acer ZGA ALC271 (1025:047c)
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-06 10:04:14 +02:00
Takashi Iwai 74bf40f079 Merge branch 'topic/misc' into for-linus 2010-08-05 11:17:04 +02:00
Takashi Iwai fc091769a5 ALSA: hda - Add pin-fix for HP dc5750
The NID 0x11 on HP dc5750 with ALC260 should be a speaker although BIOS
gives it as a line-out.  This patch adds a quirk to fix the pin config
so that the real line-out is used properly.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04 23:53:36 +02:00
Takashi Iwai 748cce431e ALSA: hda - Fix initial capsrc selection in patch_alc269()
In patch_alc269(), we initialize the primary capsrc so that the device
works from the beginning.  It issues CONNECT_SEL verb no matter which
widget is although some widget (e.g. 0x23) has no connection selection
but a mixer, which requires unmuting instead.

This patch fixes the initialization of capsrc by re-using the code as
a helper function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-04 07:40:53 +02:00
Takashi Iwai e096c8e6d5 ALSA: hda - Add PC-beep whitelist for an Intel board
An Intel board needs a white-list entry to enable PC-beep.
Otherwise the driver misdetects (due to bogus BIOS info) and ignores
the PC-beep on 2.6.35.

Reported-and-tested-by: Leandro Lucarella <luca@llucax.com.ar>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 17:22:39 +02:00
Takashi Iwai 08af495f22 ALSA: hda - More relax for pending period handling
Since the pending periods are often bogus and take long time until
actually processed, it often results in a high CPU usage of the hd-audio
workq.  Overall it's better to have low CPU consumption by avoiding a
too tight loop rather than the wake-up timing accuracy.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 14:43:07 +02:00
Takashi Iwai 92f10b3f5d ALSA: hda - Define AC_FMT_* constants
Define constants for the HD-audio stream format bits, and replace the
magic numbers in codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 14:21:00 +02:00
Daniel J Blueman 1b0e372d7b ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs
Fix HDA beep frequency on IDT 92HD73xx and 92HD71Bxx codecs.
These codecs use the standard beep frequency calculation although the
datasheet says it's linear frequency.

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

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:58:01 +02:00
Anssi Hannula ea87d1c493 ALSA: hda - Add support for HDMI HBR passthrough
Passing IEC 61937 encapsulated compressed audio at bitrates over 6.144
Mbps (i.e. more than a single 2-channel 16-bit 192kHz IEC 60958 link)
over HDMI requires the use of HBR Audio Stream Packets instead of Audio
Sample Packets.

Enable HBR mode when the stream has 8 channels and the Non-PCM bit is
set.

If the audio converter is not connected to any HBR-capable pins, return
-EINVAL in prepare().

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:53:36 +02:00
Anssi Hannula 32c168c892 ALSA: hda - Set Stream Type in Stream Format according to AES0
Set bit 15 (Stream Type) of HDA Stream Format to 1 (Non-PCM) when IEC958
channel status bit 1 (AES0 & 0x02) is set to 1 (non-audio).

This is a prequisite for HDMI HBR passthrough.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 12:53:27 +02:00
Jerone Young 68c1869791 ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed
Just as with the X301. The X300 does not have a way to do SPDIF either.
It does not have a dock connector, nor does it have the SPDIF through
the headphone jack.

This patch fixes it so X300 does not show SPDIF, since it cannot do it.

To add all Lenovo Thinkpads had different codec subsytem IDs:

X300:
http://launchpadlibrarian.net/34862838/Card0.Codecs.codec.0.txt

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 08:57:47 +02:00
Jerone Young 607bc3e488 ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF
The Lenovo X301 does not have the ability to connect to a docking
station to use the SPDIF port. It also does not have the ability to do
SPDIF though the headphone jack or Display Port jacks.

This patch fixes it so this is not exposed for the X301 and users do
think it has the ability to do SPDIF.

I tested both headphone & display port jacks and it is not there. I have
tested this patch and it works great.

Also to add the other Thinkpads have different subsystem codec IDs.
Here are examples:

X301:
http://launchpadlibrarian.net/31561902/Card0.Codecs.codec.0.txt

X200:
http://launchpadlibrarian.net/49055036/Card0.Codecs.codec.0.txt

W500:
http://launchpadlibrarian.net/36276057/Card0.Codecs.codec.0.txt

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-03 08:57:11 +02:00
David Henningsson 7bfb9c031e ALSA: hda - Do not try to create speaker NIDs for ALC268 if there aren't any
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-08-02 14:51:01 +02:00
Takashi Iwai c7a9434dd6 ALSA: hda - Add a warning for ignored pins with ALC259/268/269
The current ALC259/268/269 parser ignores some pins as unhandled,
but user won't notice what goes wrong.  So, added a warning message
for the ignored pins as a hint.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 14:10:43 +02:00
Takashi Iwai b08b1637ce ALSA: hda - Handle pin NID 0x1a on ALC259/269
The pin NID 0x1a should be handled as well as NID 0x1b.
Also added comments.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 14:09:38 +02:00
Takashi Iwai 697c373e34 ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs
Call snd_hda_shutup_pins() for power-saving and reboot-notifier in
patch_conexant.c as well as other codecs.  This will reduce the pop
noise in power-save mode.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 11:28:02 +02:00
Takashi Iwai 954a29c881 ALSA: hda - Prefer VREF50 if BIOS sets for Realtek codecs
If BIOS sets up the input pin as VREF 50, use the value as is instead of
overriding forcibly to VREF 80.  This fixes the quality of inputs on
some devices like Packard-Bell M5210.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:55:44 +02:00
Takashi Iwai 5d4abf93ea ALSA: hda - Handle missing NID 0x1b on ALC259 codec
Since ALC259/269 use the same parser of ALC268, the pin 0x1b was ignored
as an invalid widget.  Just add this NID to handle properly.
This will add the missing mixer controls for some devices.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:51:10 +02:00
Takashi Iwai 757899acee ALSA: hda - Share digital I/O parser in patch_realtek.c
Make a helper function to parse the digital I/Os of all Realtek codecs
to simplify the code and to ensure the setups.
Also, initialize digital I/O pins properly in init callbacks.  Some BIOS
seem to leave pins uninitialized.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:48:14 +02:00
Takashi Iwai ce503f38bd ALSA: hda - Increase the connection list size for ALC662
Some ALC662-compatible codecs like ALC892 may have more than 4
connections for the input source.  Use HDA_MAX_CONNECTIONS instead of
the fixed magic number 4.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:37:29 +02:00
Takashi Iwai 5aacc2186c ALSA: hda - Make error messages more verbose
Add a prefix and more information for error messages regarding the
connection-list in hda_codec.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-30 10:36:29 +02:00
David Henningsson 150b432f44 ALSA: hda - Rename iMic to Int Mic on Lenovo NB0763
The non-standard name "iMic" makes PulseAudio ignore the microphone.
BugLink: https://launchpad.net/bugs/605101

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29 15:37:28 +02:00
Takashi Iwai b0485610d6 Merge branch 'fix/hda' into topic/hda 2010-07-29 15:32:34 +02:00
Takashi Iwai dc1eae256c ALSA: hda - Add a PC-beep workaround for ASUS P5-V
ASUS P5-V provides a SSID that unexpectedly matches with the value
compilant with Realtek's specification.  Thus the driver interprets
it badly, resulting in non-working PC beep.

This patch adds a white-list for such a case; a white-list of known
devices with working PC beep.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29 15:30:02 +02:00
Takashi Iwai b6cbe517b9 ALSA: hda - Assume PC-beep as default for Realtek
Enable PC-beep as default for hardwares that aren't compliant with the
SSID value Realtek requires.  In such a case, better to enable the beep
to avoid a regression.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 17:43:36 +02:00
Takashi Iwai 8af2591d63 ALSA: hda - Don't register beep input device when no beep is available
We check now the availability of PC beep and skip the build of beep
mixers, but the driver still registers the input device.  This should
be checked as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 17:37:16 +02:00
Takashi Iwai a39afc8eb4 Merge branch 'fix/hda' into topic/hda 2010-07-28 14:26:47 +02:00
Takashi Iwai 38faddb1af ALSA: hda - Fix pin-detection of Nvidia HDMI
The behavior of Nvidia HDMI codec regarding the pin-detection unsol events
is based on the old HD-audio spec, i.e. PD bit indicates only the update
and doesn't show the current state.  Since the current code assumes the
new behavior, the pin-detection doesn't work relialby with these h/w.

This patch adds a flag for indicating the old spec, and fixes the issue
by checking the pin-detection explicitly for such hardware.

Tested-by: Wei Ni <wni@nvidia.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-28 14:26:14 +02:00
Takashi Iwai 7899f81fe4 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-07-27 10:16:04 +02:00
Takashi Iwai 7ccc3eface ALSA: hda - Fix max amp cap calculation for IDT/STAC codecs
The commit afbd9b8448
    ALSA: hda - Limit the amp value to write
introduced a regression for codec setups with amp offsets like IDT/STAC
codecs.  The limit value should be a raw value without offset calculation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-26 17:00:15 +02:00
David Henningsson 2385b789f1 ALSA: hda - Ensure codec patch files are checked for the correct codec ID
Signed-off-by: David Henningsson <diwic@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-26 10:28:01 +02:00
Jaroslav Kysela cd7643bfb7 ALSA: hda-intel - fix function_id rework (add missing bitmask)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-20 12:13:25 +02:00
Jerone Young ab85457f0a ALSA: hda - Add conexant quirk for AMD based Lenovo G series machines
This is a follow on patch adds support for AMD based Lenovo G series
machines, such as the Lenovo G555.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-19 18:47:38 +02:00
Takashi Iwai 8d011cc7a9 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-07-19 17:42:09 +02:00
Jaroslav Kysela 79c944ad13 ALSA: hda-intel - do not mix audio and modem function IDs
The function IDs are different for audio and modem. Do not mix them.
Also, show the unsolicited bit in the function_id register.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-19 16:46:56 +02:00
Takashi Iwai 840b64c080 ALSA: hda - Add support of dual-ADCs for Realtek ALC275
Some VAIO models with ALC275 have dual ADCs for both internal and external
mics, and the driver needs to switch one of them appropriately.
This patch adds a basic support for this functionality, dynamic switching
between two ADCs per jack plug state.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-13 22:49:01 +02:00
Clemens Ladisch 32e0191d79 ALSA: HDA: VT1708S: fix Smart5.1 mode
Correctly configure bidirectional pins when resuming; do not power down
widgets when they are needed for Smart5.1 output; and on 3-jack boards,
create the streams and controls needed for six channels.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Viliam Kubis <viliam.kubis@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12 17:25:45 +02:00
Takashi Iwai f8fb27bd4a Merge branch 'fix/hda' into topic/hda 2010-07-09 10:09:00 +02:00
Takashi Iwai afbd9b8448 ALSA: hda - Limit the amp value to write
Check the amp max value at put callbacks and set the upper limit
so that the driver won't write any invalid value over the defined
range.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-09 10:08:57 +02:00
Takashi Iwai 3507e2a8f1 ALSA: hda - Add beep mixer support to Conexant codecs
Added the beep mixer controls to Conexant codecs.
They simply control the digital beep generator widget.

For cx5047, I couldn't find any beep generator, so it's not implemented
there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-09 10:08:56 +02:00
Takashi Iwai ac0547dc62 ALSA: hda - Restore cleared pin controls on resume
Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins()
for reducing the click noise at power-off.  But this leaves some pins
uninitialized, and they'll be never recovered after resume.

This patch adds the proper recovery of cleared pin controls on resume.
Also it adds a check of bus->shutdown so that pins won't be cleared at
module unloading.

Reference: Kernel bug 16339
	http://bugzilla.kernel.org/show_bug.cgi?id=16339

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-09 08:42:29 +02:00
Takashi Iwai f189efcd1c ALSA: hda - Enable beep on Realtek codecs with PCI SSID override
When the PCI SSID gives an overriding SKU assno, PC-beep bit isn't
detected (since it's located over 16bit), resulting in no PC beep.
Also, many devices seem ignoring the requirement by Realtek's spec
for SSID numbers, and it also confuses the PC beep detection.

This patch assumes the PC beep is available on every machine with
PCI SSID override.  It's a regression fix from 2.6.34.

Reference: Kernel bug 16251
	http://bugzilla.kernel.org/show_bug.cgi?id=16251

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-05 17:28:17 +02:00
Takashi Iwai d4a86d8194 ALSA: hda - Add missing ALC680_* definitions
Also update the documentation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 17:52:39 +02:00
Kailang Yang d1eb57f47b ALSA: hda - Support ALC680 codec
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:25:26 +02:00
Luke Yelavich 3bfea98ff7 ALSA: hda - Add Macbook 5,2 quirk
BugLink: https://bugs.launchpad.net/bugs/463178

Set Macbook 5,2 (106b:4a00) hardware to use ALC885_MB5

Cc: <stable@kernel.org>
Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-22 11:13:54 +02:00
Takashi Iwai 2f44f84725 ALSA: hda - Fix uninitialized variable
Fix the following compile warning.  kctl should be NULL-initialized.

  sound/pci/hda/patch_realtek.c: In function ‘alc_build_controls’:
  sound/pci/hda/patch_realtek.c:2550:23: warning: ‘kctl’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-22 11:12:32 +02:00
Herton Ronaldo Krzesinski f7154de220 ALSA: hda - add ideapad model for Conexant 5051 codec
Lenovo IdeaPad Y430 has an additional subwoofer connected at pin 0x1b,
which isn't muted when headphone is plugged in. This adds additional
support to the extra subwoofer via new ideapad model.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-17 20:37:40 +02:00
Alex Murray b8f171e7e7 ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2
The line-in input is 0x7 not 0x2 for MacBook (Pro) 5,1 / 5,2 models

Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-14 09:12:21 +02:00
Takashi Iwai fbe618f216 ALSA: hda - Don't check capture source mixer if no ADC is available
With multiple codec configurations, some codec might have no ADC, thus
it keeps spec->adc_nids = NULL.  This causes an Oops in alc_build_controls().

Reference: kernel bug #16156
	https://bugzilla.kernel.org/show_bug.cgi?id=16156

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-11 11:24:58 +02:00
Justin P. Mattock ab669967d0 ALSA: hda - Add SSID table for iMac7,1.
This patch add's the iMac7,1 SSID entry to
patch_realtek.c which adds sound support.
bug entry:
    https://bugs.launchpad.net/mactel-support/+bug/360866

Note:I do not have this machine on hand only
codec#0 file for the machine so please
test if you have the appropriate equipment.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08 16:48:56 +02:00
Justin P. Mattock f53dae28cd ALSA: hda - Add SSID table for MacBookAir1,1
This patch add's the MacBookAir1,1 SSID entry to
patch_realtek.c which adds sound support.
bug entry:
    https://bugs.launchpad.net/mactel-support/+bug/268301

Note:I do not have this machine on hand only
codec#0 file for the machine so please
test if you have the appropriate equipment.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08 16:47:47 +02:00
Justin P. Mattock 6e12970bd4 ALSA: hda - Add SSID table for MacBookAir2,1
This adds the SSID number to snd_pci_quirk for the
MacBookAir2,1 taken from codec#0 at:
    http://launchpadlibrarian.net/49455483/Card0.Codecs.codec.0.txt

keep in mind I do not have one of these machines on hand
so please if you do have this machine please test for me..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08 16:46:15 +02:00
Takashi Iwai e4caa8bab3 Merge branch 'master' of git.alsa-project.org:alsa-kernel into fix/hda 2010-06-02 14:15:10 +02:00
Jaroslav Kysela 8fc6d4186e ALSA: hda-intel - fix wallclk variable update and condition
This patch fixes thinko introduced in "last minutes" before commiting
of the last wallclk patch.

It also fixes the condition checking if the first period after last
wallclk update is processed. There is a little rounding error in
period_wallclk.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-06-02 13:34:18 +02:00
Jaroslav Kysela edb39935c8 ALSA: hda-intel - fix wallclk variable update and condition
This patch fixes thinko introduced in "last minutes" before commiting
of the last wallclk patch.

It also fixes the condition checking if the first period after last
wallclk update is processed. There is a little rounding error in
period_wallclk.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-06-02 13:34:01 +02:00
Daniel T Chen 9f75c1b12c ALSA: hda: Use LPIB for ASUS M2V
BugLink: https://launchpad.net/bugs/587546

Symptom: On the reporter's ASUS M2V, using PulseAudio in Ubuntu 10.04 LTS
results in the PA daemon crashing shortly after attempting playback of an
audio file.

Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or
Linux 2.6.34, attempt playback of an audio file while PulseAudio is
active.

Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.

Reported-and-Tested-By: D Tangman
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-01 07:48:43 +02:00
Daniel T Chen b90c076424 ALSA: hda: Use LPIB for another mainboard
BugLink: https://launchpad.net/bugs/580749

Symptom: on the original reporter's VIA VT1708-based board, the
PulseAudio daemon dies shortly after the user attempts to play an audio
file.

Test case: boot from Ubuntu 10.04 LTS live cd; attempt to play an audio
file.

Resolution: add SSID for the original reporter's hardware to the
position_fix quirk table, explicitly specifying the LPIB method.

Reported-and-Tested-By: Harald
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-31 09:23:25 +02:00
Daniel T Chen 26fd74fc01 ALSA: hda: Use mb31 quirk for an iMac model
BugLink: https://launchpad.net/bugs/542550

Symptom: On the reporter's iMac, in Ubuntu 10.04 LTS neither playback
nor capture appear audible out-of-the-box.

Test case: Boot from an Ubuntu 10.04 LTS live cd or from an installed
configuration and attempt to play or capture audio.

Resolution: Specify the mb31 quirk for this machine in the codec SSID
table.

Reported-and-Tested-By: f3a97
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-31 09:22:59 +02:00
Daniel T Chen dd37f8e865 ALSA: hda: Use LPIB for an ASUS device
BugLink: https://launchpad.net/bugs/465942

Symptom: On the reporter's ASUS device, using PulseAudio in Ubuntu 10.04
LTS results in the PA daemon crashing shortly after attempting to select
capture or to configure the audio hardware profile.

Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or
Linux 2.6.34, adjust the HDA device's capture volume with PulseAudio.

Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.

Reported-and-Tested-By: Irihapeti
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-31 09:22:28 +02:00
Daniel T Chen 61bb42c37d ALSA: hda: Use LPIB for a Shuttle device
BugLink: https://launchpad.net/bugs/551949

Symptom: On the reporter's Shuttle device, using PulseAudio in Ubuntu
10.04 LTS results in "popping clicking" audio with the PA crashing
shortly thereafter.

Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or
Linux 2.6.34, adjust the HDA device's volume with PulseAudio.

Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.

Reported-and-Tested-By: Christian Mehlis <mehlis@inf.fu-berlin.de>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-29 21:47:59 +02:00
Andreas Herrmann badf18b5f5 ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec
On a Thinkpad Edge 13 "01972NG" I had the problem that speakers played
sound although headphones were plugged in. Using model=ideapad with
latest alsa-git kernel fixed this. So adding this quirk to use ideapad
for another Thinkpad Edge variant seems sensible.

Cc: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-28 10:03:31 +02:00
Daniel T Chen e96d312776 ALSA: hda: Use LPIB for Sony VPCS11V9E
BugLink: https://launchpad.net/bugs/586347

Symptom: On the Sony VPCS11V9E, using GStreamer-based applications with
PulseAudio in Ubuntu 10.04 LTS results in stuttering audio. It appears
to worsen with increased I/O.

Test case: use Rhythmbox under increased I/O pressure. This symptom is
reproducible in the current daily stable alsa-driver snapshots (at least
up until 21 May 2010; later snapshots fail to build from source due to
missing preprocessor directives when compiled against 2.6.32).

Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.

Reported-and-Tested-By: Lauri Kainulainen <lauri@sokkelo.net>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-28 07:51:17 +02:00
Jerone Young a39e33eb2a ALSA: hda - Add support for Thinkpad Edge conexant chip
This quirks in support for the Thinkpad Edge.

Signed-off-by: Jerone Young <jerone.young@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-27 09:45:17 +02:00
Clemens Ladisch 9ef04066b3 ALSA: hda_intel: fix handling of non-completion stream interrupts
Check that the interrupt raised for a stream is actually a buffer
completion interrupt before handling it as one.  Otherwise, memory
errors or FIFO xruns would be interpreted as a pointer update and could
break the stream timing.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 20:23:15 +02:00
Daniel T Chen 66668b6fb6 ALSA: hda: Fix model quirk for Dell M1730
BugLink: https://launchpad.net/bugs/576160

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

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

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

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

Reported-and-Tested-By: <picdragon99@msn.com>
Tested-By: Daren Hayward
Tested-By: Tobias Krais
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 08:46:01 +02:00
Justin P. Mattock b7cccc52fe ALSA: hda - iMac9,1 sound fixes
First issue:
With the original patch, I've noticed by unmuting the mic
(and even having it muted), there is a distorted("Noise")
coming from the internal speakers, even when the headphones are plugged in.
What my finding's revealed is:

	/* Mic (rear) pin: input vref at 80% */
	{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
	{0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},

From the original patch. Looking at codec#0 0x18/0x1a is listed as:

Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x90100141: [Fixed] Speaker at Int N/A
    Conn = Unknown, Color = Unknown
    DefAssociation = 0x4, Sequence = 0x1
    Misc = NO_PRESENCE
  Pin-ctls: 0x41: OUT VREF_50
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26

seems this Node is listed as: [Fixed] Speaker while 0x15

Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x018b3020: [Jack] Line In at Ext Rear
    Conn = Comb, Color = Blue
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0x01: VREF_50
  Unsolicited: tag=00, enabled=0
  Connection: 5
     0x0c 0x0d* 0x0e 0x0f 0x26

is [Jack] Line In at Ext Rear.
(looking at the other apple products as examples
I came up with the fix below).

Second issue:
alc885_mbp_4ch_modes
The original patch does a good job with the
HP pin automute function, but from what I noticed is I would have to manually
change the channel form 2 to 4 after plugging the headphones in.
And not to mention having odd moments to where I was jamming out
with the headphones on, then later realized I had sound blasting out
of the speakers as well. My findings revealed that changing
alc885_mbp_4ch_modes to alc885_mba21_ch_modes and setting
-	spec->autocfg.speaker_pins[0] = 0x15;
+	spec->autocfg.speaker_pins[0] = 0x18;
gets the automute function when the headphones plugged in working
flawlessly(and the no need to manually change the channel number
afterwards).

Third issue:
alc885_imac91_mixer
There probably doesnt need to be anything changed with this
(esspecially if your one to like lots of sliders),but my findings
revealed that mac osx only has a master on the top right,
another switch on itunes, and then a slider for the mic.

So the changes I did below try and mimic osx as much as possible
(only thing I had an issue with is just having one mute switch
on the master, instead of having two(still investigating)).

fourth issue:
alc882_capture_source
I endeded up creating alc889A_imac91_capture_source()
only  because looking at alc882_capture_source I see
that the mic is set to 0x1 while this works, I also noticed
that adding 0x1 and 0x01 and testing that 0x1 somehow
stops working, and 0x01 works(so I figured 0x01 was more
of the alpha of the numbers(still need to figure out
where that valuse is)). In any case the microphone
does work with the original, and with the below patch, but both
still record not as clean(lots of "Noise", which I would like to
look into too).
Note: using alsamixer -Va reveals the capture switches.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 08:44:59 +02:00
Daniel T Chen 4e0938dba7 ALSA: hda: Use LPIB for Toshiba A100-259
BugLink: https://launchpad.net/bugs/549560

Symptom: on a significant number of hardware, booting from a live cd
results in capture working correctly, but once the distribution is
installed, booting from the install results in capture not working.

Test case: boot from Ubuntu 10.04 LTS live cd; capture works correctly.
Install to HD and reboot; capture does not work. Reproduced with 2.6.32
mainline build (vanilla kernel.org compile)

Resolution: add SSID for Toshiba A100-259 to the position_fix quirk
table, explicitly specifying the LPIB method.

I'll be sending additional patches for these SSIDs as bug reports are
confirmed.

This patch also trivially sorts the quirk table in ascending order by
subsystem vendor.

Reported-and-Tested-by: <davide.molteni@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 08:40:50 +02:00
Daniel T Chen 7a68be94e2 ALSA: hda: Use LPIB for Acer Aspire 5110
BugLink: https://launchpad.net/bugs/583983

Symptom: on a significant number of hardware, booting from a live cd
results in capture working correctly, but once the distribution is
installed, booting from the install results in capture not working.

Test case: boot from Ubuntu 10.04 LTS live cd; capture works correctly.
Install to HD and reboot; capture does not work. Reproduced with 2.6.32
mainline build (vanilla kernel.org compile).

Resolution: add SSID for Acer Aspire 5110 to the position_fix quirk
table, explicitly specifying the LPIB method.

I'll be sending additional patches for these SSIDs as bug reports are
confirmed.

Reported-and-Tested-By: Leo
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 08:40:14 +02:00
Linus Torvalds 7f06a8b26a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (250 commits)
  ALSA: hda: Storage class should be before const qualifier
  ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies
  ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT
  ASoC: sdp4430 - add sdp4430 pcm ops to DAI.
  ASoC: TWL6040: Enable earphone path in codec
  ASoC: SDP4430: Add support for Earphone speaker
  ASoC: SDP4430: Add sdp4430 machine driver
  ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
  ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
  ALSA: sound/pci/asihpi: Use kzalloc
  ALSA: hdmi - dont fail on extra nodes
  ALSA: intelhdmi - add id for the CougarPoint chipset
  ALSA: intelhdmi - user friendly codec name
  ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS
  ALSA: asihpi: incorrect range check
  ALSA: asihpi: testing the wrong variable
  ALSA: es1688: add pedantic range checks
  ARM: McBSP: Add support for omap4 in McBSP driver
  ARM: McBSP: Fix request for irq in OMAP4
  OMAP: McBSP: Add 32-bit mode support
  ...
2010-05-20 09:41:44 -07:00
Linus Torvalds f39d01be4c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits)
  vlynq: make whole Kconfig-menu dependant on architecture
  add descriptive comment for TIF_MEMDIE task flag declaration.
  EEPROM: max6875: Header file cleanup
  EEPROM: 93cx6: Header file cleanup
  EEPROM: Header file cleanup
  agp: use NULL instead of 0 when pointer is needed
  rtc-v3020: make bitfield unsigned
  PCI: make bitfield unsigned
  jbd2: use NULL instead of 0 when pointer is needed
  cciss: fix shadows sparse warning
  doc: inode uses a mutex instead of a semaphore.
  uml: i386: Avoid redefinition of NR_syscalls
  fix "seperate" typos in comments
  cocbalt_lcdfb: correct sections
  doc: Change urls for sparse
  Powerpc: wii: Fix typo in comment
  i2o: cleanup some exit paths
  Documentation/: it's -> its where appropriate
  UML: Fix compiler warning due to missing task_struct declaration
  UML: add kernel.h include to signal.c
  ...
2010-05-20 09:20:59 -07:00
Takashi Iwai 19008bdacb Merge branch 'topic/hda' into for-linus 2010-05-20 11:59:52 +02:00
Tobias Klauser fbc256692e ALSA: hda: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:

The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-20 11:56:14 +02:00
Wu Fengguang 3eaead579e ALSA: hdmi - dont fail on extra nodes
The number of HDMI nodes is expected to go up in future.
So don't fail hard on seeing extra converter/pin nodes.

We can still operate safely on the nodes within
MAX_HDMI_CVTS/MAX_HDMI_PINS.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-17 08:12:13 +02:00
Wu Fengguang e48b00870f ALSA: intelhdmi - add id for the CougarPoint chipset
Add id for Intel CougarPoint HDMI audio codec.

CougarPoint provides 3 Audio Converters.
Increase MAX_HDMI_CVTS/MAX_HDMI_PINS accordingly.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-17 08:11:59 +02:00
Wu Fengguang 41da2e0a01 ALSA: intelhdmi - user friendly codec name
Use the full chipset codename as codec name.
They are more user friendly than the spec abbrs.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-17 08:11:48 +02:00
Wu Fengguang e9abf85fe1 ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS
This is necessary to support >=3 HDMI playback devices
starting from the CougarPoint codec.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-17 08:11:39 +02:00
Takashi Iwai 105ce39ca4 Merge branch 'fix/hda' into for-linus 2010-05-13 10:07:15 +02:00
Takashi Iwai 2a6ce6e5fd ALSA: hda - Add hp-dv4 model for IDT 92HD71bx
It turned out that HP dv series have inconsistent the mute-LED GPIO
mapping among various models.  dv4/7 seem to use GPIO 0 while dv 5/6
seem to use GPIO 3.  The previous commit
  26ebe0a289
  ALSA: hda - Fix mute-LED GPIO pin for HP dv series
breaks dv5/6.

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

Tested-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com> (for dv6-1110ax)
Acked-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-12 10:20:42 +02:00
Jaroslav Kysela f48f606d9f [ALSA] snd-hda-intel: Improve azx_position_ok()
Add back the zero return value (activate workqueue) when
bdl_pos_adj is nonzero for position check.

Do the position related check only for first next period
using wallclk counter.

Return -1 value (ignore interrupt) when period_bytes
variable is zero.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-05-11 12:17:55 +02:00
Jaroslav Kysela e54637205b [ALSA] snd-hda-intel: use WALLCLK register to check for early irqs
Use 24Mhz WALLCLK register to ignore too early interrupts and
wrong interrupt status. The bad timing confuses the higher ALSA
layer and causes audio skipping. More information about behaviour
and debugging can be found in kernel bz#15912.

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

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-05-11 10:21:46 +02:00
Takashi Iwai 26ebe0a289 ALSA: hda - Fix mute-LED GPIO pin for HP dv series
Old HP dv series seem to use the GPIO pin 0 for controlling the mute LED
although the pin is a large package, where the newer models use GPIO 3
in such a case.  For fixing the regression from the previous kernels,
set spec->gpio_led statically for these model quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-11 08:36:29 +02:00
Shahin Ghazinouri beaffc3993 ALSA: hda - Fixes distorted recording on US15W chipset
The HDA controller in US15W (Poulsbo) reports inaccurate position values
for capture streams when using the LPIB read method, resulting in
distorted recordings.

However, using the position buffer is broken for playback streams,
resulting in a fallback to the LPIB method with the current driver.
This patch works around the issue by independently detecting the read
position method for capture and playback streams.

The patch will not have any effect if the position fix method is
explicitly set.

[Code simplified by tiwai]

Signed-off-by: Shahin Ghazinouri <shahin.ghazinouri@pelagicore.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-11 08:21:33 +02:00
Daniel T Chen 0ebf9e3692 ALSA: hda: Fix 0 dB for Lenovo models using Conexant CX20549 (Venice)
Reference: http://mailman.alsa-project.org/pipermail/alsa-devel/2010-May/027525.html

As reported on the mailing list, we also need to cap to the 0 dB offset
for Lenovo models, else the sound will be distorted.

Reported-and-Tested-by: Tim Starling <tstarling@wikimedia.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-11 08:18:31 +02:00
Takashi Iwai 5433137336 Merge branch 'fix/hda' into topic/hda 2010-05-10 17:24:03 +02:00
Stefan Lippers-Hollmann 482c453315 ALSA: Revert "ALSA: hda/realtek: quirk for D945GCLF2 mainboard"
This reverts commit 7aee674665.

As it doesn't seem to be universally valid for all mainboard revisions of
the D945GCLF2 and breaks snd-hda-intel/ snd-hda-codec-realtek on the Intel
Corporation "D945GCLF2" (LF94510J.86A.0229.2009.0729.0209) mainboard.

00:1b.0 Audio device [0403]: Intel Corporation N10/ICH 7 Family High Definition Audio Controller [8086:27d8] (rev 01)

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: <stable@kernel.org> [2.6.33]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10 17:16:10 +02:00
Pierre-Louis Bossart 1965c441ec ALSA: hda: enable SPDIF output for Conexant 5051/Lenovo docking stations
This patch enables the SPDIF output pin by default. It also enables
it for quirks related to Levono docking stations (x200 and 25041,
identified with the same 17aa:20f2 ID). Even though not all Lenovo
docking stations have SPDIF connectors, enabling the pin by default
shouldn't be a problem for anyone.
Other quirks remain unmodified.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10 17:00:01 +02:00
Andrej Gelenberg 0217f1499c ALSA: hda - add support for Lenovo ThinkPad X100e in conexant codec
Ideapad quirks working for my ThinkPad X100e (microphone is not tested).

Signed-off-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10 10:28:12 +02:00
Wu Fengguang 4d26f44657 ALSA: hda - fix DG45ID SPDIF output
This reverts part of commit 52dc438606, in order to fix a regression:
broken SPDIF output on Intel DG45FC motherboard (IDT 92HD73E1X5 codec).

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

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

Cc: <stable@kernel.org>
Cc: Alexey Fisher <bug-track@fisher-privat.net>
Tested-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-07 10:24:53 +02:00
Takashi Iwai ef5dbbccbb ALSA: hda - Remove superfluous external amp setup for ALC888
We had a fixed external amp setup enabled for ALC888, but this seems
unnecessary.  The amps are controlled rather by GPIOs.
Let's remove it now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-06 08:40:25 +02:00
Takashi Iwai 20d157aef2 Merge branch 'fix/hda' into topic/hda 2010-05-06 08:39:43 +02:00
Takashi Iwai 69b5de8475 Merge branch 'fix/hda' into for-linus 2010-05-05 10:08:30 +02:00
Daniel T Chen 8f0f5ff677 ALSA: hda: Fix 0 dB for Packard Bell models using Conexant CX20549 (Venice)
BugLink: https://launchpad.net/bugs/541802

The OR's hardware distorts at PCM 100% because it does not correspond to
0 dB. Fix this in patch_cxt5045() for all Packard Bell models.

Reported-by: Valombre
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-05 10:01:15 +02:00
Anisse Astier 231f50bc0e ALSA: hda - Add quirk for Dell Inspiron 19T using a Conexant CX20582
Add a quirk for all-in-one computer Dell Inspiron One 19 Touch to have proper
HP and Mic support.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-05 10:00:00 +02:00
Daniel T Chen c536668138 ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite P500-PSPGSC-01800T
BugLink: https://launchpad.net/bugs/549267

The OR verified that using the olpc-xo-1_5 model quirk allows the
headphones to be audible when inserted into the jack. Capture was
also verified to work correctly.

Reported-by: Richard Gagne
Tested-by: Richard Gagne
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-05 09:52:41 +02:00
Daniel T Chen 4442dd4613 ALSA: hda: Use olpc-xo-1_5 quirk for Toshiba Satellite Pro T130-15F
BugLink: https://launchpad.net/bugs/573284

The OR verified that using the olpc-xo-1_5 model quirk allows the
headphones to be audible when inserted into the jack. Capture was
also verified to work correctly.

Reported-by: Andy Couldrake <acouldrake@googlemail.com>
Tested-by: Andy Couldrake <acouldrake@googlemail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-05 09:51:15 +02:00
Brian J. Tarricone 8dd34ab111 ALSA: hda - fix array indexing while creating inputs for Cirrus codecs
This fixes a problem where cards show up as only having a single mixer
element, suppressing all sound output.

Signed-off-by: Brian J. Tarricone <brian@tarricone.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-05 09:45:33 +02:00
Takashi Iwai 1f10cd34d9 Merge branch 'fix/hda' into for-linus 2010-04-23 17:10:44 +02:00
Daniel T Chen 5c1bccf645 ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio 1558
BugLink: https://launchpad.net/bugs/568600

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

This change is necessary for 2.6.32.11 and 2.6.33.2 alike.

Reported-by: Andy Ross <andy@plausible.org>
Tested-by: Andy Ross <andy@plausible.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-23 08:01:42 +02:00
Daniel T Chen 0e0280dc2b ALSA: hda: Use LPIB quirk for DG965OT board version AAD63733-203
BugLink: https://launchpad.net/bugs/459083

The OR has verified with 2.6.32.11 and the latest alsa-driver stable
daily snapshot that position_fix=1 is necessary for the external mic
to work and for PulseAudio not to crash constantly.

This patch is necessary also for 2.6.32.11 and 2.6.33.2.

Reported-by: <imwithid@yahoo.com>
Tested-by: <imwithid@yahoo.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-23 08:00:43 +02:00
Jiri Kosina 6c9468e9eb Merge branch 'master' into for-next 2010-04-23 02:08:44 +02:00
Daniel T Chen 3353541fe5 ALSA: hda: Use ALC880_F1734 quirk for Fujitsu Siemens AMILO Xi 1526
BugLink: https://launchpad.net/bugs/567494

The OR has verified that the existing model quirk, ALC880_UNIWILL,
is insufficient for audible playback and capture by default. Instead,
the ALC880_F1734 model quirk needs to be used.

This change is necessary for both 2.6.32.11 and 2.6.33.2.

Reported-by: Arnaud Malpeyre <amalpeyre@gmail.com>
Tested-by: Arnaud Malpeyre <amalpeyre@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-22 14:58:15 +02:00
Daniel T Chen aac78daf8f ALSA: hda: Use STAC_DELL_M6_BOTH quirk for Dell Studio XPS 1645
BugLink: https://launchpad.net/bugs/553002

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

This change is necessary for 2.6.32.11 and 2.6.33.2 alike.

Reported-by: Robert Chambers
Tested-by: Robert Chambers
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-22 09:14:32 +02:00
Takashi Iwai b7d2526f5c ALSA: hda - Fix resume from StR of HP 2510p with docking-station
When HP laptop with AD1981 codec is suspended and the docking-station
is connected before the resume, the outputs get confused, and wrongly
routed still to the speaker.  This is because of a change in 2.6.34-rc1
ea52bf260e
    ALSA: hda: Add powerdown for Analog Devices HDA codecs

The problem was the added resume callback that doesn't consider the
modified init hook.  The fix is simply remove the resume callback here
and make the resume normally.  This doesn't change any behavior intended
in the commit above (for shutting down the sound at suspend) but only
fixes the resume.

Reported-and-tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-19 18:11:29 +02:00
Takashi Iwai 923125c650 Merge branch 'fix/hda' into for-linus 2010-04-16 10:03:48 +02:00
Jens Taprogge 7b2bfdbc0d ALSA: hda - Add initial support for Thinkpad T410s HDA codec
attached please find a patch that adds support for at least the T410s
HDA codec.  Most likely it will also add support for the T410 and T510
based models.

The patch was derived from Ideapad support.  Support for the laptop's and
docking-station output connectors as well as the docking-station microphone
connector and the laptops internal devices has been tested.  Since it has been
developed without a data-sheet available, support for digital outputs and the
laptop's microphone input may well be incorrect.

Microphone mute functionality is not included:
The microphone mute button seems to be reported through thinkpad_acpi key
0000101b.  The mute button LED seems to be wired to thinkpad_acpi led
number 15.

Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-15 09:10:29 +02:00
Takashi Iwai 039f0f3a5b Merge branch 'fix/hda' into topic/hda 2010-04-15 09:09:02 +02:00
Takashi Iwai 8815cd030f ALSA: hda - Add position_fix quirk for Biostar mobo
The Biostar mobo seems to give a wrong DMA position, resulting in
stuttering or skipping sounds on 2.6.34.  Since the commit
7b3a177b0d, "ALSA: pcm_lib: fix "something
must be really wrong" condition", makes the position check more strictly,
the DMA position problem is revealed more clearly now.

The fix is to use only LPIB for obtaining the position, i.e. passing
position_fix=1.  This patch adds a static quirk to achieve it as default.

Reported-by: Frank Griffin <ftg@roadrunner.com>
Cc: Eric Piel <Eric.Piel@tremplin-utc.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-15 09:02:41 +02:00
Joerg Schirottke d1501ea844 ALSA: hda - add a quirk for Clevo M570U laptop
Added the matching model for Clevo laptop M570U.

Signed-off-by: Joerg Schirottke <master@kanotix.com>
Tested-by: Maximilian Gerhard <maxbox@directbox.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-15 08:37:41 +02:00
Takashi Iwai b265faed8c Merge branch 'fix/hda' into topic/hda 2010-04-14 14:39:21 +02:00
Takashi Iwai 3d83e577a8 ALSA: hda - Avoid invalid "Independent HP" control for VIA codecs
Some VIA codecs have no multiple source selection for headphone pins,
thus it's useless (and wrong) to create "Independent HP" control on them.

This patch adds the check of connections to skip the control in such a
case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-14 14:36:23 +02:00
Takashi Iwai b331439dfd ALSA: hda - Fix control element allocations in VIA codec parser
The commit 5b0cb1d850
    ALSA: hda - add more NID->Control mapping
breaks the control element allocation by returning a wrong value.
Let's fix it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-14 14:35:11 +02:00
Takashi Iwai ff818c24c2 ALSA: hda - Add fix-up for Sony VAIO with ALC269
Sony VAIO models with ALC269 need to initialize the pin 0x19 to VREF
ground or Hi-Z to make the headphone working.  Other than that, model=auto
works fine, so let's use model=auto with a specific fix-up table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-12 08:59:25 +02:00
Takashi Iwai 7fa90e873f ALSA: hda - Enhance fix-up table for Realtek codecs
A few enhancement / fixes for fix-up table of some Realtek codecs:
 - Apply fix-ups only for the auto model
 - Apply additional verbs after normal init verbs
 - Add a debug print to show the fix-up application

This is basically a preliminary work for the next fix for Sony VAIO.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-12 08:58:48 +02:00
Takashi Iwai 60508abe9b Merge branch 'fix/hda' into topic/hda 2010-04-09 17:36:19 +02:00
Takashi Iwai 7f311a4691 ALSA: hda - Fix initial capture source connections of ALC880/260
The widget connections of ADC of ALC880 and ALC2260 aren't initialized,
thus it might point to invalid pin.  This can be a problem when mode=auto
and there is only one input pin.  Then user can't change the connection
at all.

This patch adds the code to initialize the input pin connection of these
codecs.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-09 17:35:42 +02:00
Kailang Yang 226b1ec8c1 ALSA: hda - Fix setup for ALC269vb amic and dmic models
Corrected HP and mic pins for ALC269vb amic and dmic models.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-09 11:01:20 +02:00
Kailang Yang 531d8791ac ALSA: hda - Fix auto-parser of ALC269vb for HP pin NID 0x21
ALC269vb has an alternative HP pin 0x21 in addition.
Fix the parser to recognize it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-09 10:57:33 +02:00
Linus Torvalds 84db18bbeb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: mixart: range checking proc file
  ALSA: hda - Fix a wrong array range check in patch_realtek.c
  ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_stream
  ALSA: hda - Enable amplifiers on Acer Inspire 6530G
  ASoC: Only do WM8994 bias off transition from standby
  ASoC: Don't use DCS_DATAPATH_BUSY for WM hubs devices
  ASoC: Don't do runtime wm_hubs DC servo updates if using offset correction
  ASoC: Support second DC servo readback method for wm_hubs
  ASoC: Avoid wraparound in wm_hubs DC servo correction
  ALSA: echoaudio - Eliminate use after free
  ALSA: i2c: cleanup: change parameter to pointer
  ALSA: hda - Add MSI blacklist for Aopen MZ915-M
  ASoC: OMAP: Fix capture pointer handling for OMAP1510 to work correctly with recent ALSA PCM code
  ALSA: hda - Update document about MSI and interrupts
  ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
  ALSA: hda - Add missing printk argument in previous patch
  ASoC: Fix passing platform_data to ac97 bus users and fix a leak
  ALSA: hda - Fix ADC/MUX assignment of ALC269 codec
  ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()
  ASoC: wm8994: playback => capture
2010-04-07 08:42:25 -07:00
Maurus Cuelenaere 7ad7b218f4 ALSA: hda: Add support for Medion WIM2160
This adds support for the Medion WIM2160 soundcard.
There's no PCI quirk added because it has the same PCI id as the
Medion MD2.

Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07 14:56:55 +02:00
Takashi Iwai 25e8d9b67b ALSA: hda - Remove left-over debug printk in patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07 14:53:00 +02:00
Takashi Iwai 489008cd58 ALSA: hda - Fix ALC882 DAC connections in auto mode
Assign DACs properly to each output.  Currently, the front output is bound
to HP/speaker outputs blindly, but they should be assigned to individual
DACs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07 09:06:00 +02:00
Takashi Iwai 92ab7b8f38 Merge branch 'fix/hda' into topic/hda 2010-04-07 08:38:47 +02:00
Takashi Iwai f9700d5a45 ALSA: hda - Fix a wrong array range check in patch_realtek.c
The commit 6a4f2ccb46 introduced a wrong
comparision for the array range check, which effectively skips the whole
initialization of DAC connections.  Fixed now.

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

Reported-by: Adrian Ulrich <kernel@blinkenlights.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-05 23:36:16 +02:00
Tony Vroon d12841827a ALSA: hda - Enable amplifiers on Acer Inspire 6530G
After more tests it appears that EAPD needs to be enabled
on both the 0x14 and 0x15 NIDs to enable the main speaker
and headphone amplifiers. The maximum volume setting is
now equal to what the machine achieves under other operating
systems.
Disabling Front or LFE playback triggers EAPD and disables
the amplifier. As such, these two playback switches have
been removed from the mixer.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-05 18:29:48 +02:00
Takashi Iwai 3815595e78 ALSA: hda - Add MSI blacklist for Aopen MZ915-M
The device needs MSI disablement.  Added to the quirk list.

Reported-by: Harald Dunkel <harri@afaics.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-04 12:14:03 +02:00
Takashi Iwai c125ba3bec Merge branch 'topic/hda-alc-mute' into topic/hda 2010-04-01 16:04:28 +02:00
Takashi Iwai 7a2e38a555 Merge branch 'fix/hda' into topic/hda 2010-04-01 16:04:13 +02:00
Daniel T Chen b8e80cf386 ALSA: hda: Fix 0 dB offset for Lenovo Thinkpad models using AD1981
BugLink: https://launchpad.net/bugs/551606

The OR's hardware distorts at PCM 100% because it does not correspond to
0 dB. Fix this in patch_ad1981() for all models using the Thinkpad
quirk.

Reported-by: Jane Silber
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-31 11:47:14 +02:00
Takashi Iwai a68d5a5419 ALSA: hda - introduce snd_hda_codec_update_cache()
Add a new helper, snd_hda_codec_update_cache(), for reducing the unneeded
verbs.  This function checks the cached value and skips if it's identical
with the given one.  Otherwise it works like snd_hda_codec_write_cache().

The alc269 code uses this function as an example.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30 18:03:44 +02:00
Takashi Iwai ad35879aa1 ALSA: hda - Add mute LED support for HP laptop with ALC269
Some HP laptops have a mute LED that is controlled over the unused
MIC2 VREF pin.  Implement the LED updater like patch_sigmatel.c for this
model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30 18:03:11 +02:00
Takashi Iwai c35c9d5d3f Merge branch 'fix/hda' into topic/hda 2010-03-30 18:00:42 +02:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Takashi Iwai 1f85d72d2c ALSA: hda - Add missing printk argument in previous patch
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-30 07:48:05 +02:00
Takashi Iwai 6694635d3a ALSA: hda - Fix ADC/MUX assignment of ALC269 codec
ALC269 codec has a few different variants, and each of them may have
different ADC and MUX widgets.  For example, one model has ADC 0x08
with MUX 0x23 while others has ADC 0x09 or ADC 0x07 with MUX 022 or
0x24.  The difference of ADC appears usually as the capability of
the digital mic pin (0x12), and the current driver sometimes misses
the internal mic pin due to the mismatching ADC.

This patch adds a bit more clever way to find the matching ADC instead
of the static list.  Now the driver checks all active input pins and
fills only the ADC/MUX's that contain all of them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 17:27:31 +02:00
Takashi Iwai 4671264608 ALSA: hda - Report errors when invalid values are passed to snd_hda_amp_*()
The values should be in 8 bits.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 09:20:39 +02:00
Takashi Iwai 55440e4e37 Merge branch 'fix/hda' into topic/hda 2010-03-29 09:20:32 +02:00
Takashi Iwai 5dbd5ec6e1 ALSA: hda - Fix invalid bit values passed to snd_hda_codec_amp_stereo()
The mask and value parameters passed to snd_hda_codec_amp_stereo()
should be 8-bit values for mute and volume.  Passing AMP_IN_MUTE() is
wrong, which is found in many places in patch_realtek.c as a left-over
from the conversion to snd_hda_codec_amp_stereo().

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 09:18:49 +02:00
Daniel T Chen 9ec8ddad59 ALSA: hda: Use LPIB for ga-ma770-ud3 board
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575669

The OR states that position_fix=1 is necessary to work around glitching
during volume adjustments using PulseAudio.

Reported-by: Carlos Laviola <claviola@debian.org>
Tested-by: Carlos Laviola <claviola@debian.org>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-29 08:26:05 +02:00
Takashi Iwai 5266874b09 Merge remote branch 'alsa/devel' into topic/hda 2010-03-26 15:28:41 +01:00
Jaroslav Kysela 079e683ebd ALSA: hda-intel - probe_only module option is int type now
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-03-26 11:16:59 +01:00
Jaroslav Kysela 10e77ddac0 ALSA: hda-intel - remove model=hwio , use probe_only=3 instead
The probe_only module parameter skips the codec initialization, too.
Remove the model=hwio code and use second bit in probe_only to
skip the HDA codec reset procedure.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-03-26 11:08:43 +01:00
Jaroslav Kysela 0bf0e5a6f3 ALSA: hda-intel - AD1984 thinkpad - add analog beep input control
For Lenovo Thinkpad T61/X61, the analog beep input is connected
to node 0x20, index 3. Move the digital beep mute/volume controls
as "Digital Beep" and create analog beep controls for mentioned node.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-03-26 10:37:43 +01:00
Jaroslav Kysela cd508fe58b ALSA: hda-intel - add special 'hwio' model to bypass initialization
Using the 'model=hwio' option, the driver bypasses any codec
initialization and the reset procedure for codecs is also
bypassed. This mode is usefull to enable direct access using
hwdep interface (using hdaverb or hda-analyzer tools) and
retain codec setup from BIOS.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-03-26 10:37:39 +01:00
Takashi Iwai 05471e4c44 Merge branch 'fix/hda' into topic/hda 2010-03-25 15:06:58 +01:00
Takashi Iwai 6a4f2ccb46 ALSA: hda - Don't set invalid connection index in Realtek initialiaiton
Skip initialization of connections of DAC widgets that aren't used,
which resulted in invalid verb parameters.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-25 15:00:15 +01:00
Takashi Iwai 7fb5622326 ALSA: hda - Fix uninitialized variable warning in alc_auto_parse_customize_define()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22 17:09:47 +01:00
Takashi Iwai bae84e70d6 ALSA: hda - Fix access-after-free in patch_realtek.c
alc_free_kctls() has to be called after all jobs done in alc_build_controls().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22 08:30:20 +01:00
Takashi Iwai ea823c0891 ALSA: hda - Sort codec entry list of Nvidia HDMI
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22 08:07:55 +01:00
Derek Kelly e933e9e523 ALSA: hda - Add support of Nvidia GT220 HDMI
This patch adds the device id for Nvidia GT220 cards to the nvhdmi
driver.  I have tested it and confirmed it to be working.

Original patch download link:
https://gist.github.com/324070/

Signed-off-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22 08:06:23 +01:00
Daniel T Chen 025f206c9e ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
BugLink: https://launchpad.net/bugs/420578

The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).

Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22 08:01:41 +01:00
Takashi Iwai 93929ebc81 Merge branch 'fix/hda' into topic/hda 2010-03-21 09:33:25 +01:00
Kunal Gangakhedkar e3d2530a6c ALSA: hda - Add PCI quirk for HP dv6-1110ax.
Adding this PCI quirk fixes the board config detection.
This also fixes jack sensing by using "hp_detect=1" via properly detected
board config.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-21 09:33:11 +01:00
Kailang Yang c027ddcd01 ALSA: hda - Add alc_codec_rename() helper
Added alc_codec_rename() helper for renaming codec->chip_name.
Added Acer-specific codec naming for ALC269/662.

[Clean-up and refactoring by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19 11:40:53 +01:00
Kailang Yang da00c24493 ALSA: hda - Add parse customize define function for Realtek codecs
Added alc_auto_parse_customize_define() to parse the Realtek-specific
attributes from SKU.  Also enable beep controls only when the proper
attribute bit is set.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19 11:38:53 +01:00
Kailang Yang 6ff86a3f33 ALSA: hda - Take internal mic as Front Mic
Add new check for MIC. Do the internal DMIC as the Front MIC.
It could solve the default record source index issue.

[Fix the check properly using the bitmask by tiwai]

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-19 11:14:36 +01:00
Justin P. Mattock b7a5633ab3 fix comment typo in sound/pci/hda/hda_local.h
I think this should be automatic pin instead of ping.
(but could be wrong).

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-03-19 11:00:58 +01:00
Takashi Iwai e04dd2d21b Merge branch 'fix/hda' into for-linus 2010-03-17 09:01:38 +01:00
Daniel T Chen 572c0e3c73 ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212
BugLink: https://bugs.launchpad.net/bugs/538895

The OR has verified that both position_fix=1 and model=6stack-dig are
necessary to have capture function properly. (The existing 3stack-6ch
model quirk seems to be incorrect.)

Reported-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Tested-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-16 07:46:31 +01:00
Takashi Iwai 80c43ed724 ALSA: hda - Disable MSI for Nvidia controller
Judging from the member of enable_msi white-list, Nvidia controller
seems to cause troubles with MSI enabled, e.g. boot hang up or other
serious issue may come up.  It's safer to disable MSI as default for
Nvidia controllers again for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-15 15:51:53 +01:00
Anisse Astier b43f6e5e25 ALSA: hda - Add PCI quirks for MSI NetOn AP1900 and Wind Top AE2220
This should make the speakers and jack detection work on MSI all-in-one
computers NetOn AP1900 and Wind Top AE2220.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15 09:11:45 +01:00
Takashi Iwai 9c4cc0bded ALSA: hda - Fix secondary ADC of ALC260 basic model
Fix adc_nids[] for ALC260 basic model to match with num_adc_nids.
Otherwise you get an invalid NID in the secondary "Input Source" mixer
element.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-15 09:07:52 +01:00
Takashi Iwai 28d1a85e13 ALSA: hda - Add an error message for invalid mapping NID
Add an error message to snd_hda_add_nid() for invalid mapping NID to make
easier to hunt the buggy code.

Also added a missing space to the error message in snd_hda_build_controls()

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15 09:06:38 +01:00
Vitaliy Kulikov c602c8ad45 ALSA: hda - New Intel HDA controller
Added a PCI controller id on new Dell laptops.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-15 09:01:26 +01:00
Takashi Iwai 7d39cf6224 Merge branch 'topic/hda' into for-linus 2010-03-10 09:01:25 +01:00
Ralf Gerbig ecd216260f ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55
without the following patch audio ssttuutteerrs on
ASUS M2N32-SLI PREMIUM ACPI BIOS Revision 1304
the sound device is:
00:0e.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)
worked with 2.6.32

Signed-off-by: Ralf Gerbig <rge@quengel.org>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-09 18:29:01 +01:00
Takashi Iwai 5311114d48 ALSA: hda - Fix input source elements of secondary ADCs on Realtek
Since alc_auto_create_input_ctls() doesn't set the elements for the
secondary ADCs, "Input Source" elemtns for these also get empty, resulting
in buggy outputs of alsactl like:
	control.14 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.count 1
		iface MIXER
		name 'Input Source'
		index 1
		value 0
	}

This patch fixes alc_mux_enum_*() (and others) to fall back to the
first entry if the secondary input mux is empty.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-08 12:17:49 +01:00
Takashi Iwai 50ae0aa8f5 ALSA: hda - Fix wrong model range check for ALC268
Fix a wrong value passed to snd_hda_check_board_codec_sid_config() as
the upper-limit in parse_alc268(), so that any wrong value can't be
passed.

So far, no bogus value was set in the quirk entries, so this won't give
any behavioral changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 12:12:41 +01:00
Takashi Iwai f1cf9a666d Merge branch 'topic/hda' into for-linus 2010-03-08 09:35:43 +01:00
Wu Fengguang 2abbf4391f ALSA: hdmi - show debug message on changing audio infoframe
Also change printk level for the two others.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 08:21:25 +01:00
Wu Fengguang 079d88ccc3 ALSA: hdmi - merge common code for intelhdmi and nvhdmi
Create patch_hdmi.c to hold common code from intelhdmi and nvhdmi.

For now the patch_hdmi.c file is simply included by patch_intelhdmi.c
and patch_nvhdmi.c, and does not represent a real codec.

There are no behavior changes to intelhdmi. However nvhdmi made several
changes when copying code out of intelhdmi, which are all reverted in
this patch. Wei Ni confirmed that the reverted code actually works fine.

Tested-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-08 08:21:08 +01:00
Michele Ballabio 4193d13b2c ALSA: hda - Add ASRock mobo to MSI blacklist
This avoids a lockup at boot.

Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-07 09:29:39 +01:00
Takashi Iwai 7484399fe2 Merge branch 'fix/hda' into topic/hda 2010-03-07 09:29:29 +01:00
Frederik Deweerdt d2db09b87e ALSA: hda: uninitialized variable fix
Commit eaa9b3a748 introduced the following
uninitialized warning:

	sound/pci/hda/patch_realtek.c: In function 'set_capture_mixer':
	sound/pci/hda/patch_realtek.c:4928: warning: 'pin' is used uninitialized in this function
	sound/pci/hda/patch_realtek.c:4918: note: 'pin' was declared here

It appears indeed that 'pin' needs to be initialized to 0.

Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 16:40:26 +01:00
Daniel T Chen 0321b69569 ALSA: hda: Use LPIB for a Biostar Microtech board
BugLink: https://launchpad.net/bugs/523953

The OR has verified that position_fix=1 is necessary to work around
errors on his machine.

Reported-by: MMarking
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-05 16:06:01 +01:00
Daniel T Chen 9919c7619c ALSA: hda: Use LPIB for Dell Latitude 131L
BugLink: https://launchpad.net/bugs/530346

The OR has verified that position_fix=1 is necessary to work around
errors on his machine.

Reported-by: Tom Louwrier
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 16:32:01 +01:00
Takashi Iwai dd74b46535 ALSA: hda - Build hda_eld into snd-hda-codec module
Now two modules require hda_eld.o, so we need to put it to the common
place instead of building into two individual modules.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 16:05:24 +01:00
Wei Ni 25045705d4 ALSA: hda - Support NVIDIA MCP89 and GT21x hdmi audio
Support nvidia MCP89 and GT21x 8ch hdmi audio.
Add some eld support.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 15:54:12 +01:00
Wei Ni 7445dfc159 ALSA: hda - Support max codecs to 8 for nvidia hda controller
Support max codecs to 8 for nvidia hda controller.
Change AZX_MAX_CODECS to 8, and add
"#define AZX_DEFAULT_CODECS 4" for default driver.
Set azx_max_codecs to 8 for nvidia controller.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-04 15:53:56 +01:00
Norberto Lopes 28aedaf7bf ALSA: sound/pci/hda/hda_codec.c: various coding style fixes
Signed-off-by: Norberto Lopes <nlopes.ml@gmail.com>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-02 11:21:18 +01:00
Takashi Iwai 20645d70bd ALSA: hda - Add missing hp_pins definitions for ALC269 quirks
In 2.6.33 ACL269 unsol event handler was changed to look up the pre-defined
pins, but the headphone pins aren't defined properly in each quirk.
This patch adds the missing definitions, and fixes the speaker auto-mute
regression on some ASUS (and possibly other) laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-03-02 11:14:01 +01:00
Takashi Iwai a91a4aa1ee Merge branch 'topic/hda' into for-linus 2010-03-01 12:38:54 +01:00
Takashi Iwai 12c2a682b5 Merge branch 'topic/misc' into for-linus 2010-03-01 12:38:49 +01:00
Kailang Yang 61c2d2b5e7 ALSA: hda - Add/fix ALC269 FSC and Quanta models
Specify proper quirk models for FSC and Quanta machines with ALC269 codec.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-25 08:49:06 +01:00
Kailang Yang 6227cdced0 ALSA: hda - Add ALC670 codec support
- Fixed alc_subsystem_id( ) typo and add new function.
   - !(ass & 0x100000)) ==> Delete this check. It is unnecessary check.
   - Add porti
- ALC670 support

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-25 08:48:44 +01:00