Commit Graph

143443 Commits

Author SHA1 Message Date
Takashi Iwai ba84bfcd2b ALSA: hda - Fix reverted LED setup for HP
The commit 86d190e77c reverted the bit
flip of LED GPIO for HP DX and DV4-1222nr.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-30 08:59:03 +02:00
Takashi Iwai b4f8b5e2f5 Merge branch 'fix/hda' into topic/hda 2009-05-28 13:12:48 +02:00
Takashi Iwai b21fadb9c1 ALSA: hda - Add more register bits definitions
Added some missing register bits definitions to reduce magic numbers.
Also renamed some to follow the names on the datasheet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 12:26:15 +02:00
Takashi Iwai b05a7d4fed ALSA: hda - Always sync writes in single_cmd mode
In the single_cmd mode, the hardware cannot store the multiple replies
like on RIRB, thus each verb has to sync and wait for the response no
matter whether the return value is needed or not.  Otherwise it may
result in a wrong return value from the previous verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 12:01:24 +02:00
Tony Vroon 1812e67c74 ALSA: hda - Compaq Presario CQ60 patching for Conexant
A docking mic control is shown by default. The Compaq Presario
CQ60 laptop has no docking connector, so designate it as a
CXT5051_HP model.
This makes the phantom mixer slider disappear.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-28 07:36:20 +02:00
Takashi Iwai aa2936f5fe ALSA: hda - Support sync after writing a verb
This patch adds a debug mode to make the codec communication
synchronous.  Define SND_HDA_SUPPORT_SYNC_WRITE in hda_codec.c,
and the call of snd_hda_codec_write*() will become synchronous,
i.e. wait for the reply from the codec at each time issuing a verb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 17:23:46 +02:00
Takashi Iwai 8174086167 ALSA: hda - Allow concurrent RIRB access in single_cmd mode
In the single_cmd mode, the current driver code doesn't do any update
for RIRB just for any safety reason.  But, actually the RIRB and
single_cmd mode don't conflict.  Unsolicited events can be delivered
even while using the single_cmd mode.

This patch allows the handling of unsolicited events with single_cmd
mode, just always checking RIRB independent from single_cmd flag.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:22:00 +02:00
Takashi Iwai 20e91c5750 Merge branch 'fix/hda' into topic/hda 2009-05-26 15:19:56 +02:00
Takashi Iwai 86d190e77c ALSA: hda - Minor clean up of patch_sigmatel.c
- Remove unneeded semicolons
- Introduce spec->gpio_led to specify the GPIO bit for LED control

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-26 15:18:58 +02:00
Takashi Iwai 4fcd39207f ALSA: hda - Reset CORB/RIRB at retrying the verb communication
When a codec communication error occurs, the CORB/RIRB counters should
be reset first before re-issuing the verb.  Simply call azx_free_cmd_io()
and azx_init_cmd_io() to achieve that.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 18:34:52 +02:00
Takashi Iwai 461c6c3a0a ALSA: hda - Add missing check of pin vref 50 and others in Realtek codecs
Some Realtek codecs like ALC861 seem to support only VREF50 while the
current driver assumes it's only VREF80.  Check other VREF bits to set
the correct value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-25 08:06:02 +02:00
Takashi Iwai 679d92ed14 ALSA: hda - Add 5stack-no-fp model for STAC927x
The recent fix for the headphone volume control on IDT/STAC codecs
resulted in the removal of invalid "Side" volume eventually.  But,
if the front panel doesn't exist, this setup could be regarded as a
sort of regression, as reported in kernel bug #13250.

Now as a workaround, a new model 5stack-no-fp is added so that the user
without the front panel can choose this one explicitly.

Reference: bko#13250
	http://bugzilla.kernel.org/show_bug.cgi?id=13250

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 19:00:08 +02:00
Ozan Çağlayan 93574844bc ALSA: hda - Add forced codec-slots for ASUS W5Fm
ASUS W5Fm needs the fixed codec-slots to probe to override the BIOS
problem like W5F.

Tested-by: Alp Kılıç <kilic.alp@gmail.com>
Signed-off-by: Ozan Çağlayan <ozan@pardus.org.tr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-24 18:45:28 +02:00
Adam Williamson 87488957a6 ALSA: hda - fix audio on HP TX25xx series notebooks
Fixes https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4121

Taken from https://bugzilla.redhat.com/show_bug.cgi?id=498060

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-22 08:22:23 +02:00
Takashi Iwai fa79796631 ALSA: hda - Fix digital beep tone calculation
The digital beep tone is calculated in two different ways depending
on the codec chip.  The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs.  Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.

This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.

Reference: bko#13162
	http://bugzilla.kernel.org/show_bug.cgi?id=13162

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:54:55 +02:00
Takashi Iwai 4abc1cc2f9 ALSA: hda - Add prefix to kernel messages
Add proper prefix to each kernel message in hda_intel.c.
Also, avoid the unneeded prefix when CONFIG_SND_VERBOSE_PRINTK is used
together with snd_print*().

Reference: bko#13207
	http://bugzilla.kernel.org/show_bug.cgi?id=13207

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-19 12:16:46 +02:00
Torben Schulz eb4c41d30b ALSA: hda - Improved MacBook 3,1 support
This patch adds support for MacBook 3,1 sound by adding a model new
"mb31" with the appropriate init verbs, mixers and channel modes to
the ALC883 configuration. patch_alc882() and patch_alc883() are
modified to handle the MacBook 3,1 sound-chip (Realtek ALC889A)
correctly.

Signed-off-by: Torben Schulz <public@letorbi.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 15:13:02 +02:00
Takashi Iwai 313f6e2d40 ALSA: hda - Avoid conflicts with snd-ctxfi driver
The PCI entries of Creative with HD-audio class can be the devices
with emu20k1/emu20k2 chips.  These are supported better by snd-ctxfi
driver.  With that driver, the device will mutate from HD-audio to
its native class.

This patch adds a simple ifdef to avoid the conflict of device probe
between snd-hda-intel and snd-ctxfi drivers.  1102:0009 seems still
OK to be added as it has no emu20kx chip, and is a pure HD-audio
device.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 12:40:52 +02:00
Takashi Iwai 6c627f3978 ALSA: hda - Show the actual chip name in 'unkown model' messages
Show the actual chip name in 'unknown model..' info messages for
Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-18 12:33:36 +02:00
Takashi Iwai 812a2cca29 ALSA: hda - Split codec->name to vendor and chip name strings
Split the name string in hda_codec struct to vendor_name and chip_name
strings to be stored directly from the preset name.
Since mostly only the chip name is referred in many patch_*.c, this
results in the reduction of many codes in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-16 10:00:49 +02:00
Nickolas Lloyd 2fc9989079 ALSA: hda - add controls to toggle DC bias on mic ports
This patch adds a mixer control for the STAC92XX boards to control the
DC bias of mic ports, allowing recording from both powered and
non-powered sources.  It replaces the "Mic Output Switch" with "Mic Jack
Mode" to switch between Mic, Line In, and Line Out.

Signed-off-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-15 15:34:10 +02:00
Takashi Iwai 7442f9dadb ALSA: hda - Add a quirk entry for Macbook Pro 5,1
Added the codec SSID for MacBook Pro 5,1 as compatible as MP51.
However, the headphone auto-muting function doesn't work.  So,
this is just a tentative solution.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-14 18:20:33 +02:00
Takashi Iwai 22b530e028 ALSA: hda - Disable fallback to model=acer for Acer laptops
The model=acer for ALC883/889 doesn't work well for the recent Acer
Aspire laptops.  Since model=auto works better nowadays, it's safer
to use the default fallback instead of the Acer specific one.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-13 11:32:52 +02:00
Chris Pockelé 9541ba1d66 ALSA: hda - Add support of Samsung NC10 mini notebook
Add specific configuration for Samsung NC10 mini notebook.  Internal
mic/speakers will be correctly muted when plugging in external ones.
Mixer controls are added for speakers, headphones and PC beep.
"Boost" is added for the microphones.

Signed-off-by: Chris Pockelé <chris.pockele.f1@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-12 08:08:53 +02:00
Takashi Iwai fa1285b3d1 Merge branch 'topic/hda-vt-spdif' into topic/hda 2009-05-11 10:23:36 +02:00
Takashi Iwai 01f2bd48d0 ALSA: hda - Add missing models for Realtek codecs
Added the missing descriptions and the model names for Realtek codecs
to the documentation and the config table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-11 08:12:43 +02:00
Takashi Iwai 22e336b776 Merge branch 'fix/hda' into topic/hda 2009-05-08 16:03:20 +02:00
Takashi Iwai a9fd4f3fcd ALSA: hda - Clean up Realtek auto-mute unsol routines
Most of unsol handlers defined in patch_realtek.c can be classified to
two types, mute via amp of pins and mute via ctl bits of pins.
Thus there are a big room to generalize each implementation.

This patch creates two generic functions, alc_automute_amp() and
alc_automute_pin().  The latter is actually changed from the previous
alc_sku_automute().  Each caller needs to initialize hp_pins and
speaker_pins properly at own init_hook.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 15:57:59 +02:00
Takashi Iwai b72519b518 ALSA: hda - Clean up for ALC262 HP model auto-mute functions
Just clean up, no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 15:49:41 +02:00
Takashi Iwai 42171c17f2 ALSA: hda - Fix and clean up hippo-compat HP auto-muting
The speaker auto-muting per HP plugging for ALC262 HIPPO and compatible
devices is slightly buggy as the "Master" or "Front" mixer control can
still toggle the speaker output even if the headphone is plugged.

This patch fixes the issue, and clean up the hippo-related codes
together with fixes of some inconsistent mixer names.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 14:28:35 +02:00
Takashi Iwai 9da29271be ALSA: hda - Fix secondary SPDIF on VT1708S and VT1702 codecs
VIA VT1708S and VT1702 codecs can have two SPDIF outputs.  One of them
should have been handled as the extra digital out, but it's not
properly accessed.

This patch fixes the handling of the secondary SPDIF on these codecs
with the slave dig-out as found in patch_sigmatel.c.  This makes the
use of such a device easier (for normal users).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:28 +02:00
Takashi Iwai 5dd17cb992 ALSA: hda - Fix line-in on Mac Mini Core2 Duo
BIOS on Mac Mini Core2 Duo sets both INPUT and OUTPUT pinctl bits to
the line-in jack, and it confuses the driver as if it's a valid input.
This patch adds the check of OUTPUT bit so that the driver fixes the
invalid pin setup.

Tested-by: Tino Keitel <tino.keitel@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-08 07:55:10 +02:00
Kacper Szczesniak 41d5545d23 ALSA: hda - Add support for MacBook 5.1 (Aluminium)
Signed-off-by: Kacper Szczesniak <kacper@qwe.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-07 12:52:59 +02:00
James Gardiner 514bf54cd8 ALSA: hda - Addition for HP dv4-1222nr laptop support
Signed-off-by: James Gardiner <renidragsemaj@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-04 09:06:19 +02:00
Takashi Iwai cb6605c1e4 ALSA: hda - Fix a typo in patch_realtek.c again
The commmit dfed0ef9b3 was reverted
accidentally by the merge of auto-detection fix patch.

Fixed again now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 13:03:19 +02:00
Takashi Iwai 2a2ed0dfc9 ALSA: hda - Don't enable auto-mute but for speakers in patch_realtek.c
Enable auto-muting in model=auto only for devices with HP and speakers.
For devices with HP and line-outs, don't enable the auto-muting.

Also, add a debug print to show the auto-mute feature.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-28 13:01:26 +02:00
Takashi Iwai 299f293b34 Merge branch 'topic/hda-realtek-amp' into topic/hda 2009-04-28 09:51:57 +02:00
Takashi Iwai 1103f9b241 Merge branch 'fix/hda' into topic/hda 2009-04-28 09:51:49 +02:00
Takashi Iwai 4a79ba34ca ALSA: hda - Add amp initialization for realtek auto mode
In the realtek auto-probing mode, the initialization of amp with
some magic COEF or EAPD verbs is applied only when the codec SSID
has valid values to satisfy the realtek's definition.
However, many devices don't provide in that way, thus the device
doesn't work as is.

This patch allows the same initialization code even if the SSID
doesn't pass the bit test.  Also, alc_subsystem_id() is changed
just to check and define the type, so that it's called in the
parser, instead of the initializer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-27 18:00:30 +02:00
Takashi Iwai 7315613f87 ALSA: hda - Fix init verbs of AD1884A mobile model
The current ad1884a-mobile model has a problem that the speaker output
doesn't work sometimes after boot or power-saving on some HP laptops.
It seems that the verbs accessing to the non-functional widgets cause
this problem.

This patch simplifies the init verbs for mobile model not to touch
unnecessary setups so that it avoids the speaker-mute problem.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-23 08:24:48 +02:00
Takashi Iwai 3b1db01990 Merge branch 'fix/hda' into topic/hda 2009-04-21 18:37:53 +02:00
Takashi Iwai 5bd3729f68 ALSA: hda - Add quirk for Packard Bell RS65
Added a quirk (model=m51va) for Packard Bell RS65 with ALC663.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 18:36:30 +02:00
Takashi Iwai dfed0ef9b3 ALSA: hda - Fix a typo in debug print for realtek auto-detection
The NID and ASS numbers were swapped...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 18:33:12 +02:00
Takashi Iwai a3b48c88f2 ALSA: hda - minor optimization in hda_set_power_state()
Check the target power-state before checking EAPD exception to reduce
unneeded verb executions.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 13:38:30 +02:00
Takashi Iwai b97bedcded Merge branch 'topic/hda-cache' into topic/hda 2009-04-21 11:11:54 +02:00
Takashi Iwai 586be3fcf9 ALSA: hda - Add debug prints for Realtek auto-init
Added a couple of debug prints to show the checked id numbers in
alc_subsystem_id().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 11:10:45 +02:00
Takashi Iwai b613291fb2 ALSA: hda - Retry codec-verbs at errors
The current error-recovery scheme for the codec communication errors
doesn't work always well.  Especially falling back to the
single-command mode causes the fatal problem on many systems.

In this patch, the problematic verb is re-issued again after the error
(even with polling mode) instead of the single-cmd mode.  The
single-cmd mode will be used only when specified via the command
option explicitly, mainly just for testing.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 11:10:44 +02:00
Takashi Iwai 92c7c8a7d6 ALSA: hda - Cache PCM and STREAM parameters queries
Cache quries for PCM and STREAM parameters as well as ampcap and
pincap sharing the hash table.  This will reduce the superfluous
access of the same codec verbs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 11:10:39 +02:00
Takashi Iwai 858940773a Merge branch 'fix/hda' into topic/hda 2009-04-21 07:41:12 +02:00
Kailang Yang 622e84cdff ALSA: hda - Add quirks for Realtek codecs
- Support ASUS F81Se F5Q P80 U20A U80 U50 UX50 for ALC269
- Support ASUS F70SL UX20 X58LE F50Z N80Vc N81Te N505Tp Vx3V N5051A
  for ALC663
- Support DELL ZM1 for ALC272

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21 07:39:04 +02:00