Commit Graph

1886 Commits (e0d4435f93905f517003cfa7328a36ea19788147)

Author SHA1 Message Date
Vitaliy Kulikov a9694faa28 ALSA: hda - Adding support for another IDT 92HD83XXX codec
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-02-04 08:58:23 +01:00
Charles Chin 36706005d9 ALSA: hda - Add support for IDT 92HD88 family codecs
Signed-off-by: Charles Chin <Charles.Chin@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-29 12:05:51 +01:00
Vitaliy Kulikov e108c7b79e ALSA: hda - Add mute LED check for HP laptops with IDT 92HD83xxx codec
This patch adds HP mute LED support for IDT 92HD81/3 family of the codecs.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 19:21:07 +01:00
Takashi Iwai 30ed7ed11c ALSA: hda - Fix index of HP Compaq F700 mic amp
The amp used for the mic input on HP Compaq F700 with Cxt5051 codec
has no multiple inputs, thus its index should be 0 instead of 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:11:45 +01:00
Takashi Iwai c893622251 ALSA: hda - Define max number of PCM devices in hda_codec.h
Define the constant rather in the common header file.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:08:53 +01:00
Wei Ni 7b36ea967c ALSA: hda - Change the AZX_MAX_PCMS to 10
In hda_codec.c, it has define
"[HDA_PCM_TYPE_HDMI]  = { 3, 7, 8, 9, -1 },",
it support up to device 9 for HDMI.
But in hda_intel.c, it only define AZX_MAX_PCMS as 8.
So if it have 4 hdmi codecs, when run azx_attach_pcm_stream(),
it will show error "Invalid PCM device number 8", and "... number 9",
and return "-EINVAL".
We should change the AZX_MAX_PCMS to 10.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 17:06:19 +01:00
Takashi Iwai b09f3e78ee ALSA: hda - Allow override more fields via patch loader
Allow the override of vendor-id, subsystem-id, revision-id and chip name
via patch loading.  Updated the document, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-28 00:04:21 +01:00
Takashi Iwai 8ce28d6abf ALSA: hda - Add an ASUS mobo to MSI blacklist
Sid Boyce reported that his machine locks up without enable_msi=0 option.
This looks like another ASUS mobo with Nvidia combo.

Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-27 20:26:08 +01:00
Wei Ni ccc5df058d ALSA: hda - Add support for more the 8 streams
In azx_stream_start() and azx_stream_stop(),
it use azx_readb/azx_writeb to read/write SIE,
it just enable/disable 8 streams.
But according to the HDA spec, it support 30 streams,
and the new HDA controller will support more then 8
streams. So we should use azx_readl/azx_writel to
read/write SIE.

Signed-off-by: Wei Ni <wni@nvidia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-26 10:40:03 +01:00
Takashi Iwai 0aea778efa ALSA: hda - Remove the COEF setup for ALC267/ALC268
The COEF setup for model=auto seems problematic on some laptops,
resulting in the silent speaker output.  Better to disable it for now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 15:45:58 +01:00
Takashi Iwai 95f475f7a2 ALSA: hda - Remove coef output in Realtek proc files
The output of COEF index/value in the proc file for Realtek codecs is
rather useless since the value varies together with the index.
Let's get rid of it again.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 15:42:58 +01:00
Łukasz Wojniłowicz 973b8cb0ea ALSA: hda - add possibility to choose speakers configuration for 4930g
Now one can choose speaker configuration in e.g. PulseAudio mixer

Signed-off-by: Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-25 08:00:02 +01:00
Takashi Iwai 23d2df5b0d ALSA: hda - Change headphone pin control with master volume on cx5051
The HP pin (0x16) control has to be changed dynamically depending on
the master volume switch as well as the speaker pin (0x1a).  Otherwise
the headphone still sounds with master off.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:19:27 +01:00
Takashi Iwai ecda0cff9d ALSA: hda - Fix SPDIF output widget for Cxt5051 codec
Fixed the wrongly set up for SPDIF output on Conexant 5051 codec.
It must point to the audio out widget instead of a pin.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:14:36 +01:00
Takashi Iwai 6953e5524a ALSA: hda - initialize mic port on cxt5051 codec dynamically
Initialize the mic ports B & C on Conexant 5051 codec dynamically
according to the mic jack detection, instead of static init arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:31 +01:00
Takashi Iwai 2c7a3fb3f8 ALSA: hda - Merge playback controls for Cx5051 codec models
All cx5051 codec models have the same Master playback mixer definitions.
Merge them together.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:30 +01:00
Takashi Iwai faddaa5d1c ALSA: hda - Add support for Toshiba Satellite M300
Added the support for Toshiba Satellite M300 with Conexant 5051 codec.
Since the laptop has no port C connection and the pin reports always
the jack sense true, we need to ignore port-C unsol event.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-24 11:09:10 +01:00
Takashi Iwai 4e4ac60030 ALSA: hda - Fix HP dv6736 capture mixer name
Use the standard "Capture" mixer name for HP dv6736 with Cxt5051 codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-23 22:29:54 +01:00
Takashi Iwai 5f6c3de6a7 ALSA: hda - Minor fixes for Compaq Presario F700 quirk
Minor fixes for HP Compaq Presario F700 quirks with Cxt5051 codec:
- changed the capture mixer elements to the standard name.
- fixed the quirk name string without a space
- sorted the quirk list
- updated the documentation

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-23 22:21:31 +01:00
Jaroslav Kysela fd0b092a7b ALSA: hda - AD1988 codec - fix SPDIF-input mixer initialization (unmute)
The SPDIF-input pin 0x1c is muted by default in hardware. Unmute appropriate
pin to get captured samples instead zeros. Tested on Lenovo Thinkstation.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-21 14:54:38 +01:00
Takashi Iwai dc99be4766 ALSA: hda - Fix HP T5735 automute
This patch fixes the aut-mute setup on HP T5735 with ALC262 codec.
Instead of wrong amp, use pin control toggling for muting the speaker now.

Tested-by: Lee Trager <lee.trager@hp.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-20 08:35:06 +01:00
Takashi Iwai 9e4c84967e Merge branch 'fix/hda' into topic/hda
Conflicts:
	sound/pci/hda/patch_realtek.c
2010-01-19 15:53:43 +01:00
Takashi Iwai 3fb4a508b8 ALSA: hda - Turn on EAPD only if available for Realtek codecs
Some codecs disable widgets used for output pins and reserve as vendor-
spec widgets.  Thus we need to check the widget type and pin cap before
actually sending SET_EAPD verbs in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19 15:50:26 +01:00
Takashi Iwai 4feabefe53 ALSA: hda - Fix parsing pin node 0x21 on ALC259
ALC259 has a widget NID 0x21 for the output pin, but it wasn't handled
properly in alc268_new_analog_output().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19 15:38:44 +01:00
Takashi Iwai eaa9b3a748 ALSA: hda - Fix capture on Sony VAIO with single input
Sony VAIO VGN-P11G with ALC262 codec has only one input pin, and the
recording doesn't work with model=auto because ALC262 parser sets the
wrong cap NIDs to choose the route and the default route for the sole
input pin wasn't initialized properly.  This patch solves these issues.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-17 13:09:33 +01:00
Kunal Gangakhedkar d38cce7046 ALSA: hda - Fix mute led GPIO on HP dv-series notebooks
On my laptop (HP dv6-1110ax), there are no OEM strings in SMBIOS of type
"HP_Mute_LED*". Hence, the GPIO for the mute button LED doesn't get set
properly. I didn't find the strings in my cousin's laptop (HP dv9500t CTO)
either.

As per the documentation of find_mute_led_gpio(), these strings occur
in HP B-series systems - so, before scanning the SMBIOS strings, we need to
check if we're dealing with a B-series system.
Need to get confirmation from HP if this logic takes care of all the
systems. I'm trying to poke a friend there.

Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-15 18:15:42 +01:00
Takashi Iwai c7a8eb1032 ALSA: hda - Fix missing capture mixer for ALC861/660 codecs
The capture-related mixer elements are missing with ALC861/ALC660 codecs
when quirks are present, due to missing call of set_capture_mixer().

Reference: Novell bnc#567340
	http://bugzilla.novell.com/show_bug.cgi?id=567340

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-01-14 12:39:02 +01:00
Alex Murray a76221d47e ALSA: hda - Improved MacBook (Pro) 5,1 / 5,2 support
This patch adds support for automatically muting the speakers when headphones
are inserted, as well as relabelling the headphone widgets from the
non-standard "HP" to the standard "Headphone" for the mb5 model.

Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 18:58:38 +01:00
Takashi Iwai 4dee8baa18 ALSA: hda - Fix Toshiba NB20x quirk entry
The alc664-mode4 model doesn't seem to fit with Toshiba NB205 correctly.
NB205 uses the pin 0x17 connected with the mixer 0x0f for the speaker
output, which isn't controlled by mode4 model at all.
Rather model=auto works fine as is on the latest driver, so let it back
again.

Tested-by: Nickolas Lloyd <ultrageek.lloyd@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 17:22:40 +01:00
Seth Heasley d2f2fcd254 ALSA: hda_intel: ALSA HD Audio patch for Intel Cougar Point DeviceIDs
This patch adds the Intel Cougar Point (PCH) HD Audio Controller DeviceIDs.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-13 08:34:34 +01:00
Takashi Iwai 9c0afc861a ALSA: hda - Fix ALC861-VD capture source mixer
The capture source or input source mixer element wasn't created properly
for ALC861-VD codec due to the wrong NID passed to
alc_auto_create_input_ctls().

References: Novell bnc#568305
	http://bugzilla.novell.com/show_bug.cgi?id=568305

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2010-01-12 14:02:13 +01:00
Daniel Drake c4cfe66c4c ALSA: hda - support OLPC XO-1.5 DC input
The XO's audio hardware is wired up to allow DC sensors (e.g. light
sensors, thermistors, etc) to be plugged in through the microphone jack.

Add sound mixer controls to allow this mode to be enabled and tweaked.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:14:07 +01:00
Daniel Drake 75f8991d0e ALSA: hda - Configure XO-1.5 microphones at capture time
The XO-1.5 has a microphone LED designed to indicate to the user when
something is being recorded.

This light is controlled by the microphone bias voltage and it is
currently coming on all the time.

This patch defers the microphone port configuration until when recording
is actually taking place, fixing the behaviour of the LED.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:11:34 +01:00
Jaroslav Kysela a4ad68d57e Merge branch 'topic/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into devel 2010-01-08 09:11:18 +01:00
Ken Prox cd9d95a555 ALSA: hda - conexant - Fixed microphone mixer for HP Compaq Presario F700
Added patch for Hewlett-Packard Company Device Subsystem id - 103c:30ea.

Signed-off-by: Ken Prox <kprox@users.sourceforge.net>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-08 09:07:50 +01:00
Daniel T Chen c97259df3f ALSA: hda: Refactor powerdown for Realtek HDA codecs
This patch converts the alc889 Aspire-specific powerdown to a generic
one. Like the previous effort, it currently only handles Front and PCM
but can be easily extended to cover other nids. The existing hook for
alc889 Aspire-specific remains enabled. Upon further testing, I've added
its use for ALC861_AUTO as well. Following patches will enable them for
other quirks.

Tested-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:15:47 +01:00
Daniel T Chen ea52bf260e ALSA: hda: Add powerdown for Analog Devices HDA codecs
This patch ports powerdown fixes to AD198x. Currently we only turn off
Front and HP for suspend, but this is easily extended for additional
nids.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-28 12:15:17 +01:00
Takashi Iwai 014c41fce1 ALSA: hda - Use strict_strtoul()
Rewrite the codes to use strict_strtoul() instead of simple_strtoul().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:53:24 +01:00
Takashi Iwai b82855a0d7 ALSA: hda - Add sanity check for storing the user-defined pin configs
Check whether the given NID is a pin widget before storing the
user-defined pin configs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:25 +01:00
Takashi Iwai a4e09aa3cf ALSA: hda - Fix click noises at suspend/free with Realtek codecs
Call snd_hda_shutup_pins() at suspend and free for avoiding click noises.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:24 +01:00
Takashi Iwai 92ee6162c4 ALSA: hda - Add snd_hda_shutup_pins() helper function
Add a common helper function for clearing pin controls before suspend.
Use the pincfg array instead of looking through all widget tree.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:39:14 +01:00
Takashi Iwai 54f7190b23 ALSA: hda - Fix Oops at reloading beep devices
The recent change for supporting dynamic beep device allocation caused
a problem resulting in Oops at reloading the driver.  Also, it ignores
the error from input device registration.

This patch fixes the wrong check in snd_hda_detach_beep_device(), and
returns an error when the input device registration fails properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 13:34:01 +01:00
Takashi Iwai 411fe85c76 ALSA: hda - Don't cache beep controls
The beep control verbs don't need to be cached for resume.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-27 10:44:02 +01:00
Takashi Iwai 043958e602 ALSA: hda - Add more hints for GPIO setup of IDT/STAC codecs
gpio_led, gpio_led_polarity and gpio_mute are added now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-26 10:36:12 +01:00
Takashi Iwai a252c81a69 ALSA: hda - use snd_hda_jack_detect() again in patch_sigmatel.c
Use snd_hda_jack_detect() again for jack-sensing.
The triggering problem can be worked around with codec->no_trigger_sense
flag now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:56:20 +01:00
Takashi Iwai 729d55ba97 ALSA: hda - Disable tigger at pin-sensing on AD codecs
Analog Device codecs seem to have problems with the triggering of
pin-sensing although their pincaps give the trigger requirements.
Some reported that constant CPU load on HP laptops with AD codecs.

For avoiding this regression, add a flag to codec struct to notify
explicitly that the codec doesn't suppot the trigger at pin-sensing.

Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 22:49:01 +01:00
Takashi Iwai 15e7f8b92a Merge branch 'fix/hda' into topic/hda 2009-12-25 14:17:48 +01:00
Wu Fengguang ef18beded8 ALSA: hda - HDMI sticky stream tag support
When we run the following commands in turn (with
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0),

	speaker-test -Dhw:0,3 -c2 -twav  # HDMI
	speaker-test -Dhw:0,0 -c2 -twav  # Analog

The second command will produce sound in the analog lineout _as well as_
HDMI sink. The root cause is, device 0 "reuses" the same stream tag that
was used by device 3, and the "intelhdmi - sticky stream id" patch leaves
the HDMI codec in a functional state. So the HDMI codec happily accepts
the audio samples which reuse its stream tag.

The proposed solution is to remember the last device each azx_dev was
assigned to, and prefer to
1) reuse the azx_dev (and hence the stream tag) the HDMI codec last used
2) or assign a never-used azx_dev for HDMI

With this patch and the above two speaker-test commands,
HDMI codec will use stream tag 8 and Analog codec will use 5.

The stream tag used by HDMI codec won't be reused by others, as long
as we don't run out of the 4 playback azx_dev's. The legacy Analog
codec will continue to use stream tag 5 because its device id is 0
(this is a bit tricky).

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25 14:17:36 +01:00
Takashi Iwai 54a26089a2 Merge branch 'fix/hda' into for-linus 2009-12-23 18:50:17 +01:00
Anisse Astier 95e70e8753 ALSA: hda - Add STAC9205 PCI_QUIRK for Dell Vostro 1700
Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 18:49:22 +01:00
Takashi Iwai f62faedbed ALSA: hda - Set mixer name after codec patch
Postpone the mixer name setup after the codec patch since the codec
patch may change the codec name string in itself.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 09:27:51 +01:00
Takashi Iwai 21949f00a0 ALSA: hda - Fix NID association for capture mixers
Fix the wrong implementation of NID <-> kctl mapping for capture mixers
introduced by the ocmmit 5b0cb1d850.
So far, the driver returns an error at probe.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-23 08:38:28 +01:00
Takashi Iwai 524027916e Merge branch 'fix/hda' into topic/hda 2009-12-23 08:38:23 +01:00
Takashi Iwai 75d1aeb9d6 ALSA: hda - Add Bass Speaker switch for HP dv7
The bass speaker is controlled via GPIO5.

Tested-by: Wael Nasreddine <mla@nasreddine.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 11:56:32 +01:00
Takashi Iwai 9dc8398bab ALSA: hda - Add MSI blacklist
A machine with AMD CPU with Nvidia board doesn't work with MSI.

Reported-by: Robert J. King <peritus@gurunetwork.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 08:15:01 +01:00
Rafael Avila de Espindola 1a5ba2e9fc ALSA: hda - Add support for the new 27 inch IMacs
With the attached patch I am able to use the sound on a new IMac 27.
What works:

*) Internal speakers
*) Internal microphone
*) Headphone

I don't have an external mic or a SPDIF device to test the rest.

Signed-off-by: Rafael Avila de Espindola <rafael.espindola@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 08:01:07 +01:00
Takashi Iwai d8d881dd2c ALSA: hda - Fix NULL dereference with enable_beep=0 option
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-22 07:52:49 +01:00
Takashi Iwai 1f26cb92a2 Merge branch 'fix/misc' into for-linus 2009-12-21 12:05:40 +01:00
Takashi Iwai a6c56f611a Merge branch 'fix/hda' into for-linus 2009-12-21 12:05:31 +01:00
Takashi Iwai de8853bc38 Merge remote branch 'alsa/fixes' into fix/hda 2009-12-21 11:21:15 +01:00
Hector Martin f5de24b06a ALSA: HDA: add powersaving hook for Realtek
The current Realtek code makes no specific provision for turning stuff
off. The codec chip is placed into low-power mode generically, but this
doesn't turn off any external hardware connected to it, in particular
external amplifiers.

This patch creates a hook function that is called by the codec
suspend/resume functions. It ought to disable any external hardware in a
device-specific way. I've implemented a generic ALC889 function that
sets the EAPD pin properly, and used it for the Acer Aspire 8930G which
can benefit from this feature.

On my laptop, this results in ~0.5W extra savings.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:20:29 +01:00
Hector Martin 556eea9a92 ALSA: HDA: remove useless mixers on Aspire 8930G
This patch removes some extra mixers that do nothing on the Acer Aspire
8930G.

The CD mixer is useless because the SATA DVD/Blu-Ray drive has no analog
audio output, and the Side mixer is useless because we max out at 6ch
anyway.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:18:31 +01:00
Hector Martin 0f86a228f4 ALSA: HDA: simplify Aspire 8930G verb array
This patch just simplifies the 8930G verb array a bit. Just use the
common ALC889 EAPD verb array to make things more consistent. The file
is already huge enough already.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:17:23 +01:00
Daniel T Chen e2595322a3 ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410
BugLink: https://bugs.launchpad.net/bugs/479373

The OR has verified with hda-verb that the internal microphone needs
VREF50 set for audible capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-21 11:16:19 +01:00
Jaroslav Kysela 440b004cf9 ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-20 12:04:08 +01:00
Jaroslav Kysela 77623f62a9 Merge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into fixes 2009-12-20 12:00:30 +01:00
Julia Lawall ef86f581f7 ALSA: Use kzalloc for allocating only one thing
Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-19 09:40:26 +01:00
Takashi Iwai 0c2fd1bf4c ALSA: hda - Check class to identify Nvidia controller chips
Instead of listing all individual PCI IDs, check the matching with
the PCI class together with the vendor id for Nvidia.
This simplifies the pci id entries.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-18 16:41:39 +01:00
Takashi Iwai 2fef62c825 ALSA: hda - Fix quirk for Maxdata obook4-1
Works fine with the auto-parser.

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

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-18 08:51:30 +01:00
Takashi Iwai d1409ae4ce ALSA: hda - Fix NULL dereference in kctl-NID mapping in patch_realtek.c
capsrc_nids can be NULL, and adc_nids should be taken as fallback.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 15:01:31 +01:00
Takashi Iwai 035eb0cff0 ALSA: hda - Fix missing capsrc_nids for ALC88x
Some model quirks missed the corresponding capsrc_nids.  This resulted in
non-working capture source selection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: <stable@kernel.org>
2009-12-17 15:00:26 +01:00
Einar Rünkaru c0f8faf0c7 ALSA: hda - Make use of beep device found in Dell Vostro 1015n
Conexant CX20583-10Z has digital beep device with volume control.
Making use of them.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 12:31:29 +01:00
Einar Rünkaru 254bba6a7e ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015
Fixed initialization of internal mic and added internal mic boost control
Renamed analog mic boost control to ext mic boost contol.
Name pair analog/digital seems too confusing for a normal user.

Signed-off-by: Einar Rünkaru <einarry@smail.ee>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 12:30:03 +01:00
Takashi Iwai 9e671deb85 Merge branch 'fix/hda' into topic/hda 2009-12-17 12:27:39 +01:00
Kailang Yang ebb83eeb64 ALSA: hda - More ALC663 fixes and support of compatible chips
1. Add more ASUS NB model.
2. Fixed alc663_m51va_setup
   M51VA has Digital Mic that NID is 0x12. The record source index is
   0x9 for ALC663.
   So, to modify the alc663_m51va_setup function to index 0x9
   and add analog Mic aupport function alc663_mode1_setup.
3. Add ASUS mode7 and mode8 modules for ALC663

Signed-off-by: Kailang Yang <kailang@realtek.com.tw>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-17 12:23:00 +01:00
Linus Torvalds a8aa1ebdf8 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: ac97_codec - increase timeout for analog sections to 5 second
  ASoC: Correct code taking the size of a pointer
  ALSA: hda - Add PCI IDs for Nvidia G2xx-series
  ALSA: sound/isa/gus: Correct code taking the size of a pointer
  ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
  ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
2009-12-15 09:11:05 -08:00
André Goddard Rosa e7d2860b69 tree-wide: convert open calls to remove spaces to skip_spaces() lib function
Makes use of skip_spaces() defined in lib/string.c for removing leading
spaces from strings all over the tree.

It decreases lib.a code size by 47 bytes and reuses the function tree-wide:
   text    data     bss     dec     hex filename
  64688     584     592   65864   10148 (TOTALS-BEFORE)
  64641     584     592   65817   10119 (TOTALS-AFTER)

Also, while at it, if we see (*str && isspace(*str)), we can be sure to
remove the first condition (*str) as the second one (isspace(*str)) also
evaluates to 0 whenever *str == 0, making it redundant. In other words,
"a char equals zero is never a space".

Julia Lawall tried the semantic patch (http://coccinelle.lip6.fr) below,
and found occurrences of this pattern on 3 more files:
    drivers/leds/led-class.c
    drivers/leds/ledtrig-timer.c
    drivers/video/output.c

@@
expression str;
@@

( // ignore skip_spaces cases
while (*str &&  isspace(*str)) { \(str++;\|++str;\) }
|
- *str &&
isspace(*str)
)

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: David Howells <dhowells@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:32 -08:00
Takashi Iwai 7093505065 Merge remote branch 'alsa/devel' into topic/hda 2009-12-15 10:45:10 +01:00
Takashi Iwai a9e060571a Merge branch 'fix/hda' into for-linus 2009-12-15 10:33:51 +01:00
Jaroslav Kysela 5e26dfd061 ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAG
The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move
get_amp_nid_() call to the snd_hda_ctl_add() function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:32 +01:00
Jaroslav Kysela 9e3fd8719f ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)
The purpose of this changeset is to show information about amplifier
setting in the codec proc file. Something like:

  Control: name="Front Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Front Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=2, ofs=0

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:17 +01:00
Jaroslav Kysela 5b0cb1d850 ALSA: hda - add more NID->Control mapping
This set of changes add missing NID values to some static control
elemenents. Also, it handles all "Capture Source" or "Input Source"
controls.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2009-12-15 09:33:04 +01:00
Stefan Ringel 6dd7dc767e ALSA: hda - Add PCI IDs for Nvidia G2xx-series
Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-14 11:27:11 +01:00
Daniel T Chen 01f5966d2f ALSA: hda: Fix max PCM level to 0 dB for AD1981_HP
BugLink: https://bugs.launchpad.net/bugs/461062

The original reporter states that PCM maxes at +12 dB and results in
very bad distortion.  Cap PCM at 0 dB to resolve this symptom.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-14 11:08:39 +01:00
Daniel T Chen 950200e2ff ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
BugLink: https://bugs.launchpad.net/bugs/418627

The original reporter states that this quirk is necessary to obtain
reasonable gain for playback.  Without it, sound is inaudible.  Tested
with playback (spkr and hp) and capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-14 11:08:22 +01:00
Linus Torvalds 6eb7365db6 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: hda - Overwrite pin config on intel DG45ID board.
  intelhdmi - dont power off HDA link
  ALSA: hrtimer - Fix lock-up
  ALSA: intelhdmi - add channel mapping for typical configurations
  ALSA: intelhdmi - channel mapping applies to Pin
  ALSA: intelhdmi - accept DisplayPort pin
  ALSA: hda - show HBR(High Bit Rate) pin cap in procfs
  ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
  ASoC: Fix build of OMAP sound drivers
  ALSA: opti93x: fix irq releasing if the irq cannot be allocated
2009-12-12 11:40:50 -08:00
Alexey Fisher 52dc438606 ALSA: hda - Overwrite pin config on intel DG45ID board.
The pin config provided by BIOS have some problems:
0x0221401f: [Jack] HP Out at Ext Front  <-- other association and sequence
0x02a19020: [Jack] Mic at Ext Front     <-- other association
0x01113014: [Jack] Speaker at Ext Rear  <-- line out (not speaker)
0x01114010: [Jack] Speaker at Ext Rear  <-- line out
0x01a19030: [Jack] Mic at Ext Rear      <-- other association
0x01111012: [Jack] Speaker at Ext Rear  <-- line out
0x01116011: [Jack] Speaker at Ext Rear  <-- line out
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x40f000f0: [N/A] Other at Ext N/A
0x01451140: [Jack] SPDIF Out at Ext Rear
0x40f000f0: [N/A] Other at Ext N/A

just overwrite it.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-12 10:41:50 +01:00
Wu Fengguang 0287d97065 intelhdmi - dont power off HDA link
For codecs without EPSS support (G45/IbexPeak), the hotplug event will
be lost if the HDA is powered off during the time. After that the pin
presence detection verb returns inaccurate info.

So always power-on HDA link for !EPSS codecs.

KarL offers the fact and Takashi recommends to flag hda_bus. Thanks!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 14:06:18 +01:00
Wu Fengguang b14224bb74 ALSA: intelhdmi - add channel mapping for typical configurations
IbexPeak is the first Intel HDMI audio codec to support channel mapping.

Currently the outstanding problem is, the HDMI channel order do not
agree with that of ALSA.  This patch presents workaround for some
typical use cases. It gives priority to the typical ALSA surround
configurations, and defines channel mapping for them.

We may need better kernel+userspace interactive channel mapping scheme.
For example, in current scheme if user plays with the surround50 device,
the kernel is unaware of this and will still select the surround41
channel allocation and channel mapping..

Thanks to Marcin for offering good tips!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:56:18 +01:00
Wu Fengguang 1ffc69a6e8 ALSA: intelhdmi - channel mapping applies to Pin
HDA036-A specifies that the Audio Sample Packet (ASP) Channel Mapping
verbs apply to Digital Display Pin Complex instead of Converter.

With this fix, channel mapping is working as expected for IbexPeak.

Thanks to Marcin for pointing this out!

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:56:10 +01:00
Wu Fengguang 728765b30a ALSA: intelhdmi - accept DisplayPort pin
HDA036 spec states:
  DP (Display Port) indicates whether the Pin Complex Widget supports
  connection to a Display Port sink.  Supported if set to 1. Note that
  it is possible for the pin widget to support more than one digital
  display connection type, e.g. HDMI and DP bit are both set to 1.

Also export the DP pin cap in procfs.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:56:04 +01:00
Wu Fengguang b923528ed2 ALSA: hda - show HBR(High Bit Rate) pin cap in procfs
Note that the HBR capability only applies to HDMI pin.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:55:55 +01:00
Vitaliy Kulikov c357aab02e ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
This patch fixes an error in processing of the HP BIOS configuration to enable
GPIO based mute LED indicator control. That error causes driver to enable
such control on all HP systems with the 92HD75 IDT codecs and results in
unnecessary toggling of the GPIO on mute control manipulation.

It also adds support of the future HP BIOS configuration extension for the
named control. New configuration string has a format HP_Mute_LED_P_G
where P can be 0 or 1 and defines mute LED GPIO control state (low/high)
that corresponds to the NOT muted state of the master volume
and G is the index of the GPIO to use (0..9)

Lastly, it adds more systems to the support of the audio implementation
as found on HP B-series systems

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11 07:51:54 +01:00
Linus Torvalds 78f1ae193d 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: ice1724 - aureon - modify WM8770 Master & DAC volume
  ALSA: hda/realtek: quirk for D945GCLF2 mainboard
  ALSA: hda - Terradici HDA controllers does not support 64-bit mode
  ALSA: document: Add direct git link to grub hda-analyzer
  ALSA: radio/sound/miro: fix build, cleanup depends/selects
  ALSA: hda - Generalize EAPD inversion check in patch_analog.c
  ASoC: Wrong variable returned on error
  ALSA: snd-usb-us122l: add product IDs of US-122MKII and US-144MKII
  ALSA: hda - Exclude unusable ADCs for ALC88x
  ALSA: hda - Add missing Line-Out and PCM switches as slave
  ALSA: hda - iMac 9,1 sound patch.
  ALSA: opti93x: set MC indirect registers base from PnP data
2009-12-09 19:52:13 -08:00
Linus Torvalds 4ef58d4e2a 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: (42 commits)
  tree-wide: fix misspelling of "definition" in comments
  reiserfs: fix misspelling of "journaled"
  doc: Fix a typo in slub.txt.
  inotify: remove superfluous return code check
  hdlc: spelling fix in find_pvc() comment
  doc: fix regulator docs cut-and-pasteism
  mtd: Fix comment in Kconfig
  doc: Fix IRQ chip docs
  tree-wide: fix assorted typos all over the place
  drivers/ata/libata-sff.c: comment spelling fixes
  fix typos/grammos in Documentation/edac.txt
  sysctl: add missing comments
  fs/debugfs/inode.c: fix comment typos
  sgivwfb: Make use of ARRAY_SIZE.
  sky2: fix sky2_link_down copy/paste comment error
  tree-wide: fix typos "couter" -> "counter"
  tree-wide: fix typos "offest" -> "offset"
  fix kerneldoc for set_irq_msi()
  spidev: fix double "of of" in comment
  comment typo fix: sybsystem -> subsystem
  ...
2009-12-09 19:43:33 -08:00
David Santinoli 7aee674665 ALSA: hda/realtek: quirk for D945GCLF2 mainboard
Quirk for the ALC662 found on the Intel D945GCLF2 (and possibly other)
mainboards.

Signed-off-by: David Santinoli <david@santinoli.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09 12:34:26 +01:00
Jaroslav Kysela 396087eaea ALSA: hda - Terradici HDA controllers does not support 64-bit mode
Confirmed from vendor and tests in RedHat bugzilla #536782 .

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-09 12:29:25 +01:00
Takashi Iwai ee6e365e30 ALSA: hda - Generalize EAPD inversion check in patch_analog.c
Add a flag to spec field so that the EAPD inversion can be checked
outside the relevant control callbacks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 17:23:33 +01:00
Takashi Iwai d11f74c62f ALSA: hda - Exclude unusable ADCs for ALC88x
On Realtek codecs, a digital mic pin is connected often only to a single
ADC.  But the parser tries to set up all ADCs no matter whether the
digital mic is available, and results in non-selectable input source.

This patch adds a check of input-source availability of each ADC, and
excludes ones that don't support all input sources.

Reference: Novell bnc#561235
	http://bugzilla.novell.com/show_bug.cgi?id=561235

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 12:52:47 +01:00
Takashi Iwai 23033b2bce ALSA: hda - Add missing Line-Out and PCM switches as slave
Realtek codecs may have "PCM" and "Line-Out" playback switches, and
they can be slaves for vmaster.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-08 12:36:52 +01:00